From 9c2cafe87f8d8492bf89346a8e6ecf6ab9c8047e Mon Sep 17 00:00:00 2001 From: Rohan Date: Fri, 19 Apr 2024 02:07:12 +0530 Subject: [PATCH 1/2] [stonecrop] use new v-model API (#114) * feat: use new v-model API * fix: add changelogs --------- Co-authored-by: Rohan Bansal --- aform/dist/aform.js | 666 ++++++++------- aform/dist/aform.js.map | 2 +- aform/dist/aform.umd.cjs | 2 +- aform/dist/aform.umd.cjs.map | 2 +- aform/dist/style.css | 2 +- aform/package.json | 10 +- aform/src/components/AForm.vue | 1 - aform/src/components/form/ACheckbox.vue | 18 +- aform/src/components/form/ANumericInput.vue | 16 +- aform/tests/checkbox.spec.ts | 2 +- atable/package.json | 10 +- beam/package-lock.json | 4 +- beam/package.json | 4 +- beam/src/ItemCheck.vue | 1 + code_editor/package.json | 10 +- .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + .../feat-new-v-model_2024-04-18-10-07.json | 10 + common/config/rush/pnpm-lock.yaml | 766 +++++------------- desktop/dist/desktop.js | 2 +- desktop/dist/desktop.js.map | 2 +- desktop/dist/desktop.umd.cjs | 24 +- desktop/dist/desktop.umd.cjs.map | 2 +- desktop/package.json | 6 +- examples/package.json | 6 +- graphql_client/package.json | 6 +- node_editor/dist/node-editor.js.map | 2 +- node_editor/dist/node-editor.umd.cjs.map | 2 +- node_editor/package.json | 10 +- stonecrop/package.json | 6 +- themes/package.json | 6 +- utilities/dist/utilities.js.map | 2 +- utilities/dist/utilities.umd.cjs.map | 2 +- utilities/package.json | 10 +- 40 files changed, 718 insertions(+), 976 deletions(-) create mode 100644 common/changes/@stonecrop/aform/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/atable/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/code-editor/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/desktop/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/graphql-client/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/node-editor/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/stonecrop/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/themes/feat-new-v-model_2024-04-18-10-07.json create mode 100644 common/changes/@stonecrop/utilities/feat-new-v-model_2024-04-18-10-07.json diff --git a/aform/dist/aform.js b/aform/dist/aform.js index 26f0ae90..f15f3d8c 100644 --- a/aform/dist/aform.js +++ b/aform/dist/aform.js @@ -1,71 +1,66 @@ -import { defineComponent as D, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as C, vModelCheckbox as ge, toDisplayString as k, vShow as $, resolveComponent as ye, createBlock as H, withCtx as be, onMounted as se, onBeforeUnmount as we, ref as y, watch as F, unref as O, getCurrentScope as Ce, onScopeDispose as ke, inject as ae, nextTick as De, Fragment as V, renderList as x, normalizeStyle as Ee, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ie, mergeProps as Me, createTextVNode as Te, renderSlot as _e, createVNode as Se, resolveDirective as Oe } from "vue"; -const $e = { id: "checkbox-container" }, Le = ["id", "readonly", "required"], Ve = { id: "custom-checkbox" }, xe = ["for"], Be = ["innerHTML"], Pe = /* @__PURE__ */ D({ +import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from "vue"; +const Ve = { id: "checkbox-container" }, xe = ["id", "readonly", "required"], Be = { id: "custom-checkbox" }, Pe = ["for"], qe = ["innerHTML"], He = /* @__PURE__ */ D({ __name: "ACheckbox", - props: { + props: /* @__PURE__ */ se({ label: {}, - value: {}, required: { type: Boolean }, readOnly: { type: Boolean }, uuid: {}, validation: { default: () => ({ errorMessage: " " }) } - }, - emits: ["update:value"], - setup(e, { emit: t }) { - const o = e, n = t, s = S({ - get() { - return o.value; - }, - set(l) { - n("update:value", l); - } - }); - return (l, a) => (f(), v("div", null, [ - i("label", $e, [ + }, { + modelValue: {}, + modelModifiers: {} + }), + emits: ["update:modelValue"], + setup(e) { + const t = ae(e, "modelValue"); + return (n, o) => (f(), h("div", null, [ + i("label", Ve, [ C(i("input", { - "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r), + "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l), type: "checkbox", - id: l.uuid, + id: n.uuid, class: "checkbox", - readonly: l.readOnly, - required: l.required - }, null, 8, Le), [ - [ge, s.value] + readonly: n.readOnly, + required: n.required + }, null, 8, xe), [ + [be, t.value] ]), - i("span", Ve, k(s.value), 1) + i("span", Be, k(t.value), 1) ]), i("label", { - for: l.uuid, + for: n.uuid, id: "checkbox-label" - }, k(l.label), 9, xe), + }, k(n.label), 9, Pe), C(i("p", { - innerHTML: l.validation.errorMessage - }, null, 8, Be), [ - [$, l.validation.errorMessage] + innerHTML: n.validation.errorMessage + }, null, 8, qe), [ + [O, n.validation.errorMessage] ]) ])); } }), M = (e, t) => { - const o = e.__vccOpts || e; - for (const [n, s] of t) - o[n] = s; - return o; -}, qe = /* @__PURE__ */ M(Pe, [["__scopeId", "data-v-743cd4db"]]), He = /* @__PURE__ */ i("div", null, [ + const n = e.__vccOpts || e; + for (const [o, l] of t) + n[o] = l; + return n; +}, Fe = /* @__PURE__ */ M(He, [["__scopeId", "data-v-5093f1cb"]]), Re = /* @__PURE__ */ i("div", null, [ /* @__PURE__ */ i("input", { type: "text" }), /* @__PURE__ */ i("input", { type: "text" }), /* @__PURE__ */ i("input", { type: "text" }) -], -1), Fe = /* @__PURE__ */ D({ +], -1), Ue = /* @__PURE__ */ D({ __name: "AComboBox", props: ["event", "cellData", "tableID"], setup(e) { - return (t, o) => { - const n = ye("ATableModal"); - return f(), H(n, { + return (t, n) => { + const o = we("ATableModal"); + return f(), H(o, { event: e.event, cellData: e.cellData, class: "amodal" }, { - default: be(() => [ - He + default: Ce(() => [ + Re ]), _: 1 }, 8, ["event", "cellData"]); @@ -73,70 +68,70 @@ const $e = { id: "checkbox-container" }, Le = ["id", "readonly", "required"], Ve } }); var W; -const ie = typeof window < "u", Re = (e) => typeof e == "string", Ue = () => { +const de = typeof window < "u", Qe = (e) => typeof e == "string", Ye = () => { }; -ie && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function ue(e) { - return typeof e == "function" ? e() : O(e); +de && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); +function ce(e) { + return typeof e == "function" ? e() : S(e); } -function Qe(e) { +function je(e) { return e; } -function Ye(e) { - return Ce() ? (ke(e), !0) : !1; +function We(e) { + return De() ? (Ee(e), !0) : !1; } function q(e) { var t; - const o = ue(e); - return (t = o == null ? void 0 : o.$el) != null ? t : o; + const n = ce(e); + return (t = n == null ? void 0 : n.$el) != null ? t : n; } -const ce = ie ? window : void 0; -function je(...e) { - let t, o, n, s; - if (Re(e[0]) || Array.isArray(e[0]) ? ([o, n, s] = e, t = ce) : [t, o, n, s] = e, !t) - return Ue; - Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]); - const l = [], a = () => { - l.forEach((c) => c()), l.length = 0; - }, r = (c, g, b, m) => (c.addEventListener(g, b, m), () => c.removeEventListener(g, b, m)), p = F(() => [q(t), ue(s)], ([c, g]) => { - a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, g)))); +const pe = de ? window : void 0; +function Ne(...e) { + let t, n, o, l; + if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t) + return Ye; + Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]); + const s = [], a = () => { + s.forEach((d) => d()), s.length = 0; + }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => { + a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g)))); }, { immediate: !0, flush: "post" }), u = () => { p(), a(); }; - return Ye(u), u; + return We(u), u; } const N = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, z = "__vueuse_ssr_handlers__"; N[z] = N[z] || {}; -function We(e, { window: t = ce, scrollTarget: o } = {}) { - const n = y(!1), s = () => { +function ze(e, { window: t = pe, scrollTarget: n } = {}) { + const o = y(!1), l = () => { if (!t) return; - const l = t.document, a = q(e); + const s = t.document, a = q(e); if (!a) - n.value = !1; + o.value = !1; else { const r = a.getBoundingClientRect(); - n.value = r.top <= (t.innerHeight || l.documentElement.clientHeight) && r.left <= (t.innerWidth || l.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0; + o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0; } }; - return F(() => q(e), () => s(), { immediate: !0, flush: "post" }), t && je(o || t, "scroll", s, { + return F(() => q(e), () => l(), { immediate: !0, flush: "post" }), t && Ne(n || t, "scroll", l, { capture: !1, passive: !0 - }), n; + }), o; } var G; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(G || (G = {})); -var Ne = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, Ke = (e, t) => { - for (var o in t || (t = {})) - ze.call(t, o) && J(e, o, t[o]); +var Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => { + for (var n in t || (t = {})) + Ke.call(t, n) && J(e, n, t[n]); if (K) - for (var o of K(t)) - Ge.call(t, o) && J(e, o, t[o]); + for (var n of K(t)) + Je.call(t, n) && J(e, n, t[n]); return e; }; -const Je = { +const Ze = { easeInSine: [0.12, 0, 0.39, 0], easeOutSine: [0.61, 1, 0.88, 1], easeInOutSine: [0.37, 0, 0.63, 1], @@ -162,120 +157,120 @@ const Je = { easeOutBack: [0.34, 1.56, 0.64, 1], easeInOutBack: [0.68, -0.6, 0.32, 1.6] }; -Ke({ - linear: Qe -}, Je); +Xe({ + linear: je +}, Ze); const E = (e) => { - let t = We(e).value; + let t = ze(e).value; return t = t && e.offsetHeight > 0, t; }, A = (e) => e.tabIndex >= 0, X = (e) => { const t = e.target; return U(t); }, U = (e) => { var t; - let o; + let n; if (e instanceof HTMLTableCellElement) { - const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; - if (n) { - const s = Array.from(n.children)[e.cellIndex]; - s && (o = s); + const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; + if (o) { + const l = Array.from(o.children)[e.cellIndex]; + l && (n = l); } } else if (e instanceof HTMLTableRowElement) { - const n = e.previousElementSibling; - n && (o = n); + const o = e.previousElementSibling; + o && (n = o); } - return o && (!A(o) || !E(o)) ? U(o) : o; -}, Xe = (e) => { + return n && (!A(n) || !E(n)) ? U(n) : n; +}, et = (e) => { var t; - const o = e.target; - let n; - if (o instanceof HTMLTableCellElement) { - const s = (t = o.parentElement) == null ? void 0 : t.parentElement; - if (s) { - const l = s.firstElementChild.children[o.cellIndex]; - l && (n = l); + const n = e.target; + let o; + if (n instanceof HTMLTableCellElement) { + const l = (t = n.parentElement) == null ? void 0 : t.parentElement; + if (l) { + const s = l.firstElementChild.children[n.cellIndex]; + s && (o = s); } - } else if (o instanceof HTMLTableRowElement) { - const s = o.parentElement; - if (s) { - const l = s.firstElementChild; - l && (n = l); + } else if (n instanceof HTMLTableRowElement) { + const l = n.parentElement; + if (l) { + const s = l.firstElementChild; + s && (o = s); } } - return n && (!A(n) || !E(n)) ? Q(n) : n; + return o && (!A(o) || !E(o)) ? Q(o) : o; }, Z = (e) => { const t = e.target; return Q(t); }, Q = (e) => { var t; - let o; + let n; if (e instanceof HTMLTableCellElement) { - const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; - if (n) { - const s = Array.from(n.children)[e.cellIndex]; - s && (o = s); + const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; + if (o) { + const l = Array.from(o.children)[e.cellIndex]; + l && (n = l); } } else if (e instanceof HTMLTableRowElement) { - const n = e.nextElementSibling; - n && (o = n); + const o = e.nextElementSibling; + o && (n = o); } - return o && (!A(o) || !E(o)) ? Q(o) : o; -}, Ze = (e) => { + return n && (!A(n) || !E(n)) ? Q(n) : n; +}, tt = (e) => { var t; - const o = e.target; - let n; - if (o instanceof HTMLTableCellElement) { - const s = (t = o.parentElement) == null ? void 0 : t.parentElement; - if (s) { - const l = s.lastElementChild.children[o.cellIndex]; - l && (n = l); + const n = e.target; + let o; + if (n instanceof HTMLTableCellElement) { + const l = (t = n.parentElement) == null ? void 0 : t.parentElement; + if (l) { + const s = l.lastElementChild.children[n.cellIndex]; + s && (o = s); } - } else if (o instanceof HTMLTableRowElement) { - const s = o.parentElement; - if (s) { - const l = s.lastElementChild; - l && (n = l); + } else if (n instanceof HTMLTableRowElement) { + const l = n.parentElement; + if (l) { + const s = l.lastElementChild; + s && (o = s); } } - return n && (!A(n) || !E(n)) ? U(n) : n; + return o && (!A(o) || !E(o)) ? U(o) : o; }, ee = (e) => { const t = e.target; return Y(t); }, Y = (e) => { var t; - let o; + let n; if (e.previousElementSibling) - o = e.previousElementSibling; + n = e.previousElementSibling; else { - const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; - o = n == null ? void 0 : n.lastElementChild; + const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; + n = o == null ? void 0 : o.lastElementChild; } - return o && (!A(o) || !E(o)) ? Y(o) : o; + return n && (!A(n) || !E(n)) ? Y(n) : n; }, te = (e) => { const t = e.target; return j(t); }, j = (e) => { var t; - let o; + let n; if (e.nextElementSibling) - o = e.nextElementSibling; + n = e.nextElementSibling; else { - const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; - o = n == null ? void 0 : n.firstElementChild; + const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; + n = o == null ? void 0 : o.firstElementChild; } - return o && (!A(o) || !E(o)) ? j(o) : o; + return n && (!A(n) || !E(n)) ? j(n) : n; }, ne = (e) => { const t = e.target.parentElement.firstElementChild; return t && (!A(t) || !E(t)) ? j(t) : t; }, oe = (e) => { const t = e.target.parentElement.lastElementChild; return t && (!A(t) || !E(t)) ? Y(t) : t; -}, L = ["alt", "control", "shift", "meta"], et = { +}, $ = ["alt", "control", "shift", "meta"], nt = { ArrowUp: "up", ArrowDown: "down", ArrowLeft: "left", ArrowRight: "right" -}, de = { +}, fe = { "keydown.up": (e) => { const t = X(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); @@ -293,11 +288,11 @@ const E = (e) => { e.preventDefault(), e.stopPropagation(), t && t.focus(); }, "keydown.control.up": (e) => { - const t = Xe(e); + const t = et(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.control.down": (e) => { - const t = Ze(e); + const t = tt(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.control.left": (e) => { @@ -339,64 +334,64 @@ const E = (e) => { t && (e.preventDefault(), e.stopPropagation(), t.focus()); } }; -function tt(e) { - const t = (n) => { - let s = null; - n.parent && (typeof n.parent == "string" ? s = document.querySelector(n.parent) : n.parent instanceof Element ? s = n.parent : s = n.parent.value); - let l = []; - if (n.selectors) - if (typeof n.selectors == "string") - l = s ? Array.from(s.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors)); - else if (n.selectors instanceof Element) - l.push(n.selectors); - else if (Array.isArray(n.selectors.value)) - for (const a of n.selectors.value) - a instanceof Element ? l.push(a) : l.push(a.$el); +function ot(e) { + const t = (o) => { + let l = null; + o.parent && (typeof o.parent == "string" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value); + let s = []; + if (o.selectors) + if (typeof o.selectors == "string") + s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors)); + else if (o.selectors instanceof Element) + s.push(o.selectors); + else if (Array.isArray(o.selectors.value)) + for (const a of o.selectors.value) + a instanceof Element ? s.push(a) : s.push(a.$el); else - l.push(n.selectors.value); + s.push(o.selectors.value); else - l = Array.from(s.children).filter((a) => A(a) && E(a)); - return l; - }, o = (n) => (s) => { - const l = et[s.key] || s.key.toLowerCase(); - if (L.includes(l)) + s = Array.from(l.children).filter((a) => A(a) && E(a)); + return s; + }, n = (o) => (l) => { + const s = nt[l.key] || l.key.toLowerCase(); + if ($.includes(s)) return; - const a = n.handlers || de; + const a = o.handlers || fe; for (const r of Object.keys(a)) { const [p, ...u] = r.split("."); - if (p === "keydown" && u.includes(l)) { - const c = a[r], g = u.filter((m) => L.includes(m)), b = L.some((m) => { + if (p === "keydown" && u.includes(s)) { + const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => { const _ = m.charAt(0).toUpperCase() + m.slice(1); - return s.getModifierState(_); + return l.getModifierState(_); }); if (g.length > 0) { if (b) { - for (const m of L) + for (const m of $) if (u.includes(m)) { const _ = m.charAt(0).toUpperCase() + m.slice(1); - s.getModifierState(_) && c(s); + l.getModifierState(_) && d(l); } } } else - b || c(s); + b || d(l); } } }; - se(() => { - for (const n of e) { - const s = t(n); - for (const l of s) - l.addEventListener("keydown", o(n)); + re(() => { + for (const o of e) { + const l = t(o); + for (const s of l) + s.addEventListener("keydown", n(o)); } - }), we(() => { - for (const n of e) { - const s = t(n); - for (const l of s) - l.removeEventListener("keydown", o(n)); + }), ke(() => { + for (const o of e) { + const l = t(o); + for (const s of l) + s.removeEventListener("keydown", n(o)); } }); } -const nt = ["event", "colIndex", "rowIndex", "tableid"], ot = { colspan: "5" }, lt = ["onClick"], st = 6, I = 7, at = /* @__PURE__ */ D({ +const lt = ["event", "colIndex", "rowIndex", "tableid"], st = { colspan: "5" }, at = ["onClick"], rt = 6, I = 7, it = /* @__PURE__ */ D({ __name: "ADate", props: { colIndex: {}, @@ -407,62 +402,62 @@ const nt = ["event", "colIndex", "rowIndex", "tableid"], ot = { colspan: "5" }, readonly: { type: Boolean } }, setup(e) { - const t = e, o = ae(t.tableid), n = /* @__PURE__ */ new Date(), s = y(), l = y(), a = y(), r = y([]); - se(async () => { - let d = o.cellData(t.colIndex, t.rowIndex); - d ? (d instanceof Date || (d = new Date(d)), s.value = d, l.value = s.value.getMonth(), a.value = s.value.getFullYear()) : (l.value = n.getMonth(), a.value = n.getFullYear()), p(), await De(); + const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]); + re(async () => { + let c = n.cellData(t.colIndex, t.rowIndex); + c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae(); const T = document.getElementsByClassName("selecteddate"); if (T.length > 0) T[0].focus(); else { - const h = document.getElementsByClassName("todaysdate"); - h.length > 0 && h[0].focus(); + const v = document.getElementsByClassName("todaysdate"); + v.length > 0 && v[0].focus(); } - }), F([l, a], () => { + }), F([s, a], () => { p(); }); const p = () => { r.value = []; - const d = new Date(a.value, l.value, 1), T = d.getDay(), h = d.setDate(d.getDate() - T); + const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T); for (let w of Array(43).keys()) - r.value.push(h + w * 864e5); + r.value.push(v + w * 864e5); }, u = () => { a.value -= 1; - }, c = () => { + }, d = () => { a.value += 1; }, g = () => { - l.value == 0 ? (l.value = 11, u()) : l.value -= 1; + s.value == 0 ? (s.value = 11, u()) : s.value -= 1; }, b = () => { - l.value == 11 ? (l.value = 0, c()) : l.value += 1; - }, m = (d) => { - if (l.value === n.getMonth()) - return n.toDateString() === new Date(d).toDateString(); - }, _ = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, T) => { - s.value = new Date(r.value[T]), me(); - }, me = () => { - o.setCellData(t.rowIndex, t.colIndex, s.value.getTime()); - }, ve = S(() => new Date(a.value, l.value, 1).toLocaleDateString(void 0, { + s.value == 11 ? (s.value = 0, d()) : s.value += 1; + }, m = (c) => { + if (s.value === o.getMonth()) + return o.toDateString() === new Date(c).toDateString(); + }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => { + l.value = new Date(r.value[T]), ve(); + }, ve = () => { + n.setCellData(t.rowIndex, t.colIndex, l.value.getTime()); + }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, { year: "numeric", month: "long" })); - return tt([ + return ot([ { parent: "table.adate", selectors: "td", handlers: { - ...de, + ...fe, "keydown.pageup": g, "keydown.shift.pageup": u, "keydown.pagedown": b, - "keydown.shift.pagedown": c + "keydown.shift.pagedown": d } } - ]), (d, T) => d.readonly ? re("", !0) : (f(), v("div", { + ]), (c, T) => c.readonly ? ue("", !0) : (f(), h("div", { key: 0, - event: d.event, - colIndex: d.colIndex, - rowIndex: d.rowIndex, - tableid: d.tableid, + event: c.event, + colIndex: c.colIndex, + rowIndex: c.rowIndex, + tableid: c.tableid, class: "adate", tabindex: "0", ref: "adatepicker" @@ -473,33 +468,33 @@ const nt = ["event", "colIndex", "rowIndex", "tableid"], ot = { colspan: "5" }, onClick: g, tabindex: -1 }, "<"), - i("th", ot, k(ve.value), 1), + i("th", st, k(ge.value), 1), i("td", { onClick: b, tabindex: -1 }, ">") ]), - (f(), v(V, null, x(st, (h) => i("tr", { key: h }, [ - (f(), v(V, null, x(I, (w) => i("td", { - key: (h - 1) * I + w, + (f(), h(V, null, x(rt, (v) => i("tr", { key: v }, [ + (f(), h(V, null, x(I, (w) => i("td", { + key: (v - 1) * I + w, contenteditable: !1, spellcheck: !1, tabindex: 0, - style: Ee({ - border: _(r.value[(h - 1) * I + w]) ? "2px solid var(--focus-cell-outline)" : "none", - borderBottomColor: m(r.value[(h - 1) * I + w]) ? "var(--focus-cell-outline)" : "none" + style: Ie({ + border: _(r.value[(v - 1) * I + w]) ? "2px solid var(--focus-cell-outline)" : "none", + borderBottomColor: m(r.value[(v - 1) * I + w]) ? "var(--focus-cell-outline)" : "none" }), - onClick: Ae((he) => fe(he, (h - 1) * I + w), ["prevent", "stop"]), + onClick: Me((ye) => he(ye, (v - 1) * I + w), ["prevent", "stop"]), class: B({ - todaysdate: m(r.value[(h - 1) * I + w]), - selecteddate: _(r.value[(h - 1) * I + w]) + todaysdate: m(r.value[(v - 1) * I + w]), + selecteddate: _(r.value[(v - 1) * I + w]) }) - }, k(new Date(r.value[(h - 1) * I + w]).getDate()), 15, lt)), 64)) + }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64)) ])), 64)) ]) - ], 8, nt)); + ], 8, lt)); } -}), rt = /* @__PURE__ */ M(at, [["__scopeId", "data-v-169f1184"]]), it = D({ +}), ut = /* @__PURE__ */ M(it, [["__scopeId", "data-v-169f1184"]]), dt = D({ name: "ADropdown", props: { modelValue: { @@ -573,18 +568,18 @@ const nt = ["event", "colIndex", "rowIndex", "tableid"], ot = { colspan: "5" }, this.search = "", this.onChange(), this.$refs.mopInput.focus(); } } -}), ut = { class: "input-wrapper" }, ct = { +}), ct = { class: "input-wrapper" }, pt = { id: "autocomplete-results", class: "autocomplete-results" -}, dt = { +}, ft = { key: 0, class: "loading autocomplete-result" -}, pt = ["onClick"]; -function ft(e, t, o, n, s, l) { - return f(), v("div", { +}, mt = ["onClick"]; +function ht(e, t, n, o, l, s) { + return f(), h("div", { class: B(["autocomplete", { isOpen: e.isOpen }]) }, [ - i("div", ut, [ + i("div", ct, [ C(i("input", { ref: "mopInput", type: "text", @@ -599,30 +594,30 @@ function ft(e, t, o, n, s, l) { }, null, 544), [ [R, e.search] ]), - C(i("ul", ct, [ - e.isLoading ? (f(), v("li", dt, "Loading results...")) : (f(!0), v(V, { key: 1 }, x(e.results, (a, r) => (f(), v("li", { + C(i("ul", pt, [ + e.isLoading ? (f(), h("li", ft, "Loading results...")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h("li", { key: r, onClick: (p) => e.setResult(a), class: B(["autocomplete-result", { "is-active": r === e.arrowCounter }]) - }, k(a), 11, pt))), 128)) + }, k(a), 11, mt))), 128)) ], 512), [ - [$, e.isOpen] + [O, e.isOpen] ]), i("label", null, k(e.label), 1) ]) ], 2); } -const mt = /* @__PURE__ */ M(it, [["render", ft]]), vt = /* @__PURE__ */ D({ +const vt = /* @__PURE__ */ M(dt, [["render", ht]]), gt = /* @__PURE__ */ D({ __name: "CollapseButton", props: { collapsed: { type: Boolean } }, setup(e) { - return (t, o) => (f(), v("button", { + return (t, n) => (f(), h("button", { class: B(["collapse-button", t.collapsed ? "rotated" : "unrotated"]) }, "×", 2)); } -}), ht = /* @__PURE__ */ M(vt, [["__scopeId", "data-v-6f1c1b45"]]), gt = /* @__PURE__ */ D({ +}), yt = /* @__PURE__ */ M(gt, [["__scopeId", "data-v-6f1c1b45"]]), bt = /* @__PURE__ */ D({ __name: "AForm", props: { modelValue: {}, @@ -631,35 +626,35 @@ const mt = /* @__PURE__ */ M(it, [["render", ft]]), vt = /* @__PURE__ */ D({ }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const o = e, n = t, s = y(o.data || {}), l = (r) => { + const n = e, o = t, l = y(n.data || {}), s = (r) => { let p = {}; - for (const [u, c] of Object.entries(r)) - ["component", "fieldtype"].includes(u) || (p[u] = c), u === "rows" && c && c.length === 0 && (p.rows = s.value[r.fieldname]); + for (const [u, d] of Object.entries(r)) + ["component", "fieldtype"].includes(u) || (p[u] = d), u === "rows" && d && d.length === 0 && (p.rows = l.value[r.fieldname]); return p; - }, a = S({ - get: () => o.modelValue.map((r, p) => S({ + }, a = L({ + get: () => n.modelValue.map((r, p) => L({ get() { return r.value; }, set: (u) => { - o.modelValue[p].value = u, n("update:modelValue", o.modelValue); + n.modelValue[p].value = u, o("update:modelValue", n.modelValue); } })), set: () => { } }); - return (r, p) => (f(), v("form", null, [ - (f(!0), v(V, null, x(r.modelValue, (u, c) => (f(), H(Ie(u.component), Me({ - key: c, + return (r, p) => (f(), h("form", null, [ + (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({ + key: d, schema: u, - modelValue: a.value[c].value, - "onUpdate:modelValue": (g) => a.value[c].value = g, - data: s.value[u.fieldname], + modelValue: a.value[d].value, + "onUpdate:modelValue": (g) => a.value[d].value = g, + data: l.value[u.fieldname], readonly: r.readonly - }, l(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128)) + }, s(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128)) ])); } -}), pe = /* @__PURE__ */ M(gt, [["__scopeId", "data-v-82492bb4"]]), yt = /* @__PURE__ */ D({ +}), me = /* @__PURE__ */ M(bt, [["__scopeId", "data-v-74d66cf2"]]), wt = /* @__PURE__ */ D({ __name: "AFieldset", props: { schema: {}, @@ -668,71 +663,68 @@ const mt = /* @__PURE__ */ M(it, [["render", ft]]), vt = /* @__PURE__ */ D({ data: {} }, setup(e) { - const t = e, o = y(t.data || []); - let n = y(!1), s = y(t.collapsible); - const l = y(t.schema); + const t = e, n = y(t.data || []); + let o = y(!1), l = y(t.collapsible); + const s = y(t.schema); function a(r) { - r.preventDefault(), s.value && (n.value = !n.value); + r.preventDefault(), l.value && (o.value = !o.value); } - return (r, p) => (f(), v("fieldset", null, [ + return (r, p) => (f(), h("fieldset", null, [ i("legend", { onClick: a, onSubmit: a }, [ - Te(k(r.label) + " ", 1), - O(s) ? (f(), H(ht, { + Se(k(r.label) + " ", 1), + S(l) ? (f(), H(yt, { key: 0, - collapsed: O(n) - }, null, 8, ["collapsed"])) : re("", !0) + collapsed: S(o) + }, null, 8, ["collapsed"])) : ue("", !0) ], 32), - _e(r.$slots, "default", { collapsed: O(n) }, () => [ - C(Se(pe, { - modelValue: l.value, - "onUpdate:modelValue": p[0] || (p[0] = (u) => l.value = u), - data: o.value + Oe(r.$slots, "default", { collapsed: S(o) }, () => [ + C($e(me, { + modelValue: s.value, + "onUpdate:modelValue": p[0] || (p[0] = (u) => s.value = u), + data: n.value }, null, 8, ["modelValue", "data"]), [ - [$, !O(n)] + [O, !S(o)] ]) ], !0) ])); } -}), bt = /* @__PURE__ */ M(yt, [["__scopeId", "data-v-cad9b578"]]), wt = ["id", "disabled", "required"], Ct = ["for"], kt = ["innerHTML"], Dt = /* @__PURE__ */ D({ +}), Ct = /* @__PURE__ */ M(wt, [["__scopeId", "data-v-cad9b578"]]), kt = ["id", "disabled", "required"], Dt = ["for"], Et = ["innerHTML"], At = /* @__PURE__ */ D({ __name: "ANumericInput", - props: { + props: /* @__PURE__ */ se({ label: {}, - modelValue: {}, required: { type: Boolean }, readonly: { type: Boolean }, uuid: {}, validation: { default: () => ({ errorMessage: " " }) } - }, + }, { + modelValue: {}, + modelModifiers: {} + }), emits: ["update:modelValue"], - setup(e, { emit: t }) { - const o = e, n = t, s = S({ - get: () => o.modelValue, - set: (l) => { - n("update:modelValue", l); - } - }); - return (l, a) => (f(), v("div", null, [ + setup(e) { + const t = ae(e, "modelValue"); + return (n, o) => (f(), h("div", null, [ C(i("input", { - "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r), + "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l), type: "number", - id: l.uuid, - disabled: l.readonly, - required: l.required - }, null, 8, wt), [ - [R, s.value] + id: n.uuid, + disabled: n.readonly, + required: n.required + }, null, 8, kt), [ + [R, t.value] ]), - i("label", { for: l.uuid }, k(l.label), 9, Ct), + i("label", { for: n.uuid }, k(n.label), 9, Dt), C(i("p", { - innerHTML: l.validation.errorMessage - }, null, 8, kt), [ - [$, l.validation.errorMessage] + innerHTML: n.validation.errorMessage + }, null, 8, Et), [ + [O, n.validation.errorMessage] ]) ])); } -}), Et = /* @__PURE__ */ M(Dt, [["__scopeId", "data-v-be33e6c4"]]), le = { +}), It = /* @__PURE__ */ M(At, [["__scopeId", "data-v-02907cd6"]]), le = { date: "##/##/####", datetime: "####/##/## ##:##", time: "##:##", @@ -740,59 +732,59 @@ const mt = /* @__PURE__ */ M(it, [["render", ft]]), vt = /* @__PURE__ */ D({ phone: "(###) ### - ####", card: "#### #### #### ####" }; -function At(e) { +function Mt(e) { try { return Function(`"use strict";return (${e})`)(); } catch { } } -function It(e) { - var o; +function Tt(e) { + var n; let t = e.value; if (t) { - const n = At(t); - if (n) { - const s = e.instance.locale; - t = n(s); + const o = Mt(t); + if (o) { + const l = e.instance.locale; + t = o(l); } } else { - const s = (o = e.instance.schema.fieldtype) == null ? void 0 : o.toLowerCase(); - s && le[s] && (t = le[s]); + const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase(); + l && le[l] && (t = le[l]); } return t; } -function Mt(e, t) { +function _t(e, t) { t || (t = "#"); - let o = e; - const n = [t, "/", "-", "(", ")", " "]; - for (const s of n) - o = o.replaceAll(s, ""); - return o; + let n = e; + const o = [t, "/", "-", "(", ")", " "]; + for (const l of o) + n = n.replaceAll(l, ""); + return n; } -function Tt(e, t, o) { - o || (o = "#"); - let n = t; - for (const s of e) { - const l = n.indexOf(o); - if (l !== -1) { - const a = n.substring(0, l), r = n.substring(l + 1); - n = a + s + r; +function St(e, t, n) { + n || (n = "#"); + let o = t; + for (const l of e) { + const s = o.indexOf(n); + if (s !== -1) { + const a = o.substring(0, s), r = o.substring(s + 1); + o = a + l + r; } } - return n.slice(0, t.length); + return o.slice(0, t.length); } -function _t(e, t) { - const o = It(t); - if (!o) +function Ot(e, t) { + const n = Tt(t); + if (!n) return; - const n = "#", s = e.value, l = Mt(s, n); - if (l) { - const a = Tt(l, o, n); - t.instance.maskFilled && (t.instance.maskFilled = !a.includes(n)), e.value = a; + const o = "#", l = e.value, s = _t(l, o); + if (s) { + const a = St(s, n, o); + t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a; } else - e.value = o; + e.value = n; } -const St = D({ +const $t = D({ name: "ATextInput", props: { schema: { @@ -824,54 +816,54 @@ const St = D({ } }, setup(e, t) { - const o = y(!1), n = ae("locale", ""); - return { inputText: S({ + const n = y(!1), o = ie("locale", ""); + return { inputText: L({ get() { return e.modelValue; }, - set(l) { - t.emit("update:modelValue", l); + set(s) { + t.emit("update:modelValue", s); } - }), locale: n, maskFilled: o }; + }), locale: o, maskFilled: n }; }, directives: { - mask: _t + mask: Ot } -}), Ot = ["id", "disabled", "maxlength", "required"], $t = ["for"], Lt = ["innerHTML"]; -function Vt(e, t, o, n, s, l) { - const a = Oe("mask"); - return f(), v("div", null, [ +}), Lt = ["id", "disabled", "maxlength", "required"], Vt = ["for"], xt = ["innerHTML"]; +function Bt(e, t, n, o, l, s) { + const a = Le("mask"); + return f(), h("div", null, [ C(i("input", { "onUpdate:modelValue": t[0] || (t[0] = (r) => e.inputText = r), id: e.uuid, disabled: e.readonly, maxlength: e.mask ? e.maskFilled && e.mask.length : void 0, required: e.required - }, null, 8, Ot), [ + }, null, 8, Lt), [ [R, e.inputText], [a, e.mask] ]), - i("label", { for: e.uuid }, k(e.label), 9, $t), + i("label", { for: e.uuid }, k(e.label), 9, Vt), C(i("p", { innerHTML: e.validation.errorMessage - }, null, 8, Lt), [ - [$, e.validation.errorMessage] + }, null, 8, xt), [ + [O, e.validation.errorMessage] ]) ]); } -const xt = /* @__PURE__ */ M(St, [["render", Vt], ["__scopeId", "data-v-76dba9b8"]]); -function Pt(e) { - e.component("ACheckbox", qe), e.component("ACombobox", Fe), e.component("ADate", rt), e.component("ADropdown", mt), e.component("AFieldset", bt), e.component("AForm", pe), e.component("ANumericInput", Et), e.component("ATextInput", xt); +const Pt = /* @__PURE__ */ M($t, [["render", Bt], ["__scopeId", "data-v-76dba9b8"]]); +function Ht(e) { + e.component("ACheckbox", Fe), e.component("ACombobox", Ue), e.component("ADate", ut), e.component("ADropdown", vt), e.component("AFieldset", Ct), e.component("AForm", me), e.component("ANumericInput", It), e.component("ATextInput", Pt); } export { - qe as ACheckbox, - Fe as AComboBox, - rt as ADate, - mt as ADropdown, - bt as AFieldset, - pe as AForm, - Et as ANumericInput, - xt as ATextInput, - Pt as install + Fe as ACheckbox, + Ue as AComboBox, + ut as ADate, + vt as ADropdown, + Ct as AFieldset, + me as AForm, + It as ANumericInput, + Pt as ATextInput, + Ht as install }; //# sourceMappingURL=aform.js.map diff --git a/aform/dist/aform.js.map b/aform/dist/aform.js.map index 759d8972..f5c58a94 100644 --- a/aform/dist/aform.js.map +++ b/aform/dist/aform.js.map @@ -1 +1 @@ -{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["props","__props","emit","__emit","checkbox","computed","value","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","o","s","a","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","t","l","ne","n","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;AAcA,UAAMA,IAAQC,GAcRC,IAAOC,GAIPC,IAAWC,EAAS;AAAA,MACzB,MAAM;AACL,eAAOL,EAAM;AAAA,MACd;AAAA,MACA,IAAIM,GAAO;AACV,QAAAJ,EAAK,gBAAgBI,CAAK;AAAA,MAC3B;AAAA,IAAA,CACA;;;;;;;;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A;AAAA;;;;;ACGxB,SAASmE,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,aAAaC,EAAS,GAChCD,EAAA,UAAU,aAAaE,EAAS,GAChCF,EAAA,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,aAAaI,EAAS,GAChCJ,EAAA,UAAU,aAAaK,EAAS,GAChCL,EAAA,UAAU,SAASM,EAAK,GACxBN,EAAA,UAAU,iBAAiBO,EAAa,GACxCP,EAAA,UAAU,cAAcQ,EAAU;AAGvC;"} \ No newline at end of file +{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","s","c","a","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","t","ne","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","props","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","value","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","emit","__emit","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;;;AA2BM,UAAAA,IAAWC,GAA2CC,GAAA,YAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1B7D,IAAIC;AACJ,MAAMC,KAAI,OAAO,SAAS,KAAKC,KAAI,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAI,MAAM;AAC1E;AACAF,OAAOD,IAAI,UAAU,OAAO,SAAS,OAAO,cAAc,QAAQA,EAAE,aAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AAClI,SAASI,GAAE,GAAG;AACZ,SAAO,OAAO,KAAK,aAAa,EAAC,IAAKC,EAAE,CAAC;AAC3C;AACA,SAASC,GAAE,GAAG;AACZ,SAAO;AACT;AACA,SAASC,GAAE,GAAG;AACZ,SAAOC,GAAG,KAAIC,GAAE,CAAC,GAAG,MAAM;AAC5B;AACA,SAASC,EAAE,GAAG;AACZ,MAAI;AACJ,QAAMC,IAAIP,GAAE,CAAC;AACb,UAAQ,IAAIO,KAAK,OAAO,SAASA,EAAE,QAAQ,OAAO,IAAIA;AACxD;AACA,MAAMC,KAAIX,KAAI,SAAS;AACvB,SAASY,MAAK,GAAG;AACf,MAAI,GAAGF,GAAGG,GAAGC;AACb,MAAIb,GAAE,EAAE,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A,YAAAW;AAAA,MAClB,IAASX,EAAA;AAAA,MACT,UAAU+D,EAAAA;AAAAA,MAPd,WAAA/D,EAAA,OAAAA,EAAA,cAAAA,EAAA,KAAA,SAAA;AAAA,MAGY0D,UAAAA,EAAAA;AAAAA,IAAAA,GAKDrB,MAAAA,GAAAA,EAAAA,GAAAA;AAAAA,MAAAA,CAAAA,GAAAA,EAAAA,SAAAA;AAAAA,MACT,CAAuC2B,GAAAhE,EAAA,IAAA;AAAA,IAAA,CAAA;AAAA,IACKiE,EAAAA,SAAW,EAAY,KAAAjE,EAAA,KAAA,GAAAkE,EAAAlE,EAAA,KAAA,GAAA,GAAAH,EAAA;AAAA,IAVrEW,EAAAD,EAAA,KAAA;AAAA,MAAA,WAUa0D,EAAW,WAAA;AAAA,IAAA,GAAA,MAAA,GAAAnE,EAAA,GAAA;AAAA;;;;;ACGxB,SAASqE,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,aAAaC,EAAS,GAChCD,EAAA,UAAU,aAAaE,EAAS,GAChCF,EAAA,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,aAAaI,EAAS,GAChCJ,EAAA,UAAU,aAAaK,EAAS,GAChCL,EAAA,UAAU,SAASM,EAAK,GACxBN,EAAA,UAAU,iBAAiBO,EAAa,GACxCP,EAAA,UAAU,cAAcQ,EAAU;AAGvC;"} \ No newline at end of file diff --git a/aform/dist/aform.umd.cjs b/aform/dist/aform.umd.cjs index d5e1c1d4..9b15691d 100644 --- a/aform/dist/aform.umd.cjs +++ b/aform/dist/aform.umd.cjs @@ -1,2 +1,2 @@ -(function(m,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(m=typeof globalThis<"u"?globalThis:m||self,n(m["@stonecrop/aform"]={},m.Vue))})(this,function(m,n){"use strict";const ne={id:"checkbox-container"},oe=["id","readonly","required"],le={id:"custom-checkbox"},ae=["for"],re=["innerHTML"],se=n.defineComponent({__name:"ACheckbox",props:{label:{},value:{},required:{type:Boolean},readOnly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},emits:["update:value"],setup(e,{emit:t}){const l=e,o=t,r=n.computed({get(){return l.value},set(a){o("update:value",a)}});return(a,s)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("label",ne,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox",id:a.uuid,class:"checkbox",readonly:a.readOnly,required:a.required},null,8,oe),[[n.vModelCheckbox,r.value]]),n.createElementVNode("span",le,n.toDisplayString(r.value),1)]),n.createElementVNode("label",{for:a.uuid,id:"checkbox-label"},n.toDisplayString(a.label),9,ae),n.withDirectives(n.createElementVNode("p",{innerHTML:a.validation.errorMessage},null,8,re),[[n.vShow,a.validation.errorMessage]])]))}}),E=(e,t)=>{const l=e.__vccOpts||e;for(const[o,r]of t)l[o]=r;return l},$=E(se,[["__scopeId","data-v-743cd4db"]]),ie=n.createElementVNode("div",null,[n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"})],-1),O=n.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(e){return(t,l)=>{const o=n.resolveComponent("ATableModal");return n.openBlock(),n.createBlock(o,{event:e.event,cellData:e.cellData,class:"amodal"},{default:n.withCtx(()=>[ie]),_:1},8,["event","cellData"])}}});var v;const L=typeof window<"u",ce=e=>typeof e=="string",de=()=>{};L&&(v=window==null?void 0:window.navigator)!=null&&v.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function N(e){return typeof e=="function"?e():n.unref(e)}function ue(e){return e}function pe(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function I(e){var t;const l=N(e);return(t=l==null?void 0:l.$el)!=null?t:l}const F=L?window:void 0;function fe(...e){let t,l,o,r;if(ce(e[0])||Array.isArray(e[0])?([l,o,r]=e,t=F):[t,l,o,r]=e,!t)return de;Array.isArray(l)||(l=[l]),Array.isArray(o)||(o=[o]);const a=[],s=()=>{a.forEach(d=>d()),a.length=0},i=(d,y,g,f)=>(d.addEventListener(y,g,f),()=>d.removeEventListener(y,g,f)),p=n.watch(()=>[I(t),N(r)],([d,y])=>{s(),d&&a.push(...l.flatMap(g=>o.map(f=>i(d,g,f,y))))},{immediate:!0,flush:"post"}),c=()=>{p(),s()};return pe(c),c}const P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__";P[q]=P[q]||{};function me(e,{window:t=F,scrollTarget:l}={}){const o=n.ref(!1),r=()=>{if(!t)return;const a=t.document,s=I(e);if(!s)o.value=!1;else{const i=s.getBoundingClientRect();o.value=i.top<=(t.innerHeight||a.documentElement.clientHeight)&&i.left<=(t.innerWidth||a.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return n.watch(()=>I(e),()=>r(),{immediate:!0,flush:"post"}),t&&fe(l||t,"scroll",r,{capture:!1,passive:!0}),o}var x;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(x||(x={}));var he=Object.defineProperty,H=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,R=(e,t,l)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,we=(e,t)=>{for(var l in t||(t={}))ye.call(t,l)&&R(e,l,t[l]);if(H)for(var l of H(t))ge.call(t,l)&&R(e,l,t[l]);return e};we({linear:ue},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const w=e=>{let t=me(e).value;return t=t&&e.offsetHeight>0,t},b=e=>e.tabIndex>=0,U=e=>{const t=e.target;return S(t)},S=e=>{var t;let l;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(l=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(l=o)}return l&&(!b(l)||!w(l))?S(l):l},be=e=>{var t;const l=e.target;let o;if(l instanceof HTMLTableCellElement){const r=(t=l.parentElement)==null?void 0:t.parentElement;if(r){const a=r.firstElementChild.children[l.cellIndex];a&&(o=a)}}else if(l instanceof HTMLTableRowElement){const r=l.parentElement;if(r){const a=r.firstElementChild;a&&(o=a)}}return o&&(!b(o)||!w(o))?B(o):o},j=e=>{const t=e.target;return B(t)},B=e=>{var t;let l;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(l=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(l=o)}return l&&(!b(l)||!w(l))?B(l):l},ke=e=>{var t;const l=e.target;let o;if(l instanceof HTMLTableCellElement){const r=(t=l.parentElement)==null?void 0:t.parentElement;if(r){const a=r.lastElementChild.children[l.cellIndex];a&&(o=a)}}else if(l instanceof HTMLTableRowElement){const r=l.parentElement;if(r){const a=r.lastElementChild;a&&(o=a)}}return o&&(!b(o)||!w(o))?S(o):o},Q=e=>{const t=e.target;return _(t)},_=e=>{var t;let l;if(e.previousElementSibling)l=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;l=o==null?void 0:o.lastElementChild}return l&&(!b(l)||!w(l))?_(l):l},Y=e=>{const t=e.target;return M(t)},M=e=>{var t;let l;if(e.nextElementSibling)l=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;l=o==null?void 0:o.firstElementChild}return l&&(!b(l)||!w(l))?M(l):l},z=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!b(t)||!w(t))?M(t):t},W=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!b(t)||!w(t))?_(t):t},V=["alt","control","shift","meta"],Ee={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},K={"keydown.up":e=>{const t=U(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=j(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Q(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Y(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=be(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=ke(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=j(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=U(e);t&&t.focus()}},"keydown.home":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Y(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Q(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Ce(e){const t=o=>{let r=null;o.parent&&(typeof o.parent=="string"?r=document.querySelector(o.parent):o.parent instanceof Element?r=o.parent:r=o.parent.value);let a=[];if(o.selectors)if(typeof o.selectors=="string")a=r?Array.from(r.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)a.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const s of o.selectors.value)s instanceof Element?a.push(s):a.push(s.$el);else a.push(o.selectors.value);else a=Array.from(r.children).filter(s=>b(s)&&w(s));return a},l=o=>r=>{const a=Ee[r.key]||r.key.toLowerCase();if(V.includes(a))return;const s=o.handlers||K;for(const i of Object.keys(s)){const[p,...c]=i.split(".");if(p==="keydown"&&c.includes(a)){const d=s[i],y=c.filter(f=>V.includes(f)),g=V.some(f=>{const A=f.charAt(0).toUpperCase()+f.slice(1);return r.getModifierState(A)});if(y.length>0){if(g){for(const f of V)if(c.includes(f)){const A=f.charAt(0).toUpperCase()+f.slice(1);r.getModifierState(A)&&d(r)}}}else g||d(r)}}};n.onMounted(()=>{for(const o of e){const r=t(o);for(const a of r)a.addEventListener("keydown",l(o))}}),n.onBeforeUnmount(()=>{for(const o of e){const r=t(o);for(const a of r)a.removeEventListener("keydown",l(o))}})}const De=["event","colIndex","rowIndex","tableid"],Ae={colspan:"5"},Ve=["onClick"],Ie=6,C=7,G=E(n.defineComponent({__name:"ADate",props:{colIndex:{},rowIndex:{},tableid:{},event:{},indent:{},readonly:{type:Boolean}},setup(e){const t=e,l=n.inject(t.tableid),o=new Date,r=n.ref(),a=n.ref(),s=n.ref(),i=n.ref([]);n.onMounted(async()=>{let u=l.cellData(t.colIndex,t.rowIndex);u?(u instanceof Date||(u=new Date(u)),r.value=u,a.value=r.value.getMonth(),s.value=r.value.getFullYear()):(a.value=o.getMonth(),s.value=o.getFullYear()),p(),await n.nextTick();const D=document.getElementsByClassName("selecteddate");if(D.length>0)D[0].focus();else{const h=document.getElementsByClassName("todaysdate");h.length>0&&h[0].focus()}}),n.watch([a,s],()=>{p()});const p=()=>{i.value=[];const u=new Date(s.value,a.value,1),D=u.getDay(),h=u.setDate(u.getDate()-D);for(let k of Array(43).keys())i.value.push(h+k*864e5)},c=()=>{s.value-=1},d=()=>{s.value+=1},y=()=>{a.value==0?(a.value=11,c()):a.value-=1},g=()=>{a.value==11?(a.value=0,d()):a.value+=1},f=u=>{if(a.value===o.getMonth())return o.toDateString()===new Date(u).toDateString()},A=u=>new Date(u).toDateString()===new Date(r.value).toDateString(),We=(u,D)=>{r.value=new Date(i.value[D]),Ke()},Ke=()=>{l.setCellData(t.rowIndex,t.colIndex,r.value.getTime())},Ge=n.computed(()=>new Date(s.value,a.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ce([{parent:"table.adate",selectors:"td",handlers:{...K,"keydown.pageup":y,"keydown.shift.pageup":c,"keydown.pagedown":g,"keydown.shift.pagedown":d}}]),(u,D)=>u.readonly?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,event:u.event,colIndex:u.colIndex,rowIndex:u.rowIndex,tableid:u.tableid,class:"adate",tabindex:"0",ref:"adatepicker"},[n.createElementVNode("table",null,[n.createElementVNode("tr",null,[n.createElementVNode("td",{onClick:y,tabindex:-1},"<"),n.createElementVNode("th",Ae,n.toDisplayString(Ge.value),1),n.createElementVNode("td",{onClick:g,tabindex:-1},">")]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(Ie,h=>n.createElementVNode("tr",{key:h},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(C,k=>n.createElementVNode("td",{key:(h-1)*C+k,contenteditable:!1,spellcheck:!1,tabindex:0,style:n.normalizeStyle({border:A(i.value[(h-1)*C+k])?"2px solid var(--focus-cell-outline)":"none",borderBottomColor:f(i.value[(h-1)*C+k])?"var(--focus-cell-outline)":"none"}),onClick:n.withModifiers(Je=>We(Je,(h-1)*C+k),["prevent","stop"]),class:n.normalizeClass({todaysdate:f(i.value[(h-1)*C+k]),selecteddate:A(i.value[(h-1)*C+k])})},n.toDisplayString(new Date(i.value[(h-1)*C+k]).getDate()),15,Ve)),64))])),64))])],8,De))}}),[["__scopeId","data-v-169f1184"]]),Se=n.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}}),Be={class:"input-wrapper"},_e={id:"autocomplete-results",class:"autocomplete-results"},Me={key:0,class:"loading autocomplete-result"},Te=["onClick"];function $e(e,t,l,o,r,a){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["autocomplete",{isOpen:e.isOpen}])},[n.createElementVNode("div",Be,[n.withDirectives(n.createElementVNode("input",{ref:"mopInput",type:"text",onInput:t[0]||(t[0]=(...s)=>e.onChange&&e.onChange(...s)),onFocus:t[1]||(t[1]=(...s)=>e.onChange&&e.onChange(...s)),"onUpdate:modelValue":t[2]||(t[2]=s=>e.search=s),onKeydown:[t[3]||(t[3]=n.withKeys((...s)=>e.onArrowDown&&e.onArrowDown(...s),["down"])),t[4]||(t[4]=n.withKeys((...s)=>e.onArrowUp&&e.onArrowUp(...s),["up"])),t[5]||(t[5]=n.withKeys((...s)=>e.onEnter&&e.onEnter(...s),["enter"]))]},null,544),[[n.vModelText,e.search]]),n.withDirectives(n.createElementVNode("ul",_e,[e.isLoading?(n.openBlock(),n.createElementBlock("li",Me,"Loading results...")):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(e.results,(s,i)=>(n.openBlock(),n.createElementBlock("li",{key:i,onClick:p=>e.setResult(s),class:n.normalizeClass(["autocomplete-result",{"is-active":i===e.arrowCounter}])},n.toDisplayString(s),11,Te))),128))],512),[[n.vShow,e.isOpen]]),n.createElementVNode("label",null,n.toDisplayString(e.label),1)])],2)}const J=E(Se,[["render",$e]]),Oe=E(n.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(e){return(t,l)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["collapse-button",t.collapsed?"rotated":"unrotated"])},"×",2))}}),[["__scopeId","data-v-6f1c1b45"]]),T=E(n.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,o=t,r=n.ref(l.data||{}),a=i=>{let p={};for(const[c,d]of Object.entries(i))["component","fieldtype"].includes(c)||(p[c]=d),c==="rows"&&d&&d.length===0&&(p.rows=r.value[i.fieldname]);return p},s=n.computed({get:()=>l.modelValue.map((i,p)=>n.computed({get(){return i.value},set:c=>{l.modelValue[p].value=c,o("update:modelValue",l.modelValue)}})),set:()=>{}});return(i,p)=>(n.openBlock(),n.createElementBlock("form",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.modelValue,(c,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(c.component),n.mergeProps({key:d,schema:c,modelValue:s.value[d].value,"onUpdate:modelValue":y=>s.value[d].value=y,data:r.value[c.fieldname],readonly:i.readonly},a(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-82492bb4"]]),X=E(n.defineComponent({__name:"AFieldset",props:{schema:{},label:{},collapsible:{type:Boolean},data:{}},setup(e){const t=e,l=n.ref(t.data||[]);let o=n.ref(!1),r=n.ref(t.collapsible);const a=n.ref(t.schema);function s(i){i.preventDefault(),r.value&&(o.value=!o.value)}return(i,p)=>(n.openBlock(),n.createElementBlock("fieldset",null,[n.createElementVNode("legend",{onClick:s,onSubmit:s},[n.createTextVNode(n.toDisplayString(i.label)+" ",1),n.unref(r)?(n.openBlock(),n.createBlock(Oe,{key:0,collapsed:n.unref(o)},null,8,["collapsed"])):n.createCommentVNode("",!0)],32),n.renderSlot(i.$slots,"default",{collapsed:n.unref(o)},()=>[n.withDirectives(n.createVNode(T,{modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=c=>a.value=c),data:l.value},null,8,["modelValue","data"]),[[n.vShow,!n.unref(o)]])],!0)]))}}),[["__scopeId","data-v-cad9b578"]]),ve=["id","disabled","required"],Le=["for"],Ne=["innerHTML"],Z=E(n.defineComponent({__name:"ANumericInput",props:{label:{},modelValue:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,o=t,r=n.computed({get:()=>l.modelValue,set:a=>{o("update:modelValue",a)}});return(a,s)=>(n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"number",id:a.uuid,disabled:a.readonly,required:a.required},null,8,ve),[[n.vModelText,r.value]]),n.createElementVNode("label",{for:a.uuid},n.toDisplayString(a.label),9,Le),n.withDirectives(n.createElementVNode("p",{innerHTML:a.validation.errorMessage},null,8,Ne),[[n.vShow,a.validation.errorMessage]])]))}}),[["__scopeId","data-v-be33e6c4"]]),ee={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Fe(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Pe(e){var l;let t=e.value;if(t){const o=Fe(t);if(o){const r=e.instance.locale;t=o(r)}}else{const r=(l=e.instance.schema.fieldtype)==null?void 0:l.toLowerCase();r&&ee[r]&&(t=ee[r])}return t}function qe(e,t){t||(t="#");let l=e;const o=[t,"/","-","(",")"," "];for(const r of o)l=l.replaceAll(r,"");return l}function xe(e,t,l){l||(l="#");let o=t;for(const r of e){const a=o.indexOf(l);if(a!==-1){const s=o.substring(0,a),i=o.substring(a+1);o=s+r+i}}return o.slice(0,t.length)}function He(e,t){const l=Pe(t);if(!l)return;const o="#",r=e.value,a=qe(r,o);if(a){const s=xe(a,l,o);t.instance.maskFilled&&(t.instance.maskFilled=!s.includes(o)),e.value=s}else e.value=l}const Re=n.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const l=n.ref(!1),o=n.inject("locale","");return{inputText:n.computed({get(){return e.modelValue},set(a){t.emit("update:modelValue",a)}}),locale:o,maskFilled:l}},directives:{mask:He}}),Ue=["id","disabled","maxlength","required"],je=["for"],Qe=["innerHTML"];function Ye(e,t,l,o,r,a){const s=n.resolveDirective("mask");return n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>e.inputText=i),id:e.uuid,disabled:e.readonly,maxlength:e.mask?e.maskFilled&&e.mask.length:void 0,required:e.required},null,8,Ue),[[n.vModelText,e.inputText],[s,e.mask]]),n.createElementVNode("label",{for:e.uuid},n.toDisplayString(e.label),9,je),n.withDirectives(n.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Qe),[[n.vShow,e.validation.errorMessage]])])}const te=E(Re,[["render",Ye],["__scopeId","data-v-76dba9b8"]]);function ze(e){e.component("ACheckbox",$),e.component("ACombobox",O),e.component("ADate",G),e.component("ADropdown",J),e.component("AFieldset",X),e.component("AForm",T),e.component("ANumericInput",Z),e.component("ATextInput",te)}m.ACheckbox=$,m.AComboBox=O,m.ADate=G,m.ADropdown=J,m.AFieldset=X,m.AForm=T,m.ANumericInput=Z,m.ATextInput=te,m.install=ze,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); +(function(m,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(m=typeof globalThis<"u"?globalThis:m||self,n(m["@stonecrop/aform"]={},m.Vue))})(this,function(m,n){"use strict";const ne={id:"checkbox-container"},oe=["id","readonly","required"],le={id:"custom-checkbox"},ae=["for"],re=["innerHTML"],se=n.defineComponent({__name:"ACheckbox",props:n.mergeModels({label:{},required:{type:Boolean},readOnly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,l)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("label",ne,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"checkbox",id:o.uuid,class:"checkbox",readonly:o.readOnly,required:o.required},null,8,oe),[[n.vModelCheckbox,t.value]]),n.createElementVNode("span",le,n.toDisplayString(t.value),1)]),n.createElementVNode("label",{for:o.uuid,id:"checkbox-label"},n.toDisplayString(o.label),9,ae),n.withDirectives(n.createElementVNode("p",{innerHTML:o.validation.errorMessage},null,8,re),[[n.vShow,o.validation.errorMessage]])]))}}),E=(e,t)=>{const o=e.__vccOpts||e;for(const[l,a]of t)o[l]=a;return o},$=E(se,[["__scopeId","data-v-5093f1cb"]]),ie=n.createElementVNode("div",null,[n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"})],-1),O=n.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(e){return(t,o)=>{const l=n.resolveComponent("ATableModal");return n.openBlock(),n.createBlock(l,{event:e.event,cellData:e.cellData,class:"amodal"},{default:n.withCtx(()=>[ie]),_:1},8,["event","cellData"])}}});var L;const v=typeof window<"u",ce=e=>typeof e=="string",de=()=>{};v&&(L=window==null?void 0:window.navigator)!=null&&L.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function N(e){return typeof e=="function"?e():n.unref(e)}function ue(e){return e}function pe(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function I(e){var t;const o=N(e);return(t=o==null?void 0:o.$el)!=null?t:o}const F=v?window:void 0;function fe(...e){let t,o,l,a;if(ce(e[0])||Array.isArray(e[0])?([o,l,a]=e,t=F):[t,o,l,a]=e,!t)return de;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const r=[],s=()=>{r.forEach(d=>d()),r.length=0},i=(d,y,g,f)=>(d.addEventListener(y,g,f),()=>d.removeEventListener(y,g,f)),p=n.watch(()=>[I(t),N(a)],([d,y])=>{s(),d&&r.push(...o.flatMap(g=>l.map(f=>i(d,g,f,y))))},{immediate:!0,flush:"post"}),c=()=>{p(),s()};return pe(c),c}const P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__";P[q]=P[q]||{};function me(e,{window:t=F,scrollTarget:o}={}){const l=n.ref(!1),a=()=>{if(!t)return;const r=t.document,s=I(e);if(!s)l.value=!1;else{const i=s.getBoundingClientRect();l.value=i.top<=(t.innerHeight||r.documentElement.clientHeight)&&i.left<=(t.innerWidth||r.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return n.watch(()=>I(e),()=>a(),{immediate:!0,flush:"post"}),t&&fe(o||t,"scroll",a,{capture:!1,passive:!0}),l}var x;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(x||(x={}));var he=Object.defineProperty,H=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,R=(e,t,o)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,we=(e,t)=>{for(var o in t||(t={}))ye.call(t,o)&&R(e,o,t[o]);if(H)for(var o of H(t))ge.call(t,o)&&R(e,o,t[o]);return e};we({linear:ue},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const w=e=>{let t=me(e).value;return t=t&&e.offsetHeight>0,t},b=e=>e.tabIndex>=0,U=e=>{const t=e.target;return M(t)},M=e=>{var t;let o;if(e instanceof HTMLTableCellElement){const l=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(l){const a=Array.from(l.children)[e.cellIndex];a&&(o=a)}}else if(e instanceof HTMLTableRowElement){const l=e.previousElementSibling;l&&(o=l)}return o&&(!b(o)||!w(o))?M(o):o},be=e=>{var t;const o=e.target;let l;if(o instanceof HTMLTableCellElement){const a=(t=o.parentElement)==null?void 0:t.parentElement;if(a){const r=a.firstElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.firstElementChild;r&&(l=r)}}return l&&(!b(l)||!w(l))?S(l):l},j=e=>{const t=e.target;return S(t)},S=e=>{var t;let o;if(e instanceof HTMLTableCellElement){const l=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(l){const a=Array.from(l.children)[e.cellIndex];a&&(o=a)}}else if(e instanceof HTMLTableRowElement){const l=e.nextElementSibling;l&&(o=l)}return o&&(!b(o)||!w(o))?S(o):o},ke=e=>{var t;const o=e.target;let l;if(o instanceof HTMLTableCellElement){const a=(t=o.parentElement)==null?void 0:t.parentElement;if(a){const r=a.lastElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.lastElementChild;r&&(l=r)}}return l&&(!b(l)||!w(l))?M(l):l},Q=e=>{const t=e.target;return B(t)},B=e=>{var t;let o;if(e.previousElementSibling)o=e.previousElementSibling;else{const l=(t=e.parentElement)==null?void 0:t.previousElementSibling;o=l==null?void 0:l.lastElementChild}return o&&(!b(o)||!w(o))?B(o):o},Y=e=>{const t=e.target;return _(t)},_=e=>{var t;let o;if(e.nextElementSibling)o=e.nextElementSibling;else{const l=(t=e.parentElement)==null?void 0:t.nextElementSibling;o=l==null?void 0:l.firstElementChild}return o&&(!b(o)||!w(o))?_(o):o},z=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!b(t)||!w(t))?_(t):t},W=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!b(t)||!w(t))?B(t):t},V=["alt","control","shift","meta"],Ee={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},K={"keydown.up":e=>{const t=U(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=j(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Q(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Y(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=be(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=ke(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=j(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=U(e);t&&t.focus()}},"keydown.home":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Y(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Q(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Ce(e){const t=l=>{let a=null;l.parent&&(typeof l.parent=="string"?a=document.querySelector(l.parent):l.parent instanceof Element?a=l.parent:a=l.parent.value);let r=[];if(l.selectors)if(typeof l.selectors=="string")r=a?Array.from(a.querySelectorAll(l.selectors)):Array.from(document.querySelectorAll(l.selectors));else if(l.selectors instanceof Element)r.push(l.selectors);else if(Array.isArray(l.selectors.value))for(const s of l.selectors.value)s instanceof Element?r.push(s):r.push(s.$el);else r.push(l.selectors.value);else r=Array.from(a.children).filter(s=>b(s)&&w(s));return r},o=l=>a=>{const r=Ee[a.key]||a.key.toLowerCase();if(V.includes(r))return;const s=l.handlers||K;for(const i of Object.keys(s)){const[p,...c]=i.split(".");if(p==="keydown"&&c.includes(r)){const d=s[i],y=c.filter(f=>V.includes(f)),g=V.some(f=>{const A=f.charAt(0).toUpperCase()+f.slice(1);return a.getModifierState(A)});if(y.length>0){if(g){for(const f of V)if(c.includes(f)){const A=f.charAt(0).toUpperCase()+f.slice(1);a.getModifierState(A)&&d(a)}}}else g||d(a)}}};n.onMounted(()=>{for(const l of e){const a=t(l);for(const r of a)r.addEventListener("keydown",o(l))}}),n.onBeforeUnmount(()=>{for(const l of e){const a=t(l);for(const r of a)r.removeEventListener("keydown",o(l))}})}const De=["event","colIndex","rowIndex","tableid"],Ae={colspan:"5"},Ve=["onClick"],Ie=6,C=7,G=E(n.defineComponent({__name:"ADate",props:{colIndex:{},rowIndex:{},tableid:{},event:{},indent:{},readonly:{type:Boolean}},setup(e){const t=e,o=n.inject(t.tableid),l=new Date,a=n.ref(),r=n.ref(),s=n.ref(),i=n.ref([]);n.onMounted(async()=>{let u=o.cellData(t.colIndex,t.rowIndex);u?(u instanceof Date||(u=new Date(u)),a.value=u,r.value=a.value.getMonth(),s.value=a.value.getFullYear()):(r.value=l.getMonth(),s.value=l.getFullYear()),p(),await n.nextTick();const D=document.getElementsByClassName("selecteddate");if(D.length>0)D[0].focus();else{const h=document.getElementsByClassName("todaysdate");h.length>0&&h[0].focus()}}),n.watch([r,s],()=>{p()});const p=()=>{i.value=[];const u=new Date(s.value,r.value,1),D=u.getDay(),h=u.setDate(u.getDate()-D);for(let k of Array(43).keys())i.value.push(h+k*864e5)},c=()=>{s.value-=1},d=()=>{s.value+=1},y=()=>{r.value==0?(r.value=11,c()):r.value-=1},g=()=>{r.value==11?(r.value=0,d()):r.value+=1},f=u=>{if(r.value===l.getMonth())return l.toDateString()===new Date(u).toDateString()},A=u=>new Date(u).toDateString()===new Date(a.value).toDateString(),We=(u,D)=>{a.value=new Date(i.value[D]),Ke()},Ke=()=>{o.setCellData(t.rowIndex,t.colIndex,a.value.getTime())},Ge=n.computed(()=>new Date(s.value,r.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ce([{parent:"table.adate",selectors:"td",handlers:{...K,"keydown.pageup":y,"keydown.shift.pageup":c,"keydown.pagedown":g,"keydown.shift.pagedown":d}}]),(u,D)=>u.readonly?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,event:u.event,colIndex:u.colIndex,rowIndex:u.rowIndex,tableid:u.tableid,class:"adate",tabindex:"0",ref:"adatepicker"},[n.createElementVNode("table",null,[n.createElementVNode("tr",null,[n.createElementVNode("td",{onClick:y,tabindex:-1},"<"),n.createElementVNode("th",Ae,n.toDisplayString(Ge.value),1),n.createElementVNode("td",{onClick:g,tabindex:-1},">")]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(Ie,h=>n.createElementVNode("tr",{key:h},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(C,k=>n.createElementVNode("td",{key:(h-1)*C+k,contenteditable:!1,spellcheck:!1,tabindex:0,style:n.normalizeStyle({border:A(i.value[(h-1)*C+k])?"2px solid var(--focus-cell-outline)":"none",borderBottomColor:f(i.value[(h-1)*C+k])?"var(--focus-cell-outline)":"none"}),onClick:n.withModifiers(Je=>We(Je,(h-1)*C+k),["prevent","stop"]),class:n.normalizeClass({todaysdate:f(i.value[(h-1)*C+k]),selecteddate:A(i.value[(h-1)*C+k])})},n.toDisplayString(new Date(i.value[(h-1)*C+k]).getDate()),15,Ve)),64))])),64))])],8,De))}}),[["__scopeId","data-v-169f1184"]]),Me=n.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}}),Se={class:"input-wrapper"},Be={id:"autocomplete-results",class:"autocomplete-results"},_e={key:0,class:"loading autocomplete-result"},Te=["onClick"];function $e(e,t,o,l,a,r){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["autocomplete",{isOpen:e.isOpen}])},[n.createElementVNode("div",Se,[n.withDirectives(n.createElementVNode("input",{ref:"mopInput",type:"text",onInput:t[0]||(t[0]=(...s)=>e.onChange&&e.onChange(...s)),onFocus:t[1]||(t[1]=(...s)=>e.onChange&&e.onChange(...s)),"onUpdate:modelValue":t[2]||(t[2]=s=>e.search=s),onKeydown:[t[3]||(t[3]=n.withKeys((...s)=>e.onArrowDown&&e.onArrowDown(...s),["down"])),t[4]||(t[4]=n.withKeys((...s)=>e.onArrowUp&&e.onArrowUp(...s),["up"])),t[5]||(t[5]=n.withKeys((...s)=>e.onEnter&&e.onEnter(...s),["enter"]))]},null,544),[[n.vModelText,e.search]]),n.withDirectives(n.createElementVNode("ul",Be,[e.isLoading?(n.openBlock(),n.createElementBlock("li",_e,"Loading results...")):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(e.results,(s,i)=>(n.openBlock(),n.createElementBlock("li",{key:i,onClick:p=>e.setResult(s),class:n.normalizeClass(["autocomplete-result",{"is-active":i===e.arrowCounter}])},n.toDisplayString(s),11,Te))),128))],512),[[n.vShow,e.isOpen]]),n.createElementVNode("label",null,n.toDisplayString(e.label),1)])],2)}const J=E(Me,[["render",$e]]),Oe=E(n.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["collapse-button",t.collapsed?"rotated":"unrotated"])},"×",2))}}),[["__scopeId","data-v-6f1c1b45"]]),T=E(n.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,l=t,a=n.ref(o.data||{}),r=i=>{let p={};for(const[c,d]of Object.entries(i))["component","fieldtype"].includes(c)||(p[c]=d),c==="rows"&&d&&d.length===0&&(p.rows=a.value[i.fieldname]);return p},s=n.computed({get:()=>o.modelValue.map((i,p)=>n.computed({get(){return i.value},set:c=>{o.modelValue[p].value=c,l("update:modelValue",o.modelValue)}})),set:()=>{}});return(i,p)=>(n.openBlock(),n.createElementBlock("form",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.modelValue,(c,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(c.component),n.mergeProps({key:d,schema:c,modelValue:s.value[d].value,"onUpdate:modelValue":y=>s.value[d].value=y,data:a.value[c.fieldname],readonly:i.readonly},r(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-74d66cf2"]]),X=E(n.defineComponent({__name:"AFieldset",props:{schema:{},label:{},collapsible:{type:Boolean},data:{}},setup(e){const t=e,o=n.ref(t.data||[]);let l=n.ref(!1),a=n.ref(t.collapsible);const r=n.ref(t.schema);function s(i){i.preventDefault(),a.value&&(l.value=!l.value)}return(i,p)=>(n.openBlock(),n.createElementBlock("fieldset",null,[n.createElementVNode("legend",{onClick:s,onSubmit:s},[n.createTextVNode(n.toDisplayString(i.label)+" ",1),n.unref(a)?(n.openBlock(),n.createBlock(Oe,{key:0,collapsed:n.unref(l)},null,8,["collapsed"])):n.createCommentVNode("",!0)],32),n.renderSlot(i.$slots,"default",{collapsed:n.unref(l)},()=>[n.withDirectives(n.createVNode(T,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=c=>r.value=c),data:o.value},null,8,["modelValue","data"]),[[n.vShow,!n.unref(l)]])],!0)]))}}),[["__scopeId","data-v-cad9b578"]]),Le=["id","disabled","required"],ve=["for"],Ne=["innerHTML"],Z=E(n.defineComponent({__name:"ANumericInput",props:n.mergeModels({label:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,l)=>(n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"number",id:o.uuid,disabled:o.readonly,required:o.required},null,8,Le),[[n.vModelText,t.value]]),n.createElementVNode("label",{for:o.uuid},n.toDisplayString(o.label),9,ve),n.withDirectives(n.createElementVNode("p",{innerHTML:o.validation.errorMessage},null,8,Ne),[[n.vShow,o.validation.errorMessage]])]))}}),[["__scopeId","data-v-02907cd6"]]),ee={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Fe(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Pe(e){var o;let t=e.value;if(t){const l=Fe(t);if(l){const a=e.instance.locale;t=l(a)}}else{const a=(o=e.instance.schema.fieldtype)==null?void 0:o.toLowerCase();a&&ee[a]&&(t=ee[a])}return t}function qe(e,t){t||(t="#");let o=e;const l=[t,"/","-","(",")"," "];for(const a of l)o=o.replaceAll(a,"");return o}function xe(e,t,o){o||(o="#");let l=t;for(const a of e){const r=l.indexOf(o);if(r!==-1){const s=l.substring(0,r),i=l.substring(r+1);l=s+a+i}}return l.slice(0,t.length)}function He(e,t){const o=Pe(t);if(!o)return;const l="#",a=e.value,r=qe(a,l);if(r){const s=xe(r,o,l);t.instance.maskFilled&&(t.instance.maskFilled=!s.includes(l)),e.value=s}else e.value=o}const Re=n.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const o=n.ref(!1),l=n.inject("locale","");return{inputText:n.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:l,maskFilled:o}},directives:{mask:He}}),Ue=["id","disabled","maxlength","required"],je=["for"],Qe=["innerHTML"];function Ye(e,t,o,l,a,r){const s=n.resolveDirective("mask");return n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>e.inputText=i),id:e.uuid,disabled:e.readonly,maxlength:e.mask?e.maskFilled&&e.mask.length:void 0,required:e.required},null,8,Ue),[[n.vModelText,e.inputText],[s,e.mask]]),n.createElementVNode("label",{for:e.uuid},n.toDisplayString(e.label),9,je),n.withDirectives(n.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Qe),[[n.vShow,e.validation.errorMessage]])])}const te=E(Re,[["render",Ye],["__scopeId","data-v-76dba9b8"]]);function ze(e){e.component("ACheckbox",$),e.component("ACombobox",O),e.component("ADate",G),e.component("ADropdown",J),e.component("AFieldset",X),e.component("AForm",T),e.component("ANumericInput",Z),e.component("ATextInput",te)}m.ACheckbox=$,m.AComboBox=O,m.ADate=G,m.ADropdown=J,m.AFieldset=X,m.AForm=T,m.ANumericInput=Z,m.ATextInput=te,m.install=ze,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=aform.umd.cjs.map diff --git a/aform/dist/aform.umd.cjs.map b/aform/dist/aform.umd.cjs.map index f9cc726f..74e08e1f 100644 --- a/aform/dist/aform.umd.cjs.map +++ b/aform/dist/aform.umd.cjs.map @@ -1 +1 @@ -{"version":3,"file":"aform.umd.cjs","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["props","__props","emit","__emit","checkbox","computed","value","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","t","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":"wlBAcA,MAAMA,EAAQC,EAcRC,EAAOC,EAIPC,EAAWC,EAAAA,SAAS,CACzB,KAAM,CACL,OAAOL,EAAM,KACd,EACA,IAAIM,EAAO,CACVJ,EAAK,eAAgBI,CAAK,CAC3B,CAAA,CACA,kqCCtCD,IAAI,EACJ,MAAMC,EAAI,OAAO,OAAS,IAAKC,GAAK,GAAM,OAAO,GAAK,SAAUC,GAAI,IAAM,CAC1E,EACAF,IAAO,EAAI,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQ,EAAE,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAClI,SAASG,EAAE,EAAG,CACZ,OAAO,OAAO,GAAK,WAAa,EAAC,EAAKC,EAAAA,MAAE,CAAC,CAC3C,CACA,SAASC,GAAE,EAAG,CACZ,OAAO,CACT,CACA,SAASC,GAAE,EAAG,CACZ,OAAOC,EAAAA,gBAAG,GAAIC,iBAAE,CAAC,EAAG,IAAM,EAC5B,CACA,SAASC,EAAE,EAAG,CACZ,IAAI,EACJ,MAAMC,EAAIP,EAAE,CAAC,EACb,OAAQ,EAAIO,GAAK,KAAO,OAASA,EAAE,MAAQ,KAAO,EAAIA,CACxD,CACA,MAAMC,EAAIX,EAAI,OAAS,OACvB,SAASY,MAAK,EAAG,CACf,IAAI,EAAGF,EAAGG,EAAGC,EACb,GAAIb,GAAE,EAAE,CAAC,CAAC,GAAK,MAAM,QAAQ,EAAE,CAAC,CAAC,GAAK,CAACS,EAAGG,EAAGC,CAAC,EAAI,EAAG,EAAIH,GAAK,CAAC,EAAGD,EAAGG,EAAGC,CAAC,EAAI,EAAG,CAAC,EAC/E,OAAOZ,GACT,MAAM,QAAQQ,CAAC,IAAMA,EAAI,CAACA,CAAC,GAAI,MAAM,QAAQG,CAAC,IAAMA,EAAI,CAACA,CAA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A,UAAA,+DACCgE,mBAUM,MAAA,EAXP,OAAA9C,YAAA,EAAAC,qBAAA,MAAA,KAAA,CAIYP,EAAA,eAAAD,EAAA,mBAAA,QAAA,CACR,sBAAkBN,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAU,GAAAX,EAAA,UAAAW,GAClB,GAASX,EAAA,KACT,SAAU6D,EAAAA,SAPd,UAAA7D,EAAA,KAAAA,EAAA,YAAAA,EAAA,KAAA,OAAA,OAGYwD,SAAAA,EAAAA,QAAAA,EAKDrB,KAAAA,EAAAA,EAAAA,EAAAA,CAAAA,CAAAA,EAAAA,WAAAA,EAAAA,SAAAA,EACT,CAAuC2B,EAAA9D,EAAA,IAAA,CAAA,CAAA,EACK+D,EAAAA,mBAAAA,QAAW,CAAY,IAAA/D,EAAA,IAAA,EAAAgE,EAAA,gBAAAhE,EAAA,KAAA,EAAA,EAAAH,EAAA,EAVrEW,EAAA,eAAAD,EAAA,mBAAA,IAAA,CAAA,UAUawD,EAAW,WAAA,YAAA,EAAA,KAAA,EAAAjE,EAAA,EAAA,wGCGxB,SAASmE,GAAQC,EAAwB,CACpCA,EAAA,UAAU,YAAaC,CAAS,EAChCD,EAAA,UAAU,YAAaE,CAAS,EAChCF,EAAA,UAAU,QAASG,CAAK,EACxBH,EAAA,UAAU,YAAaI,CAAS,EAChCJ,EAAA,UAAU,YAAaK,CAAS,EAChCL,EAAA,UAAU,QAASM,CAAK,EACxBN,EAAA,UAAU,gBAAiBO,CAAa,EACxCP,EAAA,UAAU,aAAcQ,EAAU,CAGvC"} \ No newline at end of file +{"version":3,"file":"aform.umd.cjs","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","t","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","props","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","value","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","emit","__emit","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":"4nBA2BM,MAAAA,EAAWC,EAAAA,SAA2CC,EAAA,YAAC,kqCC1B7D,IAAIC,EACJ,MAAMC,EAAI,OAAO,OAAS,IAAKC,GAAK,GAAM,OAAO,GAAK,SAAUC,GAA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AAAkE,EAAA,gBAAAlE,EAAA,KAAA,EAAA,EAAAH,EAAA,EAVrEW,EAAA,eAAAD,EAAA,mBAAA,IAAA,CAAA,UAUa0D,EAAW,WAAA,YAAA,EAAA,KAAA,EAAAnE,EAAA,EAAA,wGCGxB,SAASqE,GAAQC,EAAwB,CACpCA,EAAA,UAAU,YAAaC,CAAS,EAChCD,EAAA,UAAU,YAAaE,CAAS,EAChCF,EAAA,UAAU,QAASG,CAAK,EACxBH,EAAA,UAAU,YAAaI,CAAS,EAChCJ,EAAA,UAAU,YAAaK,CAAS,EAChCL,EAAA,UAAU,QAASM,CAAK,EACxBN,EAAA,UAAU,gBAAiBO,CAAa,EACxCP,EAAA,UAAU,aAAcQ,EAAU,CAGvC"} \ No newline at end of file diff --git a/aform/dist/style.css b/aform/dist/style.css index 4954ba1b..d540f438 100644 --- a/aform/dist/style.css +++ b/aform/dist/style.css @@ -1 +1 @@ -@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";div[data-v-743cd4db]{display:inline-block;min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}p[data-v-743cd4db],label[data-v-743cd4db]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-743cd4db]{width:100%;color:red;font-size:85%}.checkbox[data-v-743cd4db]{visibility:hidden}.checkbox+#custom-checkbox[data-v-743cd4db]:after{content:"⬡";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}.checkbox:checked+#custom-checkbox[data-v-743cd4db]:after{content:"⬣";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}#custom-checkbox[data-v-743cd4db]{display:inline-block}#checkbox-container[data-v-743cd4db]{display:inline-block;min-width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;height:1.15rem;border-radius:.25rem}#checkbox-container[data-v-743cd4db]:hover{border:1px solid var(--input-active-border-color)}#checkbox-container:hover+label[data-v-743cd4db]{color:var(--input-active-label-color)}#checkbox-label[data-v-743cd4db]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}[data-v-169f1184]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}[data-v-169f1184]:root{font-family:var(--font-family)}.aform-primary-action[data-v-169f1184]{font-size:100%;text-align:center;min-height:2em;padding:.25rem 1rem;border:1px solid var(--primary-color);color:var(--primary-text-color);background-color:var(--primary-color);outline:2px solid var(--primary-text-color);transition:outline-offset .2s ease;font-size:var(--font-size);margin:.5ch}.aform-primary-action[data-v-169f1184]:hover,.aform-primary-action[data-v-169f1184]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adate[data-v-169f1184]{border:2px solid var(--focus-cell-outline);position:absolute;z-index:100;font-size:var(--table-font-size);display:inline-table;background-color:var(--row-color-zebra-light);color:var(--cell-text-color);outline:none;width:calc(100% - 4px)}.adate tr[data-v-169f1184]{height:1.15rem;text-align:center;vertical-align:middle}.adate td[data-v-169f1184]{border:2px solid transparent;min-width:2.25ch}.adate td[data-v-169f1184]:hover{border:2px solid var(--focus-cell-outline)}.adate td[data-v-169f1184]{border:1px;border-style:solid;border-color:var(--cell-border-color);border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--cell-text-color);text-overflow:ellipsis;overflow:hidden;padding-left:.5ch;padding-right:.5ch}.adate td[data-v-169f1184]:focus,.adate td[data-v-169f1184]:focus-within{background-color:var(--focus-cell-background);outline-width:2px;outline-style:solid;outline-color:var(--focus-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}button[data-v-169f1184]{background-color:var(--row-color-zebra-light);border:none;padding:0;margin:0;color:var(--cell-text-color);outline:none;font-size:var(--table-font-size)}.dateheader[data-v-169f1184]{font-weight:700;display:flex;align-items:center;justify-content:space-between}.adate .todaysdate[data-v-169f1184]{border-bottom-color:var(--focus-cell-outline)}.adate .selecteddate[data-v-169f1184]{border:2px solid var(--focus-cell-outline)}.autocomplete{position:relative}.input-wrapper{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}input:focus{border:1px solid var(--input-active-border-color);border-radius:.25rem .25rem 0 0;border-bottom:none}label{display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}.autocomplete-results{position:absolute;width:calc(100% - 1ch + 1.5px);z-index:1;padding:0;margin:0;color:#000;border:1px solid var(--input-active-border-color);border-radius:0 0 .25rem .25rem;border-top:none}.autocomplete-result{list-style:none;text-align:left;padding:4px 6px;cursor:pointer}.autocomplete-result.is-active,.autocomplete-result:hover{background-color:var(--row-color-zebra-light);color:#000}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}form[data-v-82492bb4]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline}fieldset[data-v-cad9b578]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--gray-50)}legend[data-v-cad9b578]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;-webkit-user-select:none;user-select:none}.collapse-button[data-v-cad9b578]{float:right}div[data-v-be33e6c4]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-be33e6c4]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-be33e6c4],label[data-v-be33e6c4]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-be33e6c4]{width:100%;color:red;font-size:85%}label[data-v-be33e6c4]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-be33e6c4]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-be33e6c4]{color:var(--input-active-label-color)}div[data-v-76dba9b8]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-76dba9b8]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-76dba9b8],label[data-v-76dba9b8]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-76dba9b8]{width:100%;color:red;font-size:85%}label[data-v-76dba9b8]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-76dba9b8]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-76dba9b8]{color:var(--input-active-label-color)} +@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";div[data-v-5093f1cb]{display:inline-block;min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}p[data-v-5093f1cb],label[data-v-5093f1cb]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-5093f1cb]{width:100%;color:red;font-size:85%}.checkbox[data-v-5093f1cb]{visibility:hidden}.checkbox+#custom-checkbox[data-v-5093f1cb]:after{content:"⬡";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}.checkbox:checked+#custom-checkbox[data-v-5093f1cb]:after{content:"⬣";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}#custom-checkbox[data-v-5093f1cb]{display:inline-block}#checkbox-container[data-v-5093f1cb]{display:inline-block;min-width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;height:1.15rem;border-radius:.25rem}#checkbox-container[data-v-5093f1cb]:hover{border:1px solid var(--input-active-border-color)}#checkbox-container:hover+label[data-v-5093f1cb]{color:var(--input-active-label-color)}#checkbox-label[data-v-5093f1cb]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}[data-v-169f1184]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}[data-v-169f1184]:root{font-family:var(--font-family)}.aform-primary-action[data-v-169f1184]{font-size:100%;text-align:center;min-height:2em;padding:.25rem 1rem;border:1px solid var(--primary-color);color:var(--primary-text-color);background-color:var(--primary-color);outline:2px solid var(--primary-text-color);transition:outline-offset .2s ease;font-size:var(--font-size);margin:.5ch}.aform-primary-action[data-v-169f1184]:hover,.aform-primary-action[data-v-169f1184]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adate[data-v-169f1184]{border:2px solid var(--focus-cell-outline);position:absolute;z-index:100;font-size:var(--table-font-size);display:inline-table;background-color:var(--row-color-zebra-light);color:var(--cell-text-color);outline:none;width:calc(100% - 4px)}.adate tr[data-v-169f1184]{height:1.15rem;text-align:center;vertical-align:middle}.adate td[data-v-169f1184]{border:2px solid transparent;min-width:2.25ch}.adate td[data-v-169f1184]:hover{border:2px solid var(--focus-cell-outline)}.adate td[data-v-169f1184]{border:1px;border-style:solid;border-color:var(--cell-border-color);border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--cell-text-color);text-overflow:ellipsis;overflow:hidden;padding-left:.5ch;padding-right:.5ch}.adate td[data-v-169f1184]:focus,.adate td[data-v-169f1184]:focus-within{background-color:var(--focus-cell-background);outline-width:2px;outline-style:solid;outline-color:var(--focus-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}button[data-v-169f1184]{background-color:var(--row-color-zebra-light);border:none;padding:0;margin:0;color:var(--cell-text-color);outline:none;font-size:var(--table-font-size)}.dateheader[data-v-169f1184]{font-weight:700;display:flex;align-items:center;justify-content:space-between}.adate .todaysdate[data-v-169f1184]{border-bottom-color:var(--focus-cell-outline)}.adate .selecteddate[data-v-169f1184]{border:2px solid var(--focus-cell-outline)}.autocomplete{position:relative}.input-wrapper{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}input:focus{border:1px solid var(--input-active-border-color);border-radius:.25rem .25rem 0 0;border-bottom:none}label{display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}.autocomplete-results{position:absolute;width:calc(100% - 1ch + 1.5px);z-index:1;padding:0;margin:0;color:#000;border:1px solid var(--input-active-border-color);border-radius:0 0 .25rem .25rem;border-top:none}.autocomplete-result{list-style:none;text-align:left;padding:4px 6px;cursor:pointer}.autocomplete-result.is-active,.autocomplete-result:hover{background-color:var(--row-color-zebra-light);color:#000}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}form[data-v-74d66cf2]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline}fieldset[data-v-cad9b578]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--gray-50)}legend[data-v-cad9b578]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;-webkit-user-select:none;user-select:none}.collapse-button[data-v-cad9b578]{float:right}div[data-v-02907cd6]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-02907cd6]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-02907cd6],label[data-v-02907cd6]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-02907cd6]{width:100%;color:red;font-size:85%}label[data-v-02907cd6]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-02907cd6]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-02907cd6]{color:var(--input-active-label-color)}div[data-v-76dba9b8]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-76dba9b8]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-76dba9b8],label[data-v-76dba9b8]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-76dba9b8]{width:100%;color:red;font-size:85%}label[data-v-76dba9b8]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-76dba9b8]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-76dba9b8]{color:var(--input-active-label-color)} diff --git a/aform/package.json b/aform/package.json index d220244b..cddbfe66 100644 --- a/aform/package.json +++ b/aform/package.json @@ -33,15 +33,15 @@ "@stonecrop/themes": "workspace:*", "@stonecrop/utilities": "workspace:*", "uuid": "^9.0.0", - "vue": "^3.2.47" + "vue": "^3.4.23" }, "devDependencies": { - "@histoire/plugin-vue": "^0.16.1", + "@histoire/plugin-vue": "^0.17.17", "@stonecrop/atable": "workspace:*", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", - "@vitejs/plugin-vue": "^4.2.1", + "@vitejs/plugin-vue": "^5.0.4", "@vitest/coverage-v8": "^1.5.0", "@vitest/ui": "^1.5.0", "@vue/test-utils": "^2.3.2", @@ -49,10 +49,10 @@ "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", - "histoire": "^0.16.1", + "histoire": "^0.17.17", "jsdom": "^22.0.0", "typescript": "^5.0.4", - "vite": "^4.3.5", + "vite": "^5.2.9", "vitest": "^1.5.0", "vue-router": "^4" }, diff --git a/aform/src/components/AForm.vue b/aform/src/components/AForm.vue index f856926e..d1acdb85 100644 --- a/aform/src/components/AForm.vue +++ b/aform/src/components/AForm.vue @@ -55,7 +55,6 @@ const childModels = computed({ }, set: newValue => { // Find the component in modelValue and update it - // eslint-disable-next-line vue/no-mutating-props props.modelValue[i].value = newValue emit('update:modelValue', props.modelValue) }, diff --git a/aform/src/components/form/ACheckbox.vue b/aform/src/components/form/ACheckbox.vue index 807f1d32..1476d239 100644 --- a/aform/src/components/form/ACheckbox.vue +++ b/aform/src/components/form/ACheckbox.vue @@ -10,12 +10,11 @@ \n","\n\n\n","import { defineComponent as D, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as C, vModelCheckbox as ge, toDisplayString as k, vShow as $, resolveComponent as ye, createBlock as H, withCtx as be, onMounted as se, onBeforeUnmount as we, ref as y, watch as F, unref as O, getCurrentScope as Ce, onScopeDispose as ke, inject as ae, nextTick as De, Fragment as V, renderList as x, normalizeStyle as Ee, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ie, mergeProps as Me, createTextVNode as Te, renderSlot as _e, createVNode as Se, resolveDirective as Oe } from \"vue\";\nconst $e = { id: \"checkbox-container\" }, Le = [\"id\", \"readonly\", \"required\"], Ve = { id: \"custom-checkbox\" }, xe = [\"for\"], Be = [\"innerHTML\"], Pe = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: {\n label: {},\n value: {},\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:value\"],\n setup(e, { emit: t }) {\n const o = e, n = t, s = S({\n get() {\n return o.value;\n },\n set(l) {\n n(\"update:value\", l);\n }\n });\n return (l, a) => (f(), v(\"div\", null, [\n i(\"label\", $e, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (r) => s.value = r),\n type: \"checkbox\",\n id: l.uuid,\n class: \"checkbox\",\n readonly: l.readOnly,\n required: l.required\n }, null, 8, Le), [\n [ge, s.value]\n ]),\n i(\"span\", Ve, k(s.value), 1)\n ]),\n i(\"label\", {\n for: l.uuid,\n id: \"checkbox-label\"\n }, k(l.label), 9, xe),\n C(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Be), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n}), M = (e, t) => {\n const o = e.__vccOpts || e;\n for (const [n, s] of t)\n o[n] = s;\n return o;\n}, qe = /* @__PURE__ */ M(Pe, [[\"__scopeId\", \"data-v-743cd4db\"]]), He = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), Fe = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, o) => {\n const n = ye(\"ATableModal\");\n return f(), H(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: be(() => [\n He\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar W;\nconst ie = typeof window < \"u\", Re = (e) => typeof e == \"string\", Ue = () => {\n};\nie && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction ue(e) {\n return typeof e == \"function\" ? e() : O(e);\n}\nfunction Qe(e) {\n return e;\n}\nfunction Ye(e) {\n return Ce() ? (ke(e), !0) : !1;\n}\nfunction q(e) {\n var t;\n const o = ue(e);\n return (t = o == null ? void 0 : o.$el) != null ? t : o;\n}\nconst ce = ie ? window : void 0;\nfunction je(...e) {\n let t, o, n, s;\n if (Re(e[0]) || Array.isArray(e[0]) ? ([o, n, s] = e, t = ce) : [t, o, n, s] = e, !t)\n return Ue;\n Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]);\n const l = [], a = () => {\n l.forEach((c) => c()), l.length = 0;\n }, r = (c, g, b, m) => (c.addEventListener(g, b, m), () => c.removeEventListener(g, b, m)), p = F(() => [q(t), ue(s)], ([c, g]) => {\n a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, g))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return Ye(u), u;\n}\nconst N = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nN[z] = N[z] || {};\nfunction We(e, { window: t = ce, scrollTarget: o } = {}) {\n const n = y(!1), s = () => {\n if (!t)\n return;\n const l = t.document, a = q(e);\n if (!a)\n n.value = !1;\n else {\n const r = a.getBoundingClientRect();\n n.value = r.top <= (t.innerHeight || l.documentElement.clientHeight) && r.left <= (t.innerWidth || l.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return F(() => q(e), () => s(), { immediate: !0, flush: \"post\" }), t && je(o || t, \"scroll\", s, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ne = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, Ke = (e, t) => {\n for (var o in t || (t = {}))\n ze.call(t, o) && J(e, o, t[o]);\n if (K)\n for (var o of K(t))\n Ge.call(t, o) && J(e, o, t[o]);\n return e;\n};\nconst Je = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nKe({\n linear: Qe\n}, Je);\nconst E = (e) => {\n let t = We(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, A = (e) => e.tabIndex >= 0, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let o;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (n) {\n const s = Array.from(n.children)[e.cellIndex];\n s && (o = s);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (o = n);\n }\n return o && (!A(o) || !E(o)) ? U(o) : o;\n}, Xe = (e) => {\n var t;\n const o = e.target;\n let n;\n if (o instanceof HTMLTableCellElement) {\n const s = (t = o.parentElement) == null ? void 0 : t.parentElement;\n if (s) {\n const l = s.firstElementChild.children[o.cellIndex];\n l && (n = l);\n }\n } else if (o instanceof HTMLTableRowElement) {\n const s = o.parentElement;\n if (s) {\n const l = s.firstElementChild;\n l && (n = l);\n }\n }\n return n && (!A(n) || !E(n)) ? Q(n) : n;\n}, Z = (e) => {\n const t = e.target;\n return Q(t);\n}, Q = (e) => {\n var t;\n let o;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (n) {\n const s = Array.from(n.children)[e.cellIndex];\n s && (o = s);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (o = n);\n }\n return o && (!A(o) || !E(o)) ? Q(o) : o;\n}, Ze = (e) => {\n var t;\n const o = e.target;\n let n;\n if (o instanceof HTMLTableCellElement) {\n const s = (t = o.parentElement) == null ? void 0 : t.parentElement;\n if (s) {\n const l = s.lastElementChild.children[o.cellIndex];\n l && (n = l);\n }\n } else if (o instanceof HTMLTableRowElement) {\n const s = o.parentElement;\n if (s) {\n const l = s.lastElementChild;\n l && (n = l);\n }\n }\n return n && (!A(n) || !E(n)) ? U(n) : n;\n}, ee = (e) => {\n const t = e.target;\n return Y(t);\n}, Y = (e) => {\n var t;\n let o;\n if (e.previousElementSibling)\n o = e.previousElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n o = n == null ? void 0 : n.lastElementChild;\n }\n return o && (!A(o) || !E(o)) ? Y(o) : o;\n}, te = (e) => {\n const t = e.target;\n return j(t);\n}, j = (e) => {\n var t;\n let o;\n if (e.nextElementSibling)\n o = e.nextElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n o = n == null ? void 0 : n.firstElementChild;\n }\n return o && (!A(o) || !E(o)) ? j(o) : o;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !E(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !E(t)) ? Y(t) : t;\n}, L = [\"alt\", \"control\", \"shift\", \"meta\"], et = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, de = {\n \"keydown.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = te(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = Xe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = Ze(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = Z(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction tt(e) {\n const t = (n) => {\n let s = null;\n n.parent && (typeof n.parent == \"string\" ? s = document.querySelector(n.parent) : n.parent instanceof Element ? s = n.parent : s = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = s ? Array.from(s.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const a of n.selectors.value)\n a instanceof Element ? l.push(a) : l.push(a.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(s.children).filter((a) => A(a) && E(a));\n return l;\n }, o = (n) => (s) => {\n const l = et[s.key] || s.key.toLowerCase();\n if (L.includes(l))\n return;\n const a = n.handlers || de;\n for (const r of Object.keys(a)) {\n const [p, ...u] = r.split(\".\");\n if (p === \"keydown\" && u.includes(l)) {\n const c = a[r], g = u.filter((m) => L.includes(m)), b = L.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return s.getModifierState(_);\n });\n if (g.length > 0) {\n if (b) {\n for (const m of L)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n s.getModifierState(_) && c(s);\n }\n }\n } else\n b || c(s);\n }\n }\n };\n se(() => {\n for (const n of e) {\n const s = t(n);\n for (const l of s)\n l.addEventListener(\"keydown\", o(n));\n }\n }), we(() => {\n for (const n of e) {\n const s = t(n);\n for (const l of s)\n l.removeEventListener(\"keydown\", o(n));\n }\n });\n}\nconst nt = [\"event\", \"colIndex\", \"rowIndex\", \"tableid\"], ot = { colspan: \"5\" }, lt = [\"onClick\"], st = 6, I = 7, at = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n event: {},\n indent: {},\n readonly: { type: Boolean }\n },\n setup(e) {\n const t = e, o = ae(t.tableid), n = /* @__PURE__ */ new Date(), s = y(), l = y(), a = y(), r = y([]);\n se(async () => {\n let d = o.cellData(t.colIndex, t.rowIndex);\n d ? (d instanceof Date || (d = new Date(d)), s.value = d, l.value = s.value.getMonth(), a.value = s.value.getFullYear()) : (l.value = n.getMonth(), a.value = n.getFullYear()), p(), await De();\n const T = document.getElementsByClassName(\"selecteddate\");\n if (T.length > 0)\n T[0].focus();\n else {\n const h = document.getElementsByClassName(\"todaysdate\");\n h.length > 0 && h[0].focus();\n }\n }), F([l, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const d = new Date(a.value, l.value, 1), T = d.getDay(), h = d.setDate(d.getDate() - T);\n for (let w of Array(43).keys())\n r.value.push(h + w * 864e5);\n }, u = () => {\n a.value -= 1;\n }, c = () => {\n a.value += 1;\n }, g = () => {\n l.value == 0 ? (l.value = 11, u()) : l.value -= 1;\n }, b = () => {\n l.value == 11 ? (l.value = 0, c()) : l.value += 1;\n }, m = (d) => {\n if (l.value === n.getMonth())\n return n.toDateString() === new Date(d).toDateString();\n }, _ = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, T) => {\n s.value = new Date(r.value[T]), me();\n }, me = () => {\n o.setCellData(t.rowIndex, t.colIndex, s.value.getTime());\n }, ve = S(() => new Date(a.value, l.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return tt([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...de,\n \"keydown.pageup\": g,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": c\n }\n }\n ]), (d, T) => d.readonly ? re(\"\", !0) : (f(), v(\"div\", {\n key: 0,\n event: d.event,\n colIndex: d.colIndex,\n rowIndex: d.rowIndex,\n tableid: d.tableid,\n class: \"adate\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n i(\"table\", null, [\n i(\"tr\", null, [\n i(\"td\", {\n onClick: g,\n tabindex: -1\n }, \"<\"),\n i(\"th\", ot, k(ve.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), v(V, null, x(st, (h) => i(\"tr\", { key: h }, [\n (f(), v(V, null, x(I, (w) => i(\"td\", {\n key: (h - 1) * I + w,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: Ee({\n border: _(r.value[(h - 1) * I + w]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(h - 1) * I + w]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Ae((he) => fe(he, (h - 1) * I + w), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(h - 1) * I + w]),\n selecteddate: _(r.value[(h - 1) * I + w])\n })\n }, k(new Date(r.value[(h - 1) * I + w]).getDate()), 15, lt)), 64))\n ])), 64))\n ])\n ], 8, nt));\n }\n}), rt = /* @__PURE__ */ M(at, [[\"__scopeId\", \"data-v-169f1184\"]]), it = D({\n name: \"ADropdown\",\n props: {\n modelValue: {\n type: String,\n required: !1,\n default: \"\"\n },\n label: {\n type: String,\n required: !0\n },\n value: String,\n items: {\n type: Array,\n required: !1,\n default: () => []\n },\n isAsync: {\n type: Boolean,\n required: !1,\n default: !1\n }\n },\n emits: [\"update:modelValue\", \"filterChanged\"],\n data() {\n return {\n results: [],\n search: this.modelValue,\n isLoading: !1,\n arrowCounter: 0,\n isOpen: !1\n };\n },\n watch: {\n items: function(e, t) {\n this.isLoading = !1, this.results = e;\n }\n },\n mounted() {\n document.addEventListener(\"click\", this.handleClickOutside), this.filterResults();\n },\n destroyed() {\n document.removeEventListener(\"click\", this.handleClickOutside);\n },\n methods: {\n setResult(e) {\n this.search = e, this.closeResults();\n },\n filterResults() {\n this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);\n },\n onChange() {\n this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit(\"filterChanged\", this.search)) : this.filterResults();\n },\n handleClickOutside(e) {\n this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);\n },\n closeResults() {\n this.isOpen = !1, this.items.includes(this.search) || (this.search = \"\"), this.$emit(\"update:modelValue\", this.search);\n },\n onArrowDown() {\n this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);\n },\n onArrowUp() {\n this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);\n },\n onEnter() {\n this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;\n },\n openWithSearch() {\n this.search = \"\", this.onChange(), this.$refs.mopInput.focus();\n }\n }\n}), ut = { class: \"input-wrapper\" }, ct = {\n id: \"autocomplete-results\",\n class: \"autocomplete-results\"\n}, dt = {\n key: 0,\n class: \"loading autocomplete-result\"\n}, pt = [\"onClick\"];\nfunction ft(e, t, o, n, s, l) {\n return f(), v(\"div\", {\n class: B([\"autocomplete\", { isOpen: e.isOpen }])\n }, [\n i(\"div\", ut, [\n C(i(\"input\", {\n ref: \"mopInput\",\n type: \"text\",\n onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),\n onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),\n \"onUpdate:modelValue\": t[2] || (t[2] = (a) => e.search = a),\n onKeydown: [\n t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), [\"down\"])),\n t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), [\"up\"])),\n t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), [\"enter\"]))\n ]\n }, null, 544), [\n [R, e.search]\n ]),\n C(i(\"ul\", ct, [\n e.isLoading ? (f(), v(\"li\", dt, \"Loading results...\")) : (f(!0), v(V, { key: 1 }, x(e.results, (a, r) => (f(), v(\"li\", {\n key: r,\n onClick: (p) => e.setResult(a),\n class: B([\"autocomplete-result\", { \"is-active\": r === e.arrowCounter }])\n }, k(a), 11, pt))), 128))\n ], 512), [\n [$, e.isOpen]\n ]),\n i(\"label\", null, k(e.label), 1)\n ])\n ], 2);\n}\nconst mt = /* @__PURE__ */ M(it, [[\"render\", ft]]), vt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, o) => (f(), v(\"button\", {\n class: B([\"collapse-button\", t.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n}), ht = /* @__PURE__ */ M(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), gt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: {},\n data: {},\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const o = e, n = t, s = y(o.data || {}), l = (r) => {\n let p = {};\n for (const [u, c] of Object.entries(r))\n [\"component\", \"fieldtype\"].includes(u) || (p[u] = c), u === \"rows\" && c && c.length === 0 && (p.rows = s.value[r.fieldname]);\n return p;\n }, a = S({\n get: () => o.modelValue.map((r, p) => S({\n get() {\n return r.value;\n },\n set: (u) => {\n o.modelValue[p].value = u, n(\"update:modelValue\", o.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (r, p) => (f(), v(\"form\", null, [\n (f(!0), v(V, null, x(r.modelValue, (u, c) => (f(), H(Ie(u.component), Me({\n key: c,\n schema: u,\n modelValue: a.value[c].value,\n \"onUpdate:modelValue\": (g) => a.value[c].value = g,\n data: s.value[u.fieldname],\n readonly: r.readonly\n }, l(u)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n}), pe = /* @__PURE__ */ M(gt, [[\"__scopeId\", \"data-v-82492bb4\"]]), yt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, o = y(t.data || []);\n let n = y(!1), s = y(t.collapsible);\n const l = y(t.schema);\n function a(r) {\n r.preventDefault(), s.value && (n.value = !n.value);\n }\n return (r, p) => (f(), v(\"fieldset\", null, [\n i(\"legend\", {\n onClick: a,\n onSubmit: a\n }, [\n Te(k(r.label) + \" \", 1),\n O(s) ? (f(), H(ht, {\n key: 0,\n collapsed: O(n)\n }, null, 8, [\"collapsed\"])) : re(\"\", !0)\n ], 32),\n _e(r.$slots, \"default\", { collapsed: O(n) }, () => [\n C(Se(pe, {\n modelValue: l.value,\n \"onUpdate:modelValue\": p[0] || (p[0] = (u) => l.value = u),\n data: o.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [$, !O(n)]\n ])\n ], !0)\n ]));\n }\n}), bt = /* @__PURE__ */ M(yt, [[\"__scopeId\", \"data-v-cad9b578\"]]), wt = [\"id\", \"disabled\", \"required\"], Ct = [\"for\"], kt = [\"innerHTML\"], Dt = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: {\n label: {},\n modelValue: {},\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const o = e, n = t, s = S({\n get: () => o.modelValue,\n set: (l) => {\n n(\"update:modelValue\", l);\n }\n });\n return (l, a) => (f(), v(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (r) => s.value = r),\n type: \"number\",\n id: l.uuid,\n disabled: l.readonly,\n required: l.required\n }, null, 8, wt), [\n [R, s.value]\n ]),\n i(\"label\", { for: l.uuid }, k(l.label), 9, Ct),\n C(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, kt), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n}), Et = /* @__PURE__ */ M(Dt, [[\"__scopeId\", \"data-v-be33e6c4\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction At(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction It(e) {\n var o;\n let t = e.value;\n if (t) {\n const n = At(t);\n if (n) {\n const s = e.instance.locale;\n t = n(s);\n }\n } else {\n const s = (o = e.instance.schema.fieldtype) == null ? void 0 : o.toLowerCase();\n s && le[s] && (t = le[s]);\n }\n return t;\n}\nfunction Mt(e, t) {\n t || (t = \"#\");\n let o = e;\n const n = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const s of n)\n o = o.replaceAll(s, \"\");\n return o;\n}\nfunction Tt(e, t, o) {\n o || (o = \"#\");\n let n = t;\n for (const s of e) {\n const l = n.indexOf(o);\n if (l !== -1) {\n const a = n.substring(0, l), r = n.substring(l + 1);\n n = a + s + r;\n }\n }\n return n.slice(0, t.length);\n}\nfunction _t(e, t) {\n const o = It(t);\n if (!o)\n return;\n const n = \"#\", s = e.value, l = Mt(s, n);\n if (l) {\n const a = Tt(l, o, n);\n t.instance.maskFilled && (t.instance.maskFilled = !a.includes(n)), e.value = a;\n } else\n e.value = o;\n}\nconst St = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const o = y(!1), n = ae(\"locale\", \"\");\n return { inputText: S({\n get() {\n return e.modelValue;\n },\n set(l) {\n t.emit(\"update:modelValue\", l);\n }\n }), locale: n, maskFilled: o };\n },\n directives: {\n mask: _t\n }\n}), Ot = [\"id\", \"disabled\", \"maxlength\", \"required\"], $t = [\"for\"], Lt = [\"innerHTML\"];\nfunction Vt(e, t, o, n, s, l) {\n const a = Oe(\"mask\");\n return f(), v(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, Ot), [\n [R, e.inputText],\n [a, e.mask]\n ]),\n i(\"label\", { for: e.uuid }, k(e.label), 9, $t),\n C(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Lt), [\n [$, e.validation.errorMessage]\n ])\n ]);\n}\nconst xt = /* @__PURE__ */ M(St, [[\"render\", Vt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Pt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", Fe), e.component(\"ADate\", rt), e.component(\"ADropdown\", mt), e.component(\"AFieldset\", bt), e.component(\"AForm\", pe), e.component(\"ANumericInput\", Et), e.component(\"ATextInput\", xt);\n}\nexport {\n qe as ACheckbox,\n Fe as AComboBox,\n rt as ADate,\n mt as ADropdown,\n bt as AFieldset,\n pe as AForm,\n Et as ANumericInput,\n xt as ATextInput,\n Pt as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nfunction NotImplementedError(message) {\n this.message = message || \"\";\n}\nNotImplementedError.prototype = Object.create(Error.prototype, {\n constructor: { value: NotImplementedError },\n name: { value: \"NotImplemented\" },\n stack: {\n get: function() {\n return new Error().stack;\n }\n }\n});\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.\n * @example\n * const registry = new Registry()\n * const store = useDataStore()\n * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {DoctypeMeta}\n * @see {@link DoctypeMeta}\n * @throws NotImplementedError\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * const meta = stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype);\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.getMeta('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia2, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction loadStoresState(pinia2, state) {\n for (const key in state) {\n const storeState = pinia2.state.value[key];\n if (storeState) {\n Object.assign(storeState, state[key]);\n } else {\n pinia2.state.value[key] = state[key];\n }\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (typeof store.$reset !== \"function\") {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n }) : store;\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n activeAction = void 0;\n return retValue;\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;\n const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup)));\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n if (process.env.NODE_ENV !== \"production\" && typeof id !== \"string\") {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia2, hot) {\n const hasContext = hasInjectionContext();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.getMeta(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, getMeta) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.getMeta = getMeta;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\n/*!\n * vue-router v4.2.5\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n const lastToSegment = toSegments[toSegments.length - 1];\n if (lastToSegment === \"..\" || lastToSegment === \".\") {\n toSegments.push(\"\");\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener, {\n passive: true\n });\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"object\" ? props[name] : props;\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n return app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of enteringRecords) {\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router22 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router22;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true\n });\n }\n app.provide(routerKey, router22);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router22, matcher);\n }\n }\n };\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router2;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n Object.prototype\n).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction get_escaped_char(char) {\n switch (char) {\n case '\"':\n return '\\\\\"';\n case \"<\":\n return \"\\\\u003C\";\n case \"\\\\\":\n return \"\\\\\\\\\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\u2028\":\n return \"\\\\u2028\";\n case \"\\u2029\":\n return \"\\\\u2029\";\n default:\n return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n }\n}\nfunction stringify_string(str) {\n let result = \"\";\n let last_pos = 0;\n const len = str.length;\n for (let i = 0; i < len; i += 1) {\n const char = str[i];\n const replacement = get_escaped_char(char);\n if (replacement) {\n result += str.slice(last_pos, i) + replacement;\n last_pos = i + 1;\n }\n }\n return `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta);\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", registry);\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Ae = (t) => typeof t == \"string\", Te = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : r(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return Ee() ? (ke(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Se(...t) {\n let e, n, o, a;\n if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return Te;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], s = () => {\n l.forEach((f) => f()), l.length = 0;\n }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => {\n s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c))));\n }, { immediate: !0, flush: \"post\" }), p = () => {\n d(), s();\n };\n return De(p), p;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Re(t, { window: e = me, scrollTarget: n } = {}) {\n const o = k(!1), a = () => {\n if (!e)\n return;\n const l = e.document, s = U(t);\n if (!s)\n o.value = !1;\n else {\n const i = s.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => a(), { immediate: !0, flush: \"post\" }), e && Se(n || e, \"scroll\", a, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst x = (t) => {\n let e = Re(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return V(e);\n}, V = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? V(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.firstElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.firstElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.lastElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.lastElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? V(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !x(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], We = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let a = null;\n o.parent && (typeof o.parent == \"string\" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value);\n let l = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n l.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const s of o.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(o.selectors.value);\n else\n l = Array.from(a.children).filter((s) => I(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = We[a.key] || a.key.toLowerCase();\n if (D.includes(l))\n return;\n const s = o.handlers || we;\n for (const i of Object.keys(s)) {\n const [d, ...p] = i.split(\".\");\n if (d === \"keydown\" && p.includes(l)) {\n const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(E);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(E) && f(a);\n }\n }\n } else\n v || f(a);\n }\n }\n };\n xe(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst Ve = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({\n __name: \"ACell\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: {}\n },\n setup(t) {\n var E;\n const e = t, n = O(e.tableid), o = k(null);\n let a = k(!1);\n const l = R(() => {\n const u = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(u) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(u) : u;\n } else\n return u;\n }), s = (u) => {\n if (e.clickHandler) {\n e.clickHandler(u);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let u = {\n ...we,\n \"keydown.f2\": s,\n \"keydown.alt.up\": s,\n \"keydown.alt.down\": s,\n \"keydown.alt.left\": s,\n \"keydown.alt.right\": s\n };\n typeof e.addNavigation == \"object\" && (u = {\n ...u,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: u\n }\n ]);\n }\n const i = R(() => n.columns[e.colIndex].align || \"center\"), d = R(() => n.columns[e.colIndex].width || \"40ch\");\n let p = \"\";\n const f = () => {\n o.value && (p = o.value.innerText);\n }, c = () => {\n o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p));\n }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : \"inherit\", h = {\n textAlign: i.value,\n width: d.value,\n backgroundColor: a.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: a.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent)\n };\n return (u, g) => (m(), b(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": u.colIndex,\n \"data-rowindex\": u.rowIndex,\n \"data-editable\": r(n).columns[u.colIndex].edit,\n contenteditable: r(n).columns[u.colIndex].edit,\n tabindex: u.tabIndex,\n spellcheck: !1,\n style: h,\n onFocus: f,\n onPaste: c,\n onBlur: c,\n onInput: c,\n onClick: s,\n onMousedown: s\n }, [\n r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, T(l.value), 1))\n ], 40, Ve));\n }\n}), _ = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, a] of e)\n n[o] = a;\n return n;\n}, he = /* @__PURE__ */ _(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ C({\n __name: \"AExpansionRow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const s = Object.assign({}, e.addNavigation);\n s[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: s\n }\n ]);\n }\n return (s, i) => (m(), b(L, null, [\n A(\"tr\", W(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n A(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, T(l()), 1),\n y(s.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n r(n).display[e.rowIndex].expanded ? (m(), b(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: a,\n tabindex: s.tabIndex,\n class: \"expanded-row\"\n }, [\n A(\"td\", {\n tabIndex: -1,\n colspan: r(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n y(s.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n}), Je = /* @__PURE__ */ _(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ C({\n __name: \"ARow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n de((d) => ({\n \"5b18ee03\": r(a)\n }));\n const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", s = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => {\n n.toggleRowExpand(d);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (d, p) => ce((m(), b(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: d.tabIndex,\n class: \"table-row\"\n }, [\n r(n).config.view === \"list\" ? (m(), b(\"td\", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === \"tree\" ? (m(), b(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: p[0] || (p[0] = (f) => i(d.rowIndex))\n }, T(l()), 1)) : y(d.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n y(d.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, s()]\n ]);\n }\n}), be = /* @__PURE__ */ _(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet S;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!S && (S = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return S(Ke);\n}\nconst w = [];\nfor (let t = 0; t < 256; ++t)\n w.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + \"-\" + w[t[e + 4]] + w[t[e + 5]] + \"-\" + w[t[e + 6]] + w[t[e + 7]] + \"-\" + w[t[e + 8]] + w[t[e + 9]] + \"-\" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]];\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let a = 0; a < 16; ++a)\n e[n + a] = o[a];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, a, l, s) {\n this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [a, l] of this.rows.entries())\n e[`${n}:${a}`] = l[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let a = this.rows.length - 1; a >= 0; a--) {\n const l = this.rows[a];\n l.parent && o.add(l.parent), n[a] = {\n childrenOpen: !1,\n expanded: !1,\n indent: l.indent || null,\n isParent: o.has(a),\n isRoot: l.parent === null || l.parent === void 0,\n modified: !1,\n open: l.parent === null || l.parent === void 0,\n parent: l.parent\n };\n }\n return $(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return R(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const a = this.columns[n];\n return this.rows[e][a.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ C({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"12d06943\": r(o)\n }));\n const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({\n minWidth: l.width || \"40ch\",\n textAlign: l.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (l, s) => l.columns.length ? (m(), b(\"thead\", lt, [\n A(\"tr\", at, [\n r(n).zeroColumn ? (m(), b(\"th\", rt)) : M(\"\", !0),\n (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b(\"th\", {\n key: d,\n tabindex: \"-1\",\n style: H(a(i))\n }, [\n y(l.$slots, \"default\", {}, () => [\n Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n}), ve = /* @__PURE__ */ _(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ C({\n __name: \"ATableModal\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {}\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, a) => (m(), b(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n y(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n}), ye = /* @__PURE__ */ _(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ C({\n __name: \"ATable\",\n props: {\n id: {},\n modelValue: {},\n columns: {},\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: {}\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t, o = e;\n let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config);\n _e(l.id, l), j(\n () => l.rows,\n (i) => {\n o(\"update:modelValue\", i);\n },\n { deep: !0 }\n );\n const s = (i) => {\n var d;\n (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", s), window.addEventListener(\"keydown\", (i) => {\n if (i.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const d = l.modal.parent;\n d && $e().then(() => {\n const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`);\n c && c[0].focus();\n });\n }\n }), (i, d) => (m(), b(\"table\", {\n class: \"atable\",\n style: H({ width: r(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n y(i.$slots, \"header\", { data: r(l) }, () => [\n z(ve, {\n columns: r(l).columns,\n config: r(l).config,\n tableid: r(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n A(\"tbody\", null, [\n y(i.$slots, \"body\", { data: r(l) }, () => [\n (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, {\n key: p.id || r(ge)(),\n row: p,\n rowIndex: f,\n tableid: r(l).id\n }, {\n default: G(() => [\n (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, {\n key: `${v}:${f}`,\n tableid: r(l).id,\n col: c,\n spellcheck: \"false\",\n rowIndex: f,\n colIndex: v + (r(l).zeroColumn ? 0 : -1),\n component: c.cellComponent,\n style: H({\n textAlign: (c == null ? void 0 : c.align) || \"center\",\n minWidth: (c == null ? void 0 : c.width) || \"40ch\",\n width: r(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n y(i.$slots, \"footer\", { data: r(l) }, void 0, !0),\n y(i.$slots, \"modal\", { data: r(l) }, () => [\n ce(z(ye, {\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id,\n style: H({\n left: r(l).modal.left + \"px\",\n top: r(l).modal.top + \"px\",\n maxWidth: r(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (m(), P(ie(r(l).modal.component), W({\n key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`,\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id\n }, r(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, r(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n}), ct = /* @__PURE__ */ _(dt, [[\"__scopeId\", \"data-v-55d8ba05\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", ve), t.component(\"ATableModal\", ye);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n ve as ATableHeader,\n ye as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["props","__props","_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","M","o","n","s","W","ie","Qe","N","z","G","Ne","K","ze","Ge","J","Ke","Je","D","gt","y","l","r","p","a","S","f","v","V","x","H","Ie","Me","g","pe","le","At","It","t","Mt","Tt","_t","ae","NotImplementedError","message","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now$1","ApiProxy","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","storeState","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","isBrowser","isESModule","assign","applyToParams","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLinkImpl","defineComponent","slots","link","elClass","getLinkClass","h$1","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","info","slot","slotContent","RouterView","parentName","parentSubTreeType","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","resolve2","scrollBehavior","started","router22","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","get_escaped_char","stringify_string","str","last_pos","replacement","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","d","u","h","_a2","pinia","newSchema","fieldValue","Ae","Te","fe","Oe","De","Ee","ke","U","me","Se","c","j","X","Y","Re","Z","Pe","He","Le","ee","I","te","Ue","B","ne","je","oe","Q","F","We","we","q","E","xe","Ve","Be","C","O","R","P","T","_","he","Xe","Ye","Ze","de","ce","ue","be","et","w","tt","nt","se","ge","ot","$","lt","at","rt","st","A","L","Ce","ve","it","ye","dt","_e","$e","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,UAAMA,IAAQC,GAIRC,IAAYC,EAAkB,CAAA,CAAE,GAChCC,IAASD,EAAI,EAAK,GAClBE,IAAUF,EAAoB,IAAI,GAClCG,IAAQH,EAAI,EAAK,GACjBI,IAAeJ,EAAI,EAAK;AAE9B,IAAAK,GAAU,MAAM;AACf,MAAAN,EAAU,QAAQF,EAAM,UACTS;IAAA,CACf;AAED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,GACnB2gC,IAAc3gC,EAAiB,IAAI,GAEnC4gC,IAAoBvwB,EAAS,MAC3BmwB,EAAoB,QAAQ,cAAc,SACjD;AAED,IAAAngC,GAAU,MAAM;AACH,MAAAkgC,EAAA,QAAQ1gC,EAAM,eAAe,CAAA;AAAA,IAAC,CAC1C;AAED,UAAMghC,IAAoB,MAAM;AACX,MAAAL,EAAA,QAAQ,CAACA,EAAoB;AAAA,IAAA,GAG5CM,IAAe,YAAY;AACjB,MAAAL,EAAA,QAAQ,CAACA,EAAe,OACvC,MAAMpvB,GAAS,MAAM;AACpB,QAAAsvB,EAAY,MAAM;MAAM,CACxB;AAAA,IAAA,GAGII,IAAoB,CAAC91B,MAA8B;AACxD,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB;AAAA,IAAA,GAGjB+1B,IAAe,OAAO/1B,MAAsC;AACjE,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB,GACtB,MAAM61B,EAAa;AAAA,IAAA,GAGdG,IAAe,MAA6C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEC9GnDtgC,KAAA;AAAA,EACd,SAAS,CAAC+K,MAAa;AAClB,IAAAA,EAAA,UAAU,aAAaw1B,EAAS,GAChCx1B,EAAA,UAAU,kBAAkBy1B,EAAc,GAC1Cz1B,EAAA,UAAU,WAAW01B,EAAO,GAC5B11B,EAAA,UAAU,WAAW21B,EAAO,GAC5B31B,EAAA,UAAU,YAAY41B,EAAQ;AAAA,EACnC;AACD;"} \ No newline at end of file +{"version":3,"file":"desktop.js","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from \"vue\";\nconst Ve = { id: \"checkbox-container\" }, xe = [\"id\", \"readonly\", \"required\"], Be = { id: \"custom-checkbox\" }, Pe = [\"for\"], qe = [\"innerHTML\"], He = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n i(\"label\", Ve, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"checkbox\",\n id: n.uuid,\n class: \"checkbox\",\n readonly: n.readOnly,\n required: n.required\n }, null, 8, xe), [\n [be, t.value]\n ]),\n i(\"span\", Be, k(t.value), 1)\n ]),\n i(\"label\", {\n for: n.uuid,\n id: \"checkbox-label\"\n }, k(n.label), 9, Pe),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, qe), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), M = (e, t) => {\n const n = e.__vccOpts || e;\n for (const [o, l] of t)\n n[o] = l;\n return n;\n}, Fe = /* @__PURE__ */ M(He, [[\"__scopeId\", \"data-v-5093f1cb\"]]), Re = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), Ue = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, n) => {\n const o = we(\"ATableModal\");\n return f(), H(o, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: Ce(() => [\n Re\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar W;\nconst de = typeof window < \"u\", Qe = (e) => typeof e == \"string\", Ye = () => {\n};\nde && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction ce(e) {\n return typeof e == \"function\" ? e() : S(e);\n}\nfunction je(e) {\n return e;\n}\nfunction We(e) {\n return De() ? (Ee(e), !0) : !1;\n}\nfunction q(e) {\n var t;\n const n = ce(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst pe = de ? window : void 0;\nfunction Ne(...e) {\n let t, n, o, l;\n if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t)\n return Ye;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const s = [], a = () => {\n s.forEach((d) => d()), s.length = 0;\n }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => {\n a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return We(u), u;\n}\nconst N = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nN[z] = N[z] || {};\nfunction ze(e, { window: t = pe, scrollTarget: n } = {}) {\n const o = y(!1), l = () => {\n if (!t)\n return;\n const s = t.document, a = q(e);\n if (!a)\n o.value = !1;\n else {\n const r = a.getBoundingClientRect();\n o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return F(() => q(e), () => l(), { immediate: !0, flush: \"post\" }), t && Ne(n || t, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => {\n for (var n in t || (t = {}))\n Ke.call(t, n) && J(e, n, t[n]);\n if (K)\n for (var n of K(t))\n Je.call(t, n) && J(e, n, t[n]);\n return e;\n};\nconst Ze = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nXe({\n linear: je\n}, Ze);\nconst E = (e) => {\n let t = ze(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, A = (e) => e.tabIndex >= 0, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.previousElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? U(n) : n;\n}, et = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.firstElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.firstElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? Q(o) : o;\n}, Z = (e) => {\n const t = e.target;\n return Q(t);\n}, Q = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.nextElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? Q(n) : n;\n}, tt = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.lastElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.lastElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? U(o) : o;\n}, ee = (e) => {\n const t = e.target;\n return Y(t);\n}, Y = (e) => {\n var t;\n let n;\n if (e.previousElementSibling)\n n = e.previousElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!A(n) || !E(n)) ? Y(n) : n;\n}, te = (e) => {\n const t = e.target;\n return j(t);\n}, j = (e) => {\n var t;\n let n;\n if (e.nextElementSibling)\n n = e.nextElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!A(n) || !E(n)) ? j(n) : n;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !E(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !E(t)) ? Y(t) : t;\n}, $ = [\"alt\", \"control\", \"shift\", \"meta\"], nt = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, fe = {\n \"keydown.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = te(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = et(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = tt(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = Z(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ot(e) {\n const t = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let s = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n s.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const a of o.selectors.value)\n a instanceof Element ? s.push(a) : s.push(a.$el);\n else\n s.push(o.selectors.value);\n else\n s = Array.from(l.children).filter((a) => A(a) && E(a));\n return s;\n }, n = (o) => (l) => {\n const s = nt[l.key] || l.key.toLowerCase();\n if ($.includes(s))\n return;\n const a = o.handlers || fe;\n for (const r of Object.keys(a)) {\n const [p, ...u] = r.split(\".\");\n if (p === \"keydown\" && u.includes(s)) {\n const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (g.length > 0) {\n if (b) {\n for (const m of $)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n b || d(l);\n }\n }\n };\n re(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.addEventListener(\"keydown\", n(o));\n }\n }), ke(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst lt = [\"event\", \"colIndex\", \"rowIndex\", \"tableid\"], st = { colspan: \"5\" }, at = [\"onClick\"], rt = 6, I = 7, it = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n event: {},\n indent: {},\n readonly: { type: Boolean }\n },\n setup(e) {\n const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]);\n re(async () => {\n let c = n.cellData(t.colIndex, t.rowIndex);\n c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae();\n const T = document.getElementsByClassName(\"selecteddate\");\n if (T.length > 0)\n T[0].focus();\n else {\n const v = document.getElementsByClassName(\"todaysdate\");\n v.length > 0 && v[0].focus();\n }\n }), F([s, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T);\n for (let w of Array(43).keys())\n r.value.push(v + w * 864e5);\n }, u = () => {\n a.value -= 1;\n }, d = () => {\n a.value += 1;\n }, g = () => {\n s.value == 0 ? (s.value = 11, u()) : s.value -= 1;\n }, b = () => {\n s.value == 11 ? (s.value = 0, d()) : s.value += 1;\n }, m = (c) => {\n if (s.value === o.getMonth())\n return o.toDateString() === new Date(c).toDateString();\n }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => {\n l.value = new Date(r.value[T]), ve();\n }, ve = () => {\n n.setCellData(t.rowIndex, t.colIndex, l.value.getTime());\n }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return ot([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...fe,\n \"keydown.pageup\": g,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": d\n }\n }\n ]), (c, T) => c.readonly ? ue(\"\", !0) : (f(), h(\"div\", {\n key: 0,\n event: c.event,\n colIndex: c.colIndex,\n rowIndex: c.rowIndex,\n tableid: c.tableid,\n class: \"adate\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n i(\"table\", null, [\n i(\"tr\", null, [\n i(\"td\", {\n onClick: g,\n tabindex: -1\n }, \"<\"),\n i(\"th\", st, k(ge.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), h(V, null, x(rt, (v) => i(\"tr\", { key: v }, [\n (f(), h(V, null, x(I, (w) => i(\"td\", {\n key: (v - 1) * I + w,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: Ie({\n border: _(r.value[(v - 1) * I + w]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(v - 1) * I + w]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Me((ye) => he(ye, (v - 1) * I + w), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(v - 1) * I + w]),\n selecteddate: _(r.value[(v - 1) * I + w])\n })\n }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64))\n ])), 64))\n ])\n ], 8, lt));\n }\n}), ut = /* @__PURE__ */ M(it, [[\"__scopeId\", \"data-v-169f1184\"]]), dt = D({\n name: \"ADropdown\",\n props: {\n modelValue: {\n type: String,\n required: !1,\n default: \"\"\n },\n label: {\n type: String,\n required: !0\n },\n value: String,\n items: {\n type: Array,\n required: !1,\n default: () => []\n },\n isAsync: {\n type: Boolean,\n required: !1,\n default: !1\n }\n },\n emits: [\"update:modelValue\", \"filterChanged\"],\n data() {\n return {\n results: [],\n search: this.modelValue,\n isLoading: !1,\n arrowCounter: 0,\n isOpen: !1\n };\n },\n watch: {\n items: function(e, t) {\n this.isLoading = !1, this.results = e;\n }\n },\n mounted() {\n document.addEventListener(\"click\", this.handleClickOutside), this.filterResults();\n },\n destroyed() {\n document.removeEventListener(\"click\", this.handleClickOutside);\n },\n methods: {\n setResult(e) {\n this.search = e, this.closeResults();\n },\n filterResults() {\n this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);\n },\n onChange() {\n this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit(\"filterChanged\", this.search)) : this.filterResults();\n },\n handleClickOutside(e) {\n this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);\n },\n closeResults() {\n this.isOpen = !1, this.items.includes(this.search) || (this.search = \"\"), this.$emit(\"update:modelValue\", this.search);\n },\n onArrowDown() {\n this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);\n },\n onArrowUp() {\n this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);\n },\n onEnter() {\n this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;\n },\n openWithSearch() {\n this.search = \"\", this.onChange(), this.$refs.mopInput.focus();\n }\n }\n}), ct = { class: \"input-wrapper\" }, pt = {\n id: \"autocomplete-results\",\n class: \"autocomplete-results\"\n}, ft = {\n key: 0,\n class: \"loading autocomplete-result\"\n}, mt = [\"onClick\"];\nfunction ht(e, t, n, o, l, s) {\n return f(), h(\"div\", {\n class: B([\"autocomplete\", { isOpen: e.isOpen }])\n }, [\n i(\"div\", ct, [\n C(i(\"input\", {\n ref: \"mopInput\",\n type: \"text\",\n onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),\n onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),\n \"onUpdate:modelValue\": t[2] || (t[2] = (a) => e.search = a),\n onKeydown: [\n t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), [\"down\"])),\n t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), [\"up\"])),\n t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), [\"enter\"]))\n ]\n }, null, 544), [\n [R, e.search]\n ]),\n C(i(\"ul\", pt, [\n e.isLoading ? (f(), h(\"li\", ft, \"Loading results...\")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h(\"li\", {\n key: r,\n onClick: (p) => e.setResult(a),\n class: B([\"autocomplete-result\", { \"is-active\": r === e.arrowCounter }])\n }, k(a), 11, mt))), 128))\n ], 512), [\n [O, e.isOpen]\n ]),\n i(\"label\", null, k(e.label), 1)\n ])\n ], 2);\n}\nconst vt = /* @__PURE__ */ M(dt, [[\"render\", ht]]), gt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, n) => (f(), h(\"button\", {\n class: B([\"collapse-button\", t.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n}), yt = /* @__PURE__ */ M(gt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), bt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: {},\n data: {},\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const n = e, o = t, l = y(n.data || {}), s = (r) => {\n let p = {};\n for (const [u, d] of Object.entries(r))\n [\"component\", \"fieldtype\"].includes(u) || (p[u] = d), u === \"rows\" && d && d.length === 0 && (p.rows = l.value[r.fieldname]);\n return p;\n }, a = L({\n get: () => n.modelValue.map((r, p) => L({\n get() {\n return r.value;\n },\n set: (u) => {\n n.modelValue[p].value = u, o(\"update:modelValue\", n.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (r, p) => (f(), h(\"form\", null, [\n (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({\n key: d,\n schema: u,\n modelValue: a.value[d].value,\n \"onUpdate:modelValue\": (g) => a.value[d].value = g,\n data: l.value[u.fieldname],\n readonly: r.readonly\n }, s(u)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n}), me = /* @__PURE__ */ M(bt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), wt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, n = y(t.data || []);\n let o = y(!1), l = y(t.collapsible);\n const s = y(t.schema);\n function a(r) {\n r.preventDefault(), l.value && (o.value = !o.value);\n }\n return (r, p) => (f(), h(\"fieldset\", null, [\n i(\"legend\", {\n onClick: a,\n onSubmit: a\n }, [\n Se(k(r.label) + \" \", 1),\n S(l) ? (f(), H(yt, {\n key: 0,\n collapsed: S(o)\n }, null, 8, [\"collapsed\"])) : ue(\"\", !0)\n ], 32),\n Oe(r.$slots, \"default\", { collapsed: S(o) }, () => [\n C($e(me, {\n modelValue: s.value,\n \"onUpdate:modelValue\": p[0] || (p[0] = (u) => s.value = u),\n data: n.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [O, !S(o)]\n ])\n ], !0)\n ]));\n }\n}), Ct = /* @__PURE__ */ M(wt, [[\"__scopeId\", \"data-v-cad9b578\"]]), kt = [\"id\", \"disabled\", \"required\"], Dt = [\"for\"], Et = [\"innerHTML\"], At = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"number\",\n id: n.uuid,\n disabled: n.readonly,\n required: n.required\n }, null, 8, kt), [\n [R, t.value]\n ]),\n i(\"label\", { for: n.uuid }, k(n.label), 9, Dt),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, Et), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), It = /* @__PURE__ */ M(At, [[\"__scopeId\", \"data-v-02907cd6\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction Mt(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction Tt(e) {\n var n;\n let t = e.value;\n if (t) {\n const o = Mt(t);\n if (o) {\n const l = e.instance.locale;\n t = o(l);\n }\n } else {\n const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase();\n l && le[l] && (t = le[l]);\n }\n return t;\n}\nfunction _t(e, t) {\n t || (t = \"#\");\n let n = e;\n const o = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const l of o)\n n = n.replaceAll(l, \"\");\n return n;\n}\nfunction St(e, t, n) {\n n || (n = \"#\");\n let o = t;\n for (const l of e) {\n const s = o.indexOf(n);\n if (s !== -1) {\n const a = o.substring(0, s), r = o.substring(s + 1);\n o = a + l + r;\n }\n }\n return o.slice(0, t.length);\n}\nfunction Ot(e, t) {\n const n = Tt(t);\n if (!n)\n return;\n const o = \"#\", l = e.value, s = _t(l, o);\n if (s) {\n const a = St(s, n, o);\n t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a;\n } else\n e.value = n;\n}\nconst $t = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const n = y(!1), o = ie(\"locale\", \"\");\n return { inputText: L({\n get() {\n return e.modelValue;\n },\n set(s) {\n t.emit(\"update:modelValue\", s);\n }\n }), locale: o, maskFilled: n };\n },\n directives: {\n mask: Ot\n }\n}), Lt = [\"id\", \"disabled\", \"maxlength\", \"required\"], Vt = [\"for\"], xt = [\"innerHTML\"];\nfunction Bt(e, t, n, o, l, s) {\n const a = Le(\"mask\");\n return f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, Lt), [\n [R, e.inputText],\n [a, e.mask]\n ]),\n i(\"label\", { for: e.uuid }, k(e.label), 9, Vt),\n C(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, xt), [\n [O, e.validation.errorMessage]\n ])\n ]);\n}\nconst Pt = /* @__PURE__ */ M($t, [[\"render\", Bt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Ht(e) {\n e.component(\"ACheckbox\", Fe), e.component(\"ACombobox\", Ue), e.component(\"ADate\", ut), e.component(\"ADropdown\", vt), e.component(\"AFieldset\", Ct), e.component(\"AForm\", me), e.component(\"ANumericInput\", It), e.component(\"ATextInput\", Pt);\n}\nexport {\n Fe as ACheckbox,\n Ue as AComboBox,\n ut as ADate,\n vt as ADropdown,\n Ct as AFieldset,\n me as AForm,\n It as ANumericInput,\n Pt as ATextInput,\n Ht as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nfunction NotImplementedError(message) {\n this.message = message || \"\";\n}\nNotImplementedError.prototype = Object.create(Error.prototype, {\n constructor: { value: NotImplementedError },\n name: { value: \"NotImplemented\" },\n stack: {\n get: function() {\n return new Error().stack;\n }\n }\n});\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.\n * @example\n * const registry = new Registry()\n * const store = useDataStore()\n * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {DoctypeMeta}\n * @see {@link DoctypeMeta}\n * @throws NotImplementedError\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * const meta = stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype);\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.getMeta('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia2, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction loadStoresState(pinia2, state) {\n for (const key in state) {\n const storeState = pinia2.state.value[key];\n if (storeState) {\n Object.assign(storeState, state[key]);\n } else {\n pinia2.state.value[key] = state[key];\n }\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (typeof store.$reset !== \"function\") {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n }) : store;\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n activeAction = void 0;\n return retValue;\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;\n const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup)));\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n if (process.env.NODE_ENV !== \"production\" && typeof id !== \"string\") {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia2, hot) {\n const hasContext = hasInjectionContext();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.getMeta(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, getMeta) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.getMeta = getMeta;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\n/*!\n * vue-router v4.2.5\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n const lastToSegment = toSegments[toSegments.length - 1];\n if (lastToSegment === \"..\" || lastToSegment === \".\") {\n toSegments.push(\"\");\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener, {\n passive: true\n });\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"object\" ? props[name] : props;\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n return app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of enteringRecords) {\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router22 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router22;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true\n });\n }\n app.provide(routerKey, router22);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router22, matcher);\n }\n }\n };\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router2;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n Object.prototype\n).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction get_escaped_char(char) {\n switch (char) {\n case '\"':\n return '\\\\\"';\n case \"<\":\n return \"\\\\u003C\";\n case \"\\\\\":\n return \"\\\\\\\\\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\u2028\":\n return \"\\\\u2028\";\n case \"\\u2029\":\n return \"\\\\u2029\";\n default:\n return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n }\n}\nfunction stringify_string(str) {\n let result = \"\";\n let last_pos = 0;\n const len = str.length;\n for (let i = 0; i < len; i += 1) {\n const char = str[i];\n const replacement = get_escaped_char(char);\n if (replacement) {\n result += str.slice(last_pos, i) + replacement;\n last_pos = i + 1;\n }\n }\n return `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta);\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", registry);\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Ae = (t) => typeof t == \"string\", Te = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : r(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return Ee() ? (ke(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Se(...t) {\n let e, n, o, a;\n if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return Te;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], s = () => {\n l.forEach((f) => f()), l.length = 0;\n }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => {\n s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c))));\n }, { immediate: !0, flush: \"post\" }), p = () => {\n d(), s();\n };\n return De(p), p;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Re(t, { window: e = me, scrollTarget: n } = {}) {\n const o = k(!1), a = () => {\n if (!e)\n return;\n const l = e.document, s = U(t);\n if (!s)\n o.value = !1;\n else {\n const i = s.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => a(), { immediate: !0, flush: \"post\" }), e && Se(n || e, \"scroll\", a, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst x = (t) => {\n let e = Re(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return V(e);\n}, V = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? V(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.firstElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.firstElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.lastElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.lastElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? V(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !x(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], We = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let a = null;\n o.parent && (typeof o.parent == \"string\" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value);\n let l = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n l.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const s of o.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(o.selectors.value);\n else\n l = Array.from(a.children).filter((s) => I(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = We[a.key] || a.key.toLowerCase();\n if (D.includes(l))\n return;\n const s = o.handlers || we;\n for (const i of Object.keys(s)) {\n const [d, ...p] = i.split(\".\");\n if (d === \"keydown\" && p.includes(l)) {\n const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(E);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(E) && f(a);\n }\n }\n } else\n v || f(a);\n }\n }\n };\n xe(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst Ve = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({\n __name: \"ACell\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: {}\n },\n setup(t) {\n var E;\n const e = t, n = O(e.tableid), o = k(null);\n let a = k(!1);\n const l = R(() => {\n const u = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(u) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(u) : u;\n } else\n return u;\n }), s = (u) => {\n if (e.clickHandler) {\n e.clickHandler(u);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let u = {\n ...we,\n \"keydown.f2\": s,\n \"keydown.alt.up\": s,\n \"keydown.alt.down\": s,\n \"keydown.alt.left\": s,\n \"keydown.alt.right\": s\n };\n typeof e.addNavigation == \"object\" && (u = {\n ...u,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: u\n }\n ]);\n }\n const i = R(() => n.columns[e.colIndex].align || \"center\"), d = R(() => n.columns[e.colIndex].width || \"40ch\");\n let p = \"\";\n const f = () => {\n o.value && (p = o.value.innerText);\n }, c = () => {\n o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p));\n }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : \"inherit\", h = {\n textAlign: i.value,\n width: d.value,\n backgroundColor: a.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: a.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent)\n };\n return (u, g) => (m(), b(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": u.colIndex,\n \"data-rowindex\": u.rowIndex,\n \"data-editable\": r(n).columns[u.colIndex].edit,\n contenteditable: r(n).columns[u.colIndex].edit,\n tabindex: u.tabIndex,\n spellcheck: !1,\n style: h,\n onFocus: f,\n onPaste: c,\n onBlur: c,\n onInput: c,\n onClick: s,\n onMousedown: s\n }, [\n r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, T(l.value), 1))\n ], 40, Ve));\n }\n}), _ = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, a] of e)\n n[o] = a;\n return n;\n}, he = /* @__PURE__ */ _(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ C({\n __name: \"AExpansionRow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const s = Object.assign({}, e.addNavigation);\n s[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: s\n }\n ]);\n }\n return (s, i) => (m(), b(L, null, [\n A(\"tr\", W(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n A(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, T(l()), 1),\n y(s.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n r(n).display[e.rowIndex].expanded ? (m(), b(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: a,\n tabindex: s.tabIndex,\n class: \"expanded-row\"\n }, [\n A(\"td\", {\n tabIndex: -1,\n colspan: r(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n y(s.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n}), Je = /* @__PURE__ */ _(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ C({\n __name: \"ARow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n de((d) => ({\n \"5b18ee03\": r(a)\n }));\n const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", s = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => {\n n.toggleRowExpand(d);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (d, p) => ce((m(), b(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: d.tabIndex,\n class: \"table-row\"\n }, [\n r(n).config.view === \"list\" ? (m(), b(\"td\", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === \"tree\" ? (m(), b(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: p[0] || (p[0] = (f) => i(d.rowIndex))\n }, T(l()), 1)) : y(d.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n y(d.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, s()]\n ]);\n }\n}), be = /* @__PURE__ */ _(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet S;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!S && (S = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return S(Ke);\n}\nconst w = [];\nfor (let t = 0; t < 256; ++t)\n w.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + \"-\" + w[t[e + 4]] + w[t[e + 5]] + \"-\" + w[t[e + 6]] + w[t[e + 7]] + \"-\" + w[t[e + 8]] + w[t[e + 9]] + \"-\" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]];\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let a = 0; a < 16; ++a)\n e[n + a] = o[a];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, a, l, s) {\n this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [a, l] of this.rows.entries())\n e[`${n}:${a}`] = l[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let a = this.rows.length - 1; a >= 0; a--) {\n const l = this.rows[a];\n l.parent && o.add(l.parent), n[a] = {\n childrenOpen: !1,\n expanded: !1,\n indent: l.indent || null,\n isParent: o.has(a),\n isRoot: l.parent === null || l.parent === void 0,\n modified: !1,\n open: l.parent === null || l.parent === void 0,\n parent: l.parent\n };\n }\n return $(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return R(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const a = this.columns[n];\n return this.rows[e][a.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ C({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"12d06943\": r(o)\n }));\n const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({\n minWidth: l.width || \"40ch\",\n textAlign: l.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (l, s) => l.columns.length ? (m(), b(\"thead\", lt, [\n A(\"tr\", at, [\n r(n).zeroColumn ? (m(), b(\"th\", rt)) : M(\"\", !0),\n (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b(\"th\", {\n key: d,\n tabindex: \"-1\",\n style: H(a(i))\n }, [\n y(l.$slots, \"default\", {}, () => [\n Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n}), ve = /* @__PURE__ */ _(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ C({\n __name: \"ATableModal\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {}\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, a) => (m(), b(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n y(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n}), ye = /* @__PURE__ */ _(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ C({\n __name: \"ATable\",\n props: {\n id: {},\n modelValue: {},\n columns: {},\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: {}\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t, o = e;\n let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config);\n _e(l.id, l), j(\n () => l.rows,\n (i) => {\n o(\"update:modelValue\", i);\n },\n { deep: !0 }\n );\n const s = (i) => {\n var d;\n (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", s), window.addEventListener(\"keydown\", (i) => {\n if (i.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const d = l.modal.parent;\n d && $e().then(() => {\n const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`);\n c && c[0].focus();\n });\n }\n }), (i, d) => (m(), b(\"table\", {\n class: \"atable\",\n style: H({ width: r(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n y(i.$slots, \"header\", { data: r(l) }, () => [\n z(ve, {\n columns: r(l).columns,\n config: r(l).config,\n tableid: r(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n A(\"tbody\", null, [\n y(i.$slots, \"body\", { data: r(l) }, () => [\n (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, {\n key: p.id || r(ge)(),\n row: p,\n rowIndex: f,\n tableid: r(l).id\n }, {\n default: G(() => [\n (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, {\n key: `${v}:${f}`,\n tableid: r(l).id,\n col: c,\n spellcheck: \"false\",\n rowIndex: f,\n colIndex: v + (r(l).zeroColumn ? 0 : -1),\n component: c.cellComponent,\n style: H({\n textAlign: (c == null ? void 0 : c.align) || \"center\",\n minWidth: (c == null ? void 0 : c.width) || \"40ch\",\n width: r(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n y(i.$slots, \"footer\", { data: r(l) }, void 0, !0),\n y(i.$slots, \"modal\", { data: r(l) }, () => [\n ce(z(ye, {\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id,\n style: H({\n left: r(l).modal.left + \"px\",\n top: r(l).modal.top + \"px\",\n maxWidth: r(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (m(), P(ie(r(l).modal.component), W({\n key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`,\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id\n }, r(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, r(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n}), ct = /* @__PURE__ */ _(dt, [[\"__scopeId\", \"data-v-55d8ba05\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", ve), t.component(\"ATableModal\", ye);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n ve as ATableHeader,\n ye as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["props","__props","_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","M","l","W","de","je","N","z","G","Ge","K","Ke","Je","J","Xe","Ze","D","bt","y","r","p","d","a","L","f","h","V","x","H","Te","_e","g","me","le","Mt","Tt","n","t","_t","St","Ot","ie","s","NotImplementedError","message","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now$1","ApiProxy","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","o","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","storeState","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","isBrowser","isESModule","assign","applyToParams","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","v","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLinkImpl","defineComponent","slots","link","elClass","getLinkClass","h$1","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","info","slot","slotContent","RouterView","parentName","parentSubTreeType","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","resolve2","scrollBehavior","started","router22","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","get_escaped_char","stringify_string","str","last_pos","replacement","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","u","_a2","pinia","newSchema","fieldValue","pe","Ae","fe","Oe","De","Ee","ke","U","Se","c","j","X","Y","Re","Z","Pe","He","Le","ee","Me","Ne","I","te","Ue","B","ne","oe","Q","F","ae","We","we","q","E","xe","Ie","Ve","Be","Qe","C","O","R","P","T","_","he","Ye","ce","ue","be","S","et","w","tt","nt","se","ge","ot","$","lt","at","rt","st","A","Ce","ve","it","ye","dt","$e","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,UAAMA,IAAQC,GAIRC,IAAYC,EAAkB,CAAA,CAAE,GAChCC,IAASD,EAAI,EAAK,GAClBE,IAAUF,EAAoB,IAAI,GAClCG,IAAQH,EAAI,EAAK,GACjBI,IAAeJ,EAAI,EAAK;AAE9B,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,EAAiB,IAAI,GAEnC2gC,IAAoBrwB,EAAS,MAC3BiwB,EAAoB,QAAQ,cAAc,SACjD;AAED,IAAAlgC,GAAU,MAAM;AACH,MAAAigC,EAAA,QAAQzgC,EAAM,eAAe,CAAA;AAAA,IAAC,CAC1C;AAED,UAAM+gC,IAAoB,MAAM;AACX,MAAAL,EAAA,QAAQ,CAACA,EAAoB;AAAA,IAAA,GAG5CM,IAAe,YAAY;AACjB,MAAAL,EAAA,QAAQ,CAACA,EAAe,OACvC,MAAMlvB,GAAS,MAAM;AACpB,QAAAovB,EAAY,MAAM;MAAM,CACxB;AAAA,IAAA,GAGII,IAAoB,CAAC51B,MAA8B;AACxD,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB;AAAA,IAAA,GAGjB61B,IAAe,OAAO71B,MAAsC;AACjE,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB,GACtB,MAAM21B,EAAa;AAAA,IAAA,GAGdG,IAAe,MAA6C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEC9GnDrgC,KAAA;AAAA,EACd,SAAS,CAACgL,MAAa;AAClB,IAAAA,EAAA,UAAU,aAAas1B,EAAS,GAChCt1B,EAAA,UAAU,kBAAkBu1B,EAAc,GAC1Cv1B,EAAA,UAAU,WAAWw1B,EAAO,GAC5Bx1B,EAAA,UAAU,WAAWy1B,EAAO,GAC5Bz1B,EAAA,UAAU,YAAY01B,EAAQ;AAAA,EACnC;AACD;"} \ No newline at end of file diff --git a/desktop/dist/desktop.umd.cjs b/desktop/dist/desktop.umd.cjs index 00e33baa..8ff22cc1 100644 --- a/desktop/dist/desktop.umd.cjs +++ b/desktop/dist/desktop.umd.cjs @@ -1,10 +1,10 @@ -(function(W,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(W=typeof globalThis<"u"?globalThis:W||self,s(W["@stonecrop/desktop"]={},W.Vue))})(this,function(W,s){"use strict";const ze=e=>(s.pushScopeId("data-v-b7fdfbec"),e=e(),s.popScopeId(),e),Do={class:"action-menu-icon"},Vo=[ze(()=>s.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1)),ze(()=>s.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1))],Bo=ze(()=>s.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),Mo=["onclick"],Lo={key:1},jo=["onClick"],Uo={class:"dropdown-container"},Ho={class:"dropdown"},Fo=["onclick"],Wo=["href"],zo={class:"dropdown-item"},Go=s.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=e,n=s.ref([]),o=s.ref(!1),r=s.ref(null),a=s.ref(!1),c=s.ref(!1);s.onMounted(()=>{n.value=t.elements,i()});const i=()=>{for(let f of n.value)f.elementType==="dropdown"&&(f.show=!1)},u=()=>{a.value=!0,r.value=setTimeout(()=>{a.value&&(o.value=!0)},500)},d=()=>{a.value=!1,c.value=!1,clearTimeout(r.value),o.value=!1},l=f=>{const p=!n.value[f].show;i(),n.value[f].show=p};return(f,p)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([{"open-set":o.value,"hovered-and-closed":c.value},"action-set collapse"]),onMouseover:u,onMouseleave:d},[s.createElementVNode("div",Do,[s.createElementVNode("div",{id:"chevron",onClick:p[0]||(p[0]=h=>c.value=!c.value)},Vo)]),Bo,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(h,y)=>(s.openBlock(),s.createElementBlock("div",{class:"action-element",key:y},[h.elementType=="button"?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:h.action,class:"button-default"},s.toDisplayString(h.label),9,Mo)):s.createCommentVNode("",!0),h.elementType=="dropdown"?(s.openBlock(),s.createElementBlock("div",Lo,[s.createElementVNode("button",{class:"button-default",onClick:g=>l(y)},s.toDisplayString(h.label),9,jo),s.withDirectives(s.createElementVNode("div",Uo,[s.createElementVNode("div",Ho,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.actions,g=>(s.openBlock(),s.createElementBlock("div",{key:g.label},[g.action!=null?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:g.action,class:"dropdown-item"},s.toDisplayString(g.label),9,Fo)):g.link!=null?(s.openBlock(),s.createElementBlock("a",{key:1,href:g.link},[s.createElementVNode("button",zo,s.toDisplayString(g.label),1)],8,Wo)):s.createCommentVNode("",!0)]))),128))])],512),[[s.vShow,h.show]])])):s.createCommentVNode("",!0)]))),128))],34))}}),Ge=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$t=Ge(Go,[["__scopeId","data-v-b7fdfbec"]]),Qo={};function qo(e,t){return s.openBlock(),s.createElementBlock("dialog")}const Rt=Ge(Qo,[["render",qo]]),Ko=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};var Tt;typeof window<"u"&&(Tt=window==null?void 0:window.navigator)!=null&&Tt.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Jo(e){return e}const At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dt="__vueuse_ssr_handlers__";At[Dt]=At[Dt]||{};var Vt;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Vt||(Vt={}));var Yo=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Xo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,Mt=(e,t,n)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,er=(e,t)=>{for(var n in t||(t={}))Xo.call(t,n)&&Mt(e,n,t[n]);if(Bt)for(var n of Bt(t))Zo.call(t,n)&&Mt(e,n,t[n]);return e};er({linear:Jo},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]}),s.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}});const tr=s.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=s.ref(n.data||{}),a=i=>{let u={};for(const[d,l]of Object.entries(i))["component","fieldtype"].includes(d)||(u[d]=l),d==="rows"&&l&&l.length===0&&(u.rows=r.value[i.fieldname]);return u},c=s.computed({get:()=>n.modelValue.map((i,u)=>s.computed({get(){return i.value},set:d=>{n.modelValue[u].value=d,o("update:modelValue",n.modelValue)}})),set:()=>{}});return(i,u)=>(s.openBlock(),s.createElementBlock("form",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.modelValue,(d,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(d.component),s.mergeProps({key:l,schema:d,modelValue:c.value[l].value,"onUpdate:modelValue":f=>c.value[l].value=f,data:r.value[d.fieldname],readonly:i.readonly},a(d)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),nr=Ko(tr,[["__scopeId","data-v-82492bb4"]]),Lt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function or(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function rr(e){var t;let n=e.value;if(n){const o=or(n);if(o){const r=e.instance.locale;n=o(r)}}else{const o=(t=e.instance.schema.fieldtype)==null?void 0:t.toLowerCase();o&&Lt[o]&&(n=Lt[o])}return n}function sr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function ar(e,t,n){n||(n="#");let o=t;for(const r of e){const a=o.indexOf(n);if(a!==-1){const c=o.substring(0,a),i=o.substring(a+1);o=c+r+i}}return o.slice(0,t.length)}function ir(e,t){const n=rr(t);if(!n)return;const o="#",r=e.value,a=sr(r,o);if(a){const c=ar(a,n,o);t.instance.maskFilled&&(t.instance.maskFilled=!c.includes(o)),e.value=c}else e.value=n}s.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const n=s.ref(!1),o=s.inject("locale","");return{inputText:s.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:o,maskFilled:n}},directives:{mask:ir}});function Qe(e){this.message=e||""}Qe.prototype=Object.create(Error.prototype,{constructor:{value:Qe},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});class ve{constructor(t,n,o,r,a){if(this.name="Stonecrop",ve._root)return ve._root;ve._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=r,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new Qe(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const r=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:r})}async getRecord(t,n){this.store.$patch({record:{}});const r=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:r})}runAction(t,n,o){const a=this.registry.registry[t.slug].actions.get(n),{initialState:c}=this.workflow;this.workflow.transition(c,{type:n}),a.length>0&&a.forEach(i=>{new Function(i)(o)})}}var jt=!1;function $e(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function qe(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function cr(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const lr=typeof Proxy=="function",ur="devtools-plugin:setup",dr="plugin:settings:set";let pe,Ke;function fr(){var e;return pe!==void 0||(typeof window<"u"&&window.performance?(pe=!0,Ke=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(pe=!0,Ke=global.perf_hooks.performance):pe=!1),pe}function pr(){return fr()?Ke.now():Date.now()}class hr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const c in t.settings){const i=t.settings[c];o[c]=i.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const c=localStorage.getItem(r),i=JSON.parse(c);Object.assign(a,i)}catch{}this.fallbacks={getSettings(){return a},setSettings(c){try{localStorage.setItem(r,JSON.stringify(c))}catch{}a=c},now(){return pr()}},n&&n.on(dr,(c,i)=>{c===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(c,i)=>this.target?this.target.on[i]:(...u)=>{this.onQueue.push({method:i,args:u})}}),this.proxiedTarget=new Proxy({},{get:(c,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...u)=>(this.targetQueue.push({method:i,args:u,resolve:()=>{}}),this.fallbacks[i](...u)):(...u)=>new Promise(d=>{this.targetQueue.push({method:i,args:u,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Je(e,t){const n=e,o=Ut(),r=cr(),a=lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(ur,e,t);else{const c=a?new hr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:c}),c&&t(c.proxiedTarget)}}/*! +(function(W,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(W=typeof globalThis<"u"?globalThis:W||self,s(W["@stonecrop/desktop"]={},W.Vue))})(this,function(W,s){"use strict";const ze=e=>(s.pushScopeId("data-v-b7fdfbec"),e=e(),s.popScopeId(),e),Do={class:"action-menu-icon"},Vo=[ze(()=>s.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1)),ze(()=>s.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1))],Bo=ze(()=>s.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),Mo=["onclick"],Lo={key:1},jo=["onClick"],Uo={class:"dropdown-container"},Ho={class:"dropdown"},Fo=["onclick"],Wo=["href"],zo={class:"dropdown-item"},Go=s.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=e,n=s.ref([]),o=s.ref(!1),r=s.ref(null),a=s.ref(!1),c=s.ref(!1);s.onMounted(()=>{n.value=t.elements,i()});const i=()=>{for(let f of n.value)f.elementType==="dropdown"&&(f.show=!1)},u=()=>{a.value=!0,r.value=setTimeout(()=>{a.value&&(o.value=!0)},500)},d=()=>{a.value=!1,c.value=!1,clearTimeout(r.value),o.value=!1},l=f=>{const p=!n.value[f].show;i(),n.value[f].show=p};return(f,p)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([{"open-set":o.value,"hovered-and-closed":c.value},"action-set collapse"]),onMouseover:u,onMouseleave:d},[s.createElementVNode("div",Do,[s.createElementVNode("div",{id:"chevron",onClick:p[0]||(p[0]=h=>c.value=!c.value)},Vo)]),Bo,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(h,y)=>(s.openBlock(),s.createElementBlock("div",{class:"action-element",key:y},[h.elementType=="button"?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:h.action,class:"button-default"},s.toDisplayString(h.label),9,Mo)):s.createCommentVNode("",!0),h.elementType=="dropdown"?(s.openBlock(),s.createElementBlock("div",Lo,[s.createElementVNode("button",{class:"button-default",onClick:g=>l(y)},s.toDisplayString(h.label),9,jo),s.withDirectives(s.createElementVNode("div",Uo,[s.createElementVNode("div",Ho,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.actions,g=>(s.openBlock(),s.createElementBlock("div",{key:g.label},[g.action!=null?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:g.action,class:"dropdown-item"},s.toDisplayString(g.label),9,Fo)):g.link!=null?(s.openBlock(),s.createElementBlock("a",{key:1,href:g.link},[s.createElementVNode("button",zo,s.toDisplayString(g.label),1)],8,Wo)):s.createCommentVNode("",!0)]))),128))])],512),[[s.vShow,h.show]])])):s.createCommentVNode("",!0)]))),128))],34))}}),Ge=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$t=Ge(Go,[["__scopeId","data-v-b7fdfbec"]]),Qo={};function qo(e,t){return s.openBlock(),s.createElementBlock("dialog")}const Rt=Ge(Qo,[["render",qo]]),Ko=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};var Tt;typeof window<"u"&&(Tt=window==null?void 0:window.navigator)!=null&&Tt.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Jo(e){return e}const At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dt="__vueuse_ssr_handlers__";At[Dt]=At[Dt]||{};var Vt;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Vt||(Vt={}));var Yo=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Xo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,Mt=(e,t,n)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,er=(e,t)=>{for(var n in t||(t={}))Xo.call(t,n)&&Mt(e,n,t[n]);if(Bt)for(var n of Bt(t))Zo.call(t,n)&&Mt(e,n,t[n]);return e};er({linear:Jo},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]}),s.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}});const tr=s.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=s.ref(n.data||{}),a=i=>{let u={};for(const[d,l]of Object.entries(i))["component","fieldtype"].includes(d)||(u[d]=l),d==="rows"&&l&&l.length===0&&(u.rows=r.value[i.fieldname]);return u},c=s.computed({get:()=>n.modelValue.map((i,u)=>s.computed({get(){return i.value},set:d=>{n.modelValue[u].value=d,o("update:modelValue",n.modelValue)}})),set:()=>{}});return(i,u)=>(s.openBlock(),s.createElementBlock("form",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.modelValue,(d,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(d.component),s.mergeProps({key:l,schema:d,modelValue:c.value[l].value,"onUpdate:modelValue":f=>c.value[l].value=f,data:r.value[d.fieldname],readonly:i.readonly},a(d)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),nr=Ko(tr,[["__scopeId","data-v-74d66cf2"]]),Lt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function or(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function rr(e){var t;let n=e.value;if(n){const o=or(n);if(o){const r=e.instance.locale;n=o(r)}}else{const o=(t=e.instance.schema.fieldtype)==null?void 0:t.toLowerCase();o&&Lt[o]&&(n=Lt[o])}return n}function sr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function ar(e,t,n){n||(n="#");let o=t;for(const r of e){const a=o.indexOf(n);if(a!==-1){const c=o.substring(0,a),i=o.substring(a+1);o=c+r+i}}return o.slice(0,t.length)}function ir(e,t){const n=rr(t);if(!n)return;const o="#",r=e.value,a=sr(r,o);if(a){const c=ar(a,n,o);t.instance.maskFilled&&(t.instance.maskFilled=!c.includes(o)),e.value=c}else e.value=n}s.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const n=s.ref(!1),o=s.inject("locale","");return{inputText:s.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:o,maskFilled:n}},directives:{mask:ir}});function Qe(e){this.message=e||""}Qe.prototype=Object.create(Error.prototype,{constructor:{value:Qe},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});class ve{constructor(t,n,o,r,a){if(this.name="Stonecrop",ve._root)return ve._root;ve._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=r,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new Qe(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const r=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:r})}async getRecord(t,n){this.store.$patch({record:{}});const r=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:r})}runAction(t,n,o){const a=this.registry.registry[t.slug].actions.get(n),{initialState:c}=this.workflow;this.workflow.transition(c,{type:n}),a.length>0&&a.forEach(i=>{new Function(i)(o)})}}var jt=!1;function $e(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function qe(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function cr(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const lr=typeof Proxy=="function",ur="devtools-plugin:setup",dr="plugin:settings:set";let pe,Ke;function fr(){var e;return pe!==void 0||(typeof window<"u"&&window.performance?(pe=!0,Ke=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(pe=!0,Ke=global.perf_hooks.performance):pe=!1),pe}function pr(){return fr()?Ke.now():Date.now()}class hr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const c in t.settings){const i=t.settings[c];o[c]=i.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const c=localStorage.getItem(r),i=JSON.parse(c);Object.assign(a,i)}catch{}this.fallbacks={getSettings(){return a},setSettings(c){try{localStorage.setItem(r,JSON.stringify(c))}catch{}a=c},now(){return pr()}},n&&n.on(dr,(c,i)=>{c===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(c,i)=>this.target?this.target.on[i]:(...u)=>{this.onQueue.push({method:i,args:u})}}),this.proxiedTarget=new Proxy({},{get:(c,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...u)=>(this.targetQueue.push({method:i,args:u,resolve:()=>{}}),this.fallbacks[i](...u)):(...u)=>new Promise(d=>{this.targetQueue.push({method:i,args:u,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Je(e,t){const n=e,o=Ut(),r=cr(),a=lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(ur,e,t);else{const c=a?new hr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:c}),c&&t(c.proxiedTarget)}}/*! * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let _e;const be=e=>_e=e,Ht=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ce(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var J;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(J||(J={}));const Re=typeof window<"u",Ee=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&Re,Ft=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ye(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Gt(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Wt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Te(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Ae=typeof navigator=="object"?navigator:{userAgent:""},zt=/Macintosh/.test(Ae.userAgent)&&/AppleWebKit/.test(Ae.userAgent)&&!/Safari/.test(Ae.userAgent),Gt=Re?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!zt?gr:"msSaveOrOpenBlob"in Ae?yr:wr:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?Wt(o.href)?Ye(e,t,n):(o.target="_blank",Te(o)):Te(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Te(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(Wt(e))Ye(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Te(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function wr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ye(e,t,n);const r=e.type==="application/octet-stream",a=/constructor/i.test(String(Ft.HTMLElement))||"safari"in Ft,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||r&&a||zt)&&typeof FileReader<"u"){const i=new FileReader;i.onloadend=function(){let u=i.result;if(typeof u!="string")throw o=null,new Error("Wrong reader.result type");u=c?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=u:location.assign(u),o=null},i.readAsDataURL(e)}else{const i=URL.createObjectURL(e);o?o.location.assign(i):location.href=i,o=null,setTimeout(function(){URL.revokeObjectURL(i)},4e4)}}function B(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Xe(e){return"_a"in e&&"install"in e}function Qt(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function qt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function vr(e){if(!Qt())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(t){if(qt(t))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function _r(e){if(!Qt())try{Kt(e,JSON.parse(await navigator.clipboard.readText())),B("Global state pasted from clipboard.")}catch(t){if(qt(t))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function br(e){try{Gt(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let X;function Er(){X||(X=document.createElement("input"),X.type="file",X.accept=".json");function e(){return new Promise((t,n)=>{X.onchange=async()=>{const o=X.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},X.oncancel=()=>t(null),X.onerror=n,X.click()})}return e}async function kr(e){try{const n=await Er()();if(!n)return;const{text:o,file:r}=n;Kt(e,JSON.parse(o)),B(`Global state imported from "${r.name}".`)}catch(t){B("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Kt(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function q(e){return{_custom:{display:e}}}const Jt="🍍 Pinia (root)",Ze="_root";function Sr(e){return Xe(e)?{id:Ze,label:Jt}:{id:e.$id,label:e.$id}}function Ir(e){if(Xe(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:n.filter(a=>o.get(a)._getters).map(a=>{const c=o.get(a);return{editable:!1,key:a,value:c._getters.reduce((i,u)=>(i[u]=c[u],i),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Or(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:q(e.type),key:q(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Cr(e){switch(e){case J.direct:return"mutation";case J.patchFunction:return"$patch";case J.patchObject:return"$patch";default:return"unknown"}}let he=!0;const De=[],le="pinia:mutations",j="pinia",{assign:Nr}=Object,Ve=e=>"🍍 "+e;function Pr(e,t){Je({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:De,app:e},n=>{typeof n.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:le,label:"Pinia 🍍",color:15064968}),n.addInspector({id:j,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{vr(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await _r(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{br(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const r=t._s.get(o);r?typeof r.$reset!="function"?B(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(r.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,r)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const c=o.componentInstance.proxy._pStores;Object.values(c).forEach(i=>{o.instanceData.state.push({type:Ve(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:s.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((u,d)=>(u[d]=i.$state[d],u),{})}),i._getters&&i._getters.length&&o.instanceData.state.push({type:Ve(i.$id),key:"getters",editable:!1,value:i._getters.reduce((u,d)=>{try{u[d]=i[d]}catch(l){u[d]=l}return u},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===j){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):Jt.toLowerCase().includes(o.filter.toLowerCase())):r).map(Sr)}}),n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===j){const r=o.nodeId===Ze?t:t._s.get(o.nodeId);if(!r)return;r&&(o.state=Ir(r))}}),n.on.editInspectorState((o,r)=>{if(o.app===e&&o.inspectorId===j){const a=o.nodeId===Ze?t:t._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:c}=o;Xe(a)?c.unshift("state"):(c.length!==1||!a._customProperties.has(c[0])||c[0]in a.$state)&&c.unshift("$state"),he=!1,o.set(a,c,o.state.value),he=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const r=o.type.replace(/^🍍\s*/,""),a=t._s.get(r);if(!a)return B(`store "${r}" not found`,"error");const{path:c}=o;if(c[0]!=="state")return B(`Invalid path for store "${r}": + */let _e;const be=e=>_e=e,Ht=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ce(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var J;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(J||(J={}));const Re=typeof window<"u",Ee=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&Re,Ft=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ye(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Gt(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Wt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Te(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Ae=typeof navigator=="object"?navigator:{userAgent:""},zt=/Macintosh/.test(Ae.userAgent)&&/AppleWebKit/.test(Ae.userAgent)&&!/Safari/.test(Ae.userAgent),Gt=Re?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!zt?gr:"msSaveOrOpenBlob"in Ae?yr:wr:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?Wt(o.href)?Ye(e,t,n):(o.target="_blank",Te(o)):Te(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Te(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(Wt(e))Ye(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Te(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function wr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ye(e,t,n);const r=e.type==="application/octet-stream",a=/constructor/i.test(String(Ft.HTMLElement))||"safari"in Ft,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||r&&a||zt)&&typeof FileReader<"u"){const i=new FileReader;i.onloadend=function(){let u=i.result;if(typeof u!="string")throw o=null,new Error("Wrong reader.result type");u=c?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=u:location.assign(u),o=null},i.readAsDataURL(e)}else{const i=URL.createObjectURL(e);o?o.location.assign(i):location.href=i,o=null,setTimeout(function(){URL.revokeObjectURL(i)},4e4)}}function B(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Xe(e){return"_a"in e&&"install"in e}function Qt(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function qt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function vr(e){if(!Qt())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(t){if(qt(t))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function _r(e){if(!Qt())try{Kt(e,JSON.parse(await navigator.clipboard.readText())),B("Global state pasted from clipboard.")}catch(t){if(qt(t))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function br(e){try{Gt(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let X;function Er(){X||(X=document.createElement("input"),X.type="file",X.accept=".json");function e(){return new Promise((t,n)=>{X.onchange=async()=>{const o=X.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},X.oncancel=()=>t(null),X.onerror=n,X.click()})}return e}async function kr(e){try{const n=await Er()();if(!n)return;const{text:o,file:r}=n;Kt(e,JSON.parse(o)),B(`Global state imported from "${r.name}".`)}catch(t){B("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Kt(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function q(e){return{_custom:{display:e}}}const Jt="🍍 Pinia (root)",Ze="_root";function Sr(e){return Xe(e)?{id:Ze,label:Jt}:{id:e.$id,label:e.$id}}function Or(e){if(Xe(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:n.filter(a=>o.get(a)._getters).map(a=>{const c=o.get(a);return{editable:!1,key:a,value:c._getters.reduce((i,u)=>(i[u]=c[u],i),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Ir(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:q(e.type),key:q(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Cr(e){switch(e){case J.direct:return"mutation";case J.patchFunction:return"$patch";case J.patchObject:return"$patch";default:return"unknown"}}let he=!0;const De=[],le="pinia:mutations",j="pinia",{assign:Nr}=Object,Ve=e=>"🍍 "+e;function Pr(e,t){Je({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:De,app:e},n=>{typeof n.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:le,label:"Pinia 🍍",color:15064968}),n.addInspector({id:j,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{vr(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await _r(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{br(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const r=t._s.get(o);r?typeof r.$reset!="function"?B(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(r.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,r)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const c=o.componentInstance.proxy._pStores;Object.values(c).forEach(i=>{o.instanceData.state.push({type:Ve(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:s.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((u,d)=>(u[d]=i.$state[d],u),{})}),i._getters&&i._getters.length&&o.instanceData.state.push({type:Ve(i.$id),key:"getters",editable:!1,value:i._getters.reduce((u,d)=>{try{u[d]=i[d]}catch(l){u[d]=l}return u},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===j){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):Jt.toLowerCase().includes(o.filter.toLowerCase())):r).map(Sr)}}),n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===j){const r=o.nodeId===Ze?t:t._s.get(o.nodeId);if(!r)return;r&&(o.state=Or(r))}}),n.on.editInspectorState((o,r)=>{if(o.app===e&&o.inspectorId===j){const a=o.nodeId===Ze?t:t._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:c}=o;Xe(a)?c.unshift("state"):(c.length!==1||!a._customProperties.has(c[0])||c[0]in a.$state)&&c.unshift("$state"),he=!1,o.set(a,c,o.state.value),he=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const r=o.type.replace(/^🍍\s*/,""),a=t._s.get(r);if(!a)return B(`store "${r}" not found`,"error");const{path:c}=o;if(c[0]!=="state")return B(`Invalid path for store "${r}": ${c} -Only state can be modified.`);c[0]="$state",he=!1,o.set(a,c,o.state.value),he=!0}})})}function xr(e,t){De.includes(Ve(t.$id))||De.push(Ve(t.$id)),Je({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:De,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:c,onError:i,name:u,args:d})=>{const l=Yt++;n.addTimelineEvent({layerId:le,event:{time:o(),title:"🛫 "+u,subtitle:"start",data:{store:q(t.$id),action:q(u),args:d},groupId:l}}),c(f=>{re=void 0,n.addTimelineEvent({layerId:le,event:{time:o(),title:"🛬 "+u,subtitle:"end",data:{store:q(t.$id),action:q(u),args:d,result:f},groupId:l}})}),i(f=>{re=void 0,n.addTimelineEvent({layerId:le,event:{time:o(),logType:"error",title:"💥 "+u,subtitle:"end",data:{store:q(t.$id),action:q(u),args:d,error:f},groupId:l}})})},!0),t._customProperties.forEach(c=>{s.watch(()=>s.unref(t[c]),(i,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(j),he&&n.addTimelineEvent({layerId:le,event:{time:o(),title:"Change",subtitle:c,data:{newValue:i,oldValue:u},groupId:re}})},{deep:!0})}),t.$subscribe(({events:c,type:i},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(j),!he)return;const d={time:o(),title:Cr(i),data:Nr({store:q(t.$id)},Or(c)),groupId:re};i===J.patchFunction?d.subtitle="⤵️":i===J.patchObject?d.subtitle="🧩":c&&!Array.isArray(c)&&(d.subtitle=c.type),c&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),n.addTimelineEvent({layerId:le,event:d})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=s.markRaw(c=>{r(c),n.addTimelineEvent({layerId:le,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:q(t.$id),info:q("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`"${t.$id}" store installed 🆕`)})}let Yt=0,re;function Xt(e,t,n){const o=t.reduce((r,a)=>(r[a]=s.toRaw(e)[a],r),{});for(const r in o)e[r]=function(){const a=Yt,c=n?new Proxy(e,{get(...u){return re=a,Reflect.get(...u)},set(...u){return re=a,Reflect.set(...u)}}):e;re=a;const i=o[r].apply(c,arguments);return re=void 0,i}}function $r({app:e,store:t,options:n}){if(t.$id.startsWith("__hot:"))return;t._isOptionsAPI=!!n.state,Xt(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;s.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),Xt(t,Object.keys(r._hmrPayload.actions),!!t._isOptionsAPI)},xr(e,t)}function Rr(){const e=s.effectScope(!0),t=e.run(()=>s.ref({}));let n=[],o=[];const r=s.markRaw({install(a){be(r),r._a=a,a.provide(Ht,r),a.config.globalProperties.$pinia=r,Ee&&Pr(a,r),o.forEach(c=>n.push(c)),o=[]},use(a){return!this._a&&!jt?o.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Ee&&typeof Proxy<"u"&&r.use($r),r}function Zt(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const r=e[n];ce(r)&&ce(o)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Zt(r,o):e[n]=o}return e}const en=()=>{};function tn(e,t,n,o=en){e.push(t);const r=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&s.getCurrentScope()&&s.onScopeDispose(r),r}function me(e,...t){e.slice().forEach(n=>{n(...t)})}const Tr=e=>e();function et(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,o)=>e.set(o,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ce(r)&&ce(o)&&e.hasOwnProperty(n)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=et(r,o):e[n]=o}return e}const Ar=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Dr(e){return!ce(e)||!e.hasOwnProperty(Ar)}const{assign:z}=Object;function nn(e){return!!(s.isRef(e)&&e.effect)}function on(e,t,n,o){const{state:r,actions:a,getters:c}=t,i=n.state.value[e];let u;function d(){!i&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=r?r():{});const l=process.env.NODE_ENV!=="production"&&o?s.toRefs(s.ref(r?r():{}).value):s.toRefs(n.state.value[e]);return z(l,a,Object.keys(c||{}).reduce((f,p)=>(process.env.NODE_ENV!=="production"&&p in l&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),f[p]=s.markRaw(s.computed(()=>{be(n);const h=n._s.get(e);return c[p].call(h,h)})),f),{}))}return u=tt(e,d,t,n,o,!0),u}function tt(e,t,n={},o,r,a){let c;const i=z({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const u={deep:!0};process.env.NODE_ENV!=="production"&&!jt&&(u.onTrigger=k=>{d?h=k:d==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(k):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,l,f=[],p=[],h;const y=o.state.value[e];!a&&!y&&(process.env.NODE_ENV==="production"||!r)&&(o.state.value[e]={});const g=s.ref({});let _;function I(k){let b;d=l=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof k=="function"?(k(o.state.value[e]),b={type:J.patchFunction,storeId:e,events:h}):(et(o.state.value[e],k),b={type:J.patchObject,payload:k,storeId:e,events:h});const R=_=Symbol();s.nextTick().then(()=>{_===R&&(d=!0)}),l=!0,me(f,b,o.state.value[e])}const O=a?function(){const{state:b}=n,R=b?b():{};this.$patch(V=>{z(V,R)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:en;function T(){c.stop(),f=[],p=[],o._s.delete(e)}function L(k,b){return function(){be(o);const R=Array.from(arguments),V=[],de=[];function xe(U){V.push(U)}function Fe(U){de.push(U)}me(p,{args:R,name:k,store:S,after:xe,onError:Fe});let Y;try{Y=b.apply(this&&this.$id===e?this:S,R)}catch(U){throw me(de,U),U}return Y instanceof Promise?Y.then(U=>(me(V,U),U)).catch(U=>(me(de,U),Promise.reject(U))):(me(V,Y),Y)}}const G=s.markRaw({actions:{},getters:{},state:[],hotState:g}),Q={_p:o,$id:e,$onAction:tn.bind(null,p),$patch:I,$reset:O,$subscribe(k,b={}){const R=tn(f,k,b.detached,()=>V()),V=c.run(()=>s.watch(()=>o.state.value[e],de=>{(b.flush==="sync"?l:d)&&k({storeId:e,type:J.direct,events:h},de)},z({},u,b)));return R},$dispose:T},S=s.reactive(process.env.NODE_ENV!=="production"||Ee?z({_hmrPayload:G,_customProperties:s.markRaw(new Set)},Q):Q);o._s.set(e,S);const K=(o._a&&o._a.runWithContext||Tr)(()=>o._e.run(()=>(c=s.effectScope()).run(t)));for(const k in K){const b=K[k];if(s.isRef(b)&&!nn(b)||s.isReactive(b))process.env.NODE_ENV!=="production"&&r?$e(g.value,k,s.toRef(K,k)):a||(y&&Dr(b)&&(s.isRef(b)?b.value=y[k]:et(b,y[k])),o.state.value[e][k]=b),process.env.NODE_ENV!=="production"&&G.state.push(k);else if(typeof b=="function"){const R=process.env.NODE_ENV!=="production"&&r?b:L(k,b);K[k]=R,process.env.NODE_ENV!=="production"&&(G.actions[k]=b),i.actions[k]=b}else process.env.NODE_ENV!=="production"&&nn(b)&&(G.getters[k]=a?n.getters[k]:b,Re&&(K._getters||(K._getters=s.markRaw([]))).push(k))}if(z(S,K),z(s.toRaw(S),K),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&r?g.value:o.state.value[e],set:k=>{if(process.env.NODE_ENV!=="production"&&r)throw new Error("cannot set hotState");I(b=>{z(b,k)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=s.markRaw(k=>{S._hotUpdating=!0,k._hmrPayload.state.forEach(b=>{if(b in S.$state){const R=k.$state[b],V=S.$state[b];typeof R=="object"&&ce(R)&&ce(V)?Zt(R,V):k.$state[b]=V}$e(S,b,s.toRef(k.$state,b))}),Object.keys(S.$state).forEach(b=>{b in k.$state||qe(S,b)}),d=!1,l=!1,o.state.value[e]=s.toRef(k._hmrPayload,"hotState"),l=!0,s.nextTick().then(()=>{d=!0});for(const b in k._hmrPayload.actions){const R=k[b];$e(S,b,L(b,R))}for(const b in k._hmrPayload.getters){const R=k._hmrPayload.getters[b],V=a?s.computed(()=>(be(o),R.call(S,S))):R;$e(S,b,V)}Object.keys(S._hmrPayload.getters).forEach(b=>{b in k._hmrPayload.getters||qe(S,b)}),Object.keys(S._hmrPayload.actions).forEach(b=>{b in k._hmrPayload.actions||qe(S,b)}),S._hmrPayload=k._hmrPayload,S._getters=k._getters,S._hotUpdating=!1})),Ee){const k={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(b=>{Object.defineProperty(S,b,z({value:S[b]},k))})}return o._p.forEach(k=>{if(Ee){const b=c.run(()=>k({store:S,app:o._a,pinia:o,options:i}));Object.keys(b||{}).forEach(R=>S._customProperties.add(R)),z(S,b)}else z(S,c.run(()=>k({store:S,app:o._a,pinia:o,options:i})))}),process.env.NODE_ENV!=="production"&&S.$state&&typeof S.$state=="object"&&typeof S.$state.constructor=="function"&&!S.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be +Only state can be modified.`);c[0]="$state",he=!1,o.set(a,c,o.state.value),he=!0}})})}function xr(e,t){De.includes(Ve(t.$id))||De.push(Ve(t.$id)),Je({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:De,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:c,onError:i,name:u,args:d})=>{const l=Yt++;n.addTimelineEvent({layerId:le,event:{time:o(),title:"🛫 "+u,subtitle:"start",data:{store:q(t.$id),action:q(u),args:d},groupId:l}}),c(f=>{re=void 0,n.addTimelineEvent({layerId:le,event:{time:o(),title:"🛬 "+u,subtitle:"end",data:{store:q(t.$id),action:q(u),args:d,result:f},groupId:l}})}),i(f=>{re=void 0,n.addTimelineEvent({layerId:le,event:{time:o(),logType:"error",title:"💥 "+u,subtitle:"end",data:{store:q(t.$id),action:q(u),args:d,error:f},groupId:l}})})},!0),t._customProperties.forEach(c=>{s.watch(()=>s.unref(t[c]),(i,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(j),he&&n.addTimelineEvent({layerId:le,event:{time:o(),title:"Change",subtitle:c,data:{newValue:i,oldValue:u},groupId:re}})},{deep:!0})}),t.$subscribe(({events:c,type:i},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(j),!he)return;const d={time:o(),title:Cr(i),data:Nr({store:q(t.$id)},Ir(c)),groupId:re};i===J.patchFunction?d.subtitle="⤵️":i===J.patchObject?d.subtitle="🧩":c&&!Array.isArray(c)&&(d.subtitle=c.type),c&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),n.addTimelineEvent({layerId:le,event:d})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=s.markRaw(c=>{r(c),n.addTimelineEvent({layerId:le,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:q(t.$id),info:q("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`"${t.$id}" store installed 🆕`)})}let Yt=0,re;function Xt(e,t,n){const o=t.reduce((r,a)=>(r[a]=s.toRaw(e)[a],r),{});for(const r in o)e[r]=function(){const a=Yt,c=n?new Proxy(e,{get(...u){return re=a,Reflect.get(...u)},set(...u){return re=a,Reflect.set(...u)}}):e;re=a;const i=o[r].apply(c,arguments);return re=void 0,i}}function $r({app:e,store:t,options:n}){if(t.$id.startsWith("__hot:"))return;t._isOptionsAPI=!!n.state,Xt(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;s.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),Xt(t,Object.keys(r._hmrPayload.actions),!!t._isOptionsAPI)},xr(e,t)}function Rr(){const e=s.effectScope(!0),t=e.run(()=>s.ref({}));let n=[],o=[];const r=s.markRaw({install(a){be(r),r._a=a,a.provide(Ht,r),a.config.globalProperties.$pinia=r,Ee&&Pr(a,r),o.forEach(c=>n.push(c)),o=[]},use(a){return!this._a&&!jt?o.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Ee&&typeof Proxy<"u"&&r.use($r),r}function Zt(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const r=e[n];ce(r)&&ce(o)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Zt(r,o):e[n]=o}return e}const en=()=>{};function tn(e,t,n,o=en){e.push(t);const r=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&s.getCurrentScope()&&s.onScopeDispose(r),r}function me(e,...t){e.slice().forEach(n=>{n(...t)})}const Tr=e=>e();function et(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,o)=>e.set(o,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ce(r)&&ce(o)&&e.hasOwnProperty(n)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=et(r,o):e[n]=o}return e}const Ar=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Dr(e){return!ce(e)||!e.hasOwnProperty(Ar)}const{assign:z}=Object;function nn(e){return!!(s.isRef(e)&&e.effect)}function on(e,t,n,o){const{state:r,actions:a,getters:c}=t,i=n.state.value[e];let u;function d(){!i&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=r?r():{});const l=process.env.NODE_ENV!=="production"&&o?s.toRefs(s.ref(r?r():{}).value):s.toRefs(n.state.value[e]);return z(l,a,Object.keys(c||{}).reduce((f,p)=>(process.env.NODE_ENV!=="production"&&p in l&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),f[p]=s.markRaw(s.computed(()=>{be(n);const h=n._s.get(e);return c[p].call(h,h)})),f),{}))}return u=tt(e,d,t,n,o,!0),u}function tt(e,t,n={},o,r,a){let c;const i=z({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const u={deep:!0};process.env.NODE_ENV!=="production"&&!jt&&(u.onTrigger=k=>{d?h=k:d==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(k):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,l,f=[],p=[],h;const y=o.state.value[e];!a&&!y&&(process.env.NODE_ENV==="production"||!r)&&(o.state.value[e]={});const g=s.ref({});let _;function O(k){let b;d=l=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof k=="function"?(k(o.state.value[e]),b={type:J.patchFunction,storeId:e,events:h}):(et(o.state.value[e],k),b={type:J.patchObject,payload:k,storeId:e,events:h});const R=_=Symbol();s.nextTick().then(()=>{_===R&&(d=!0)}),l=!0,me(f,b,o.state.value[e])}const I=a?function(){const{state:b}=n,R=b?b():{};this.$patch(V=>{z(V,R)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:en;function T(){c.stop(),f=[],p=[],o._s.delete(e)}function L(k,b){return function(){be(o);const R=Array.from(arguments),V=[],de=[];function xe(U){V.push(U)}function Fe(U){de.push(U)}me(p,{args:R,name:k,store:S,after:xe,onError:Fe});let Y;try{Y=b.apply(this&&this.$id===e?this:S,R)}catch(U){throw me(de,U),U}return Y instanceof Promise?Y.then(U=>(me(V,U),U)).catch(U=>(me(de,U),Promise.reject(U))):(me(V,Y),Y)}}const G=s.markRaw({actions:{},getters:{},state:[],hotState:g}),Q={_p:o,$id:e,$onAction:tn.bind(null,p),$patch:O,$reset:I,$subscribe(k,b={}){const R=tn(f,k,b.detached,()=>V()),V=c.run(()=>s.watch(()=>o.state.value[e],de=>{(b.flush==="sync"?l:d)&&k({storeId:e,type:J.direct,events:h},de)},z({},u,b)));return R},$dispose:T},S=s.reactive(process.env.NODE_ENV!=="production"||Ee?z({_hmrPayload:G,_customProperties:s.markRaw(new Set)},Q):Q);o._s.set(e,S);const K=(o._a&&o._a.runWithContext||Tr)(()=>o._e.run(()=>(c=s.effectScope()).run(t)));for(const k in K){const b=K[k];if(s.isRef(b)&&!nn(b)||s.isReactive(b))process.env.NODE_ENV!=="production"&&r?$e(g.value,k,s.toRef(K,k)):a||(y&&Dr(b)&&(s.isRef(b)?b.value=y[k]:et(b,y[k])),o.state.value[e][k]=b),process.env.NODE_ENV!=="production"&&G.state.push(k);else if(typeof b=="function"){const R=process.env.NODE_ENV!=="production"&&r?b:L(k,b);K[k]=R,process.env.NODE_ENV!=="production"&&(G.actions[k]=b),i.actions[k]=b}else process.env.NODE_ENV!=="production"&&nn(b)&&(G.getters[k]=a?n.getters[k]:b,Re&&(K._getters||(K._getters=s.markRaw([]))).push(k))}if(z(S,K),z(s.toRaw(S),K),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&r?g.value:o.state.value[e],set:k=>{if(process.env.NODE_ENV!=="production"&&r)throw new Error("cannot set hotState");O(b=>{z(b,k)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=s.markRaw(k=>{S._hotUpdating=!0,k._hmrPayload.state.forEach(b=>{if(b in S.$state){const R=k.$state[b],V=S.$state[b];typeof R=="object"&&ce(R)&&ce(V)?Zt(R,V):k.$state[b]=V}$e(S,b,s.toRef(k.$state,b))}),Object.keys(S.$state).forEach(b=>{b in k.$state||qe(S,b)}),d=!1,l=!1,o.state.value[e]=s.toRef(k._hmrPayload,"hotState"),l=!0,s.nextTick().then(()=>{d=!0});for(const b in k._hmrPayload.actions){const R=k[b];$e(S,b,L(b,R))}for(const b in k._hmrPayload.getters){const R=k._hmrPayload.getters[b],V=a?s.computed(()=>(be(o),R.call(S,S))):R;$e(S,b,V)}Object.keys(S._hmrPayload.getters).forEach(b=>{b in k._hmrPayload.getters||qe(S,b)}),Object.keys(S._hmrPayload.actions).forEach(b=>{b in k._hmrPayload.actions||qe(S,b)}),S._hmrPayload=k._hmrPayload,S._getters=k._getters,S._hotUpdating=!1})),Ee){const k={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(b=>{Object.defineProperty(S,b,z({value:S[b]},k))})}return o._p.forEach(k=>{if(Ee){const b=c.run(()=>k({store:S,app:o._a,pinia:o,options:i}));Object.keys(b||{}).forEach(R=>S._customProperties.add(R)),z(S,b)}else z(S,c.run(()=>k({store:S,app:o._a,pinia:o,options:i})))}),process.env.NODE_ENV!=="production"&&S.$state&&typeof S.$state=="object"&&typeof S.$state.constructor=="function"&&!S.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be state: () => new MyClass() Found in store "${S.$id}".`),y&&a&&n.hydrate&&n.hydrate(S.$state,y),d=!0,l=!0,S}function Vr(e,t,n){let o,r;const a=typeof t=="function";if(typeof e=="string")o=e,r=a?n:t;else if(r=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function c(i,u){const d=s.hasInjectionContext();if(i=(process.env.NODE_ENV==="test"&&_e&&_e._testing?null:i)||(d?s.inject(Ht,null):null),i&&be(i),process.env.NODE_ENV!=="production"&&!_e)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. @@ -12,28 +12,28 @@ This will fail in production.`);i=_e,i._s.has(o)||(a?tt(o,t,r,i):on(o,r,i),proce * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Z=typeof window<"u";function Mr(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const x=Object.assign;function nt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const ke=()=>{},F=Array.isArray;function P(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const Lr=/\/$/,jr=e=>e.replace(Lr,"");function ot(e,t,n="/"){let o,r={},a="",c="";const i=t.indexOf("#");let u=t.indexOf("?");return i=0&&(u=-1),u>-1&&(o=t.slice(0,u),a=t.slice(u+1,i>-1?i:t.length),r=e(a)),i>-1&&(o=o||t.slice(0,i),c=t.slice(i,t.length)),o=Fr(o??t,n),{fullPath:o+(a&&"?")+a+c,path:o,query:r,hash:c}}function Ur(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function sn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function an(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&se(t.matched[o],n.matched[r])&&cn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function se(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Hr(e[n],t[n]))return!1;return!0}function Hr(e,t){return F(e)?ln(e,t):F(t)?ln(t,e):e===t}function ln(e,t){return F(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Fr(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return P(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let a=n.length-1,c,i;for(c=0;c1&&a--;else break;return n.slice(0,a).join("/")+"/"+o.slice(c-(c===o.length?1:0)).join("/")}var Se;(function(e){e.pop="pop",e.push="push"})(Se||(Se={}));var Ie;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ie||(Ie={}));function Wr(e){if(!e)if(Z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jr(e)}const zr=/^[^#]+#/;function Gr(e,t){return e.replace(zr,"#")+t}function Qr(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Be=()=>({left:window.pageXOffset,top:window.pageYOffset});function qr(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const a=document.querySelector(e.el);if(o&&a){P(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{P(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r){process.env.NODE_ENV!=="production"&&P(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=Qr(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function un(e,t){return(history.state?history.state.position-t:-1)+e}const rt=new Map;function Kr(e,t){rt.set(e,t)}function Jr(e){const t=rt.get(e);return rt.delete(e),t}let Yr=()=>location.protocol+"//"+location.host;function dn(e,t){const{pathname:n,search:o,hash:r}=t,a=e.indexOf("#");if(a>-1){let i=r.includes(e.slice(a))?e.slice(a).length:1,u=r.slice(i);return u[0]!=="/"&&(u="/"+u),sn(u,"")}return sn(n,e)+o+r}function Xr(e,t,n,o){let r=[],a=[],c=null;const i=({state:p})=>{const h=dn(e,location),y=n.value,g=t.value;let _=0;if(p){if(n.value=h,t.value=p,c&&c===y){c=null;return}_=g?p.position-g.position:0}else o(h);r.forEach(I=>{I(n.value,y,{delta:_,type:Se.pop,direction:_?_>0?Ie.forward:Ie.back:Ie.unknown})})};function u(){c=n.value}function d(p){r.push(p);const h=()=>{const y=r.indexOf(p);y>-1&&r.splice(y,1)};return a.push(h),h}function l(){const{history:p}=window;p.state&&p.replaceState(x({},p.state,{scroll:Be()}),"")}function f(){for(const p of a)p();a=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:u,listen:d,destroy:f}}function fn(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Be():null}}function Zr(e){const{history:t,location:n}=window,o={value:dn(e,n)},r={value:t.state};r.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(u,d,l){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:Yr()+e+u;try{t[l?"replaceState":"pushState"](d,"",p),r.value=d}catch(h){process.env.NODE_ENV!=="production"?P("Error with push/replace State",h):console.error(h),n[l?"replace":"assign"](p)}}function c(u,d){const l=x({},t.state,fn(r.value.back,u,r.value.forward,!0),d,{position:r.value.position});a(u,l,!0),o.value=u}function i(u,d){const l=x({},r.value,t.state,{forward:u,scroll:Be()});process.env.NODE_ENV!=="production"&&!t.state&&P(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: + */const Z=typeof window<"u";function Mr(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const x=Object.assign;function nt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const ke=()=>{},F=Array.isArray;function P(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const Lr=/\/$/,jr=e=>e.replace(Lr,"");function ot(e,t,n="/"){let o,r={},a="",c="";const i=t.indexOf("#");let u=t.indexOf("?");return i=0&&(u=-1),u>-1&&(o=t.slice(0,u),a=t.slice(u+1,i>-1?i:t.length),r=e(a)),i>-1&&(o=o||t.slice(0,i),c=t.slice(i,t.length)),o=Fr(o??t,n),{fullPath:o+(a&&"?")+a+c,path:o,query:r,hash:c}}function Ur(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function sn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function an(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&se(t.matched[o],n.matched[r])&&cn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function se(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Hr(e[n],t[n]))return!1;return!0}function Hr(e,t){return F(e)?ln(e,t):F(t)?ln(t,e):e===t}function ln(e,t){return F(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Fr(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return P(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let a=n.length-1,c,i;for(c=0;c1&&a--;else break;return n.slice(0,a).join("/")+"/"+o.slice(c-(c===o.length?1:0)).join("/")}var Se;(function(e){e.pop="pop",e.push="push"})(Se||(Se={}));var Oe;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Oe||(Oe={}));function Wr(e){if(!e)if(Z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jr(e)}const zr=/^[^#]+#/;function Gr(e,t){return e.replace(zr,"#")+t}function Qr(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Be=()=>({left:window.pageXOffset,top:window.pageYOffset});function qr(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const a=document.querySelector(e.el);if(o&&a){P(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{P(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r){process.env.NODE_ENV!=="production"&&P(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=Qr(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function un(e,t){return(history.state?history.state.position-t:-1)+e}const rt=new Map;function Kr(e,t){rt.set(e,t)}function Jr(e){const t=rt.get(e);return rt.delete(e),t}let Yr=()=>location.protocol+"//"+location.host;function dn(e,t){const{pathname:n,search:o,hash:r}=t,a=e.indexOf("#");if(a>-1){let i=r.includes(e.slice(a))?e.slice(a).length:1,u=r.slice(i);return u[0]!=="/"&&(u="/"+u),sn(u,"")}return sn(n,e)+o+r}function Xr(e,t,n,o){let r=[],a=[],c=null;const i=({state:p})=>{const h=dn(e,location),y=n.value,g=t.value;let _=0;if(p){if(n.value=h,t.value=p,c&&c===y){c=null;return}_=g?p.position-g.position:0}else o(h);r.forEach(O=>{O(n.value,y,{delta:_,type:Se.pop,direction:_?_>0?Oe.forward:Oe.back:Oe.unknown})})};function u(){c=n.value}function d(p){r.push(p);const h=()=>{const y=r.indexOf(p);y>-1&&r.splice(y,1)};return a.push(h),h}function l(){const{history:p}=window;p.state&&p.replaceState(x({},p.state,{scroll:Be()}),"")}function f(){for(const p of a)p();a=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:u,listen:d,destroy:f}}function fn(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Be():null}}function Zr(e){const{history:t,location:n}=window,o={value:dn(e,n)},r={value:t.state};r.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(u,d,l){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:Yr()+e+u;try{t[l?"replaceState":"pushState"](d,"",p),r.value=d}catch(h){process.env.NODE_ENV!=="production"?P("Error with push/replace State",h):console.error(h),n[l?"replace":"assign"](p)}}function c(u,d){const l=x({},t.state,fn(r.value.back,u,r.value.forward,!0),d,{position:r.value.position});a(u,l,!0),o.value=u}function i(u,d){const l=x({},r.value,t.state,{forward:u,scroll:Be()});process.env.NODE_ENV!=="production"&&!t.state&&P(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: history.replaceState(history.state, '', url) You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`),a(l.current,l,!0);const f=x({},fn(o.value,u,null),{position:l.position+1},d);a(u,f,!1),o.value=u}return{location:o,state:r,push:i,replace:c}}function es(e){e=Wr(e);const t=Zr(e),n=Xr(e,t.state,t.location,t.replace);function o(a,c=!0){c||n.pauseListeners(),history.go(a)}const r=x({location:"",base:e,go:o,createHref:Gr.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function ts(e){return typeof e=="string"||e&&typeof e=="object"}function pn(e){return typeof e=="string"||typeof e=="symbol"}const ae={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},st=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var hn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(hn||(hn={}));const ns={1({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at -`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${rs(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ge(e,t){return process.env.NODE_ENV!=="production"?x(new Error(ns[e](t)),{type:e,[st]:!0},t):x(new Error,{type:e,[st]:!0},t)}function ee(e,t){return e instanceof Error&&st in e&&(t==null||!!(e.type&t))}const os=["params","query","hash"];function rs(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of os)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const mn="[^/]+?",ss={sensitive:!1,strict:!1,start:!0,end:!0},as=/[.+*?^${}()[\]/\\]/g;function is(e,t){const n=x({},ss,t),o=[];let r=n.start?"^":"";const a=[];for(const d of e){const l=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function ls(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const us={type:0,value:""},ds=/[a-zA-Z0-9_]/;function fs(e){if(!e)return[[]];if(e==="/")return[[us]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${d}": ${h}`)}let n=0,o=n;const r=[];let a;function c(){a&&r.push(a),a=[]}let i=0,u,d="",l="";function f(){d&&(n===0?a.push({type:0,value:d}):n===1||n===2||n===3?(a.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:d,regexp:l,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=u}for(;i{c(O)}:ke}function c(l){if(pn(l)){const f=o.get(l);f&&(o.delete(l),n.splice(n.indexOf(f),1),f.children.forEach(c),f.alias.forEach(c))}else{const f=n.indexOf(l);f>-1&&(n.splice(f,1),l.record.name&&o.delete(l.record.name),l.children.forEach(c),l.alias.forEach(c))}}function i(){return n}function u(l){let f=0;for(;f=0&&(l.record.path!==n[f].record.path||!_n(l,n[f]));)f++;n.splice(f,0,l),l.record.name&&!wn(l)&&o.set(l.record.name,l)}function d(l,f){let p,h={},y,g;if("name"in l&&l.name){if(p=o.get(l.name),!p)throw ge(1,{location:l});if(process.env.NODE_ENV!=="production"){const O=Object.keys(l.params||{}).filter(T=>!p.keys.find(L=>L.name===T));O.length&&P(`Discarded invalid param(s) "${O.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}g=p.record.name,h=x(yn(f.params,p.keys.filter(O=>!O.optional).map(O=>O.name)),l.params&&yn(l.params,p.keys.map(O=>O.name))),y=p.stringify(h)}else if("path"in l)y=l.path,process.env.NODE_ENV!=="production"&&!y.startsWith("/")&&P(`The Matcher cannot resolve relative paths but received "${y}". Unless you directly called \`matcher.resolve("${y}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),p=n.find(O=>O.re.test(y)),p&&(h=p.parse(y),g=p.record.name);else{if(p=f.name?o.get(f.name):n.find(O=>O.re.test(f.path)),!p)throw ge(1,{location:l,currentLocation:f});g=p.record.name,h=x({},f.params,l.params),y=p.stringify(h)}const _=[];let I=p;for(;I;)_.unshift(I.record),I=I.parent;return{name:g,path:y,params:h,matched:_,meta:ys(_)}}return e.forEach(l=>a(l)),{addRoute:a,resolve:d,removeRoute:c,getRoutes:i,getRecordMatcher:r}}function yn(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function ms(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:gs(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function gs(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function wn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ys(e){return e.reduce((t,n)=>x(t,n.meta),{})}function vn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function at(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function ws(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(at.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(at.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function vs(e,t){t&&t.record.name&&!e.name&&!e.path&&P(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function _s(e,t){for(const n of t.keys)if(!e.keys.find(at.bind(null,n)))return P(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function _n(e,t){return t.children.some(n=>n===e||_n(e,n))}const bn=/#/g,bs=/&/g,Es=/\//g,ks=/=/g,Ss=/\?/g,En=/\+/g,Is=/%5B/g,Os=/%5D/g,kn=/%5E/g,Cs=/%60/g,Sn=/%7B/g,Ns=/%7C/g,In=/%7D/g,Ps=/%20/g;function it(e){return encodeURI(""+e).replace(Ns,"|").replace(Is,"[").replace(Os,"]")}function xs(e){return it(e).replace(Sn,"{").replace(In,"}").replace(kn,"^")}function ct(e){return it(e).replace(En,"%2B").replace(Ps,"+").replace(bn,"%23").replace(bs,"%26").replace(Cs,"`").replace(Sn,"{").replace(In,"}").replace(kn,"^")}function $s(e){return ct(e).replace(ks,"%3D")}function Rs(e){return it(e).replace(bn,"%23").replace(Ss,"%3F")}function Ts(e){return e==null?"":Rs(e).replace(Es,"%2F")}function Oe(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&P(`Error decoding "${e}". Using original value`)}return""+e}function As(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ra&&ct(a)):[o&&ct(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function Ds(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=F(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Vs=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),lt=Symbol(process.env.NODE_ENV!=="production"?"router":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),ut=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Ce(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ie(e,t,n,o,r){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((c,i)=>{const u=f=>{f===!1?i(ge(4,{from:n,to:t})):f instanceof Error?i(f):ts(f)?i(ge(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),c())},d=e.call(o&&o.instances[r],t,n,process.env.NODE_ENV!=="production"?Bs(u,t,n):u);let l=Promise.resolve(d);if(e.length<3&&(l=l.then(u)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: +`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${rs(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ge(e,t){return process.env.NODE_ENV!=="production"?x(new Error(ns[e](t)),{type:e,[st]:!0},t):x(new Error,{type:e,[st]:!0},t)}function ee(e,t){return e instanceof Error&&st in e&&(t==null||!!(e.type&t))}const os=["params","query","hash"];function rs(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of os)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const mn="[^/]+?",ss={sensitive:!1,strict:!1,start:!0,end:!0},as=/[.+*?^${}()[\]/\\]/g;function is(e,t){const n=x({},ss,t),o=[];let r=n.start?"^":"";const a=[];for(const d of e){const l=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function ls(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const us={type:0,value:""},ds=/[a-zA-Z0-9_]/;function fs(e){if(!e)return[[]];if(e==="/")return[[us]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${d}": ${h}`)}let n=0,o=n;const r=[];let a;function c(){a&&r.push(a),a=[]}let i=0,u,d="",l="";function f(){d&&(n===0?a.push({type:0,value:d}):n===1||n===2||n===3?(a.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:d,regexp:l,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=u}for(;i{c(I)}:ke}function c(l){if(pn(l)){const f=o.get(l);f&&(o.delete(l),n.splice(n.indexOf(f),1),f.children.forEach(c),f.alias.forEach(c))}else{const f=n.indexOf(l);f>-1&&(n.splice(f,1),l.record.name&&o.delete(l.record.name),l.children.forEach(c),l.alias.forEach(c))}}function i(){return n}function u(l){let f=0;for(;f=0&&(l.record.path!==n[f].record.path||!_n(l,n[f]));)f++;n.splice(f,0,l),l.record.name&&!wn(l)&&o.set(l.record.name,l)}function d(l,f){let p,h={},y,g;if("name"in l&&l.name){if(p=o.get(l.name),!p)throw ge(1,{location:l});if(process.env.NODE_ENV!=="production"){const I=Object.keys(l.params||{}).filter(T=>!p.keys.find(L=>L.name===T));I.length&&P(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}g=p.record.name,h=x(yn(f.params,p.keys.filter(I=>!I.optional).map(I=>I.name)),l.params&&yn(l.params,p.keys.map(I=>I.name))),y=p.stringify(h)}else if("path"in l)y=l.path,process.env.NODE_ENV!=="production"&&!y.startsWith("/")&&P(`The Matcher cannot resolve relative paths but received "${y}". Unless you directly called \`matcher.resolve("${y}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),p=n.find(I=>I.re.test(y)),p&&(h=p.parse(y),g=p.record.name);else{if(p=f.name?o.get(f.name):n.find(I=>I.re.test(f.path)),!p)throw ge(1,{location:l,currentLocation:f});g=p.record.name,h=x({},f.params,l.params),y=p.stringify(h)}const _=[];let O=p;for(;O;)_.unshift(O.record),O=O.parent;return{name:g,path:y,params:h,matched:_,meta:ys(_)}}return e.forEach(l=>a(l)),{addRoute:a,resolve:d,removeRoute:c,getRoutes:i,getRecordMatcher:r}}function yn(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function ms(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:gs(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function gs(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function wn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ys(e){return e.reduce((t,n)=>x(t,n.meta),{})}function vn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function at(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function ws(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(at.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(at.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function vs(e,t){t&&t.record.name&&!e.name&&!e.path&&P(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function _s(e,t){for(const n of t.keys)if(!e.keys.find(at.bind(null,n)))return P(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function _n(e,t){return t.children.some(n=>n===e||_n(e,n))}const bn=/#/g,bs=/&/g,Es=/\//g,ks=/=/g,Ss=/\?/g,En=/\+/g,Os=/%5B/g,Is=/%5D/g,kn=/%5E/g,Cs=/%60/g,Sn=/%7B/g,Ns=/%7C/g,On=/%7D/g,Ps=/%20/g;function it(e){return encodeURI(""+e).replace(Ns,"|").replace(Os,"[").replace(Is,"]")}function xs(e){return it(e).replace(Sn,"{").replace(On,"}").replace(kn,"^")}function ct(e){return it(e).replace(En,"%2B").replace(Ps,"+").replace(bn,"%23").replace(bs,"%26").replace(Cs,"`").replace(Sn,"{").replace(On,"}").replace(kn,"^")}function $s(e){return ct(e).replace(ks,"%3D")}function Rs(e){return it(e).replace(bn,"%23").replace(Ss,"%3F")}function Ts(e){return e==null?"":Rs(e).replace(Es,"%2F")}function Ie(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&P(`Error decoding "${e}". Using original value`)}return""+e}function As(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ra&&ct(a)):[o&&ct(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function Ds(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=F(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Vs=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),lt=Symbol(process.env.NODE_ENV!=="production"?"router":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),ut=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Ce(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ie(e,t,n,o,r){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((c,i)=>{const u=f=>{f===!1?i(ge(4,{from:n,to:t})):f instanceof Error?i(f):ts(f)?i(ge(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),c())},d=e.call(o&&o.instances[r],t,n,process.env.NODE_ENV!=="production"?Bs(u,t,n):u);let l=Promise.resolve(d);if(e.length<3&&(l=l.then(u)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: ${e.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof d=="object"&&"then"in d)l=l.then(p=>u._called?p:(P(f),Promise.reject(new Error("Invalid navigation guard"))));else if(d!==void 0&&!u._called){P(f),i(new Error("Invalid navigation guard"));return}}l.catch(f=>i(f))})}function Bs(e,t,n){let o=0;return function(){o++===1&&P(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function dt(e,t,n,o){const r=[];for(const a of e){process.env.NODE_ENV!=="production"&&!a.components&&!a.children.length&&P(`Record with path "${a.path}" is either missing a "component(s)" or "children" property.`);for(const c in a.components){let i=a.components[c];if(process.env.NODE_ENV!=="production"){if(!i||typeof i!="object"&&typeof i!="function")throw P(`Component "${c}" in record with path "${a.path}" is not a valid component. Received "${String(i)}".`),new Error("Invalid route component");if("then"in i){P(`Component "${c}" in record with path "${a.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const u=i;i=()=>u}else i.__asyncLoader&&!i.__warnedDefineAsync&&(i.__warnedDefineAsync=!0,P(`Component "${c}" in record with path "${a.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(Ms(i)){const d=(i.__vccOpts||i)[t];d&&r.push(ie(d,n,o,a,c))}else{let u=i();process.env.NODE_ENV!=="production"&&!("catch"in u)&&(P(`Component "${c}" in record with path "${a.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),u=Promise.resolve(u)),r.push(()=>u.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${a.path}"`));const l=Mr(d)?d.default:d;a.components[c]=l;const p=(l.__vccOpts||l)[t];return p&&ie(p,n,o,a,c)()}))}}}return r}function Ms(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Pn(e){const t=s.inject(lt),n=s.inject(Nn),o=s.computed(()=>t.resolve(s.unref(e.to))),r=s.computed(()=>{const{matched:u}=o.value,{length:d}=u,l=u[d-1],f=n.matched;if(!l||!f.length)return-1;const p=f.findIndex(se.bind(null,l));if(p>-1)return p;const h=xn(u[d-2]);return d>1&&xn(l)===h&&f[f.length-1].path!==h?f.findIndex(se.bind(null,u[d-2])):p}),a=s.computed(()=>r.value>-1&&Us(n.params,o.value.params)),c=s.computed(()=>r.value>-1&&r.value===n.matched.length-1&&cn(n.params,o.value.params));function i(u={}){return js(u)?t[s.unref(e.replace)?"replace":"push"](s.unref(e.to)).catch(ke):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&Z){const u=s.getCurrentInstance();if(u){const d={route:o.value,isActive:a.value,isExactActive:c.value};u.__vrl_devtools=u.__vrl_devtools||[],u.__vrl_devtools.push(d),s.watchEffect(()=>{d.route=o.value,d.isActive=a.value,d.isExactActive=c.value},{flush:"post"})}}return{route:o,href:s.computed(()=>o.value.href),isActive:a,isExactActive:c,navigate:i}}const Ls=s.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Pn,setup(e,{slots:t}){const n=s.reactive(Pn(e)),{options:o}=s.inject(lt),r=s.computed(()=>({[$n(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[$n(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:s.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}});function js(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Us(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!F(r)||r.length!==o.length||o.some((a,c)=>a!==r[c]))return!1}return!0}function xn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const $n=(e,t,n)=>e??t??n,Hs=s.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Ws();const o=s.inject(ut),r=s.computed(()=>e.route||o.value),a=s.inject(Cn,0),c=s.computed(()=>{let d=s.unref(a);const{matched:l}=r.value;let f;for(;(f=l[d])&&!f.components;)d++;return d}),i=s.computed(()=>r.value.matched[c.value]);s.provide(Cn,s.computed(()=>c.value+1)),s.provide(Vs,i),s.provide(ut,r);const u=s.ref();return s.watch(()=>[u.value,i.value,e.name],([d,l,f],[p,h,y])=>{l&&(l.instances[f]=d,h&&h!==l&&d&&d===p&&(l.leaveGuards.size||(l.leaveGuards=h.leaveGuards),l.updateGuards.size||(l.updateGuards=h.updateGuards))),d&&l&&(!h||!se(l,h)||!p)&&(l.enterCallbacks[f]||[]).forEach(g=>g(d))},{flush:"post"}),()=>{const d=r.value,l=e.name,f=i.value,p=f&&f.components[l];if(!p)return Rn(n.default,{Component:p,route:d});const h=f.props[l],y=h?h===!0?d.params:typeof h=="function"?h(d):h:null,g=I=>{I.component.isUnmounted&&(f.instances[l]=null)},_=s.h(p,x({},y,t,{onVnodeUnmounted:g,ref:u}));if(process.env.NODE_ENV!=="production"&&Z&&_.ref){const I={depth:c.value,name:f.name,path:f.path,meta:f.meta};(F(_.ref)?_.ref.map(T=>T.i):[_.ref.i]).forEach(T=>{T.__vrv_devtools=I})}return Rn(n.default,{Component:_,route:d})||_}}});function Rn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Fs=Hs;function Ws(){const e=s.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const o=t==="KeepAlive"?"keep-alive":"transition";P(` can no longer be used directly inside or . +. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof d=="object"&&"then"in d)l=l.then(p=>u._called?p:(P(f),Promise.reject(new Error("Invalid navigation guard"))));else if(d!==void 0&&!u._called){P(f),i(new Error("Invalid navigation guard"));return}}l.catch(f=>i(f))})}function Bs(e,t,n){let o=0;return function(){o++===1&&P(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function dt(e,t,n,o){const r=[];for(const a of e){process.env.NODE_ENV!=="production"&&!a.components&&!a.children.length&&P(`Record with path "${a.path}" is either missing a "component(s)" or "children" property.`);for(const c in a.components){let i=a.components[c];if(process.env.NODE_ENV!=="production"){if(!i||typeof i!="object"&&typeof i!="function")throw P(`Component "${c}" in record with path "${a.path}" is not a valid component. Received "${String(i)}".`),new Error("Invalid route component");if("then"in i){P(`Component "${c}" in record with path "${a.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const u=i;i=()=>u}else i.__asyncLoader&&!i.__warnedDefineAsync&&(i.__warnedDefineAsync=!0,P(`Component "${c}" in record with path "${a.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(Ms(i)){const d=(i.__vccOpts||i)[t];d&&r.push(ie(d,n,o,a,c))}else{let u=i();process.env.NODE_ENV!=="production"&&!("catch"in u)&&(P(`Component "${c}" in record with path "${a.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),u=Promise.resolve(u)),r.push(()=>u.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${a.path}"`));const l=Mr(d)?d.default:d;a.components[c]=l;const p=(l.__vccOpts||l)[t];return p&&ie(p,n,o,a,c)()}))}}}return r}function Ms(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Pn(e){const t=s.inject(lt),n=s.inject(Nn),o=s.computed(()=>t.resolve(s.unref(e.to))),r=s.computed(()=>{const{matched:u}=o.value,{length:d}=u,l=u[d-1],f=n.matched;if(!l||!f.length)return-1;const p=f.findIndex(se.bind(null,l));if(p>-1)return p;const h=xn(u[d-2]);return d>1&&xn(l)===h&&f[f.length-1].path!==h?f.findIndex(se.bind(null,u[d-2])):p}),a=s.computed(()=>r.value>-1&&Us(n.params,o.value.params)),c=s.computed(()=>r.value>-1&&r.value===n.matched.length-1&&cn(n.params,o.value.params));function i(u={}){return js(u)?t[s.unref(e.replace)?"replace":"push"](s.unref(e.to)).catch(ke):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&Z){const u=s.getCurrentInstance();if(u){const d={route:o.value,isActive:a.value,isExactActive:c.value};u.__vrl_devtools=u.__vrl_devtools||[],u.__vrl_devtools.push(d),s.watchEffect(()=>{d.route=o.value,d.isActive=a.value,d.isExactActive=c.value},{flush:"post"})}}return{route:o,href:s.computed(()=>o.value.href),isActive:a,isExactActive:c,navigate:i}}const Ls=s.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Pn,setup(e,{slots:t}){const n=s.reactive(Pn(e)),{options:o}=s.inject(lt),r=s.computed(()=>({[$n(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[$n(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:s.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}});function js(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Us(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!F(r)||r.length!==o.length||o.some((a,c)=>a!==r[c]))return!1}return!0}function xn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const $n=(e,t,n)=>e??t??n,Hs=s.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Ws();const o=s.inject(ut),r=s.computed(()=>e.route||o.value),a=s.inject(Cn,0),c=s.computed(()=>{let d=s.unref(a);const{matched:l}=r.value;let f;for(;(f=l[d])&&!f.components;)d++;return d}),i=s.computed(()=>r.value.matched[c.value]);s.provide(Cn,s.computed(()=>c.value+1)),s.provide(Vs,i),s.provide(ut,r);const u=s.ref();return s.watch(()=>[u.value,i.value,e.name],([d,l,f],[p,h,y])=>{l&&(l.instances[f]=d,h&&h!==l&&d&&d===p&&(l.leaveGuards.size||(l.leaveGuards=h.leaveGuards),l.updateGuards.size||(l.updateGuards=h.updateGuards))),d&&l&&(!h||!se(l,h)||!p)&&(l.enterCallbacks[f]||[]).forEach(g=>g(d))},{flush:"post"}),()=>{const d=r.value,l=e.name,f=i.value,p=f&&f.components[l];if(!p)return Rn(n.default,{Component:p,route:d});const h=f.props[l],y=h?h===!0?d.params:typeof h=="function"?h(d):h:null,g=O=>{O.component.isUnmounted&&(f.instances[l]=null)},_=s.h(p,x({},y,t,{onVnodeUnmounted:g,ref:u}));if(process.env.NODE_ENV!=="production"&&Z&&_.ref){const O={depth:c.value,name:f.name,path:f.path,meta:f.meta};(F(_.ref)?_.ref.map(T=>T.i):[_.ref.i]).forEach(T=>{T.__vrv_devtools=O})}return Rn(n.default,{Component:_,route:d})||_}}});function Rn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Fs=Hs;function Ws(){const e=s.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const o=t==="KeepAlive"?"keep-alive":"transition";P(` can no longer be used directly inside or . Use slot props instead: <${o}> -`)}}function Ne(e,t){const n=x({},e,{matched:e.matched.map(o=>Zs(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Me(e){return{_custom:{display:e}}}let zs=0;function Gs(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=zs++;Je({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((l,f)=>{l.instanceData&&l.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ne(t.currentRoute.value,"Current Route")})}),r.on.visitComponentTree(({treeNode:l,componentInstance:f})=>{if(f.__vrv_devtools){const p=f.__vrv_devtools;l.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:Tn})}F(f.__vrl_devtools)&&(f.__devtoolsApi=r,f.__vrl_devtools.forEach(p=>{let h=Vn,y="";p.isExactActive?(h=Dn,y="This is exactly active"):p.isActive&&(h=An,y="This link is active"),l.tags.push({label:p.route.path,textColor:0,tooltip:y,backgroundColor:h})}))}),s.watch(t.currentRoute,()=>{u(),r.notifyComponentUpdate(),r.sendInspectorTree(i),r.sendInspectorState(i)});const a="router:navigations:"+o;r.addTimelineLayer({id:a,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((l,f)=>{r.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:f.fullPath,logType:"error",time:r.now(),data:{error:l},groupId:f.meta.__navigationId}})});let c=0;t.beforeEach((l,f)=>{const p={guard:Me("beforeEach"),from:Ne(f,"Current Location during this navigation"),to:Ne(l,"Target location")};Object.defineProperty(l.meta,"__navigationId",{value:c++}),r.addTimelineEvent({layerId:a,event:{time:r.now(),title:"Start of navigation",subtitle:l.fullPath,data:p,groupId:l.meta.__navigationId}})}),t.afterEach((l,f,p)=>{const h={guard:Me("afterEach")};p?(h.failure={_custom:{type:Error,readOnly:!0,display:p?p.message:"",tooltip:"Navigation Failure",value:p}},h.status=Me("❌")):h.status=Me("✅"),h.from=Ne(f,"Current Location during this navigation"),h.to=Ne(l,"Target location"),r.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:l.fullPath,time:r.now(),data:h,logType:p?"warning":"default",groupId:l.meta.__navigationId}})});const i="router-inspector:"+o;r.addInspector({id:i,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function u(){if(!d)return;const l=d;let f=n.getRoutes().filter(p=>!p.parent||!p.parent.record.components);f.forEach(Ln),l.filter&&(f=f.filter(p=>ft(p,l.filter.toLowerCase()))),f.forEach(p=>Mn(p,t.currentRoute.value)),l.rootNodes=f.map(Bn)}let d;r.on.getInspectorTree(l=>{d=l,l.app===e&&l.inspectorId===i&&u()}),r.on.getInspectorState(l=>{if(l.app===e&&l.inspectorId===i){const p=n.getRoutes().find(h=>h.record.__vd_id===l.nodeId);p&&(l.state={options:qs(p)})}}),r.sendInspectorTree(i),r.sendInspectorState(i)})}function Qs(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function qs(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${Qs(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Tn=15485081,An=2450411,Dn=8702998,Ks=2282478,Vn=16486972,Js=6710886;function Bn(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:Ks}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Vn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Tn}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Dn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:An}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:Js});let o=n.__vd_id;return o==null&&(o=String(Ys++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(Bn)}}let Ys=0;const Xs=/^\/(.*)\/([a-z]*)$/;function Mn(e,t){const n=t.matched.length&&se(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>se(o,e.record))),e.children.forEach(o=>Mn(o,t))}function Ln(e){e.__vd_match=!1,e.children.forEach(Ln)}function ft(e,t){const n=String(e.re).match(Xs);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(c=>ft(c,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const r=e.record.path.toLowerCase(),a=Oe(r);return!t.startsWith("/")&&(a.includes(t)||r.includes(t))||a.startsWith(t)||r.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(c=>ft(c,t))}function Zs(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function ea(e){const t=hs(e.routes,e),n=e.parseQuery||As,o=e.stringifyQuery||On,r=e.history;if(process.env.NODE_ENV!=="production"&&!r)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const a=Ce(),c=Ce(),i=Ce(),u=s.shallowRef(ae);let d=ae;Z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=nt.bind(null,m=>""+m),f=nt.bind(null,Ts),p=nt.bind(null,Oe);function h(m,v){let w,E;return pn(m)?(w=t.getRecordMatcher(m),E=v):E=m,t.addRoute(E,w)}function y(m){const v=t.getRecordMatcher(m);v?t.removeRoute(v):process.env.NODE_ENV!=="production"&&P(`Cannot remove non-existent route "${String(m)}"`)}function g(){return t.getRoutes().map(m=>m.record)}function _(m){return!!t.getRecordMatcher(m)}function I(m,v){if(v=x({},v||u.value),typeof m=="string"){const C=ot(n,m,v.path),A=t.resolve({path:C.path},v),fe=r.createHref(C.fullPath);return process.env.NODE_ENV!=="production"&&(fe.startsWith("//")?P(`Location "${m}" resolved to "${fe}". A resolved location cannot start with multiple slashes.`):A.matched.length||P(`No match found for location with path "${m}"`)),x(C,A,{params:p(A.params),hash:Oe(C.hash),redirectedFrom:void 0,href:fe})}let w;if("path"in m)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&P(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),w=x({},m,{path:ot(n,m.path,v.path).path});else{const C=x({},m.params);for(const A in C)C[A]==null&&delete C[A];w=x({},m,{params:f(C)}),v.params=f(v.params)}const E=t.resolve(w,v),$=m.hash||"";process.env.NODE_ENV!=="production"&&$&&!$.startsWith("#")&&P(`A \`hash\` should always start with the character "#". Replace "${$}" with "#${$}".`),E.params=l(p(E.params));const D=Ur(o,x({},m,{hash:xs($),path:E.path})),N=r.createHref(D);return process.env.NODE_ENV!=="production"&&(N.startsWith("//")?P(`Location "${m}" resolved to "${N}". A resolved location cannot start with multiple slashes.`):E.matched.length||P(`No match found for location with path "${"path"in m?m.path:m}"`)),x({fullPath:D,hash:$,query:o===On?Ds(m.query):m.query||{}},E,{redirectedFrom:void 0,href:N})}function O(m){return typeof m=="string"?ot(n,m,u.value.path):x({},m)}function T(m,v){if(d!==m)return ge(8,{from:v,to:m})}function L(m){return S(m)}function G(m){return L(x(O(m),{replace:!0}))}function Q(m){const v=m.matched[m.matched.length-1];if(v&&v.redirect){const{redirect:w}=v;let E=typeof w=="function"?w(m):w;if(typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=O(E):{path:E},E.params={}),process.env.NODE_ENV!=="production"&&!("path"in E)&&!("name"in E))throw P(`Invalid redirect found: +`)}}function Ne(e,t){const n=x({},e,{matched:e.matched.map(o=>Zs(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Me(e){return{_custom:{display:e}}}let zs=0;function Gs(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=zs++;Je({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((l,f)=>{l.instanceData&&l.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ne(t.currentRoute.value,"Current Route")})}),r.on.visitComponentTree(({treeNode:l,componentInstance:f})=>{if(f.__vrv_devtools){const p=f.__vrv_devtools;l.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:Tn})}F(f.__vrl_devtools)&&(f.__devtoolsApi=r,f.__vrl_devtools.forEach(p=>{let h=Vn,y="";p.isExactActive?(h=Dn,y="This is exactly active"):p.isActive&&(h=An,y="This link is active"),l.tags.push({label:p.route.path,textColor:0,tooltip:y,backgroundColor:h})}))}),s.watch(t.currentRoute,()=>{u(),r.notifyComponentUpdate(),r.sendInspectorTree(i),r.sendInspectorState(i)});const a="router:navigations:"+o;r.addTimelineLayer({id:a,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((l,f)=>{r.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:f.fullPath,logType:"error",time:r.now(),data:{error:l},groupId:f.meta.__navigationId}})});let c=0;t.beforeEach((l,f)=>{const p={guard:Me("beforeEach"),from:Ne(f,"Current Location during this navigation"),to:Ne(l,"Target location")};Object.defineProperty(l.meta,"__navigationId",{value:c++}),r.addTimelineEvent({layerId:a,event:{time:r.now(),title:"Start of navigation",subtitle:l.fullPath,data:p,groupId:l.meta.__navigationId}})}),t.afterEach((l,f,p)=>{const h={guard:Me("afterEach")};p?(h.failure={_custom:{type:Error,readOnly:!0,display:p?p.message:"",tooltip:"Navigation Failure",value:p}},h.status=Me("❌")):h.status=Me("✅"),h.from=Ne(f,"Current Location during this navigation"),h.to=Ne(l,"Target location"),r.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:l.fullPath,time:r.now(),data:h,logType:p?"warning":"default",groupId:l.meta.__navigationId}})});const i="router-inspector:"+o;r.addInspector({id:i,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function u(){if(!d)return;const l=d;let f=n.getRoutes().filter(p=>!p.parent||!p.parent.record.components);f.forEach(Ln),l.filter&&(f=f.filter(p=>ft(p,l.filter.toLowerCase()))),f.forEach(p=>Mn(p,t.currentRoute.value)),l.rootNodes=f.map(Bn)}let d;r.on.getInspectorTree(l=>{d=l,l.app===e&&l.inspectorId===i&&u()}),r.on.getInspectorState(l=>{if(l.app===e&&l.inspectorId===i){const p=n.getRoutes().find(h=>h.record.__vd_id===l.nodeId);p&&(l.state={options:qs(p)})}}),r.sendInspectorTree(i),r.sendInspectorState(i)})}function Qs(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function qs(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${Qs(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Tn=15485081,An=2450411,Dn=8702998,Ks=2282478,Vn=16486972,Js=6710886;function Bn(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:Ks}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Vn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Tn}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Dn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:An}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:Js});let o=n.__vd_id;return o==null&&(o=String(Ys++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(Bn)}}let Ys=0;const Xs=/^\/(.*)\/([a-z]*)$/;function Mn(e,t){const n=t.matched.length&&se(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>se(o,e.record))),e.children.forEach(o=>Mn(o,t))}function Ln(e){e.__vd_match=!1,e.children.forEach(Ln)}function ft(e,t){const n=String(e.re).match(Xs);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(c=>ft(c,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const r=e.record.path.toLowerCase(),a=Ie(r);return!t.startsWith("/")&&(a.includes(t)||r.includes(t))||a.startsWith(t)||r.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(c=>ft(c,t))}function Zs(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function ea(e){const t=hs(e.routes,e),n=e.parseQuery||As,o=e.stringifyQuery||In,r=e.history;if(process.env.NODE_ENV!=="production"&&!r)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const a=Ce(),c=Ce(),i=Ce(),u=s.shallowRef(ae);let d=ae;Z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=nt.bind(null,m=>""+m),f=nt.bind(null,Ts),p=nt.bind(null,Ie);function h(m,v){let w,E;return pn(m)?(w=t.getRecordMatcher(m),E=v):E=m,t.addRoute(E,w)}function y(m){const v=t.getRecordMatcher(m);v?t.removeRoute(v):process.env.NODE_ENV!=="production"&&P(`Cannot remove non-existent route "${String(m)}"`)}function g(){return t.getRoutes().map(m=>m.record)}function _(m){return!!t.getRecordMatcher(m)}function O(m,v){if(v=x({},v||u.value),typeof m=="string"){const C=ot(n,m,v.path),A=t.resolve({path:C.path},v),fe=r.createHref(C.fullPath);return process.env.NODE_ENV!=="production"&&(fe.startsWith("//")?P(`Location "${m}" resolved to "${fe}". A resolved location cannot start with multiple slashes.`):A.matched.length||P(`No match found for location with path "${m}"`)),x(C,A,{params:p(A.params),hash:Ie(C.hash),redirectedFrom:void 0,href:fe})}let w;if("path"in m)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&P(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),w=x({},m,{path:ot(n,m.path,v.path).path});else{const C=x({},m.params);for(const A in C)C[A]==null&&delete C[A];w=x({},m,{params:f(C)}),v.params=f(v.params)}const E=t.resolve(w,v),$=m.hash||"";process.env.NODE_ENV!=="production"&&$&&!$.startsWith("#")&&P(`A \`hash\` should always start with the character "#". Replace "${$}" with "#${$}".`),E.params=l(p(E.params));const D=Ur(o,x({},m,{hash:xs($),path:E.path})),N=r.createHref(D);return process.env.NODE_ENV!=="production"&&(N.startsWith("//")?P(`Location "${m}" resolved to "${N}". A resolved location cannot start with multiple slashes.`):E.matched.length||P(`No match found for location with path "${"path"in m?m.path:m}"`)),x({fullPath:D,hash:$,query:o===In?Ds(m.query):m.query||{}},E,{redirectedFrom:void 0,href:N})}function I(m){return typeof m=="string"?ot(n,m,u.value.path):x({},m)}function T(m,v){if(d!==m)return ge(8,{from:v,to:m})}function L(m){return S(m)}function G(m){return L(x(I(m),{replace:!0}))}function Q(m){const v=m.matched[m.matched.length-1];if(v&&v.redirect){const{redirect:w}=v;let E=typeof w=="function"?w(m):w;if(typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=I(E):{path:E},E.params={}),process.env.NODE_ENV!=="production"&&!("path"in E)&&!("name"in E))throw P(`Invalid redirect found: ${JSON.stringify(E,null,2)} - when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return x({query:m.query,hash:m.hash,params:"path"in E?{}:m.params},E)}}function S(m,v){const w=d=I(m),E=u.value,$=m.state,D=m.force,N=m.replace===!0,C=Q(w);if(C)return S(x(O(C),{state:typeof C=="object"?x({},$,C.state):$,force:D,replace:N}),v||w);const A=w;A.redirectedFrom=v;let fe;return!D&&an(o,E,w)&&(fe=ge(16,{to:A,from:E}),Ao(E,E,!0,!1)),(fe?Promise.resolve(fe):k(A,E)).catch(H=>ee(H)?ee(H,2)?H:Nt(H):U(H,A,E)).then(H=>{if(H){if(ee(H,2))return process.env.NODE_ENV!=="production"&&an(o,I(H.to),A)&&v&&(v._count=v._count?v._count+1:1)>30?(P(`Detected a possibly infinite redirection in a navigation guard when going from "${E.fullPath}" to "${A.fullPath}". Aborting to avoid a Stack Overflow. - Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S(x({replace:N},O(H.to),{state:typeof H.to=="object"?x({},$,H.to.state):$,force:D}),v||A)}else H=R(A,E,!0,N,$);return b(A,E,H),H})}function To(m,v){const w=T(m,v);return w?Promise.reject(w):Promise.resolve()}function K(m){const v=We.values().next().value;return v&&typeof v.runWithContext=="function"?v.runWithContext(m):m()}function k(m,v){let w;const[E,$,D]=ta(m,v);w=dt(E.reverse(),"beforeRouteLeave",m,v);for(const C of E)C.leaveGuards.forEach(A=>{w.push(ie(A,m,v))});const N=To.bind(null,m,v);return w.push(N),we(w).then(()=>{w=[];for(const C of a.list())w.push(ie(C,m,v));return w.push(N),we(w)}).then(()=>{w=dt($,"beforeRouteUpdate",m,v);for(const C of $)C.updateGuards.forEach(A=>{w.push(ie(A,m,v))});return w.push(N),we(w)}).then(()=>{w=[];for(const C of D)if(C.beforeEnter)if(F(C.beforeEnter))for(const A of C.beforeEnter)w.push(ie(A,m,v));else w.push(ie(C.beforeEnter,m,v));return w.push(N),we(w)}).then(()=>(m.matched.forEach(C=>C.enterCallbacks={}),w=dt(D,"beforeRouteEnter",m,v),w.push(N),we(w))).then(()=>{w=[];for(const C of c.list())w.push(ie(C,m,v));return w.push(N),we(w)}).catch(C=>ee(C,8)?C:Promise.reject(C))}function b(m,v,w){i.list().forEach(E=>K(()=>E(m,v,w)))}function R(m,v,w,E,$){const D=T(m,v);if(D)return D;const N=v===ae,C=Z?history.state:{};w&&(E||N?r.replace(m.fullPath,x({scroll:N&&C&&C.scroll},$)):r.push(m.fullPath,$)),u.value=m,Ao(m,v,w,N),Nt()}let V;function de(){V||(V=r.listen((m,v,w)=>{const E=I(m),$=Q(E);if($){S(x($,{replace:!0}),E).catch(ke);return}d=E;const D=u.value;Z&&Kr(un(D.fullPath,w.delta),Be()),k(E,D).catch(N=>ee(N,12)?N:ee(N,2)?(S(N.to,E).then(C=>{ee(C,20)&&!w.delta&&w.type===Se.pop&&r.go(-1,!1)}).catch(ke),Promise.reject()):(w.delta&&r.go(-w.delta,!1),U(N,E,D))).then(N=>{N=N||R(E,D,!1),N&&(w.delta&&!ee(N,8)?r.go(-w.delta,!1):w.type===Se.pop&&ee(N,20)&&r.go(-1,!1)),b(E,D,N)}).catch(ke)}))}let xe=Ce(),Fe=Ce(),Y;function U(m,v,w){Nt(m);const E=Fe.list();return E.length?E.forEach($=>$(m,v,w)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function Zi(){return Y&&u.value!==ae?Promise.resolve():new Promise((m,v)=>{xe.add([m,v])})}function Nt(m){return Y||(Y=!m,de(),xe.list().forEach(([v,w])=>m?w(m):v()),xe.reset()),m}function Ao(m,v,w,E){const{scrollBehavior:$}=e;if(!Z||!$)return Promise.resolve();const D=!w&&Jr(un(m.fullPath,0))||(E||!w)&&history.state&&history.state.scroll||null;return s.nextTick().then(()=>$(m,v,D)).then(N=>N&&qr(N)).catch(N=>U(N,m,v))}const Pt=m=>r.go(m);let xt;const We=new Set,ec={currentRoute:u,listening:!0,addRoute:h,removeRoute:y,hasRoute:_,getRoutes:g,resolve:I,options:e,push:L,replace:G,go:Pt,back:()=>Pt(-1),forward:()=>Pt(1),beforeEach:a.add,beforeResolve:c.add,afterEach:i.add,onError:Fe.add,isReady:Zi,install(m){const v=this;m.component("RouterLink",Ls),m.component("RouterView",Fs),m.config.globalProperties.$router=v,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>s.unref(u)}),Z&&!xt&&u.value===ae&&(xt=!0,L(r.location).catch($=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",$)}));const w={};for(const $ in ae)Object.defineProperty(w,$,{get:()=>u.value[$],enumerable:!0});m.provide(lt,v),m.provide(Nn,s.shallowReactive(w)),m.provide(ut,u);const E=m.unmount;We.add(m),m.unmount=function(){We.delete(m),We.size<1&&(d=ae,V&&V(),V=null,u.value=ae,xt=!1,Y=!1),E()},process.env.NODE_ENV!=="production"&&Z&&Gs(m,v,t)}};function we(m){return m.reduce((v,w)=>v.then(()=>K(w)),Promise.resolve())}return ec}function ta(e,t){const n=[],o=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let c=0;cse(d,i))?o.push(i):n.push(i));const u=e.matched[c];u&&(t.matched.find(d=>se(d,u))||r.push(u))}return[n,o,r]}ea({history:es(),routes:[]});function na(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ue=Promise.resolve();function jn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function oa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function pt(){return Math.random().toString(36).substring(2)}var Un=0,ht=0;function Le(){var e=new Date().getTime();return e===Un?(ht++,e*1e3+ht):(Un=e,ht=0,e*1e3)}var ra=Le,sa="native";function aa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function ia(e){e.bc.close(),e.subFns=[]}function ca(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function la(e,t){e.messagesCallback=t}function ua(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function da(){return 150}var fa={create:aa,close:ia,onMessage:la,postMessage:ca,canBeUsed:ua,type:sa,averageResponseTime:da,microSeconds:ra},Hn=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,Fn()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,pa(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function pa(e){for(var t=Fn()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],a=o[1];if(a0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ha=Le,ma="pubkey.broadcast-channel-0-",te="messages",je={durability:"relaxed"},ga="idb";function Wn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function gt(e){e.commit&&e.commit()}function ya(e){var t=Wn(),n=ma+e,o=t.open(n);return o.onupgradeneeded=function(r){var a=r.target.result;a.createObjectStore(te,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,a){o.onerror=function(c){return a(c)},o.onsuccess=function(){r(o.result)}})}function wa(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},a=e.transaction([te],"readwrite",je);return new Promise(function(c,i){a.oncomplete=function(){return c()},a.onerror=function(d){return i(d)};var u=a.objectStore(te);u.add(r),gt(a)})}function va(e,t){var n=e.transaction(te,"readonly",je),o=n.objectStore(te),r=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var c=o.getAll(a);return new Promise(function(u,d){c.onerror=function(l){return d(l)},c.onsuccess=function(l){u(l.target.result)}})}function i(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(u,d){var l=i();l.onerror=function(f){return d(f)},l.onsuccess=function(f){var p=f.target.result;p?p.value.ide.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Sa(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ue})}function Ia(e){e.closed=!0,e.db.close()}function Oa(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return wa(e.db,e.uuid,t)}).then(function(){oa(0,10)===0&&Ea(e)}),e.writeBlockPromise}function Ca(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Gn(e)}function Na(){return!!Wn()}function Pa(e){return e.idb.fallbackInterval*2}var xa={create:ka,close:Ia,onMessage:Ca,postMessage:Oa,canBeUsed:Na,type:ga,averageResponseTime:Pa,microSeconds:ha},$a=Le,Ra="pubkey.broadcastChannel-",Ta="localstorage";function Qn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function qn(e){return Ra+e}function Aa(e,t){return new Promise(function(n){jn().then(function(){var o=qn(e.channelName),r={token:pt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(r);Qn().setItem(o,a);var c=document.createEvent("Event");c.initEvent("storage",!0,!0),c.key=o,c.newValue=a,window.dispatchEvent(c),n()})})}function Da(e,t){var n=qn(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Va(e){window.removeEventListener("storage",e)}function Ba(e,t){if(t=mt(t),!Kn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=pt(),o=new Hn(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=Da(e,function(a){r.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time0||e._addEL.internal.length>0}function eo(e,t,n){e._addEL[t].push(n),ei(e)}function to(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ti(e)}function ei(e){if(!e._iL&&Zn(e)){var t=function(r){e._addEL[r.type].forEach(function(a){var c=1e5,i=a.time-c;r.time>=i&&a.fn(r.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ti(e){if(e._iL&&!Zn(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}class vt extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function no(e){return Object(e)!==e}const ni=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oi(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===ni}function ri(e){return Object.prototype.toString.call(e).slice(8,-1)}function si(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case` -`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function ye(e){let t="",n=0;const o=e.length;for(let r=0;r0&&(f+=","),g in d?(a.push(`[${g}]`),f+=i(d[g]),a.pop()):f+=oo;f+="]";break;case"Set":f='["Set"';for(const g of d)f+=`,${i(g)}`;f+="]";break;case"Map":f='["Map"';for(const[g,_]of d)a.push(`.get(${no(g)?Et(g):"..."})`),f+=`,${i(g)},${i(_)}`;f+="]";break;default:if(!oi(d))throw new vt("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(d).length>0)throw new vt("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(d)===null){f='["null"';for(const g in d)a.push(`.${g}`),f+=`,${ye(g)},${i(d[g])}`,a.pop();f+="]"}else{f="{";let g=!1;for(const _ in d)g&&(f+=","),g=!0,a.push(`.${_}`),f+=`${ye(_)}:${i(d[_])}`,a.pop();f+="}"}}return n[l]=f,l}const u=i(e);return u<0?`${u}`:`[${n.join(",")}]`}function Et(e){const t=typeof e;return t==="string"?ye(e):e instanceof String?ye(e.toString()):e===void 0?_t.toString():e===0&&1/e<0?bt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ii(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,a=new wt(r,{type:o}),c=!1,i=0;s.watch(()=>t[e],l=>{c||(i=Date.now(),a.postMessage({timestamp:i,state:io(co(l))})),c=!1},{deep:!0}),a.onmessage=l=>{if(l===void 0){a.postMessage({timestamp:i,state:io(co(t[e]))});return}l.timestamp<=i||(c=!0,i=l.timestamp,t[e]=l.state)};let u=()=>a.postMessage(void 0),d=()=>a.close();return n&&u(),{sync:u,unshare:d}}var ci=(e,t)=>Object.keys(t).includes(e),li=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var a,c;let i=((a=r==null?void 0:r.share)==null?void 0:a.enable)??t,u=((c=r==null?void 0:r.share)==null?void 0:c.omit)??[];!i||Object.keys(o.$state).forEach(d=>{var l;u.includes(d)||!ci(d,o.$state)||ii(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};Rr().use(li({enable:!0,initialize:!0}));const lo=s.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=rn(),o=s.ref([]);return s.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((a,c)=>{const u=t.value.store.record[a.fieldname];r[c].value=u}),o.value=r}}),(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(nr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c)},null,8,["modelValue"])):s.createCommentVNode("",!0)}});var uo;const fo=typeof window<"u",ui=e=>typeof e=="string",di=()=>{};fo&&(uo=window==null?void 0:window.navigator)!=null&&uo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function po(e){return typeof e=="function"?e():s.unref(e)}function fi(e){return e}function pi(e){return s.getCurrentScope()?(s.onScopeDispose(e),!0):!1}function kt(e){var t;const n=po(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ho=fo?window:void 0;function hi(...e){let t,n,o,r;if(ui(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=ho):[t,n,o,r]=e,!t)return di;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],c=()=>{a.forEach(l=>l()),a.length=0},i=(l,f,p,h)=>(l.addEventListener(f,p,h),()=>l.removeEventListener(f,p,h)),u=s.watch(()=>[kt(t),po(r)],([l,f])=>{c(),l&&a.push(...n.flatMap(p=>o.map(h=>i(l,p,h,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return pi(d),d}const mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},go="__vueuse_ssr_handlers__";mo[go]=mo[go]||{};function mi(e,{window:t=ho,scrollTarget:n}={}){const o=s.ref(!1),r=()=>{if(!t)return;const a=t.document,c=kt(e);if(!c)o.value=!1;else{const i=c.getBoundingClientRect();o.value=i.top<=(t.innerHeight||a.documentElement.clientHeight)&&i.left<=(t.innerWidth||a.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return s.watch(()=>kt(e),()=>r(),{immediate:!0,flush:"post"}),t&&hi(n||t,"scroll",r,{capture:!1,passive:!0}),o}var yo;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(yo||(yo={}));var gi=Object.defineProperty,wo=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,vo=(e,t,n)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vi=(e,t)=>{for(var n in t||(t={}))yi.call(t,n)&&vo(e,n,t[n]);if(wo)for(var n of wo(t))wi.call(t,n)&&vo(e,n,t[n]);return e};vi({linear:fi},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const ne=e=>{let t=mi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,_o=e=>{const t=e.target;return St(t)},St=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?St(n):n},_i=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.firstElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.firstElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?It(o):o},bo=e=>{const t=e.target;return It(t)},It=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?It(n):n},bi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.lastElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.lastElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?St(o):o},Eo=e=>{const t=e.target;return Ot(t)},Ot=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!oe(n)||!ne(n))?Ot(n):n},ko=e=>{const t=e.target;return Ct(t)},Ct=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!oe(n)||!ne(n))?Ct(n):n},So=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!oe(t)||!ne(t))?Ct(t):t},Io=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!oe(t)||!ne(t))?Ot(t):t},Ue=["alt","control","shift","meta"],Ei={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Oo={"keydown.up":e=>{const t=_o(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=bo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Eo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=ko(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=_i(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=bi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=bo(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=_o(e);t&&t.focus()}},"keydown.home":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Eo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Co(e){const t=o=>{let r=null;o.parent&&(typeof o.parent=="string"?r=document.querySelector(o.parent):o.parent instanceof Element?r=o.parent:r=o.parent.value);let a=[];if(o.selectors)if(typeof o.selectors=="string")a=r?Array.from(r.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)a.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const c of o.selectors.value)c instanceof Element?a.push(c):a.push(c.$el);else a.push(o.selectors.value);else a=Array.from(r.children).filter(c=>oe(c)&&ne(c));return a},n=o=>r=>{const a=Ei[r.key]||r.key.toLowerCase();if(Ue.includes(a))return;const c=o.handlers||Oo;for(const i of Object.keys(c)){const[u,...d]=i.split(".");if(u==="keydown"&&d.includes(a)){const l=c[i],f=d.filter(h=>Ue.includes(h)),p=Ue.some(h=>{const y=h.charAt(0).toUpperCase()+h.slice(1);return r.getModifierState(y)});if(f.length>0){if(p){for(const h of Ue)if(d.includes(h)){const y=h.charAt(0).toUpperCase()+h.slice(1);r.getModifierState(y)&&l(r)}}}else p||l(r)}}};s.onMounted(()=>{for(const o of e){const r=t(o);for(const a of r)a.addEventListener("keydown",n(o))}}),s.onBeforeUnmount(()=>{for(const o of e){const r=t(o);for(const a of r)a.removeEventListener("keydown",n(o))}})}const ki=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Si={key:1},Ii=s.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},clickHandler:{}},setup(e){var t;const n=e,o=s.inject(n.tableid),r=s.ref(null);let a=s.ref(!1);const c=s.computed(()=>{const g=o.cellData(n.colIndex,n.rowIndex);if(o.columns[n.colIndex].format){const _=o.columns[n.colIndex].format;return typeof _=="function"?_(g):typeof _=="string"?Function(`"use strict";return (${_})`)()(g):g}else return g}),i=g=>{if(n.clickHandler){n.clickHandler(g);return}if(o.columns[n.colIndex].mask,o.columns[n.colIndex].modalComponent){const _=r.value.getBoundingClientRect();o.modal.visible=!0,o.modal.colIndex=n.colIndex,o.modal.rowIndex=n.rowIndex,o.modal.parent=r.value,o.modal.top=_.top+_.height,o.modal.left=_.left,o.modal.width=d.value,o.modal.component=o.columns[n.colIndex].modalComponent,o.modal.componentProps=o.columns[n.colIndex].modalComponentProps}};if(n.addNavigation){let g={...Oo,"keydown.f2":i,"keydown.alt.up":i,"keydown.alt.down":i,"keydown.alt.left":i,"keydown.alt.right":i};typeof n.addNavigation=="object"&&(g={...g,...n.addNavigation}),Co([{selectors:r,handlers:g}])}const u=s.computed(()=>o.columns[n.colIndex].align||"center"),d=s.computed(()=>o.columns[n.colIndex].width||"40ch");let l="";const f=()=>{r.value&&(l=r.value.innerText)},p=()=>{r.value&&r.value.innerHTML!==l&&(l=r.value.innerText,r.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[n.colIndex].format||o.setCellData(n.rowIndex,n.colIndex,l))},h=(g,_)=>_&&g===0&&_>0?`${_}ch`:"inherit",y={textAlign:u.value,width:d.value,backgroundColor:a.value?"var(--cell-modified-color)":"inherit",fontWeight:a.value?"bold":"inherit",paddingLeft:h(n.colIndex,(t=o.display[n.rowIndex])==null?void 0:t.indent)};return(g,_)=>(s.openBlock(),s.createElementBlock("td",{ref_key:"cell",ref:r,"data-colindex":g.colIndex,"data-rowindex":g.rowIndex,"data-editable":s.unref(o).columns[g.colIndex].edit,contenteditable:s.unref(o).columns[g.colIndex].edit,tabindex:g.tabIndex,spellcheck:!1,style:y,onFocus:f,onPaste:p,onBlur:p,onInput:p,onClick:i,onMousedown:i},[s.unref(o).columns[g.colIndex].cellComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).columns[g.colIndex].cellComponent),s.mergeProps({key:0,value:c.value},s.unref(o).columns[g.colIndex].cellComponentProps),null,16,["value"])):(s.openBlock(),s.createElementBlock("span",Si,s.toDisplayString(c.value),1))],40,ki))}}),Pe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Oi=Pe(Ii,[["__scopeId","data-v-07dfe445"]]),Ci=["tabindex"],Ni={key:0,tabIndex:-1,class:"list-index"},Pi=s.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(e){s.useCssVars(u=>({"5b18ee03":s.unref(r)}));const t=e,n=s.inject(t.tableid),o=s.ref(null),r=n.numberedRowWidth.value,a=()=>n.config.view!=="tree"?"":n.display[t.rowIndex].isRoot||n.display[t.rowIndex].isParent?n.display[t.rowIndex].childrenOpen?"-":"+":"",c=()=>n.config.view!=="tree"||n.display[t.rowIndex].isRoot||n.display[t.rowIndex].open,i=u=>{n.toggleRowExpand(u)};return t.addNavigation&&Co([{selectors:o,handlers:t.addNavigation}]),(u,d)=>s.withDirectives((s.openBlock(),s.createElementBlock("tr",{ref_key:"rowEl",ref:o,tabindex:u.tabIndex,class:"table-row"},[s.unref(n).config.view==="list"?(s.openBlock(),s.createElementBlock("td",Ni,s.toDisplayString(u.rowIndex+1),1)):s.unref(n).config.view==="tree"?(s.openBlock(),s.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:d[0]||(d[0]=l=>i(u.rowIndex))},s.toDisplayString(a()),1)):s.renderSlot(u.$slots,"indexCell",{key:2},void 0,!0),s.renderSlot(u.$slots,"default",{},void 0,!0)],8,Ci)),[[s.vShow,c()]])}}),xi=Pe(Pi,[["__scopeId","data-v-4c71a067"]]);let He;const $i=new Uint8Array(16);function Ri(){if(!He&&(He=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!He))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return He($i)}const M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function Ti(e,t=0){return M[e[t+0]]+M[e[t+1]]+M[e[t+2]]+M[e[t+3]]+"-"+M[e[t+4]]+M[e[t+5]]+"-"+M[e[t+6]]+M[e[t+7]]+"-"+M[e[t+8]]+M[e[t+9]]+"-"+M[e[t+10]]+M[e[t+11]]+M[e[t+12]]+M[e[t+13]]+M[e[t+14]]+M[e[t+15]]}const Ai=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),No={randomUUID:Ai};function Po(e,t,n){if(No.randomUUID&&!t&&!e)return No.randomUUID();e=e||{};const o=e.random||(e.rng||Ri)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=o[r];return t}return Ti(o)}class Di{constructor(t,n,o,r,a,c){this.id=t||Po(),this.rows=o,this.columns=s.reactive(n),this.config=s.reactive(r),this.table=a||s.reactive(this.createTableObject()),this.display=this.createDisplayObject(c),this.modal=s.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,a]of this.rows.entries())t[`${n}:${r}`]=a[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const a=this.rows[r];a.parent&&o.add(a.parent),n[r]={childrenOpen:!1,expanded:!1,indent:a.indent||null,isParent:o.has(r),isRoot:a.parent===null||a.parent===void 0,modified:!1,open:a.parent===null||a.parent===void 0,parent:a.parent}}return s.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return s.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Vi={key:0},Bi={class:"atable-header-row",tabindex:"-1"},Mi={key:0,id:"header-index"},Li=s.defineComponent({__name:"ATableHeader",props:{columns:{},config:{},tableid:{}},setup(e){s.useCssVars(r=>({"12d06943":s.unref(n)}));const t=s.inject(e.tableid),n=t.numberedRowWidth.value,o=r=>({minWidth:r.width||"40ch",textAlign:r.align||"center",width:t.config.fullWidth?"auto":null});return(r,a)=>r.columns.length?(s.openBlock(),s.createElementBlock("thead",Vi,[s.createElementVNode("tr",Bi,[s.unref(t).zeroColumn?(s.openBlock(),s.createElementBlock("th",Mi)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.columns,(c,i)=>(s.openBlock(),s.createElementBlock("th",{key:i,tabindex:"-1",style:s.normalizeStyle(o(c))},[s.renderSlot(r.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(c.label||String.fromCharCode(i+97).toUpperCase()),1)],!0)],4))),128))])])):s.createCommentVNode("",!0)}}),ji=Pe(Li,[["__scopeId","data-v-16e66636"]]),Ui=s.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){s.inject(e.tableid);const t=n=>{n.stopPropagation()};return(n,o)=>(s.openBlock(),s.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",onClick:t,onInput:t},[s.renderSlot(n.$slots,"default",{},void 0,!0)],544))}}),Hi=Pe(Ui,[["__scopeId","data-v-10a48b2a"]]),Fi=s.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;let r=n.modelValue?n.modelValue:n.rows,a=new Di(n.id,n.columns,r,n.config);s.provide(a.id,a),s.watch(()=>a.rows,i=>{o("update:modelValue",i)},{deep:!0});const c=i=>{var u;(u=a.modal.parent)!=null&&u.contains(i.target)||a.modal.visible&&(a.modal.visible=!1)};return window.addEventListener("click",c),window.addEventListener("keydown",i=>{if(i.key==="Escape"&&a.modal.visible){a.modal.visible=!1;const u=a.modal.parent;u&&s.nextTick().then(()=>{const d=u.dataset.rowindex,l=u.dataset.colindex,f=document.querySelectorAll(`[data-rowindex='${d}'][data-colindex='${l}']`);f&&f[0].focus()})}}),(i,u)=>(s.openBlock(),s.createElementBlock("table",{class:"atable",style:s.normalizeStyle({width:s.unref(a).config.fullWidth?"100%":"auto"})},[s.renderSlot(i.$slots,"header",{data:s.unref(a)},()=>[s.createVNode(ji,{columns:s.unref(a).columns,config:s.unref(a).config,tableid:s.unref(a).id},null,8,["columns","config","tableid"])],!0),s.createElementVNode("tbody",null,[s.renderSlot(i.$slots,"body",{data:s.unref(a)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).rows,(d,l)=>(s.openBlock(),s.createBlock(xi,{key:d.id||s.unref(Po)(),row:d,rowIndex:l,tableid:s.unref(a).id},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).columns,(f,p)=>(s.openBlock(),s.createBlock(Oi,{key:`${p}:${l}`,tableid:s.unref(a).id,col:f,spellcheck:"false",rowIndex:l,colIndex:p+(s.unref(a).zeroColumn?0:-1),component:f.cellComponent,style:s.normalizeStyle({textAlign:(f==null?void 0:f.align)||"center",minWidth:(f==null?void 0:f.width)||"40ch",width:s.unref(a).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))],!0)]),s.renderSlot(i.$slots,"footer",{data:s.unref(a)},void 0,!0),s.renderSlot(i.$slots,"modal",{data:s.unref(a)},()=>[s.withDirectives(s.createVNode(Hi,{colIndex:s.unref(a).modal.colIndex,rowIndex:s.unref(a).modal.rowIndex,tableid:s.unref(a).id,style:s.normalizeStyle({left:s.unref(a).modal.left+"px",top:s.unref(a).modal.top+"px",maxWidth:s.unref(a).modal.width+"px"})},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(a).modal.component),s.mergeProps({key:`${s.unref(a).modal.rowIndex}:${s.unref(a).modal.colIndex}`,colIndex:s.unref(a).modal.colIndex,rowIndex:s.unref(a).modal.rowIndex,tableid:s.unref(a).id},s.unref(a).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[s.vShow,s.unref(a).modal.visible]])],!0)],4))}}),Wi=Pe(Fi,[["__scopeId","data-v-55d8ba05"]]),xo=s.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=rn(),o={view:"list"};return(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(Wi),{key:0,columns:s.unref(t).schema.schema.toArray(),rows:s.unref(t).store.records,config:o},null,8,["columns","rows"])):s.createCommentVNode("",!0)}}),$o=e=>(s.pushScopeId("data-v-18bfde6e"),e=e(),s.popScopeId(),e),zi={class:"tabs"},Gi={tabindex:"0"},Qi={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},qi=[$o(()=>s.createElementVNode("g",null,[s.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114 + when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return x({query:m.query,hash:m.hash,params:"path"in E?{}:m.params},E)}}function S(m,v){const w=d=O(m),E=u.value,$=m.state,D=m.force,N=m.replace===!0,C=Q(w);if(C)return S(x(I(C),{state:typeof C=="object"?x({},$,C.state):$,force:D,replace:N}),v||w);const A=w;A.redirectedFrom=v;let fe;return!D&&an(o,E,w)&&(fe=ge(16,{to:A,from:E}),Ao(E,E,!0,!1)),(fe?Promise.resolve(fe):k(A,E)).catch(H=>ee(H)?ee(H,2)?H:Nt(H):U(H,A,E)).then(H=>{if(H){if(ee(H,2))return process.env.NODE_ENV!=="production"&&an(o,O(H.to),A)&&v&&(v._count=v._count?v._count+1:1)>30?(P(`Detected a possibly infinite redirection in a navigation guard when going from "${E.fullPath}" to "${A.fullPath}". Aborting to avoid a Stack Overflow. + Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S(x({replace:N},I(H.to),{state:typeof H.to=="object"?x({},$,H.to.state):$,force:D}),v||A)}else H=R(A,E,!0,N,$);return b(A,E,H),H})}function To(m,v){const w=T(m,v);return w?Promise.reject(w):Promise.resolve()}function K(m){const v=We.values().next().value;return v&&typeof v.runWithContext=="function"?v.runWithContext(m):m()}function k(m,v){let w;const[E,$,D]=ta(m,v);w=dt(E.reverse(),"beforeRouteLeave",m,v);for(const C of E)C.leaveGuards.forEach(A=>{w.push(ie(A,m,v))});const N=To.bind(null,m,v);return w.push(N),we(w).then(()=>{w=[];for(const C of a.list())w.push(ie(C,m,v));return w.push(N),we(w)}).then(()=>{w=dt($,"beforeRouteUpdate",m,v);for(const C of $)C.updateGuards.forEach(A=>{w.push(ie(A,m,v))});return w.push(N),we(w)}).then(()=>{w=[];for(const C of D)if(C.beforeEnter)if(F(C.beforeEnter))for(const A of C.beforeEnter)w.push(ie(A,m,v));else w.push(ie(C.beforeEnter,m,v));return w.push(N),we(w)}).then(()=>(m.matched.forEach(C=>C.enterCallbacks={}),w=dt(D,"beforeRouteEnter",m,v),w.push(N),we(w))).then(()=>{w=[];for(const C of c.list())w.push(ie(C,m,v));return w.push(N),we(w)}).catch(C=>ee(C,8)?C:Promise.reject(C))}function b(m,v,w){i.list().forEach(E=>K(()=>E(m,v,w)))}function R(m,v,w,E,$){const D=T(m,v);if(D)return D;const N=v===ae,C=Z?history.state:{};w&&(E||N?r.replace(m.fullPath,x({scroll:N&&C&&C.scroll},$)):r.push(m.fullPath,$)),u.value=m,Ao(m,v,w,N),Nt()}let V;function de(){V||(V=r.listen((m,v,w)=>{const E=O(m),$=Q(E);if($){S(x($,{replace:!0}),E).catch(ke);return}d=E;const D=u.value;Z&&Kr(un(D.fullPath,w.delta),Be()),k(E,D).catch(N=>ee(N,12)?N:ee(N,2)?(S(N.to,E).then(C=>{ee(C,20)&&!w.delta&&w.type===Se.pop&&r.go(-1,!1)}).catch(ke),Promise.reject()):(w.delta&&r.go(-w.delta,!1),U(N,E,D))).then(N=>{N=N||R(E,D,!1),N&&(w.delta&&!ee(N,8)?r.go(-w.delta,!1):w.type===Se.pop&&ee(N,20)&&r.go(-1,!1)),b(E,D,N)}).catch(ke)}))}let xe=Ce(),Fe=Ce(),Y;function U(m,v,w){Nt(m);const E=Fe.list();return E.length?E.forEach($=>$(m,v,w)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function Zi(){return Y&&u.value!==ae?Promise.resolve():new Promise((m,v)=>{xe.add([m,v])})}function Nt(m){return Y||(Y=!m,de(),xe.list().forEach(([v,w])=>m?w(m):v()),xe.reset()),m}function Ao(m,v,w,E){const{scrollBehavior:$}=e;if(!Z||!$)return Promise.resolve();const D=!w&&Jr(un(m.fullPath,0))||(E||!w)&&history.state&&history.state.scroll||null;return s.nextTick().then(()=>$(m,v,D)).then(N=>N&&qr(N)).catch(N=>U(N,m,v))}const Pt=m=>r.go(m);let xt;const We=new Set,ec={currentRoute:u,listening:!0,addRoute:h,removeRoute:y,hasRoute:_,getRoutes:g,resolve:O,options:e,push:L,replace:G,go:Pt,back:()=>Pt(-1),forward:()=>Pt(1),beforeEach:a.add,beforeResolve:c.add,afterEach:i.add,onError:Fe.add,isReady:Zi,install(m){const v=this;m.component("RouterLink",Ls),m.component("RouterView",Fs),m.config.globalProperties.$router=v,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>s.unref(u)}),Z&&!xt&&u.value===ae&&(xt=!0,L(r.location).catch($=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",$)}));const w={};for(const $ in ae)Object.defineProperty(w,$,{get:()=>u.value[$],enumerable:!0});m.provide(lt,v),m.provide(Nn,s.shallowReactive(w)),m.provide(ut,u);const E=m.unmount;We.add(m),m.unmount=function(){We.delete(m),We.size<1&&(d=ae,V&&V(),V=null,u.value=ae,xt=!1,Y=!1),E()},process.env.NODE_ENV!=="production"&&Z&&Gs(m,v,t)}};function we(m){return m.reduce((v,w)=>v.then(()=>K(w)),Promise.resolve())}return ec}function ta(e,t){const n=[],o=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let c=0;cse(d,i))?o.push(i):n.push(i));const u=e.matched[c];u&&(t.matched.find(d=>se(d,u))||r.push(u))}return[n,o,r]}ea({history:es(),routes:[]});function na(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ue=Promise.resolve();function jn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function oa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function pt(){return Math.random().toString(36).substring(2)}var Un=0,ht=0;function Le(){var e=new Date().getTime();return e===Un?(ht++,e*1e3+ht):(Un=e,ht=0,e*1e3)}var ra=Le,sa="native";function aa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function ia(e){e.bc.close(),e.subFns=[]}function ca(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function la(e,t){e.messagesCallback=t}function ua(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function da(){return 150}var fa={create:aa,close:ia,onMessage:la,postMessage:ca,canBeUsed:ua,type:sa,averageResponseTime:da,microSeconds:ra},Hn=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,Fn()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,pa(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function pa(e){for(var t=Fn()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],a=o[1];if(a0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ha=Le,ma="pubkey.broadcast-channel-0-",te="messages",je={durability:"relaxed"},ga="idb";function Wn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function gt(e){e.commit&&e.commit()}function ya(e){var t=Wn(),n=ma+e,o=t.open(n);return o.onupgradeneeded=function(r){var a=r.target.result;a.createObjectStore(te,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,a){o.onerror=function(c){return a(c)},o.onsuccess=function(){r(o.result)}})}function wa(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},a=e.transaction([te],"readwrite",je);return new Promise(function(c,i){a.oncomplete=function(){return c()},a.onerror=function(d){return i(d)};var u=a.objectStore(te);u.add(r),gt(a)})}function va(e,t){var n=e.transaction(te,"readonly",je),o=n.objectStore(te),r=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var c=o.getAll(a);return new Promise(function(u,d){c.onerror=function(l){return d(l)},c.onsuccess=function(l){u(l.target.result)}})}function i(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(u,d){var l=i();l.onerror=function(f){return d(f)},l.onsuccess=function(f){var p=f.target.result;p?p.value.ide.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Sa(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ue})}function Oa(e){e.closed=!0,e.db.close()}function Ia(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return wa(e.db,e.uuid,t)}).then(function(){oa(0,10)===0&&Ea(e)}),e.writeBlockPromise}function Ca(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Gn(e)}function Na(){return!!Wn()}function Pa(e){return e.idb.fallbackInterval*2}var xa={create:ka,close:Oa,onMessage:Ca,postMessage:Ia,canBeUsed:Na,type:ga,averageResponseTime:Pa,microSeconds:ha},$a=Le,Ra="pubkey.broadcastChannel-",Ta="localstorage";function Qn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function qn(e){return Ra+e}function Aa(e,t){return new Promise(function(n){jn().then(function(){var o=qn(e.channelName),r={token:pt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(r);Qn().setItem(o,a);var c=document.createEvent("Event");c.initEvent("storage",!0,!0),c.key=o,c.newValue=a,window.dispatchEvent(c),n()})})}function Da(e,t){var n=qn(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Va(e){window.removeEventListener("storage",e)}function Ba(e,t){if(t=mt(t),!Kn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=pt(),o=new Hn(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=Da(e,function(a){r.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time0||e._addEL.internal.length>0}function eo(e,t,n){e._addEL[t].push(n),ei(e)}function to(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ti(e)}function ei(e){if(!e._iL&&Zn(e)){var t=function(r){e._addEL[r.type].forEach(function(a){var c=1e5,i=a.time-c;r.time>=i&&a.fn(r.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ti(e){if(e._iL&&!Zn(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}class vt extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function no(e){return Object(e)!==e}const ni=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oi(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===ni}function ri(e){return Object.prototype.toString.call(e).slice(8,-1)}function si(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case` +`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function ye(e){let t="",n=0;const o=e.length;for(let r=0;r0&&(f+=","),g in d?(a.push(`[${g}]`),f+=i(d[g]),a.pop()):f+=oo;f+="]";break;case"Set":f='["Set"';for(const g of d)f+=`,${i(g)}`;f+="]";break;case"Map":f='["Map"';for(const[g,_]of d)a.push(`.get(${no(g)?Et(g):"..."})`),f+=`,${i(g)},${i(_)}`;f+="]";break;default:if(!oi(d))throw new vt("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(d).length>0)throw new vt("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(d)===null){f='["null"';for(const g in d)a.push(`.${g}`),f+=`,${ye(g)},${i(d[g])}`,a.pop();f+="]"}else{f="{";let g=!1;for(const _ in d)g&&(f+=","),g=!0,a.push(`.${_}`),f+=`${ye(_)}:${i(d[_])}`,a.pop();f+="}"}}return n[l]=f,l}const u=i(e);return u<0?`${u}`:`[${n.join(",")}]`}function Et(e){const t=typeof e;return t==="string"?ye(e):e instanceof String?ye(e.toString()):e===void 0?_t.toString():e===0&&1/e<0?bt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ii(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,a=new wt(r,{type:o}),c=!1,i=0;s.watch(()=>t[e],l=>{c||(i=Date.now(),a.postMessage({timestamp:i,state:io(co(l))})),c=!1},{deep:!0}),a.onmessage=l=>{if(l===void 0){a.postMessage({timestamp:i,state:io(co(t[e]))});return}l.timestamp<=i||(c=!0,i=l.timestamp,t[e]=l.state)};let u=()=>a.postMessage(void 0),d=()=>a.close();return n&&u(),{sync:u,unshare:d}}var ci=(e,t)=>Object.keys(t).includes(e),li=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var a,c;let i=((a=r==null?void 0:r.share)==null?void 0:a.enable)??t,u=((c=r==null?void 0:r.share)==null?void 0:c.omit)??[];!i||Object.keys(o.$state).forEach(d=>{var l;u.includes(d)||!ci(d,o.$state)||ii(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};Rr().use(li({enable:!0,initialize:!0}));const lo=s.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=rn(),o=s.ref([]);return s.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((a,c)=>{const u=t.value.store.record[a.fieldname];r[c].value=u}),o.value=r}}),(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(nr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c)},null,8,["modelValue"])):s.createCommentVNode("",!0)}});var uo;const fo=typeof window<"u",ui=e=>typeof e=="string",di=()=>{};fo&&(uo=window==null?void 0:window.navigator)!=null&&uo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function po(e){return typeof e=="function"?e():s.unref(e)}function fi(e){return e}function pi(e){return s.getCurrentScope()?(s.onScopeDispose(e),!0):!1}function kt(e){var t;const n=po(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ho=fo?window:void 0;function hi(...e){let t,n,o,r;if(ui(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=ho):[t,n,o,r]=e,!t)return di;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],c=()=>{a.forEach(l=>l()),a.length=0},i=(l,f,p,h)=>(l.addEventListener(f,p,h),()=>l.removeEventListener(f,p,h)),u=s.watch(()=>[kt(t),po(r)],([l,f])=>{c(),l&&a.push(...n.flatMap(p=>o.map(h=>i(l,p,h,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return pi(d),d}const mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},go="__vueuse_ssr_handlers__";mo[go]=mo[go]||{};function mi(e,{window:t=ho,scrollTarget:n}={}){const o=s.ref(!1),r=()=>{if(!t)return;const a=t.document,c=kt(e);if(!c)o.value=!1;else{const i=c.getBoundingClientRect();o.value=i.top<=(t.innerHeight||a.documentElement.clientHeight)&&i.left<=(t.innerWidth||a.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return s.watch(()=>kt(e),()=>r(),{immediate:!0,flush:"post"}),t&&hi(n||t,"scroll",r,{capture:!1,passive:!0}),o}var yo;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(yo||(yo={}));var gi=Object.defineProperty,wo=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,vo=(e,t,n)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vi=(e,t)=>{for(var n in t||(t={}))yi.call(t,n)&&vo(e,n,t[n]);if(wo)for(var n of wo(t))wi.call(t,n)&&vo(e,n,t[n]);return e};vi({linear:fi},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const ne=e=>{let t=mi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,_o=e=>{const t=e.target;return St(t)},St=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?St(n):n},_i=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.firstElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.firstElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?Ot(o):o},bo=e=>{const t=e.target;return Ot(t)},Ot=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?Ot(n):n},bi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.lastElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.lastElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?St(o):o},Eo=e=>{const t=e.target;return It(t)},It=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!oe(n)||!ne(n))?It(n):n},ko=e=>{const t=e.target;return Ct(t)},Ct=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!oe(n)||!ne(n))?Ct(n):n},So=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!oe(t)||!ne(t))?Ct(t):t},Oo=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!oe(t)||!ne(t))?It(t):t},Ue=["alt","control","shift","meta"],Ei={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Io={"keydown.up":e=>{const t=_o(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=bo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Eo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=ko(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=_i(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=bi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=bo(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=_o(e);t&&t.focus()}},"keydown.home":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Eo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Co(e){const t=o=>{let r=null;o.parent&&(typeof o.parent=="string"?r=document.querySelector(o.parent):o.parent instanceof Element?r=o.parent:r=o.parent.value);let a=[];if(o.selectors)if(typeof o.selectors=="string")a=r?Array.from(r.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)a.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const c of o.selectors.value)c instanceof Element?a.push(c):a.push(c.$el);else a.push(o.selectors.value);else a=Array.from(r.children).filter(c=>oe(c)&&ne(c));return a},n=o=>r=>{const a=Ei[r.key]||r.key.toLowerCase();if(Ue.includes(a))return;const c=o.handlers||Io;for(const i of Object.keys(c)){const[u,...d]=i.split(".");if(u==="keydown"&&d.includes(a)){const l=c[i],f=d.filter(h=>Ue.includes(h)),p=Ue.some(h=>{const y=h.charAt(0).toUpperCase()+h.slice(1);return r.getModifierState(y)});if(f.length>0){if(p){for(const h of Ue)if(d.includes(h)){const y=h.charAt(0).toUpperCase()+h.slice(1);r.getModifierState(y)&&l(r)}}}else p||l(r)}}};s.onMounted(()=>{for(const o of e){const r=t(o);for(const a of r)a.addEventListener("keydown",n(o))}}),s.onBeforeUnmount(()=>{for(const o of e){const r=t(o);for(const a of r)a.removeEventListener("keydown",n(o))}})}const ki=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Si={key:1},Oi=s.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},clickHandler:{}},setup(e){var t;const n=e,o=s.inject(n.tableid),r=s.ref(null);let a=s.ref(!1);const c=s.computed(()=>{const g=o.cellData(n.colIndex,n.rowIndex);if(o.columns[n.colIndex].format){const _=o.columns[n.colIndex].format;return typeof _=="function"?_(g):typeof _=="string"?Function(`"use strict";return (${_})`)()(g):g}else return g}),i=g=>{if(n.clickHandler){n.clickHandler(g);return}if(o.columns[n.colIndex].mask,o.columns[n.colIndex].modalComponent){const _=r.value.getBoundingClientRect();o.modal.visible=!0,o.modal.colIndex=n.colIndex,o.modal.rowIndex=n.rowIndex,o.modal.parent=r.value,o.modal.top=_.top+_.height,o.modal.left=_.left,o.modal.width=d.value,o.modal.component=o.columns[n.colIndex].modalComponent,o.modal.componentProps=o.columns[n.colIndex].modalComponentProps}};if(n.addNavigation){let g={...Io,"keydown.f2":i,"keydown.alt.up":i,"keydown.alt.down":i,"keydown.alt.left":i,"keydown.alt.right":i};typeof n.addNavigation=="object"&&(g={...g,...n.addNavigation}),Co([{selectors:r,handlers:g}])}const u=s.computed(()=>o.columns[n.colIndex].align||"center"),d=s.computed(()=>o.columns[n.colIndex].width||"40ch");let l="";const f=()=>{r.value&&(l=r.value.innerText)},p=()=>{r.value&&r.value.innerHTML!==l&&(l=r.value.innerText,r.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[n.colIndex].format||o.setCellData(n.rowIndex,n.colIndex,l))},h=(g,_)=>_&&g===0&&_>0?`${_}ch`:"inherit",y={textAlign:u.value,width:d.value,backgroundColor:a.value?"var(--cell-modified-color)":"inherit",fontWeight:a.value?"bold":"inherit",paddingLeft:h(n.colIndex,(t=o.display[n.rowIndex])==null?void 0:t.indent)};return(g,_)=>(s.openBlock(),s.createElementBlock("td",{ref_key:"cell",ref:r,"data-colindex":g.colIndex,"data-rowindex":g.rowIndex,"data-editable":s.unref(o).columns[g.colIndex].edit,contenteditable:s.unref(o).columns[g.colIndex].edit,tabindex:g.tabIndex,spellcheck:!1,style:y,onFocus:f,onPaste:p,onBlur:p,onInput:p,onClick:i,onMousedown:i},[s.unref(o).columns[g.colIndex].cellComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).columns[g.colIndex].cellComponent),s.mergeProps({key:0,value:c.value},s.unref(o).columns[g.colIndex].cellComponentProps),null,16,["value"])):(s.openBlock(),s.createElementBlock("span",Si,s.toDisplayString(c.value),1))],40,ki))}}),Pe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=Pe(Oi,[["__scopeId","data-v-07dfe445"]]),Ci=["tabindex"],Ni={key:0,tabIndex:-1,class:"list-index"},Pi=s.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(e){s.useCssVars(u=>({"5b18ee03":s.unref(r)}));const t=e,n=s.inject(t.tableid),o=s.ref(null),r=n.numberedRowWidth.value,a=()=>n.config.view!=="tree"?"":n.display[t.rowIndex].isRoot||n.display[t.rowIndex].isParent?n.display[t.rowIndex].childrenOpen?"-":"+":"",c=()=>n.config.view!=="tree"||n.display[t.rowIndex].isRoot||n.display[t.rowIndex].open,i=u=>{n.toggleRowExpand(u)};return t.addNavigation&&Co([{selectors:o,handlers:t.addNavigation}]),(u,d)=>s.withDirectives((s.openBlock(),s.createElementBlock("tr",{ref_key:"rowEl",ref:o,tabindex:u.tabIndex,class:"table-row"},[s.unref(n).config.view==="list"?(s.openBlock(),s.createElementBlock("td",Ni,s.toDisplayString(u.rowIndex+1),1)):s.unref(n).config.view==="tree"?(s.openBlock(),s.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:d[0]||(d[0]=l=>i(u.rowIndex))},s.toDisplayString(a()),1)):s.renderSlot(u.$slots,"indexCell",{key:2},void 0,!0),s.renderSlot(u.$slots,"default",{},void 0,!0)],8,Ci)),[[s.vShow,c()]])}}),xi=Pe(Pi,[["__scopeId","data-v-4c71a067"]]);let He;const $i=new Uint8Array(16);function Ri(){if(!He&&(He=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!He))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return He($i)}const M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function Ti(e,t=0){return M[e[t+0]]+M[e[t+1]]+M[e[t+2]]+M[e[t+3]]+"-"+M[e[t+4]]+M[e[t+5]]+"-"+M[e[t+6]]+M[e[t+7]]+"-"+M[e[t+8]]+M[e[t+9]]+"-"+M[e[t+10]]+M[e[t+11]]+M[e[t+12]]+M[e[t+13]]+M[e[t+14]]+M[e[t+15]]}const Ai=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),No={randomUUID:Ai};function Po(e,t,n){if(No.randomUUID&&!t&&!e)return No.randomUUID();e=e||{};const o=e.random||(e.rng||Ri)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=o[r];return t}return Ti(o)}class Di{constructor(t,n,o,r,a,c){this.id=t||Po(),this.rows=o,this.columns=s.reactive(n),this.config=s.reactive(r),this.table=a||s.reactive(this.createTableObject()),this.display=this.createDisplayObject(c),this.modal=s.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,a]of this.rows.entries())t[`${n}:${r}`]=a[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const a=this.rows[r];a.parent&&o.add(a.parent),n[r]={childrenOpen:!1,expanded:!1,indent:a.indent||null,isParent:o.has(r),isRoot:a.parent===null||a.parent===void 0,modified:!1,open:a.parent===null||a.parent===void 0,parent:a.parent}}return s.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return s.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Vi={key:0},Bi={class:"atable-header-row",tabindex:"-1"},Mi={key:0,id:"header-index"},Li=s.defineComponent({__name:"ATableHeader",props:{columns:{},config:{},tableid:{}},setup(e){s.useCssVars(r=>({"12d06943":s.unref(n)}));const t=s.inject(e.tableid),n=t.numberedRowWidth.value,o=r=>({minWidth:r.width||"40ch",textAlign:r.align||"center",width:t.config.fullWidth?"auto":null});return(r,a)=>r.columns.length?(s.openBlock(),s.createElementBlock("thead",Vi,[s.createElementVNode("tr",Bi,[s.unref(t).zeroColumn?(s.openBlock(),s.createElementBlock("th",Mi)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.columns,(c,i)=>(s.openBlock(),s.createElementBlock("th",{key:i,tabindex:"-1",style:s.normalizeStyle(o(c))},[s.renderSlot(r.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(c.label||String.fromCharCode(i+97).toUpperCase()),1)],!0)],4))),128))])])):s.createCommentVNode("",!0)}}),ji=Pe(Li,[["__scopeId","data-v-16e66636"]]),Ui=s.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){s.inject(e.tableid);const t=n=>{n.stopPropagation()};return(n,o)=>(s.openBlock(),s.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",onClick:t,onInput:t},[s.renderSlot(n.$slots,"default",{},void 0,!0)],544))}}),Hi=Pe(Ui,[["__scopeId","data-v-10a48b2a"]]),Fi=s.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;let r=n.modelValue?n.modelValue:n.rows,a=new Di(n.id,n.columns,r,n.config);s.provide(a.id,a),s.watch(()=>a.rows,i=>{o("update:modelValue",i)},{deep:!0});const c=i=>{var u;(u=a.modal.parent)!=null&&u.contains(i.target)||a.modal.visible&&(a.modal.visible=!1)};return window.addEventListener("click",c),window.addEventListener("keydown",i=>{if(i.key==="Escape"&&a.modal.visible){a.modal.visible=!1;const u=a.modal.parent;u&&s.nextTick().then(()=>{const d=u.dataset.rowindex,l=u.dataset.colindex,f=document.querySelectorAll(`[data-rowindex='${d}'][data-colindex='${l}']`);f&&f[0].focus()})}}),(i,u)=>(s.openBlock(),s.createElementBlock("table",{class:"atable",style:s.normalizeStyle({width:s.unref(a).config.fullWidth?"100%":"auto"})},[s.renderSlot(i.$slots,"header",{data:s.unref(a)},()=>[s.createVNode(ji,{columns:s.unref(a).columns,config:s.unref(a).config,tableid:s.unref(a).id},null,8,["columns","config","tableid"])],!0),s.createElementVNode("tbody",null,[s.renderSlot(i.$slots,"body",{data:s.unref(a)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).rows,(d,l)=>(s.openBlock(),s.createBlock(xi,{key:d.id||s.unref(Po)(),row:d,rowIndex:l,tableid:s.unref(a).id},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).columns,(f,p)=>(s.openBlock(),s.createBlock(Ii,{key:`${p}:${l}`,tableid:s.unref(a).id,col:f,spellcheck:"false",rowIndex:l,colIndex:p+(s.unref(a).zeroColumn?0:-1),component:f.cellComponent,style:s.normalizeStyle({textAlign:(f==null?void 0:f.align)||"center",minWidth:(f==null?void 0:f.width)||"40ch",width:s.unref(a).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))],!0)]),s.renderSlot(i.$slots,"footer",{data:s.unref(a)},void 0,!0),s.renderSlot(i.$slots,"modal",{data:s.unref(a)},()=>[s.withDirectives(s.createVNode(Hi,{colIndex:s.unref(a).modal.colIndex,rowIndex:s.unref(a).modal.rowIndex,tableid:s.unref(a).id,style:s.normalizeStyle({left:s.unref(a).modal.left+"px",top:s.unref(a).modal.top+"px",maxWidth:s.unref(a).modal.width+"px"})},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(a).modal.component),s.mergeProps({key:`${s.unref(a).modal.rowIndex}:${s.unref(a).modal.colIndex}`,colIndex:s.unref(a).modal.colIndex,rowIndex:s.unref(a).modal.rowIndex,tableid:s.unref(a).id},s.unref(a).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[s.vShow,s.unref(a).modal.visible]])],!0)],4))}}),Wi=Pe(Fi,[["__scopeId","data-v-55d8ba05"]]),xo=s.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=rn(),o={view:"list"};return(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(Wi),{key:0,columns:s.unref(t).schema.schema.toArray(),rows:s.unref(t).store.records,config:o},null,8,["columns","rows"])):s.createCommentVNode("",!0)}}),$o=e=>(s.pushScopeId("data-v-18bfde6e"),e=e(),s.popScopeId(),e),zi={class:"tabs"},Gi={tabindex:"0"},Qi={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},qi=[$o(()=>s.createElementVNode("g",null,[s.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114 c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276 c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129 v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0 @@ -41,5 +41,5 @@ ${JSON.stringify(E,null,2)} c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863 c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511 c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129 - C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1))],Ki={tabindex:"0"},Ji={style:{width:"11pt"}},Yi=[$o(()=>s.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[s.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1))],Ro=Ge(s.defineComponent({__name:"SheetNav",props:{breadcrumbs:{}},setup(e){const t=e,n=s.ref([]),o=s.ref(!0),r=s.ref(!1),a=s.ref(""),c=s.ref(null),i=s.computed(()=>o.value?"unrotated":"rotated");s.onMounted(()=>{n.value=t.breadcrumbs||[]});const u=()=>{o.value=!o.value},d=async()=>{r.value=!r.value,await s.nextTick(()=>{c.value.focus()})},l=h=>{h.preventDefault(),h.stopPropagation()},f=async h=>{h.preventDefault(),h.stopPropagation(),await d()},p=()=>{};return(h,y)=>{const g=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("footer",null,[s.createElementVNode("ul",zi,[s.createElementVNode("li",{class:"hidebreadcrumbs",onClick:u,onKeydown:s.withKeys(u,["enter"])},[s.createElementVNode("a",Gi,[s.createElementVNode("div",{class:s.normalizeClass(i.value)},"×",2)])],32),s.createElementVNode("li",{class:"hometab",onClick:p,onKeydown:s.withKeys(p,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(g,{to:"/home",tabindex:"0"},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock("svg",Qi,qi))]),_:1})],36),s.createElementVNode("li",{class:"searchtab",onClick:d,onKeydown:s.withKeys(d,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createElementVNode("a",Ki,[s.createElementVNode("span",{style:s.normalizeStyle({display:r.value?"none":"block"})},[(s.openBlock(),s.createElementBlock("svg",Ji,Yi))],4),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=_=>a.value=_),ref_key:"searchinput",ref:c,style:s.normalizeStyle({display:r.value?"block":"none"}),onClick:y[1]||(y[1]=_=>l(_)),onInput:y[2]||(y[2]=_=>l(_)),onBlur:y[3]||(y[3]=_=>f(_)),onKeydown:y[4]||(y[4]=s.withKeys(_=>f(_),["enter"])),type:"text"},null,36),[[s.vModelText,a.value]])])],36),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(_,I)=>(s.openBlock(),s.createElementBlock("li",{key:I,style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(g,{tabindex:"0",to:_.to},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(_.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-18bfde6e"]]),Xi={install:e=>{e.component("ActionSet",$t),e.component("CommandPalette",Rt),e.component("Doctype",lo),e.component("Records",xo),e.component("SheetNav",Ro)}};W.ActionSet=$t,W.CommandPalette=Rt,W.Doctype=lo,W.Records=xo,W.SheetNav=Ro,W.StonecropDesktop=Xi,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}); + C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1))],Ki={tabindex:"0"},Ji={style:{width:"11pt"}},Yi=[$o(()=>s.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[s.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1))],Ro=Ge(s.defineComponent({__name:"SheetNav",props:{breadcrumbs:{}},setup(e){const t=e,n=s.ref([]),o=s.ref(!0),r=s.ref(!1),a=s.ref(""),c=s.ref(null),i=s.computed(()=>o.value?"unrotated":"rotated");s.onMounted(()=>{n.value=t.breadcrumbs||[]});const u=()=>{o.value=!o.value},d=async()=>{r.value=!r.value,await s.nextTick(()=>{c.value.focus()})},l=h=>{h.preventDefault(),h.stopPropagation()},f=async h=>{h.preventDefault(),h.stopPropagation(),await d()},p=()=>{};return(h,y)=>{const g=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("footer",null,[s.createElementVNode("ul",zi,[s.createElementVNode("li",{class:"hidebreadcrumbs",onClick:u,onKeydown:s.withKeys(u,["enter"])},[s.createElementVNode("a",Gi,[s.createElementVNode("div",{class:s.normalizeClass(i.value)},"×",2)])],32),s.createElementVNode("li",{class:"hometab",onClick:p,onKeydown:s.withKeys(p,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(g,{to:"/home",tabindex:"0"},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock("svg",Qi,qi))]),_:1})],36),s.createElementVNode("li",{class:"searchtab",onClick:d,onKeydown:s.withKeys(d,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createElementVNode("a",Ki,[s.createElementVNode("span",{style:s.normalizeStyle({display:r.value?"none":"block"})},[(s.openBlock(),s.createElementBlock("svg",Ji,Yi))],4),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=_=>a.value=_),ref_key:"searchinput",ref:c,style:s.normalizeStyle({display:r.value?"block":"none"}),onClick:y[1]||(y[1]=_=>l(_)),onInput:y[2]||(y[2]=_=>l(_)),onBlur:y[3]||(y[3]=_=>f(_)),onKeydown:y[4]||(y[4]=s.withKeys(_=>f(_),["enter"])),type:"text"},null,36),[[s.vModelText,a.value]])])],36),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(_,O)=>(s.openBlock(),s.createElementBlock("li",{key:O,style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(g,{tabindex:"0",to:_.to},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(_.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-18bfde6e"]]),Xi={install:e=>{e.component("ActionSet",$t),e.component("CommandPalette",Rt),e.component("Doctype",lo),e.component("Records",xo),e.component("SheetNav",Ro)}};W.ActionSet=$t,W.CommandPalette=Rt,W.Doctype=lo,W.Records=xo,W.SheetNav=Ro,W.StonecropDesktop=Xi,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=desktop.umd.cjs.map diff --git a/desktop/dist/desktop.umd.cjs.map b/desktop/dist/desktop.umd.cjs.map index 89d1e04c..fa93b585 100644 --- a/desktop/dist/desktop.umd.cjs.map +++ b/desktop/dist/desktop.umd.cjs.map @@ -1 +1 @@ -{"version":3,"file":"desktop.umd.cjs","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as C, vModelCheckbox as ge, toDisplayString as k, vShow as $, resolveComponent as ye, createBlock as H, withCtx as be, onMounted as se, onBeforeUnmount as we, ref as y, watch as F, unref as O, getCurrentScope as Ce, onScopeDispose as ke, inject as ae, nextTick as De, Fragment as V, renderList as x, normalizeStyle as Ee, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ie, mergeProps as Me, createTextVNode as Te, renderSlot as _e, createVNode as Se, resolveDirective as Oe } from \"vue\";\nconst $e = { id: \"checkbox-container\" }, Le = [\"id\", \"readonly\", \"required\"], Ve = { id: \"custom-checkbox\" }, xe = [\"for\"], Be = [\"innerHTML\"], Pe = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: {\n label: {},\n value: {},\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:value\"],\n setup(e, { emit: t }) {\n const o = e, n = t, s = S({\n get() {\n return o.value;\n },\n set(l) {\n n(\"update:value\", l);\n }\n });\n return (l, a) => (f(), v(\"div\", null, [\n i(\"label\", $e, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (r) => s.value = r),\n type: \"checkbox\",\n id: l.uuid,\n class: \"checkbox\",\n readonly: l.readOnly,\n required: l.required\n }, null, 8, Le), [\n [ge, s.value]\n ]),\n i(\"span\", Ve, k(s.value), 1)\n ]),\n i(\"label\", {\n for: l.uuid,\n id: \"checkbox-label\"\n }, k(l.label), 9, xe),\n C(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Be), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n}), M = (e, t) => {\n const o = e.__vccOpts || e;\n for (const [n, s] of t)\n o[n] = s;\n return o;\n}, qe = /* @__PURE__ */ M(Pe, [[\"__scopeId\", \"data-v-743cd4db\"]]), He = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), Fe = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, o) => {\n const n = ye(\"ATableModal\");\n return f(), H(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: be(() => [\n He\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar W;\nconst ie = typeof window < \"u\", Re = (e) => typeof e == \"string\", Ue = () => {\n};\nie && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction ue(e) {\n return typeof e == \"function\" ? e() : O(e);\n}\nfunction Qe(e) {\n return e;\n}\nfunction Ye(e) {\n return Ce() ? (ke(e), !0) : !1;\n}\nfunction q(e) {\n var t;\n const o = ue(e);\n return (t = o == null ? void 0 : o.$el) != null ? t : o;\n}\nconst ce = ie ? window : void 0;\nfunction je(...e) {\n let t, o, n, s;\n if (Re(e[0]) || Array.isArray(e[0]) ? ([o, n, s] = e, t = ce) : [t, o, n, s] = e, !t)\n return Ue;\n Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]);\n const l = [], a = () => {\n l.forEach((c) => c()), l.length = 0;\n }, r = (c, g, b, m) => (c.addEventListener(g, b, m), () => c.removeEventListener(g, b, m)), p = F(() => [q(t), ue(s)], ([c, g]) => {\n a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, g))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return Ye(u), u;\n}\nconst N = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nN[z] = N[z] || {};\nfunction We(e, { window: t = ce, scrollTarget: o } = {}) {\n const n = y(!1), s = () => {\n if (!t)\n return;\n const l = t.document, a = q(e);\n if (!a)\n n.value = !1;\n else {\n const r = a.getBoundingClientRect();\n n.value = r.top <= (t.innerHeight || l.documentElement.clientHeight) && r.left <= (t.innerWidth || l.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return F(() => q(e), () => s(), { immediate: !0, flush: \"post\" }), t && je(o || t, \"scroll\", s, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ne = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, Ke = (e, t) => {\n for (var o in t || (t = {}))\n ze.call(t, o) && J(e, o, t[o]);\n if (K)\n for (var o of K(t))\n Ge.call(t, o) && J(e, o, t[o]);\n return e;\n};\nconst Je = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nKe({\n linear: Qe\n}, Je);\nconst E = (e) => {\n let t = We(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, A = (e) => e.tabIndex >= 0, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let o;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (n) {\n const s = Array.from(n.children)[e.cellIndex];\n s && (o = s);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (o = n);\n }\n return o && (!A(o) || !E(o)) ? U(o) : o;\n}, Xe = (e) => {\n var t;\n const o = e.target;\n let n;\n if (o instanceof HTMLTableCellElement) {\n const s = (t = o.parentElement) == null ? void 0 : t.parentElement;\n if (s) {\n const l = s.firstElementChild.children[o.cellIndex];\n l && (n = l);\n }\n } else if (o instanceof HTMLTableRowElement) {\n const s = o.parentElement;\n if (s) {\n const l = s.firstElementChild;\n l && (n = l);\n }\n }\n return n && (!A(n) || !E(n)) ? Q(n) : n;\n}, Z = (e) => {\n const t = e.target;\n return Q(t);\n}, Q = (e) => {\n var t;\n let o;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (n) {\n const s = Array.from(n.children)[e.cellIndex];\n s && (o = s);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (o = n);\n }\n return o && (!A(o) || !E(o)) ? Q(o) : o;\n}, Ze = (e) => {\n var t;\n const o = e.target;\n let n;\n if (o instanceof HTMLTableCellElement) {\n const s = (t = o.parentElement) == null ? void 0 : t.parentElement;\n if (s) {\n const l = s.lastElementChild.children[o.cellIndex];\n l && (n = l);\n }\n } else if (o instanceof HTMLTableRowElement) {\n const s = o.parentElement;\n if (s) {\n const l = s.lastElementChild;\n l && (n = l);\n }\n }\n return n && (!A(n) || !E(n)) ? U(n) : n;\n}, ee = (e) => {\n const t = e.target;\n return Y(t);\n}, Y = (e) => {\n var t;\n let o;\n if (e.previousElementSibling)\n o = e.previousElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n o = n == null ? void 0 : n.lastElementChild;\n }\n return o && (!A(o) || !E(o)) ? Y(o) : o;\n}, te = (e) => {\n const t = e.target;\n return j(t);\n}, j = (e) => {\n var t;\n let o;\n if (e.nextElementSibling)\n o = e.nextElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n o = n == null ? void 0 : n.firstElementChild;\n }\n return o && (!A(o) || !E(o)) ? j(o) : o;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !E(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !E(t)) ? Y(t) : t;\n}, L = [\"alt\", \"control\", \"shift\", \"meta\"], et = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, de = {\n \"keydown.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = te(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = Xe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = Ze(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = Z(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction tt(e) {\n const t = (n) => {\n let s = null;\n n.parent && (typeof n.parent == \"string\" ? s = document.querySelector(n.parent) : n.parent instanceof Element ? s = n.parent : s = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = s ? Array.from(s.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const a of n.selectors.value)\n a instanceof Element ? l.push(a) : l.push(a.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(s.children).filter((a) => A(a) && E(a));\n return l;\n }, o = (n) => (s) => {\n const l = et[s.key] || s.key.toLowerCase();\n if (L.includes(l))\n return;\n const a = n.handlers || de;\n for (const r of Object.keys(a)) {\n const [p, ...u] = r.split(\".\");\n if (p === \"keydown\" && u.includes(l)) {\n const c = a[r], g = u.filter((m) => L.includes(m)), b = L.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return s.getModifierState(_);\n });\n if (g.length > 0) {\n if (b) {\n for (const m of L)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n s.getModifierState(_) && c(s);\n }\n }\n } else\n b || c(s);\n }\n }\n };\n se(() => {\n for (const n of e) {\n const s = t(n);\n for (const l of s)\n l.addEventListener(\"keydown\", o(n));\n }\n }), we(() => {\n for (const n of e) {\n const s = t(n);\n for (const l of s)\n l.removeEventListener(\"keydown\", o(n));\n }\n });\n}\nconst nt = [\"event\", \"colIndex\", \"rowIndex\", \"tableid\"], ot = { colspan: \"5\" }, lt = [\"onClick\"], st = 6, I = 7, at = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n event: {},\n indent: {},\n readonly: { type: Boolean }\n },\n setup(e) {\n const t = e, o = ae(t.tableid), n = /* @__PURE__ */ new Date(), s = y(), l = y(), a = y(), r = y([]);\n se(async () => {\n let d = o.cellData(t.colIndex, t.rowIndex);\n d ? (d instanceof Date || (d = new Date(d)), s.value = d, l.value = s.value.getMonth(), a.value = s.value.getFullYear()) : (l.value = n.getMonth(), a.value = n.getFullYear()), p(), await De();\n const T = document.getElementsByClassName(\"selecteddate\");\n if (T.length > 0)\n T[0].focus();\n else {\n const h = document.getElementsByClassName(\"todaysdate\");\n h.length > 0 && h[0].focus();\n }\n }), F([l, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const d = new Date(a.value, l.value, 1), T = d.getDay(), h = d.setDate(d.getDate() - T);\n for (let w of Array(43).keys())\n r.value.push(h + w * 864e5);\n }, u = () => {\n a.value -= 1;\n }, c = () => {\n a.value += 1;\n }, g = () => {\n l.value == 0 ? (l.value = 11, u()) : l.value -= 1;\n }, b = () => {\n l.value == 11 ? (l.value = 0, c()) : l.value += 1;\n }, m = (d) => {\n if (l.value === n.getMonth())\n return n.toDateString() === new Date(d).toDateString();\n }, _ = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, T) => {\n s.value = new Date(r.value[T]), me();\n }, me = () => {\n o.setCellData(t.rowIndex, t.colIndex, s.value.getTime());\n }, ve = S(() => new Date(a.value, l.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return tt([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...de,\n \"keydown.pageup\": g,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": c\n }\n }\n ]), (d, T) => d.readonly ? re(\"\", !0) : (f(), v(\"div\", {\n key: 0,\n event: d.event,\n colIndex: d.colIndex,\n rowIndex: d.rowIndex,\n tableid: d.tableid,\n class: \"adate\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n i(\"table\", null, [\n i(\"tr\", null, [\n i(\"td\", {\n onClick: g,\n tabindex: -1\n }, \"<\"),\n i(\"th\", ot, k(ve.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), v(V, null, x(st, (h) => i(\"tr\", { key: h }, [\n (f(), v(V, null, x(I, (w) => i(\"td\", {\n key: (h - 1) * I + w,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: Ee({\n border: _(r.value[(h - 1) * I + w]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(h - 1) * I + w]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Ae((he) => fe(he, (h - 1) * I + w), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(h - 1) * I + w]),\n selecteddate: _(r.value[(h - 1) * I + w])\n })\n }, k(new Date(r.value[(h - 1) * I + w]).getDate()), 15, lt)), 64))\n ])), 64))\n ])\n ], 8, nt));\n }\n}), rt = /* @__PURE__ */ M(at, [[\"__scopeId\", \"data-v-169f1184\"]]), it = D({\n name: \"ADropdown\",\n props: {\n modelValue: {\n type: String,\n required: !1,\n default: \"\"\n },\n label: {\n type: String,\n required: !0\n },\n value: String,\n items: {\n type: Array,\n required: !1,\n default: () => []\n },\n isAsync: {\n type: Boolean,\n required: !1,\n default: !1\n }\n },\n emits: [\"update:modelValue\", \"filterChanged\"],\n data() {\n return {\n results: [],\n search: this.modelValue,\n isLoading: !1,\n arrowCounter: 0,\n isOpen: !1\n };\n },\n watch: {\n items: function(e, t) {\n this.isLoading = !1, this.results = e;\n }\n },\n mounted() {\n document.addEventListener(\"click\", this.handleClickOutside), this.filterResults();\n },\n destroyed() {\n document.removeEventListener(\"click\", this.handleClickOutside);\n },\n methods: {\n setResult(e) {\n this.search = e, this.closeResults();\n },\n filterResults() {\n this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);\n },\n onChange() {\n this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit(\"filterChanged\", this.search)) : this.filterResults();\n },\n handleClickOutside(e) {\n this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);\n },\n closeResults() {\n this.isOpen = !1, this.items.includes(this.search) || (this.search = \"\"), this.$emit(\"update:modelValue\", this.search);\n },\n onArrowDown() {\n this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);\n },\n onArrowUp() {\n this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);\n },\n onEnter() {\n this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;\n },\n openWithSearch() {\n this.search = \"\", this.onChange(), this.$refs.mopInput.focus();\n }\n }\n}), ut = { class: \"input-wrapper\" }, ct = {\n id: \"autocomplete-results\",\n class: \"autocomplete-results\"\n}, dt = {\n key: 0,\n class: \"loading autocomplete-result\"\n}, pt = [\"onClick\"];\nfunction ft(e, t, o, n, s, l) {\n return f(), v(\"div\", {\n class: B([\"autocomplete\", { isOpen: e.isOpen }])\n }, [\n i(\"div\", ut, [\n C(i(\"input\", {\n ref: \"mopInput\",\n type: \"text\",\n onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),\n onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),\n \"onUpdate:modelValue\": t[2] || (t[2] = (a) => e.search = a),\n onKeydown: [\n t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), [\"down\"])),\n t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), [\"up\"])),\n t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), [\"enter\"]))\n ]\n }, null, 544), [\n [R, e.search]\n ]),\n C(i(\"ul\", ct, [\n e.isLoading ? (f(), v(\"li\", dt, \"Loading results...\")) : (f(!0), v(V, { key: 1 }, x(e.results, (a, r) => (f(), v(\"li\", {\n key: r,\n onClick: (p) => e.setResult(a),\n class: B([\"autocomplete-result\", { \"is-active\": r === e.arrowCounter }])\n }, k(a), 11, pt))), 128))\n ], 512), [\n [$, e.isOpen]\n ]),\n i(\"label\", null, k(e.label), 1)\n ])\n ], 2);\n}\nconst mt = /* @__PURE__ */ M(it, [[\"render\", ft]]), vt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, o) => (f(), v(\"button\", {\n class: B([\"collapse-button\", t.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n}), ht = /* @__PURE__ */ M(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), gt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: {},\n data: {},\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const o = e, n = t, s = y(o.data || {}), l = (r) => {\n let p = {};\n for (const [u, c] of Object.entries(r))\n [\"component\", \"fieldtype\"].includes(u) || (p[u] = c), u === \"rows\" && c && c.length === 0 && (p.rows = s.value[r.fieldname]);\n return p;\n }, a = S({\n get: () => o.modelValue.map((r, p) => S({\n get() {\n return r.value;\n },\n set: (u) => {\n o.modelValue[p].value = u, n(\"update:modelValue\", o.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (r, p) => (f(), v(\"form\", null, [\n (f(!0), v(V, null, x(r.modelValue, (u, c) => (f(), H(Ie(u.component), Me({\n key: c,\n schema: u,\n modelValue: a.value[c].value,\n \"onUpdate:modelValue\": (g) => a.value[c].value = g,\n data: s.value[u.fieldname],\n readonly: r.readonly\n }, l(u)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n}), pe = /* @__PURE__ */ M(gt, [[\"__scopeId\", \"data-v-82492bb4\"]]), yt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, o = y(t.data || []);\n let n = y(!1), s = y(t.collapsible);\n const l = y(t.schema);\n function a(r) {\n r.preventDefault(), s.value && (n.value = !n.value);\n }\n return (r, p) => (f(), v(\"fieldset\", null, [\n i(\"legend\", {\n onClick: a,\n onSubmit: a\n }, [\n Te(k(r.label) + \" \", 1),\n O(s) ? (f(), H(ht, {\n key: 0,\n collapsed: O(n)\n }, null, 8, [\"collapsed\"])) : re(\"\", !0)\n ], 32),\n _e(r.$slots, \"default\", { collapsed: O(n) }, () => [\n C(Se(pe, {\n modelValue: l.value,\n \"onUpdate:modelValue\": p[0] || (p[0] = (u) => l.value = u),\n data: o.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [$, !O(n)]\n ])\n ], !0)\n ]));\n }\n}), bt = /* @__PURE__ */ M(yt, [[\"__scopeId\", \"data-v-cad9b578\"]]), wt = [\"id\", \"disabled\", \"required\"], Ct = [\"for\"], kt = [\"innerHTML\"], Dt = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: {\n label: {},\n modelValue: {},\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const o = e, n = t, s = S({\n get: () => o.modelValue,\n set: (l) => {\n n(\"update:modelValue\", l);\n }\n });\n return (l, a) => (f(), v(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (r) => s.value = r),\n type: \"number\",\n id: l.uuid,\n disabled: l.readonly,\n required: l.required\n }, null, 8, wt), [\n [R, s.value]\n ]),\n i(\"label\", { for: l.uuid }, k(l.label), 9, Ct),\n C(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, kt), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n}), Et = /* @__PURE__ */ M(Dt, [[\"__scopeId\", \"data-v-be33e6c4\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction At(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction It(e) {\n var o;\n let t = e.value;\n if (t) {\n const n = At(t);\n if (n) {\n const s = e.instance.locale;\n t = n(s);\n }\n } else {\n const s = (o = e.instance.schema.fieldtype) == null ? void 0 : o.toLowerCase();\n s && le[s] && (t = le[s]);\n }\n return t;\n}\nfunction Mt(e, t) {\n t || (t = \"#\");\n let o = e;\n const n = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const s of n)\n o = o.replaceAll(s, \"\");\n return o;\n}\nfunction Tt(e, t, o) {\n o || (o = \"#\");\n let n = t;\n for (const s of e) {\n const l = n.indexOf(o);\n if (l !== -1) {\n const a = n.substring(0, l), r = n.substring(l + 1);\n n = a + s + r;\n }\n }\n return n.slice(0, t.length);\n}\nfunction _t(e, t) {\n const o = It(t);\n if (!o)\n return;\n const n = \"#\", s = e.value, l = Mt(s, n);\n if (l) {\n const a = Tt(l, o, n);\n t.instance.maskFilled && (t.instance.maskFilled = !a.includes(n)), e.value = a;\n } else\n e.value = o;\n}\nconst St = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const o = y(!1), n = ae(\"locale\", \"\");\n return { inputText: S({\n get() {\n return e.modelValue;\n },\n set(l) {\n t.emit(\"update:modelValue\", l);\n }\n }), locale: n, maskFilled: o };\n },\n directives: {\n mask: _t\n }\n}), Ot = [\"id\", \"disabled\", \"maxlength\", \"required\"], $t = [\"for\"], Lt = [\"innerHTML\"];\nfunction Vt(e, t, o, n, s, l) {\n const a = Oe(\"mask\");\n return f(), v(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, Ot), [\n [R, e.inputText],\n [a, e.mask]\n ]),\n i(\"label\", { for: e.uuid }, k(e.label), 9, $t),\n C(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Lt), [\n [$, e.validation.errorMessage]\n ])\n ]);\n}\nconst xt = /* @__PURE__ */ M(St, [[\"render\", Vt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Pt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", Fe), e.component(\"ADate\", rt), e.component(\"ADropdown\", mt), e.component(\"AFieldset\", bt), e.component(\"AForm\", pe), e.component(\"ANumericInput\", Et), e.component(\"ATextInput\", xt);\n}\nexport {\n qe as ACheckbox,\n Fe as AComboBox,\n rt as ADate,\n mt as ADropdown,\n bt as AFieldset,\n pe as AForm,\n Et as ANumericInput,\n xt as ATextInput,\n Pt as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nfunction NotImplementedError(message) {\n this.message = message || \"\";\n}\nNotImplementedError.prototype = Object.create(Error.prototype, {\n constructor: { value: NotImplementedError },\n name: { value: \"NotImplemented\" },\n stack: {\n get: function() {\n return new Error().stack;\n }\n }\n});\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.\n * @example\n * const registry = new Registry()\n * const store = useDataStore()\n * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {DoctypeMeta}\n * @see {@link DoctypeMeta}\n * @throws NotImplementedError\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * const meta = stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype);\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.getMeta('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia2, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction loadStoresState(pinia2, state) {\n for (const key in state) {\n const storeState = pinia2.state.value[key];\n if (storeState) {\n Object.assign(storeState, state[key]);\n } else {\n pinia2.state.value[key] = state[key];\n }\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (typeof store.$reset !== \"function\") {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n }) : store;\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n activeAction = void 0;\n return retValue;\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;\n const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup)));\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n if (process.env.NODE_ENV !== \"production\" && typeof id !== \"string\") {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia2, hot) {\n const hasContext = hasInjectionContext();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.getMeta(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, getMeta) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.getMeta = getMeta;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\n/*!\n * vue-router v4.2.5\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n const lastToSegment = toSegments[toSegments.length - 1];\n if (lastToSegment === \"..\" || lastToSegment === \".\") {\n toSegments.push(\"\");\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener, {\n passive: true\n });\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"object\" ? props[name] : props;\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n return app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of enteringRecords) {\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router22 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router22;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true\n });\n }\n app.provide(routerKey, router22);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router22, matcher);\n }\n }\n };\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router2;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n Object.prototype\n).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction get_escaped_char(char) {\n switch (char) {\n case '\"':\n return '\\\\\"';\n case \"<\":\n return \"\\\\u003C\";\n case \"\\\\\":\n return \"\\\\\\\\\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\u2028\":\n return \"\\\\u2028\";\n case \"\\u2029\":\n return \"\\\\u2029\";\n default:\n return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n }\n}\nfunction stringify_string(str) {\n let result = \"\";\n let last_pos = 0;\n const len = str.length;\n for (let i = 0; i < len; i += 1) {\n const char = str[i];\n const replacement = get_escaped_char(char);\n if (replacement) {\n result += str.slice(last_pos, i) + replacement;\n last_pos = i + 1;\n }\n }\n return `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta);\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", registry);\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Ae = (t) => typeof t == \"string\", Te = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : r(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return Ee() ? (ke(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Se(...t) {\n let e, n, o, a;\n if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return Te;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], s = () => {\n l.forEach((f) => f()), l.length = 0;\n }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => {\n s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c))));\n }, { immediate: !0, flush: \"post\" }), p = () => {\n d(), s();\n };\n return De(p), p;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Re(t, { window: e = me, scrollTarget: n } = {}) {\n const o = k(!1), a = () => {\n if (!e)\n return;\n const l = e.document, s = U(t);\n if (!s)\n o.value = !1;\n else {\n const i = s.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => a(), { immediate: !0, flush: \"post\" }), e && Se(n || e, \"scroll\", a, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst x = (t) => {\n let e = Re(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return V(e);\n}, V = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? V(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.firstElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.firstElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.lastElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.lastElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? V(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !x(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], We = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let a = null;\n o.parent && (typeof o.parent == \"string\" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value);\n let l = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n l.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const s of o.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(o.selectors.value);\n else\n l = Array.from(a.children).filter((s) => I(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = We[a.key] || a.key.toLowerCase();\n if (D.includes(l))\n return;\n const s = o.handlers || we;\n for (const i of Object.keys(s)) {\n const [d, ...p] = i.split(\".\");\n if (d === \"keydown\" && p.includes(l)) {\n const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(E);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(E) && f(a);\n }\n }\n } else\n v || f(a);\n }\n }\n };\n xe(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst Ve = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({\n __name: \"ACell\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: {}\n },\n setup(t) {\n var E;\n const e = t, n = O(e.tableid), o = k(null);\n let a = k(!1);\n const l = R(() => {\n const u = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(u) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(u) : u;\n } else\n return u;\n }), s = (u) => {\n if (e.clickHandler) {\n e.clickHandler(u);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let u = {\n ...we,\n \"keydown.f2\": s,\n \"keydown.alt.up\": s,\n \"keydown.alt.down\": s,\n \"keydown.alt.left\": s,\n \"keydown.alt.right\": s\n };\n typeof e.addNavigation == \"object\" && (u = {\n ...u,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: u\n }\n ]);\n }\n const i = R(() => n.columns[e.colIndex].align || \"center\"), d = R(() => n.columns[e.colIndex].width || \"40ch\");\n let p = \"\";\n const f = () => {\n o.value && (p = o.value.innerText);\n }, c = () => {\n o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p));\n }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : \"inherit\", h = {\n textAlign: i.value,\n width: d.value,\n backgroundColor: a.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: a.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent)\n };\n return (u, g) => (m(), b(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": u.colIndex,\n \"data-rowindex\": u.rowIndex,\n \"data-editable\": r(n).columns[u.colIndex].edit,\n contenteditable: r(n).columns[u.colIndex].edit,\n tabindex: u.tabIndex,\n spellcheck: !1,\n style: h,\n onFocus: f,\n onPaste: c,\n onBlur: c,\n onInput: c,\n onClick: s,\n onMousedown: s\n }, [\n r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, T(l.value), 1))\n ], 40, Ve));\n }\n}), _ = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, a] of e)\n n[o] = a;\n return n;\n}, he = /* @__PURE__ */ _(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ C({\n __name: \"AExpansionRow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const s = Object.assign({}, e.addNavigation);\n s[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: s\n }\n ]);\n }\n return (s, i) => (m(), b(L, null, [\n A(\"tr\", W(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n A(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, T(l()), 1),\n y(s.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n r(n).display[e.rowIndex].expanded ? (m(), b(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: a,\n tabindex: s.tabIndex,\n class: \"expanded-row\"\n }, [\n A(\"td\", {\n tabIndex: -1,\n colspan: r(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n y(s.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n}), Je = /* @__PURE__ */ _(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ C({\n __name: \"ARow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n de((d) => ({\n \"5b18ee03\": r(a)\n }));\n const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", s = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => {\n n.toggleRowExpand(d);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (d, p) => ce((m(), b(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: d.tabIndex,\n class: \"table-row\"\n }, [\n r(n).config.view === \"list\" ? (m(), b(\"td\", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === \"tree\" ? (m(), b(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: p[0] || (p[0] = (f) => i(d.rowIndex))\n }, T(l()), 1)) : y(d.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n y(d.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, s()]\n ]);\n }\n}), be = /* @__PURE__ */ _(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet S;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!S && (S = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return S(Ke);\n}\nconst w = [];\nfor (let t = 0; t < 256; ++t)\n w.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + \"-\" + w[t[e + 4]] + w[t[e + 5]] + \"-\" + w[t[e + 6]] + w[t[e + 7]] + \"-\" + w[t[e + 8]] + w[t[e + 9]] + \"-\" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]];\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let a = 0; a < 16; ++a)\n e[n + a] = o[a];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, a, l, s) {\n this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [a, l] of this.rows.entries())\n e[`${n}:${a}`] = l[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let a = this.rows.length - 1; a >= 0; a--) {\n const l = this.rows[a];\n l.parent && o.add(l.parent), n[a] = {\n childrenOpen: !1,\n expanded: !1,\n indent: l.indent || null,\n isParent: o.has(a),\n isRoot: l.parent === null || l.parent === void 0,\n modified: !1,\n open: l.parent === null || l.parent === void 0,\n parent: l.parent\n };\n }\n return $(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return R(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const a = this.columns[n];\n return this.rows[e][a.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ C({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"12d06943\": r(o)\n }));\n const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({\n minWidth: l.width || \"40ch\",\n textAlign: l.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (l, s) => l.columns.length ? (m(), b(\"thead\", lt, [\n A(\"tr\", at, [\n r(n).zeroColumn ? (m(), b(\"th\", rt)) : M(\"\", !0),\n (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b(\"th\", {\n key: d,\n tabindex: \"-1\",\n style: H(a(i))\n }, [\n y(l.$slots, \"default\", {}, () => [\n Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n}), ve = /* @__PURE__ */ _(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ C({\n __name: \"ATableModal\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {}\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, a) => (m(), b(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n y(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n}), ye = /* @__PURE__ */ _(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ C({\n __name: \"ATable\",\n props: {\n id: {},\n modelValue: {},\n columns: {},\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: {}\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t, o = e;\n let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config);\n _e(l.id, l), j(\n () => l.rows,\n (i) => {\n o(\"update:modelValue\", i);\n },\n { deep: !0 }\n );\n const s = (i) => {\n var d;\n (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", s), window.addEventListener(\"keydown\", (i) => {\n if (i.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const d = l.modal.parent;\n d && $e().then(() => {\n const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`);\n c && c[0].focus();\n });\n }\n }), (i, d) => (m(), b(\"table\", {\n class: \"atable\",\n style: H({ width: r(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n y(i.$slots, \"header\", { data: r(l) }, () => [\n z(ve, {\n columns: r(l).columns,\n config: r(l).config,\n tableid: r(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n A(\"tbody\", null, [\n y(i.$slots, \"body\", { data: r(l) }, () => [\n (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, {\n key: p.id || r(ge)(),\n row: p,\n rowIndex: f,\n tableid: r(l).id\n }, {\n default: G(() => [\n (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, {\n key: `${v}:${f}`,\n tableid: r(l).id,\n col: c,\n spellcheck: \"false\",\n rowIndex: f,\n colIndex: v + (r(l).zeroColumn ? 0 : -1),\n component: c.cellComponent,\n style: H({\n textAlign: (c == null ? void 0 : c.align) || \"center\",\n minWidth: (c == null ? void 0 : c.width) || \"40ch\",\n width: r(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n y(i.$slots, \"footer\", { data: r(l) }, void 0, !0),\n y(i.$slots, \"modal\", { data: r(l) }, () => [\n ce(z(ye, {\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id,\n style: H({\n left: r(l).modal.left + \"px\",\n top: r(l).modal.top + \"px\",\n maxWidth: r(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (m(), P(ie(r(l).modal.component), W({\n key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`,\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id\n }, r(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, r(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n}), ct = /* @__PURE__ */ _(dt, [[\"__scopeId\", \"data-v-55d8ba05\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", ve), t.component(\"ATableModal\", ye);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n ve as ATableHeader,\n ye as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["props","__props","_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","M","o","n","s","W","Qe","N","z","G","Ne","K","ze","Ge","J","Ke","D","gt","y","l","r","p","u","c","a","S","f","v","V","x","H","Ie","Me","g","pe","le","At","It","t","Mt","Tt","_t","ae","NotImplementedError","message","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now$1","ApiProxy","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","storeState","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","isBrowser","isESModule","assign","applyToParams","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLink","defineComponent","slots","link","elClass","getLinkClass","h$1","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","onVnodeUnmounted","vnode","info","slot","slotContent","RouterView","parentName","parentSubTreeType","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","resolve2","scrollBehavior","started","router22","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","get_escaped_char","stringify_string","str","last_pos","replacement","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","d","h","_a2","newSchema","fieldValue","Ae","Te","fe","Oe","De","Ee","ke","U","me","Se","j","X","Y","Re","Z","Pe","He","Le","ee","I","te","Ue","B","ne","je","oe","Q","F","We","we","q","E","xe","Ve","Be","C","O","R","P","ie","T","_","he","Xe","Ye","Ze","de","ce","ue","be","et","w","tt","nt","se","ge","ot","$","lt","at","rt","st","A","L","Ce","ve","it","ye","dt","_e","$e","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":"kzCA6EA,MAAMA,EAAQC,EAIRC,EAAYC,MAAkB,CAAA,CAAE,EAChCC,EAASD,MAAI,EAAK,EAClBE,EAAUF,MAAoB,IAAI,EAClCG,EAAQH,MAAI,EAAK,EACjBI,EAAeJ,MAAI,EAAK,EAE9BK,EAAAA,UAAU,IAAM,CACfN,EAAU,MAAQF,EAAM,SACTS,GAAA,CACf,EAED,MAAMA,EAAiB,IAAM,CACnB,QAAAC,KAAWR,EAAU,MACzBQ,EAAQ,cAAgB,aAC3BA,EAAQ,KAAO,GAEjB,EAGKC,EAAU,IAAM,CACrBL,EAAM,MAAQ,GACND,EAAA,MAAQ,WAAW,IAAM,CAC5BC,EAAM,QACTF,EAAO,MAAQ,KAEd,GAAG,CAAA,EAGDQ,EAAe,IAAM,CAC1BN,EAAM,MAAQ,GACdC,EAAa,MAAQ,GACrB,aAAaF,EAAQ,KAAK,EAC1BD,EAAO,MAAQ,EAAA,EAGVS,EAAkBC,GAAkB,CACzC,MAAMC,EAAe,CAACb,EAAU,MAAMY,CAAK,EAAE,KAC9BL,IACLP,EAAA,MAAMY,CAAK,EAAE,KAAOC,CAAA,qiDCtHbC,EAAA,qFC6CdC,GAAI,CAAC,EAAG,IAAM,CAChB,MAAMC,EAAI,EAAE,W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C,CAAA,ypDC9GnDpgC,GAAA,CACd,QAAU+K,GAAa,CAClBA,EAAA,UAAU,YAAas1B,EAAS,EAChCt1B,EAAA,UAAU,iBAAkBu1B,EAAc,EAC1Cv1B,EAAA,UAAU,UAAWw1B,EAAO,EAC5Bx1B,EAAA,UAAU,UAAWy1B,EAAO,EAC5Bz1B,EAAA,UAAU,WAAY01B,EAAQ,CACnC,CACD"} \ No newline at end of file +{"version":3,"file":"desktop.umd.cjs","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from \"vue\";\nconst Ve = { id: \"checkbox-container\" }, xe = [\"id\", \"readonly\", \"required\"], Be = { id: \"custom-checkbox\" }, Pe = [\"for\"], qe = [\"innerHTML\"], He = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n i(\"label\", Ve, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"checkbox\",\n id: n.uuid,\n class: \"checkbox\",\n readonly: n.readOnly,\n required: n.required\n }, null, 8, xe), [\n [be, t.value]\n ]),\n i(\"span\", Be, k(t.value), 1)\n ]),\n i(\"label\", {\n for: n.uuid,\n id: \"checkbox-label\"\n }, k(n.label), 9, Pe),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, qe), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), M = (e, t) => {\n const n = e.__vccOpts || e;\n for (const [o, l] of t)\n n[o] = l;\n return n;\n}, Fe = /* @__PURE__ */ M(He, [[\"__scopeId\", \"data-v-5093f1cb\"]]), Re = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), Ue = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, n) => {\n const o = we(\"ATableModal\");\n return f(), H(o, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: Ce(() => [\n Re\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar W;\nconst de = typeof window < \"u\", Qe = (e) => typeof e == \"string\", Ye = () => {\n};\nde && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction ce(e) {\n return typeof e == \"function\" ? e() : S(e);\n}\nfunction je(e) {\n return e;\n}\nfunction We(e) {\n return De() ? (Ee(e), !0) : !1;\n}\nfunction q(e) {\n var t;\n const n = ce(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst pe = de ? window : void 0;\nfunction Ne(...e) {\n let t, n, o, l;\n if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t)\n return Ye;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const s = [], a = () => {\n s.forEach((d) => d()), s.length = 0;\n }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => {\n a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return We(u), u;\n}\nconst N = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nN[z] = N[z] || {};\nfunction ze(e, { window: t = pe, scrollTarget: n } = {}) {\n const o = y(!1), l = () => {\n if (!t)\n return;\n const s = t.document, a = q(e);\n if (!a)\n o.value = !1;\n else {\n const r = a.getBoundingClientRect();\n o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return F(() => q(e), () => l(), { immediate: !0, flush: \"post\" }), t && Ne(n || t, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => {\n for (var n in t || (t = {}))\n Ke.call(t, n) && J(e, n, t[n]);\n if (K)\n for (var n of K(t))\n Je.call(t, n) && J(e, n, t[n]);\n return e;\n};\nconst Ze = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nXe({\n linear: je\n}, Ze);\nconst E = (e) => {\n let t = ze(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, A = (e) => e.tabIndex >= 0, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.previousElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? U(n) : n;\n}, et = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.firstElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.firstElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? Q(o) : o;\n}, Z = (e) => {\n const t = e.target;\n return Q(t);\n}, Q = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.nextElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? Q(n) : n;\n}, tt = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.lastElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.lastElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? U(o) : o;\n}, ee = (e) => {\n const t = e.target;\n return Y(t);\n}, Y = (e) => {\n var t;\n let n;\n if (e.previousElementSibling)\n n = e.previousElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!A(n) || !E(n)) ? Y(n) : n;\n}, te = (e) => {\n const t = e.target;\n return j(t);\n}, j = (e) => {\n var t;\n let n;\n if (e.nextElementSibling)\n n = e.nextElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!A(n) || !E(n)) ? j(n) : n;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !E(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !E(t)) ? Y(t) : t;\n}, $ = [\"alt\", \"control\", \"shift\", \"meta\"], nt = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, fe = {\n \"keydown.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = te(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = et(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = tt(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = Z(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ot(e) {\n const t = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let s = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n s.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const a of o.selectors.value)\n a instanceof Element ? s.push(a) : s.push(a.$el);\n else\n s.push(o.selectors.value);\n else\n s = Array.from(l.children).filter((a) => A(a) && E(a));\n return s;\n }, n = (o) => (l) => {\n const s = nt[l.key] || l.key.toLowerCase();\n if ($.includes(s))\n return;\n const a = o.handlers || fe;\n for (const r of Object.keys(a)) {\n const [p, ...u] = r.split(\".\");\n if (p === \"keydown\" && u.includes(s)) {\n const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (g.length > 0) {\n if (b) {\n for (const m of $)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n b || d(l);\n }\n }\n };\n re(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.addEventListener(\"keydown\", n(o));\n }\n }), ke(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst lt = [\"event\", \"colIndex\", \"rowIndex\", \"tableid\"], st = { colspan: \"5\" }, at = [\"onClick\"], rt = 6, I = 7, it = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n event: {},\n indent: {},\n readonly: { type: Boolean }\n },\n setup(e) {\n const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]);\n re(async () => {\n let c = n.cellData(t.colIndex, t.rowIndex);\n c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae();\n const T = document.getElementsByClassName(\"selecteddate\");\n if (T.length > 0)\n T[0].focus();\n else {\n const v = document.getElementsByClassName(\"todaysdate\");\n v.length > 0 && v[0].focus();\n }\n }), F([s, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T);\n for (let w of Array(43).keys())\n r.value.push(v + w * 864e5);\n }, u = () => {\n a.value -= 1;\n }, d = () => {\n a.value += 1;\n }, g = () => {\n s.value == 0 ? (s.value = 11, u()) : s.value -= 1;\n }, b = () => {\n s.value == 11 ? (s.value = 0, d()) : s.value += 1;\n }, m = (c) => {\n if (s.value === o.getMonth())\n return o.toDateString() === new Date(c).toDateString();\n }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => {\n l.value = new Date(r.value[T]), ve();\n }, ve = () => {\n n.setCellData(t.rowIndex, t.colIndex, l.value.getTime());\n }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return ot([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...fe,\n \"keydown.pageup\": g,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": d\n }\n }\n ]), (c, T) => c.readonly ? ue(\"\", !0) : (f(), h(\"div\", {\n key: 0,\n event: c.event,\n colIndex: c.colIndex,\n rowIndex: c.rowIndex,\n tableid: c.tableid,\n class: \"adate\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n i(\"table\", null, [\n i(\"tr\", null, [\n i(\"td\", {\n onClick: g,\n tabindex: -1\n }, \"<\"),\n i(\"th\", st, k(ge.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), h(V, null, x(rt, (v) => i(\"tr\", { key: v }, [\n (f(), h(V, null, x(I, (w) => i(\"td\", {\n key: (v - 1) * I + w,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: Ie({\n border: _(r.value[(v - 1) * I + w]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(v - 1) * I + w]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Me((ye) => he(ye, (v - 1) * I + w), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(v - 1) * I + w]),\n selecteddate: _(r.value[(v - 1) * I + w])\n })\n }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64))\n ])), 64))\n ])\n ], 8, lt));\n }\n}), ut = /* @__PURE__ */ M(it, [[\"__scopeId\", \"data-v-169f1184\"]]), dt = D({\n name: \"ADropdown\",\n props: {\n modelValue: {\n type: String,\n required: !1,\n default: \"\"\n },\n label: {\n type: String,\n required: !0\n },\n value: String,\n items: {\n type: Array,\n required: !1,\n default: () => []\n },\n isAsync: {\n type: Boolean,\n required: !1,\n default: !1\n }\n },\n emits: [\"update:modelValue\", \"filterChanged\"],\n data() {\n return {\n results: [],\n search: this.modelValue,\n isLoading: !1,\n arrowCounter: 0,\n isOpen: !1\n };\n },\n watch: {\n items: function(e, t) {\n this.isLoading = !1, this.results = e;\n }\n },\n mounted() {\n document.addEventListener(\"click\", this.handleClickOutside), this.filterResults();\n },\n destroyed() {\n document.removeEventListener(\"click\", this.handleClickOutside);\n },\n methods: {\n setResult(e) {\n this.search = e, this.closeResults();\n },\n filterResults() {\n this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);\n },\n onChange() {\n this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit(\"filterChanged\", this.search)) : this.filterResults();\n },\n handleClickOutside(e) {\n this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);\n },\n closeResults() {\n this.isOpen = !1, this.items.includes(this.search) || (this.search = \"\"), this.$emit(\"update:modelValue\", this.search);\n },\n onArrowDown() {\n this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);\n },\n onArrowUp() {\n this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);\n },\n onEnter() {\n this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;\n },\n openWithSearch() {\n this.search = \"\", this.onChange(), this.$refs.mopInput.focus();\n }\n }\n}), ct = { class: \"input-wrapper\" }, pt = {\n id: \"autocomplete-results\",\n class: \"autocomplete-results\"\n}, ft = {\n key: 0,\n class: \"loading autocomplete-result\"\n}, mt = [\"onClick\"];\nfunction ht(e, t, n, o, l, s) {\n return f(), h(\"div\", {\n class: B([\"autocomplete\", { isOpen: e.isOpen }])\n }, [\n i(\"div\", ct, [\n C(i(\"input\", {\n ref: \"mopInput\",\n type: \"text\",\n onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),\n onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),\n \"onUpdate:modelValue\": t[2] || (t[2] = (a) => e.search = a),\n onKeydown: [\n t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), [\"down\"])),\n t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), [\"up\"])),\n t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), [\"enter\"]))\n ]\n }, null, 544), [\n [R, e.search]\n ]),\n C(i(\"ul\", pt, [\n e.isLoading ? (f(), h(\"li\", ft, \"Loading results...\")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h(\"li\", {\n key: r,\n onClick: (p) => e.setResult(a),\n class: B([\"autocomplete-result\", { \"is-active\": r === e.arrowCounter }])\n }, k(a), 11, mt))), 128))\n ], 512), [\n [O, e.isOpen]\n ]),\n i(\"label\", null, k(e.label), 1)\n ])\n ], 2);\n}\nconst vt = /* @__PURE__ */ M(dt, [[\"render\", ht]]), gt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, n) => (f(), h(\"button\", {\n class: B([\"collapse-button\", t.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n}), yt = /* @__PURE__ */ M(gt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), bt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: {},\n data: {},\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const n = e, o = t, l = y(n.data || {}), s = (r) => {\n let p = {};\n for (const [u, d] of Object.entries(r))\n [\"component\", \"fieldtype\"].includes(u) || (p[u] = d), u === \"rows\" && d && d.length === 0 && (p.rows = l.value[r.fieldname]);\n return p;\n }, a = L({\n get: () => n.modelValue.map((r, p) => L({\n get() {\n return r.value;\n },\n set: (u) => {\n n.modelValue[p].value = u, o(\"update:modelValue\", n.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (r, p) => (f(), h(\"form\", null, [\n (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({\n key: d,\n schema: u,\n modelValue: a.value[d].value,\n \"onUpdate:modelValue\": (g) => a.value[d].value = g,\n data: l.value[u.fieldname],\n readonly: r.readonly\n }, s(u)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n}), me = /* @__PURE__ */ M(bt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), wt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, n = y(t.data || []);\n let o = y(!1), l = y(t.collapsible);\n const s = y(t.schema);\n function a(r) {\n r.preventDefault(), l.value && (o.value = !o.value);\n }\n return (r, p) => (f(), h(\"fieldset\", null, [\n i(\"legend\", {\n onClick: a,\n onSubmit: a\n }, [\n Se(k(r.label) + \" \", 1),\n S(l) ? (f(), H(yt, {\n key: 0,\n collapsed: S(o)\n }, null, 8, [\"collapsed\"])) : ue(\"\", !0)\n ], 32),\n Oe(r.$slots, \"default\", { collapsed: S(o) }, () => [\n C($e(me, {\n modelValue: s.value,\n \"onUpdate:modelValue\": p[0] || (p[0] = (u) => s.value = u),\n data: n.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [O, !S(o)]\n ])\n ], !0)\n ]));\n }\n}), Ct = /* @__PURE__ */ M(wt, [[\"__scopeId\", \"data-v-cad9b578\"]]), kt = [\"id\", \"disabled\", \"required\"], Dt = [\"for\"], Et = [\"innerHTML\"], At = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"number\",\n id: n.uuid,\n disabled: n.readonly,\n required: n.required\n }, null, 8, kt), [\n [R, t.value]\n ]),\n i(\"label\", { for: n.uuid }, k(n.label), 9, Dt),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, Et), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), It = /* @__PURE__ */ M(At, [[\"__scopeId\", \"data-v-02907cd6\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction Mt(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction Tt(e) {\n var n;\n let t = e.value;\n if (t) {\n const o = Mt(t);\n if (o) {\n const l = e.instance.locale;\n t = o(l);\n }\n } else {\n const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase();\n l && le[l] && (t = le[l]);\n }\n return t;\n}\nfunction _t(e, t) {\n t || (t = \"#\");\n let n = e;\n const o = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const l of o)\n n = n.replaceAll(l, \"\");\n return n;\n}\nfunction St(e, t, n) {\n n || (n = \"#\");\n let o = t;\n for (const l of e) {\n const s = o.indexOf(n);\n if (s !== -1) {\n const a = o.substring(0, s), r = o.substring(s + 1);\n o = a + l + r;\n }\n }\n return o.slice(0, t.length);\n}\nfunction Ot(e, t) {\n const n = Tt(t);\n if (!n)\n return;\n const o = \"#\", l = e.value, s = _t(l, o);\n if (s) {\n const a = St(s, n, o);\n t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a;\n } else\n e.value = n;\n}\nconst $t = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const n = y(!1), o = ie(\"locale\", \"\");\n return { inputText: L({\n get() {\n return e.modelValue;\n },\n set(s) {\n t.emit(\"update:modelValue\", s);\n }\n }), locale: o, maskFilled: n };\n },\n directives: {\n mask: Ot\n }\n}), Lt = [\"id\", \"disabled\", \"maxlength\", \"required\"], Vt = [\"for\"], xt = [\"innerHTML\"];\nfunction Bt(e, t, n, o, l, s) {\n const a = Le(\"mask\");\n return f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, Lt), [\n [R, e.inputText],\n [a, e.mask]\n ]),\n i(\"label\", { for: e.uuid }, k(e.label), 9, Vt),\n C(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, xt), [\n [O, e.validation.errorMessage]\n ])\n ]);\n}\nconst Pt = /* @__PURE__ */ M($t, [[\"render\", Bt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Ht(e) {\n e.component(\"ACheckbox\", Fe), e.component(\"ACombobox\", Ue), e.component(\"ADate\", ut), e.component(\"ADropdown\", vt), e.component(\"AFieldset\", Ct), e.component(\"AForm\", me), e.component(\"ANumericInput\", It), e.component(\"ATextInput\", Pt);\n}\nexport {\n Fe as ACheckbox,\n Ue as AComboBox,\n ut as ADate,\n vt as ADropdown,\n Ct as AFieldset,\n me as AForm,\n It as ANumericInput,\n Pt as ATextInput,\n Ht as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nfunction NotImplementedError(message) {\n this.message = message || \"\";\n}\nNotImplementedError.prototype = Object.create(Error.prototype, {\n constructor: { value: NotImplementedError },\n name: { value: \"NotImplemented\" },\n stack: {\n get: function() {\n return new Error().stack;\n }\n }\n});\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.\n * @example\n * const registry = new Registry()\n * const store = useDataStore()\n * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {DoctypeMeta}\n * @see {@link DoctypeMeta}\n * @throws NotImplementedError\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * const meta = stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype);\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.getMeta('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia2, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction loadStoresState(pinia2, state) {\n for (const key in state) {\n const storeState = pinia2.state.value[key];\n if (storeState) {\n Object.assign(storeState, state[key]);\n } else {\n pinia2.state.value[key] = state[key];\n }\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (typeof store.$reset !== \"function\") {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n }) : store;\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n activeAction = void 0;\n return retValue;\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;\n const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup)));\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n if (process.env.NODE_ENV !== \"production\" && typeof id !== \"string\") {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia2, hot) {\n const hasContext = hasInjectionContext();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.getMeta(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, getMeta) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.getMeta = getMeta;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\n/*!\n * vue-router v4.2.5\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n const lastToSegment = toSegments[toSegments.length - 1];\n if (lastToSegment === \"..\" || lastToSegment === \".\") {\n toSegments.push(\"\");\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener, {\n passive: true\n });\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"object\" ? props[name] : props;\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n return app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of enteringRecords) {\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router22 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router22;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true\n });\n }\n app.provide(routerKey, router22);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router22, matcher);\n }\n }\n };\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router2;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n Object.prototype\n).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction get_escaped_char(char) {\n switch (char) {\n case '\"':\n return '\\\\\"';\n case \"<\":\n return \"\\\\u003C\";\n case \"\\\\\":\n return \"\\\\\\\\\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\u2028\":\n return \"\\\\u2028\";\n case \"\\u2029\":\n return \"\\\\u2029\";\n default:\n return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n }\n}\nfunction stringify_string(str) {\n let result = \"\";\n let last_pos = 0;\n const len = str.length;\n for (let i = 0; i < len; i += 1) {\n const char = str[i];\n const replacement = get_escaped_char(char);\n if (replacement) {\n result += str.slice(last_pos, i) + replacement;\n last_pos = i + 1;\n }\n }\n return `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta);\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", registry);\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Ae = (t) => typeof t == \"string\", Te = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : r(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return Ee() ? (ke(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Se(...t) {\n let e, n, o, a;\n if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return Te;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], s = () => {\n l.forEach((f) => f()), l.length = 0;\n }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => {\n s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c))));\n }, { immediate: !0, flush: \"post\" }), p = () => {\n d(), s();\n };\n return De(p), p;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Re(t, { window: e = me, scrollTarget: n } = {}) {\n const o = k(!1), a = () => {\n if (!e)\n return;\n const l = e.document, s = U(t);\n if (!s)\n o.value = !1;\n else {\n const i = s.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => a(), { immediate: !0, flush: \"post\" }), e && Se(n || e, \"scroll\", a, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst x = (t) => {\n let e = Re(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return V(e);\n}, V = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? V(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.firstElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.firstElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.lastElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.lastElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? V(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !x(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], We = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let a = null;\n o.parent && (typeof o.parent == \"string\" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value);\n let l = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n l.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const s of o.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(o.selectors.value);\n else\n l = Array.from(a.children).filter((s) => I(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = We[a.key] || a.key.toLowerCase();\n if (D.includes(l))\n return;\n const s = o.handlers || we;\n for (const i of Object.keys(s)) {\n const [d, ...p] = i.split(\".\");\n if (d === \"keydown\" && p.includes(l)) {\n const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(E);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(E) && f(a);\n }\n }\n } else\n v || f(a);\n }\n }\n };\n xe(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst Ve = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({\n __name: \"ACell\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: {}\n },\n setup(t) {\n var E;\n const e = t, n = O(e.tableid), o = k(null);\n let a = k(!1);\n const l = R(() => {\n const u = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(u) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(u) : u;\n } else\n return u;\n }), s = (u) => {\n if (e.clickHandler) {\n e.clickHandler(u);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let u = {\n ...we,\n \"keydown.f2\": s,\n \"keydown.alt.up\": s,\n \"keydown.alt.down\": s,\n \"keydown.alt.left\": s,\n \"keydown.alt.right\": s\n };\n typeof e.addNavigation == \"object\" && (u = {\n ...u,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: u\n }\n ]);\n }\n const i = R(() => n.columns[e.colIndex].align || \"center\"), d = R(() => n.columns[e.colIndex].width || \"40ch\");\n let p = \"\";\n const f = () => {\n o.value && (p = o.value.innerText);\n }, c = () => {\n o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p));\n }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : \"inherit\", h = {\n textAlign: i.value,\n width: d.value,\n backgroundColor: a.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: a.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent)\n };\n return (u, g) => (m(), b(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": u.colIndex,\n \"data-rowindex\": u.rowIndex,\n \"data-editable\": r(n).columns[u.colIndex].edit,\n contenteditable: r(n).columns[u.colIndex].edit,\n tabindex: u.tabIndex,\n spellcheck: !1,\n style: h,\n onFocus: f,\n onPaste: c,\n onBlur: c,\n onInput: c,\n onClick: s,\n onMousedown: s\n }, [\n r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, T(l.value), 1))\n ], 40, Ve));\n }\n}), _ = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, a] of e)\n n[o] = a;\n return n;\n}, he = /* @__PURE__ */ _(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ C({\n __name: \"AExpansionRow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const s = Object.assign({}, e.addNavigation);\n s[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: s\n }\n ]);\n }\n return (s, i) => (m(), b(L, null, [\n A(\"tr\", W(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n A(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, T(l()), 1),\n y(s.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n r(n).display[e.rowIndex].expanded ? (m(), b(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: a,\n tabindex: s.tabIndex,\n class: \"expanded-row\"\n }, [\n A(\"td\", {\n tabIndex: -1,\n colspan: r(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n y(s.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n}), Je = /* @__PURE__ */ _(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ C({\n __name: \"ARow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n de((d) => ({\n \"5b18ee03\": r(a)\n }));\n const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", s = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => {\n n.toggleRowExpand(d);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (d, p) => ce((m(), b(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: d.tabIndex,\n class: \"table-row\"\n }, [\n r(n).config.view === \"list\" ? (m(), b(\"td\", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === \"tree\" ? (m(), b(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: p[0] || (p[0] = (f) => i(d.rowIndex))\n }, T(l()), 1)) : y(d.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n y(d.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, s()]\n ]);\n }\n}), be = /* @__PURE__ */ _(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet S;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!S && (S = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return S(Ke);\n}\nconst w = [];\nfor (let t = 0; t < 256; ++t)\n w.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + \"-\" + w[t[e + 4]] + w[t[e + 5]] + \"-\" + w[t[e + 6]] + w[t[e + 7]] + \"-\" + w[t[e + 8]] + w[t[e + 9]] + \"-\" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]];\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let a = 0; a < 16; ++a)\n e[n + a] = o[a];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, a, l, s) {\n this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [a, l] of this.rows.entries())\n e[`${n}:${a}`] = l[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let a = this.rows.length - 1; a >= 0; a--) {\n const l = this.rows[a];\n l.parent && o.add(l.parent), n[a] = {\n childrenOpen: !1,\n expanded: !1,\n indent: l.indent || null,\n isParent: o.has(a),\n isRoot: l.parent === null || l.parent === void 0,\n modified: !1,\n open: l.parent === null || l.parent === void 0,\n parent: l.parent\n };\n }\n return $(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return R(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const a = this.columns[n];\n return this.rows[e][a.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ C({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"12d06943\": r(o)\n }));\n const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({\n minWidth: l.width || \"40ch\",\n textAlign: l.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (l, s) => l.columns.length ? (m(), b(\"thead\", lt, [\n A(\"tr\", at, [\n r(n).zeroColumn ? (m(), b(\"th\", rt)) : M(\"\", !0),\n (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b(\"th\", {\n key: d,\n tabindex: \"-1\",\n style: H(a(i))\n }, [\n y(l.$slots, \"default\", {}, () => [\n Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n}), ve = /* @__PURE__ */ _(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ C({\n __name: \"ATableModal\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {}\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, a) => (m(), b(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n y(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n}), ye = /* @__PURE__ */ _(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ C({\n __name: \"ATable\",\n props: {\n id: {},\n modelValue: {},\n columns: {},\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: {}\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t, o = e;\n let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config);\n _e(l.id, l), j(\n () => l.rows,\n (i) => {\n o(\"update:modelValue\", i);\n },\n { deep: !0 }\n );\n const s = (i) => {\n var d;\n (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", s), window.addEventListener(\"keydown\", (i) => {\n if (i.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const d = l.modal.parent;\n d && $e().then(() => {\n const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`);\n c && c[0].focus();\n });\n }\n }), (i, d) => (m(), b(\"table\", {\n class: \"atable\",\n style: H({ width: r(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n y(i.$slots, \"header\", { data: r(l) }, () => [\n z(ve, {\n columns: r(l).columns,\n config: r(l).config,\n tableid: r(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n A(\"tbody\", null, [\n y(i.$slots, \"body\", { data: r(l) }, () => [\n (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, {\n key: p.id || r(ge)(),\n row: p,\n rowIndex: f,\n tableid: r(l).id\n }, {\n default: G(() => [\n (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, {\n key: `${v}:${f}`,\n tableid: r(l).id,\n col: c,\n spellcheck: \"false\",\n rowIndex: f,\n colIndex: v + (r(l).zeroColumn ? 0 : -1),\n component: c.cellComponent,\n style: H({\n textAlign: (c == null ? void 0 : c.align) || \"center\",\n minWidth: (c == null ? void 0 : c.width) || \"40ch\",\n width: r(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n y(i.$slots, \"footer\", { data: r(l) }, void 0, !0),\n y(i.$slots, \"modal\", { data: r(l) }, () => [\n ce(z(ye, {\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id,\n style: H({\n left: r(l).modal.left + \"px\",\n top: r(l).modal.top + \"px\",\n maxWidth: r(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (m(), P(ie(r(l).modal.component), W({\n key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`,\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id\n }, r(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, r(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n}), ct = /* @__PURE__ */ _(dt, [[\"__scopeId\", \"data-v-55d8ba05\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", ve), t.component(\"ATableModal\", ye);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n ve as ATableHeader,\n ye as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["props","__props","_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","M","l","W","je","N","z","G","Ge","K","Ke","Je","J","Xe","D","bt","y","s","r","p","u","d","a","L","f","h","V","x","H","Te","_e","g","me","le","Mt","Tt","n","t","_t","St","Ot","ie","NotImplementedError","message","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now$1","ApiProxy","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","o","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","storeState","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","isBrowser","isESModule","assign","applyToParams","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","v","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLink","defineComponent","slots","link","elClass","getLinkClass","h$1","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","onVnodeUnmounted","vnode","info","slot","slotContent","RouterView","parentName","parentSubTreeType","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","resolve2","scrollBehavior","started","router22","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","get_escaped_char","stringify_string","str","last_pos","replacement","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","_a2","newSchema","fieldValue","pe","Ae","fe","Oe","De","Ee","ke","U","Se","c","j","X","Y","Re","Z","Pe","He","Le","ee","Me","I","te","Ue","B","ne","oe","Q","F","ae","We","we","q","E","xe","Ie","Ve","Be","Qe","C","O","R","P","T","_","he","Ye","Ze","de","ce","ue","be","S","et","w","tt","nt","se","ge","ot","$","lt","at","rt","st","A","Ce","ve","it","ye","dt","$e","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":"kzCA6EA,MAAMA,EAAQC,EAIRC,EAAYC,MAAkB,CAAA,CAAE,EAChCC,EAASD,MAAI,EAAK,EAClBE,EAAUF,MAAoB,IAAI,EAClCG,EAAQH,MAAI,EAAK,EACjBI,EAAeJ,MAAI,EAAK,EAE9BK,EAAAA,UAAU,IAAM,CACfN,EAAU,MAAQF,EAAM,SACTS,GAAA,CACf,EAED,MAAMA,EAAiB,IAAM,CACnB,QAAAC,KAAWR,EAAU,MACzBQ,EAAQ,cAAgB,aAC3BA,EAAQ,KAAO,GAEjB,EAGKC,EAAU,IAAM,CACrBL,EAAM,MAAQ,GACND,EAAA,MAAQ,WAAW,IAAM,CAC5BC,EAAM,QACTF,EAAO,MAAQ,KAEd,GAAG,CAAA,EAGDQ,EAAe,IAAM,CAC1BN,EAAM,MAAQ,GACdC,EAAa,MAAQ,GACrB,aAAaF,EAAQ,KAAK,EAC1BD,EAAO,MAAQ,EAAA,EAGVS,EAAkBC,GAAkB,CACzC,MAAMC,EAAe,CAACb,EAAU,MAAMY,CAAK,EAAE,KAC9BL,IACLP,EAAA,MAAMY,CAAK,EAAE,KAAOC,CAAA,qiDCtHbC,EAAA,qFCwCdC,GAAI,CAAC,EAAG,IAAM,CAChB,MAAM,EAAI,EAAE,WAAa,EACzB,SAAW,CAAC,EAAGC,CAAC,IAAK,EACnB,EAAE,CAAC,EAAIA,EACT,OAAO,CACT,EAuBA,IAAIC,GACO,OAAO,OAAS,MAEpBA,GAAI,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,GAAE,WAAa,iBA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EAAO,EAC5Bx1B,EAAA,UAAU,WAAYy1B,EAAQ,CACnC,CACD"} \ No newline at end of file diff --git a/desktop/package.json b/desktop/package.json index 84239434..02b3ed50 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -31,20 +31,20 @@ "@stonecrop/stonecrop": "workspace:*", "@stonecrop/themes": "workspace:*", "immutable": "^4.3.0", - "vue": "^3.2.47", + "vue": "^3.4.23", "xstate": "~4.37.2" }, "devDependencies": { "@miragejs/graphql": "^0.1.13", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", - "@vitejs/plugin-vue": "^4.2.1", + "@vitejs/plugin-vue": "^5.0.4", "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", "miragejs": "^0.1.47", "typescript": "^5.0.4", - "vite": "^4.3.5", + "vite": "^5.2.9", "vue-router": "^4" }, "engines": { diff --git a/examples/package.json b/examples/package.json index c0e787b2..7a54631a 100644 --- a/examples/package.json +++ b/examples/package.json @@ -22,11 +22,11 @@ "@stonecrop/stonecrop": "workspace:*", "@stonecrop/themes": "workspace:*", "@miragejs/graphql": "^0.1.13", - "@vitejs/plugin-vue": "^4.2.1", + "@vitejs/plugin-vue": "^5.0.4", "miragejs": "^0.1.47", "uuid": "^9.0.0", - "vite": "^4.3.5", - "vue": "^3.2.47", + "vite": "^5.2.9", + "vue": "^3.4.23", "xstate": "~4.37.2" }, "devDependencies": { diff --git a/graphql_client/package.json b/graphql_client/package.json index c1d919ff..399d08ea 100644 --- a/graphql_client/package.json +++ b/graphql_client/package.json @@ -34,15 +34,15 @@ "@types/graphql": "~14.5.0", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", - "@vitejs/plugin-vue": "^4.2.1", + "@vitejs/plugin-vue": "^5.0.4", "cypress": "^12.11.0", "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", "miragejs": "^0.1.47", "typescript": "^5.0.4", - "vite": "^4.3.5", - "vue": "^3.2.47", + "vite": "^5.2.9", + "vue": "^3.4.23", "vue-router": "^4" }, "engines": { diff --git a/node_editor/dist/node-editor.js.map b/node_editor/dist/node-editor.js.map index 828e6af8..a0def6bc 100644 --- a/node_editor/dist/node-editor.js.map +++ b/node_editor/dist/node-editor.js.map @@ -1 +1 @@ -{"version":3,"file":"node-editor.js","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.21/node_modules/@vue-flow/core/dist/vue-flow-core.mjs","../src/components/EditableNode.vue","../src/components/EditableEdge.vue","../src/components/NodeEditor.vue","../src/components/StateEditor.vue","../src/index.ts"],"sourcesContent":["import { unref as C, ref as ie, watch as de, customRef as br, getCurrentScope as hi, onScopeDispose as Vt, getCurrentInstance as on, onMounted as Ve, nextTick as Ue, readonly as Er, isRef as Sr, computed as J, onBeforeMount as Nr, markRaw as it, inject as He, defineComponent as ge, toRef as M, openBlock as oe, createElementBlock as se, normalizeClass as Ke, renderSlot as xe, h as ue, provide as ut, onBeforeUnmount as gi, normalizeStyle as Le, createCommentVNode as Ee, createElementVNode as ct, mergeProps as vi, createBlock as ze, resolveDynamicComponent as mi, Fragment as Ce, createTextVNode as Cr, toDisplayString as Vn, Teleport as Mr, normalizeProps as $r, reactive as kr, toRefs as Or, effectScope as Tr, renderList as dt, resolveComponent as pi, createVNode as qe, watchEffect as bo, withCtx as Fe, useSlots as Ir, onUnmounted as Pr } from \"vue\";\nvar Eo;\nconst oo = typeof window < \"u\", Dr = (e) => typeof e < \"u\", zr = (e) => typeof e == \"boolean\", Ae = (e) => typeof e == \"function\", Ie = (e) => typeof e == \"number\", Pe = (e) => typeof e == \"string\", Ar = () => {\n};\noo && ((Eo = window == null ? void 0 : window.navigator) != null && Eo.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction le(e) {\n return typeof e == \"function\" ? e() : C(e);\n}\nfunction Br(e, t) {\n function n(...o) {\n return new Promise((i, r) => {\n Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(i).catch(r);\n });\n }\n return n;\n}\nconst yi = (e) => e();\nfunction Rr(e = yi) {\n const t = ie(!0);\n function n() {\n t.value = !1;\n }\n function o() {\n t.value = !0;\n }\n const i = (...r) => {\n t.value && e(...r);\n };\n return { isActive: Er(t), pause: n, resume: o, eventFilter: i };\n}\nfunction So(e, t = !1, n = \"Timeout\") {\n return new Promise((o, i) => {\n setTimeout(t ? () => i(n) : o, e);\n });\n}\nfunction Vr(e) {\n return e;\n}\nfunction Sn(e, t) {\n let n, o, i;\n const r = ie(!0), a = () => {\n r.value = !0, i();\n };\n de(e, a, { flush: \"sync\" });\n const s = Ae(t) ? t : t.get, l = Ae(t) ? void 0 : t.set, u = br((c, v) => (o = c, i = v, {\n get() {\n return r.value && (n = s(), r.value = !1), o(), n;\n },\n set(g) {\n l == null || l(g);\n }\n }));\n return Object.isExtensible(u) && (u.trigger = a), u;\n}\nfunction Mt(e) {\n return hi() ? (Vt(e), !0) : !1;\n}\nfunction Hr(e, t = !0) {\n on() ? Ve(e) : t ? e() : Ue(e);\n}\nfunction Hn(e, t = !1) {\n function n(v, { flush: g = \"sync\", deep: x = !1, timeout: h, throwOnTimeout: d } = {}) {\n let w = null;\n const S = [new Promise((V) => {\n w = de(e, (p) => {\n v(p) !== t && (w == null || w(), V(p));\n }, {\n flush: g,\n deep: x,\n immediate: !0\n });\n })];\n return h != null && S.push(So(h, d).then(() => le(e)).finally(() => w == null ? void 0 : w())), Promise.race(S);\n }\n function o(v, g) {\n if (!Sr(v))\n return n((p) => p === v, g);\n const { flush: x = \"sync\", deep: h = !1, timeout: d, throwOnTimeout: w } = g ?? {};\n let y = null;\n const V = [new Promise((p) => {\n y = de([e, v], ([N, T]) => {\n t !== (N === T) && (y == null || y(), p(N));\n }, {\n flush: x,\n deep: h,\n immediate: !0\n });\n })];\n return d != null && V.push(So(d, w).then(() => le(e)).finally(() => (y == null || y(), le(e)))), Promise.race(V);\n }\n function i(v) {\n return n((g) => Boolean(g), v);\n }\n function r(v) {\n return o(null, v);\n }\n function a(v) {\n return o(void 0, v);\n }\n function s(v) {\n return n(Number.isNaN, v);\n }\n function l(v, g) {\n return n((x) => {\n const h = Array.from(x);\n return h.includes(v) || h.includes(le(v));\n }, g);\n }\n function u(v) {\n return c(1, v);\n }\n function c(v = 1, g) {\n let x = -1;\n return n(() => (x += 1, x >= v), g);\n }\n return Array.isArray(le(e)) ? {\n toMatch: n,\n toContains: l,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n } : {\n toMatch: n,\n toBe: o,\n toBeTruthy: i,\n toBeNull: r,\n toBeNaN: s,\n toBeUndefined: a,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n };\n}\nfunction ye(e) {\n return Hn(e);\n}\nvar No = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Gr = Object.prototype.propertyIsEnumerable, Fr = (e, t) => {\n var n = {};\n for (var o in e)\n Lr.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && No)\n for (var o of No(e))\n t.indexOf(o) < 0 && Gr.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction Yr(e, t, n = {}) {\n const o = n, {\n eventFilter: i = yi\n } = o, r = Fr(o, [\n \"eventFilter\"\n ]);\n return de(e, Br(i, t), r);\n}\nvar Xr = Object.defineProperty, Zr = Object.defineProperties, Ur = Object.getOwnPropertyDescriptors, Yt = Object.getOwnPropertySymbols, xi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, Co = (e, t, n) => t in e ? Xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wr = (e, t) => {\n for (var n in t || (t = {}))\n xi.call(t, n) && Co(e, n, t[n]);\n if (Yt)\n for (var n of Yt(t))\n _i.call(t, n) && Co(e, n, t[n]);\n return e;\n}, Kr = (e, t) => Zr(e, Ur(t)), qr = (e, t) => {\n var n = {};\n for (var o in e)\n xi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && Yt)\n for (var o of Yt(e))\n t.indexOf(o) < 0 && _i.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction tt(e, t, n = {}) {\n const o = n, {\n eventFilter: i\n } = o, r = qr(o, [\n \"eventFilter\"\n ]), { eventFilter: a, pause: s, resume: l, isActive: u } = Rr(i);\n return { stop: Yr(e, t, Kr(Wr({}, r), {\n eventFilter: a\n })), pause: s, resume: l, isActive: u };\n}\nfunction wi(e) {\n var t;\n const n = le(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst io = oo ? window : void 0;\nfunction ro(...e) {\n let t, n, o, i;\n if (Pe(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = io) : [t, n, o, i] = e, !t)\n return Ar;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const r = [], a = () => {\n r.forEach((c) => c()), r.length = 0;\n }, s = (c, v, g, x) => (c.addEventListener(v, g, x), () => c.removeEventListener(v, g, x)), l = de(() => [wi(t), le(i)], ([c, v]) => {\n a(), c && r.push(...n.flatMap((g) => o.map((x) => s(c, g, x, v))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n l(), a();\n };\n return Mt(u), u;\n}\nconst jr = (e) => typeof e == \"function\" ? e : typeof e == \"string\" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;\nfunction Mo(...e) {\n let t, n, o = {};\n e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == \"object\" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);\n const { target: i = io, eventName: r = \"keydown\", passive: a = !1 } = o, s = jr(t);\n return ro(i, r, (u) => {\n s(u) && n(u);\n }, a);\n}\nfunction Qr(e, t = !1) {\n const n = ie(), o = () => n.value = Boolean(e());\n return o(), Hr(o, t), n;\n}\nfunction Jr(e) {\n return JSON.parse(JSON.stringify(e));\n}\nconst Ln = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Gn = \"__vueuse_ssr_handlers__\";\nLn[Gn] = Ln[Gn] || {};\nLn[Gn];\nvar $o = Object.getOwnPropertySymbols, ea = Object.prototype.hasOwnProperty, ta = Object.prototype.propertyIsEnumerable, na = (e, t) => {\n var n = {};\n for (var o in e)\n ea.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && $o)\n for (var o of $o(e))\n t.indexOf(o) < 0 && ta.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction oa(e, t, n = {}) {\n const o = n, { window: i = io } = o, r = na(o, [\"window\"]);\n let a;\n const s = Qr(() => i && \"ResizeObserver\" in i), l = () => {\n a && (a.disconnect(), a = void 0);\n }, u = de(() => wi(e), (v) => {\n l(), s.value && i && v && (a = new ResizeObserver(t), a.observe(v, r));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n l(), u();\n };\n return Mt(c), {\n isSupported: s,\n stop: c\n };\n}\nvar ko;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(ko || (ko = {}));\nvar ia = Object.defineProperty, Oo = Object.getOwnPropertySymbols, ra = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, To = (e, t, n) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t) => {\n for (var n in t || (t = {}))\n ra.call(t, n) && To(e, n, t[n]);\n if (Oo)\n for (var n of Oo(t))\n aa.call(t, n) && To(e, n, t[n]);\n return e;\n};\nconst la = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nsa({\n linear: Vr\n}, la);\nfunction yt(e, t, n, o = {}) {\n var i, r, a;\n const {\n clone: s = !1,\n passive: l = !1,\n eventName: u,\n deep: c = !1,\n defaultValue: v\n } = o, g = on(), x = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((a = (r = g == null ? void 0 : g.proxy) == null ? void 0 : r.$emit) == null ? void 0 : a.bind(g == null ? void 0 : g.proxy));\n let h = u;\n t || (t = \"modelValue\"), h = u || h || `update:${t.toString()}`;\n const d = (y) => s ? Ae(s) ? s(y) : Jr(y) : y, w = () => Dr(e[t]) ? d(e[t]) : v;\n if (l) {\n const y = w(), S = ie(y);\n return de(() => e[t], (V) => S.value = d(V)), de(S, (V) => {\n (V !== e[t] || c) && x(h, V);\n }, { deep: c }), S;\n } else\n return J({\n get() {\n return w();\n },\n set(y) {\n x(h, y);\n }\n });\n}\nfunction X(e = () => {\n}) {\n const t = ie(/* @__PURE__ */ new Set());\n e && t.value.add(e);\n const n = (r) => {\n t.value.delete(r);\n };\n return {\n on: (r) => {\n t.value.has(e) && t.value.delete(e), t.value.add(r);\n const a = () => n(r);\n return Mt(a), {\n off: a\n };\n },\n off: n,\n trigger: (r) => Promise.all(Array.from(t.value).map((a) => a(r))),\n fns: t\n };\n}\nconst ua = [\"production\", \"prod\"];\nfunction wt(e, ...t) {\n ua.includes(process.env.NODE_ENV || \"\") || console.warn(`[Vue Flow]: ${e}`, ...t);\n}\nfunction ca() {\n return {\n edgesChange: X(),\n nodesChange: X(),\n nodeDoubleClick: X(),\n nodeClick: X(),\n nodeMouseEnter: X(),\n nodeMouseMove: X(),\n nodeMouseLeave: X(),\n nodeContextMenu: X(),\n nodeDragStart: X(),\n nodeDrag: X(),\n nodeDragStop: X(),\n nodesInitialized: X(),\n miniMapNodeClick: X(),\n miniMapNodeDoubleClick: X(),\n miniMapNodeMouseEnter: X(),\n miniMapNodeMouseMove: X(),\n miniMapNodeMouseLeave: X(),\n connect: X(),\n connectStart: X(),\n connectEnd: X(),\n clickConnectStart: X(),\n clickConnectEnd: X(),\n paneReady: X(),\n move: X(),\n moveStart: X(),\n moveEnd: X(),\n selectionDragStart: X(),\n selectionDrag: X(),\n selectionDragStop: X(),\n selectionContextMenu: X(),\n selectionStart: X(),\n selectionEnd: X(),\n viewportChangeStart: X(),\n viewportChange: X(),\n viewportChangeEnd: X(),\n paneScroll: X(),\n paneClick: X(),\n paneContextMenu: X(),\n paneMouseEnter: X(),\n paneMouseMove: X(),\n paneMouseLeave: X(),\n edgeContextMenu: X(),\n edgeMouseEnter: X(),\n edgeMouseMove: X(),\n edgeMouseLeave: X(),\n edgeDoubleClick: X(),\n edgeClick: X(),\n edgeUpdateStart: X(),\n edgeUpdate: X(),\n edgeUpdateEnd: X(),\n updateNodeInternals: X(),\n error: X((e) => wt(e.message))\n };\n}\nfunction da(e, t) {\n Nr(() => {\n for (const [n, o] of Object.entries(t.value)) {\n const i = (r) => {\n e(n, r);\n };\n o.on(i), Mt(() => {\n o.off(i);\n });\n }\n });\n}\nvar he = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = \"MISSING_VIEWPORT_DIMENSIONS\", e.NODE_NOT_FOUND = \"NODE_NOT_FOUND\", e.NODE_MISSING_PARENT = \"NODE_MISSING_PARENT\", e.NODE_TYPE_MISSING = \"NODE_TYPE_MISSING\", e.NODE_EXTENT_INVALID = \"NODE_EXTENT_INVALID\", e.EDGE_INVALID = \"EDGE_INVALID\", e.EDGE_NOT_FOUND = \"EDGE_NOT_FOUND\", e.EDGE_SOURCE_MISSING = \"EDGE_SOURCE_MISSING\", e.EDGE_TARGET_MISSING = \"EDGE_TARGET_MISSING\", e.EDGE_TYPE_MISSING = \"EDGE_TYPE_MISSING\", e.EDGE_SOURCE_TARGET_SAME = \"EDGE_SOURCE_TARGET_SAME\", e.EDGE_SOURCE_TARGET_MISSING = \"EDGE_SOURCE_TARGET_MISSING\", e.EDGE_ORPHANED = \"EDGE_ORPHANED\", e))(he || {});\nconst Nn = {\n MISSING_VIEWPORT_DIMENSIONS: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n NODE_NOT_FOUND: (e) => `Node not found\nNode: ${e}`,\n NODE_MISSING_PARENT: (e, t) => `Node is missing a parent\nNode: ${e}\nParent: ${t}`,\n NODE_TYPE_MISSING: (e) => `Node type is missing\nType: ${e}`,\n NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent\nNode: ${e}`,\n EDGE_INVALID: (e) => `An edge needs a source and a target\nEdge: ${e}`,\n EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing\nEdge: ${e} \nSource: ${t}`,\n EDGE_TARGET_MISSING: (e, t) => `Edge target is missing\nEdge: ${e} \nTarget: ${t}`,\n EDGE_TYPE_MISSING: (e) => `Edge type is missing\nType: ${e}`,\n EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,\n EDGE_NOT_FOUND: (e) => `Edge not found\nEdge: ${e}`\n};\nclass ve extends Error {\n constructor(t, ...n) {\n var o;\n super((o = Nn[t]) == null ? void 0 : o.call(Nn, ...n)), this.code = t;\n }\n}\nconst ao = () => typeof window < \"u\" ? window : { chrome: !1 };\nfunction Io(e) {\n return {\n ...e.computedPosition || { x: 0, y: 0 },\n width: e.dimensions.width || 0,\n height: e.dimensions.height || 0\n };\n}\nfunction Fn(e, t) {\n const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));\n return Math.ceil(n * o);\n}\nfunction rn(e) {\n return {\n width: e.offsetWidth,\n height: e.offsetHeight\n };\n}\nfunction je(e, t = 0, n = 1) {\n return Math.min(Math.max(e, t), n);\n}\nfunction so(e, t) {\n return {\n x: je(e.x, t[0][0], t[1][0]),\n y: je(e.y, t[0][1], t[1][1])\n };\n}\nfunction Po(e) {\n const t = e.getRootNode(), n = ao();\n return \"elementFromPoint\" in t ? t : n.document;\n}\nfunction $e(e) {\n return e && \"id\" in e && \"source\" in e && \"target\" in e;\n}\nfunction fa(e) {\n return $e(e) && \"sourceNode\" in e && \"targetNode\" in e;\n}\nfunction xt(e) {\n return e && \"id\" in e && !$e(e);\n}\nfunction nt(e) {\n return xt(e) && \"computedPosition\" in e;\n}\nfunction ha(e) {\n return !!e.width && !!e.height && !!e.x && !!e.y;\n}\nfunction ga(e, t = {}) {\n let n = t;\n return nt(e) || (n = {\n type: e.type ?? t.type ?? \"default\",\n dimensions: it({\n width: 0,\n height: 0\n }),\n handleBounds: {\n source: [],\n target: []\n },\n computedPosition: it({\n z: 0,\n ...e.position\n }),\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: !1,\n dragging: !1,\n resizing: !1,\n initialized: !1,\n ...t,\n data: ce(e.data) ? e.data : {},\n events: it(ce(e.events) ? e.events : {})\n }), Object.assign({}, n, e, { id: e.id.toString() });\n}\nfunction lo(e, t = {}) {\n const n = ce(e.events) ? e.events : t.events && ce(t.events) ? t.events : {}, o = ce(e.data) ? e.data : t.data && ce(t.data) ? t.data : {};\n return t = fa(e) ? t : {\n ...t,\n sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle,\n targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle,\n type: e.type ?? t.type ?? \"default\",\n source: e.source.toString() || t.source,\n target: e.target.toString() || t.target,\n updatable: e.updatable ?? t.updatable,\n selectable: e.selectable ?? t.selectable,\n focusable: e.focusable ?? t.focusable,\n data: o,\n events: it(n),\n label: (e.label && !Pe(e.label) ? it(e.label) : e.label) || t.label,\n interactionWidth: e.interactionWidth || t.interactionWidth\n }, Object.assign({}, t, e, { id: e.id.toString() });\n}\nfunction bi(e, t, n) {\n if (!xt(e))\n return [];\n const o = n === \"source\" ? \"target\" : \"source\", i = t.filter((r) => $e(r) && r[o] === e.id).map((r) => $e(r) && r[n]);\n return t.filter((r) => i.includes(r.id));\n}\nfunction Pd(e, t) {\n return bi(e, t, \"target\");\n}\nfunction Dd(e, t) {\n return bi(e, t, \"source\");\n}\nfunction an({ source: e, sourceHandle: t, target: n, targetHandle: o }) {\n return `vueflow__edge-${e}${t ?? \"\"}-${n}${o ?? \"\"}`;\n}\nfunction Ei(e, t) {\n return t.some(\n (n) => $e(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle)\n );\n}\nfunction zd(e, t, n) {\n if (!e.source || !e.target)\n return wt(\"Can't create edge. An edge needs a source and a target.\"), t;\n let o;\n return $e(e) ? o = { ...e } : o = {\n ...e,\n id: an(e)\n }, o = lo(o, n), Ei(o, t) || t.push(o), t;\n}\nfunction Ad(e, t, n) {\n if (!t.source || !t.target)\n return wt(\"Can't create new edge. An edge needs a source and a target.\"), n;\n const o = n.find((r) => $e(r) && r.id === e.id);\n if (!o)\n return wt(`The old edge with id=${e.id} does not exist.`), n;\n const i = {\n ...e,\n id: an(t),\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(o), 1, i), n.filter((r) => r.id !== e.id);\n}\nfunction va({ x: e, y: t }, { x: n, y: o, zoom: i }) {\n return {\n x: e * i + n,\n y: t * i + o\n };\n}\nfunction uo({ x: e, y: t }, { x: n, y: o, zoom: i }, r, [a, s]) {\n const l = {\n x: (e - n) / i,\n y: (t - o) / i\n };\n return r ? {\n x: a * Math.round(l.x / a),\n y: s * Math.round(l.y / s)\n } : l;\n}\nfunction Si(e, t) {\n return {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x2, t.x2),\n y2: Math.max(e.y2, t.y2)\n };\n}\nfunction Xt({ x: e, y: t, width: n, height: o }) {\n return {\n x: e,\n y: t,\n x2: e + n,\n y2: t + o\n };\n}\nfunction Ni({ x: e, y: t, x2: n, y2: o }) {\n return {\n x: e,\n y: t,\n width: n - e,\n height: o - t\n };\n}\nfunction Bd(e, t) {\n return Ni(Si(Xt(e), Xt(t)));\n}\nfunction co(e) {\n const t = e.reduce(\n (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: i = { width: 0, height: 0 } } = {}) => Si(\n n,\n Xt({\n ...o,\n ...i\n })\n ),\n { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }\n );\n return Ni(t);\n}\nfunction Ci(e, t, { x: n, y: o, zoom: i } = { x: 0, y: 0, zoom: 1 }, r = !1, a = !1) {\n const s = {\n x: (t.x - n) / i,\n y: (t.y - o) / i,\n width: t.width / i,\n height: t.height / i\n };\n return e.filter((l) => {\n const { computedPosition: u = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: v } = l;\n if (a && !v)\n return !1;\n const g = { ...u, width: c.width || 0, height: c.height || 0 }, x = Fn(s, g), h = typeof c.width > \"u\" || typeof c.height > \"u\" || c.width === 0 || c.height === 0, d = r && x > 0, w = c.width * c.height;\n return h || d || x >= w;\n });\n}\nfunction sn(e, t) {\n const n = e.map((o) => Pe(o) ? o : o.id);\n return t.filter((o) => n.includes(o.source) || n.includes(o.target));\n}\nfunction Zt(e, t, n, o, i, r = 0.1, a = { x: 0, y: 0 }) {\n const s = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), u = Math.min(s, l), c = je(u, o, i), v = e.x + e.width / 2, g = e.y + e.height / 2, x = t / 2 - v * c + (a.x ?? 0), h = n / 2 - g * c + (a.y ?? 0);\n return { x, y: h, zoom: c };\n}\nfunction ma(e, t) {\n return {\n x: t.x + e.x,\n y: t.y + e.y,\n z: (e.z > t.z ? e.z : t.z) + 1\n };\n}\nfunction Mi(e, t) {\n if (!e.parentNode)\n return !1;\n const n = t(e.parentNode);\n return n ? n.selected ? !0 : Mi(n, t) : !1;\n}\nfunction Xe(e, t) {\n return typeof e > \"u\" ? \"\" : typeof e == \"string\" ? e : `${t ? `${t}__` : \"\"}${Object.keys(e).sort().map((o) => `${o}=${e[o]}`).join(\"&\")}`;\n}\nfunction ce(e) {\n return typeof C(e) < \"u\";\n}\nfunction pa(e, t, n) {\n if (!e.source || !e.target)\n return n(new ve(he.EDGE_INVALID, e.id)), !1;\n let o;\n return $e(e) ? o = e : o = {\n ...e,\n id: an(e)\n }, o = lo(o), Ei(o, t) ? !1 : o;\n}\nfunction ya(e, t, n, o, i, r) {\n if (!t.source || !t.target)\n return r(new ve(he.EDGE_INVALID, e.id)), !1;\n const a = o(e.id);\n if (!a)\n return r(new ve(he.EDGE_NOT_FOUND, e.id)), !1;\n const { id: s, ...l } = e, u = {\n ...l,\n id: i ? an(t) : s,\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(a), 1, u), u;\n}\nfunction Do(e, t, n, o) {\n const i = {}, r = e.map((s) => {\n const l = ga(s, {\n ...n(s.id),\n parentNode: s.parentNode\n });\n return s.parentNode && (i[s.parentNode] = !0), l;\n }), a = [...r, ...t];\n return r.forEach((s) => {\n const l = a.find((u) => u.id === s.parentNode);\n s.parentNode && !l && o(new ve(he.NODE_MISSING_PARENT, s.id, s.parentNode)), (s.parentNode || i[s.id]) && (i[s.id] && (s.isParent = !0), l && (l.isParent = !0));\n }), r;\n}\nvar j = /* @__PURE__ */ ((e) => (e.Left = \"left\", e.Top = \"top\", e.Right = \"right\", e.Bottom = \"bottom\", e))(j || {}), fo = /* @__PURE__ */ ((e) => (e.Partial = \"partial\", e.Full = \"full\", e))(fo || {}), Ye = /* @__PURE__ */ ((e) => (e.Bezier = \"default\", e.SimpleBezier = \"simple-bezier\", e.Straight = \"straight\", e.Step = \"step\", e.SmoothStep = \"smoothstep\", e))(Ye || {}), Qe = /* @__PURE__ */ ((e) => (e.Strict = \"strict\", e.Loose = \"loose\", e))(Qe || {}), Yn = /* @__PURE__ */ ((e) => (e.Arrow = \"arrow\", e.ArrowClosed = \"arrowclosed\", e))(Yn || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = \"free\", e.Vertical = \"vertical\", e.Horizontal = \"horizontal\", e))(Ut || {}), xa = /* @__PURE__ */ ((e) => (e.TopLeft = \"top-left\", e.TopCenter = \"top-center\", e.TopRight = \"top-right\", e.BottomLeft = \"bottom-left\", e.BottomCenter = \"bottom-center\", e.BottomRight = \"bottom-right\", e))(xa || {});\nconst zo = Symbol(\"vueFlow\"), $i = Symbol(\"nodeId\"), ki = Symbol(\"nodeRef\"), Oi = Symbol(\"edgeId\"), Ti = Symbol(\"edgeRef\"), ln = Symbol(\"slots\");\nfunction _a(e) {\n const t = e ?? He($i, \"\"), n = He(ki, null), { findNode: o, edges: i, emits: r } = fe(), a = o(t);\n return a || r.error(new ve(he.NODE_NOT_FOUND, t)), {\n id: t,\n nodeEl: n,\n node: a,\n parentNode: J(() => o(a.parentNode)),\n connectedEdges: J(() => sn([a], i.value))\n };\n}\nfunction ho(e) {\n return \"clientX\" in e;\n}\nfunction rt(e, t) {\n var r, a;\n const n = ho(e), o = n ? e.clientX : (r = e.touches) == null ? void 0 : r[0].clientX, i = n ? e.clientY : (a = e.touches) == null ? void 0 : a[0].clientY;\n return {\n x: o - ((t == null ? void 0 : t.left) ?? 0),\n y: i - ((t == null ? void 0 : t.top) ?? 0)\n };\n}\nfunction Wt(e, t, n) {\n const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, i = ((n == null ? void 0 : n.y) ?? 0) + t.y, r = (n == null ? void 0 : n.width) ?? t.width, a = (n == null ? void 0 : n.height) ?? t.height;\n switch (e) {\n case j.Top:\n return {\n x: o + r / 2,\n y: i\n };\n case j.Right:\n return {\n x: o + r,\n y: i + a / 2\n };\n case j.Bottom:\n return {\n x: o + r / 2,\n y: i + a\n };\n case j.Left:\n return {\n x: o,\n y: i + a / 2\n };\n }\n}\nfunction Ao(e = [], t) {\n return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null;\n}\nfunction wa(e, t, n, o, i, r) {\n const a = Wt(\n n,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n t\n ), s = Wt(\n r,\n {\n ...o.dimensions,\n ...o.computedPosition\n },\n i\n );\n return {\n sourceX: a.x,\n sourceY: a.y,\n targetX: s.x,\n targetY: s.y\n };\n}\nfunction ba({\n sourcePos: e,\n targetPos: t,\n sourceWidth: n,\n sourceHeight: o,\n targetWidth: i,\n targetHeight: r,\n width: a,\n height: s,\n viewport: l\n}) {\n const u = {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x + n, t.x + i),\n y2: Math.max(e.y + o, t.y + r)\n };\n u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);\n const c = Xt({\n x: (0 - l.x) / l.zoom,\n y: (0 - l.y) / l.zoom,\n width: a / l.zoom,\n height: s / l.zoom\n }), v = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), g = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));\n return Math.ceil(v * g) > 0;\n}\nfunction Ea(e, t, n = !1) {\n let o = -1;\n const i = e.reduce((r, a) => {\n const s = Ie(a.zIndex);\n let l = s ? a.zIndex : 0;\n const u = t(a.source), c = t(a.target);\n return !u || !c || (n && (l = s ? a.zIndex : Math.max(u.computedPosition.z || 0, c.computedPosition.z || 0)), r[l] ? r[l].push(a) : r[l] = [a], o = l > o ? l : o), r;\n }, {});\n return Object.entries(Object.keys(i).length ? i : { 0: [] }).map(([r, a]) => {\n const s = +r;\n return {\n edges: a,\n level: s,\n isMaxLevel: s === o\n };\n });\n}\nfunction Cn(e) {\n e == null || e.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction Bo(e, t, n, o) {\n return (t[n] || []).reduce((i, r) => (`${e.id}-${r.id}-${n}` !== o && i.push({\n id: r.id || null,\n type: n,\n nodeId: e.id,\n ...Wt(\n r.position,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n r\n )\n }), i), []);\n}\nfunction Sa(e, t, n) {\n let o = null, i = 1 / 0;\n return n.forEach((r) => {\n const a = Math.sqrt((r.x - e.x) ** 2 + (r.y - e.y) ** 2);\n a <= t && a < i && (i = a, o = r);\n }), o;\n}\nfunction Ro(e, t, n, o, i, r, a, s, l, u) {\n const c = r === \"target\", v = s.querySelector(`.vue-flow__handle[data-id=\"${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}\"]`), { x: g, y: x } = rt(e), h = s.elementFromPoint(g, x), d = h != null && h.classList.contains(\"vue-flow__handle\") ? h : v, w = {\n handleDomNode: d,\n isValid: !1,\n connection: { source: \"\", target: \"\", sourceHandle: null, targetHandle: null },\n endHandle: null\n };\n if (d) {\n const y = Ii(void 0, d), S = d.getAttribute(\"data-nodeid\"), V = d.getAttribute(\"data-handleid\"), p = d.classList.contains(\"connectable\"), N = d.classList.contains(\"connectableend\"), T = {\n source: c ? S : o,\n sourceHandle: c ? V : i,\n target: c ? o : S,\n targetHandle: c ? i : V\n };\n w.connection = T, p && N && (n === Qe.Strict ? c && y === \"source\" || !c && y === \"target\" : S !== o || V !== i) && (w.endHandle = {\n nodeId: S,\n handleId: V,\n type: y\n }, w.isValid = a(T, {\n edges: l,\n sourceNode: u(T.source),\n targetNode: u(T.target)\n }));\n }\n return w;\n}\nfunction Na({ nodes: e, nodeId: t, handleId: n, handleType: o }) {\n return e.reduce((i, r) => {\n const { handleBounds: a } = r;\n let s = [], l = [];\n return a && (s = Bo(r, a, \"source\", `${t}-${n}-${o}`), l = Bo(r, a, \"target\", `${t}-${n}-${o}`)), i.push(...s, ...l), i;\n }, []);\n}\nfunction Ii(e, t) {\n return e || (t != null && t.classList.contains(\"target\") ? \"target\" : t != null && t.classList.contains(\"source\") ? \"source\" : null);\n}\nfunction Ca(e, t) {\n let n = null;\n return t ? n = \"valid\" : e && !t && (n = \"invalid\"), n;\n}\nfunction Vo(e, t, n) {\n return e < t ? je(Math.abs(e - t), 1, 50) / 50 : e > n ? -je(Math.abs(e - n), 1, 50) / 50 : 0;\n}\nfunction Pi(e, t) {\n const n = Vo(e.x, 35, t.width - 35) * 20, o = Vo(e.y, 35, t.height - 35) * 20;\n return [n, o];\n}\nfunction It() {\n return !0;\n}\nfunction Di({\n handleId: e,\n nodeId: t,\n type: n,\n isValidConnection: o,\n edgeUpdaterType: i,\n onEdgeUpdate: r,\n onEdgeUpdateEnd: a\n}) {\n const s = J(() => le(n) === \"target\"), {\n vueFlowRef: l,\n connectionMode: u,\n connectionRadius: c,\n connectOnClick: v,\n connectionClickStartHandle: g,\n nodesConnectable: x,\n autoPanOnConnect: h,\n findNode: d,\n panBy: w,\n getNodes: y,\n startConnection: S,\n updateConnection: V,\n endConnection: p,\n emits: N,\n viewport: T,\n edges: _,\n isValidConnection: P\n } = fe();\n let R = null, $ = !1, D = null;\n function Q(m) {\n var G;\n const A = ho(m), E = Po(m.target);\n if (A && m.button === 0 || !A) {\n let Z = function(Y) {\n L = rt(Y, f), B = Sa(\n uo(L, T.value, !1, [1, 1]),\n c.value,\n F\n ), I || (U(), I = !0);\n const ne = Ro(\n Y,\n B,\n u.value,\n le(t),\n le(e),\n s.value ? \"target\" : \"source\",\n W,\n E,\n _.value,\n d\n );\n if (R = ne.connection, $ = ne.isValid, D = ne.handleDomNode, V(\n B && $ ? va(\n {\n x: B.x,\n y: B.y\n },\n T.value\n ) : L,\n ne.endHandle,\n Ca(!!B, $)\n ), !B && !$ && !D)\n return Cn(b);\n R && R.source !== R.target && D && (Cn(b), b = D, D.classList.add(\"connecting\", \"vue-flow__handle-connecting\"), D.classList.toggle(\"valid\", $), D.classList.toggle(\"vue-flow__handle-valid\", $));\n }, K = function(Y) {\n (B || D) && R && $ && (r ? r(Y, R) : N.connect(R)), N.connectEnd(Y), i && (a == null || a(Y)), Cn(b), cancelAnimationFrame(q), p(Y), I = !1, $ = !1, R = null, D = null, E.removeEventListener(\"mousemove\", Z), E.removeEventListener(\"mouseup\", K), E.removeEventListener(\"touchmove\", Z), E.removeEventListener(\"touchend\", K);\n };\n const z = d(le(t));\n let W = o || P.value || It;\n !W && z && (W = (s ? z.isValidSourcePos : z.isValidTargetPos) || It);\n let B, q = 0;\n const { x: te, y: re } = rt(m), k = E == null ? void 0 : E.elementFromPoint(te, re), H = Ii(le(i), k), f = (G = l.value) == null ? void 0 : G.getBoundingClientRect();\n if (!f || !H)\n return;\n let b, L = rt(m, f), I = !1;\n const F = Na({\n nodes: y.value,\n nodeId: le(t),\n handleId: le(e),\n handleType: H\n }), U = () => {\n if (!h)\n return;\n const [Y, ne] = Pi(L, f);\n w({ x: Y, y: ne }), q = requestAnimationFrame(U);\n };\n S(\n {\n nodeId: le(t),\n handleId: le(e),\n type: H\n },\n {\n x: te - f.left,\n y: re - f.top\n },\n m\n ), N.connectStart({ event: m, nodeId: le(t), handleId: le(e), handleType: H }), E.addEventListener(\"mousemove\", Z), E.addEventListener(\"mouseup\", K), E.addEventListener(\"touchmove\", Z), E.addEventListener(\"touchend\", K);\n }\n }\n function ee(m) {\n if (v.value)\n if (!g.value)\n N.clickConnectStart({ event: m, nodeId: le(t), handleId: le(e) }), S(\n { nodeId: le(t), type: le(n), handleId: le(e) },\n void 0,\n m,\n !0\n );\n else {\n let A = o || P.value || It;\n const E = d(le(t));\n if (!A && E && (A = (s ? E.isValidSourcePos : E.isValidTargetPos) || It), E && (typeof E.connectable > \"u\" ? x.value : E.connectable) === !1)\n return;\n const G = Po(m.target), { connection: Z, isValid: K } = Ro(\n m,\n {\n nodeId: le(t),\n id: le(e),\n type: le(n)\n },\n u.value,\n g.value.nodeId,\n g.value.handleId || null,\n g.value.type,\n A,\n G,\n _.value,\n d\n ), z = Z.source === Z.target;\n K && !z && N.connect(Z), N.clickConnectEnd(m), p(m, !0);\n }\n }\n return {\n handlePointerDown: Q,\n handleClick: ee\n };\n}\nfunction Ma(e, t) {\n const n = {};\n for (const o in e)\n t.includes(o) || Object.defineProperty(n, o, {\n enumerable: !0,\n get: () => e[o]\n });\n return n;\n}\nconst $a = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"], ka = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n}, Kt = /* @__PURE__ */ ge({\n ...ka,\n props: {\n id: null,\n type: null,\n position: { default: j.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: !0 },\n connectableEnd: { type: Boolean, default: !0 }\n },\n setup(e) {\n const t = Ma(e, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\", \"isValidConnection\"]), n = M(t, \"type\", \"source\"), {\n connectionStartHandle: o,\n connectionClickStartHandle: i,\n connectionEndHandle: r,\n vueFlowRef: a,\n nodesConnectable: s,\n noDragClassName: l,\n noPanClassName: u\n } = fe(), { id: c, node: v, nodeEl: g, connectedEdges: x } = _a(), h = ie(), d = J(() => e.id ?? `${c}__handle-${e.position}`), w = J(() => typeof e.connectableStart < \"u\" ? e.connectableStart : !0), y = J(() => typeof e.connectableEnd < \"u\" ? e.connectableEnd : !0), { handlePointerDown: S, handleClick: V } = Di({\n nodeId: c,\n handleId: d,\n isValidConnection: e.isValidConnection,\n type: n\n }), p = J(() => Pe(e.connectable) && e.connectable === \"single\" ? !x.value.some((R) => {\n const $ = R[`${n.value}Handle`];\n return R[n.value] !== c ? !1 : $ ? $ === d.value : !0;\n }) : Ae(e.connectable) ? e.connectable(v, x.value) : ce(e.connectable) ? e.connectable : s.value), N = J(\n () => {\n var R, $, D, Q, ee, m;\n return ((R = o.value) == null ? void 0 : R.nodeId) === c && (($ = o.value) == null ? void 0 : $.handleId) === d.value && ((D = o.value) == null ? void 0 : D.type) === n.value || ((Q = r.value) == null ? void 0 : Q.nodeId) === c && ((ee = r.value) == null ? void 0 : ee.handleId) === d.value && ((m = r.value) == null ? void 0 : m.type) === n.value;\n }\n ), T = J(\n () => {\n var R, $, D;\n return ((R = i.value) == null ? void 0 : R.nodeId) === c && (($ = i.value) == null ? void 0 : $.handleId) === d.value && ((D = i.value) == null ? void 0 : D.type) === n.value;\n }\n );\n ye(() => v.initialized).toBe(!0, { flush: \"post\" }).then(() => {\n var E;\n const R = (E = v.handleBounds[n.value]) == null ? void 0 : E.find((G) => G.id === d.value);\n if (!a.value || R)\n return;\n const $ = a.value.querySelector(\".vue-flow__transformationpane\");\n if (!g || !h.value || !$ || !d.value)\n return;\n const D = g.value.getBoundingClientRect(), Q = h.value.getBoundingClientRect(), ee = window.getComputedStyle($), { m22: m } = new window.DOMMatrixReadOnly(ee.transform), A = {\n id: d.value,\n position: e.position,\n x: (Q.left - D.left) / m,\n y: (Q.top - D.top) / m,\n ...rn(h.value)\n };\n v.handleBounds[n.value] = [...v.handleBounds[n.value] ?? [], A];\n });\n function _(R) {\n const $ = ho(R);\n p.value && w.value && ($ && R.button === 0 || !$) && S(R);\n }\n function P(R) {\n !c || !i.value && !w.value || p.value && V(R);\n }\n return (R, $) => (oe(), se(\"div\", {\n ref_key: \"handle\",\n ref: h,\n \"data-id\": `${C(c)}-${C(d)}-${C(n)}`,\n \"data-handleid\": C(d),\n \"data-nodeid\": C(c),\n \"data-handlepos\": e.position,\n class: Ke([\"vue-flow__handle\", [\n `vue-flow__handle-${e.position}`,\n `vue-flow__handle-${C(d)}`,\n C(l),\n C(u),\n C(n),\n {\n connectable: C(p),\n connecting: C(T),\n connectablestart: C(w),\n connectableend: C(y),\n connectionindicator: C(p) && (C(w) && !C(N) || C(y) && C(N))\n }\n ]]),\n onMousedown: _,\n onTouchstartPassive: _,\n onClick: P\n }, [\n xe(R.$slots, \"default\", { id: e.id })\n ], 42, $a));\n }\n}), un = function({\n sourcePosition: e = j.Bottom,\n targetPosition: t = j.Top,\n label: n,\n connectable: o = !0,\n isValidTargetPos: i,\n isValidSourcePos: r\n}) {\n return [\n ue(Kt, { type: \"target\", position: t, connectable: o, isValidConnection: i }),\n typeof n != \"string\" && n ? ue(n) : ue(\"div\", { innerHTML: n }),\n ue(Kt, { type: \"source\", position: e, connectable: o, isValidConnection: r })\n ];\n};\nun.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\"];\nun.inheritAttrs = !1;\nun.compatConfig = { MODE: 3 };\nconst Oa = un, cn = function({\n sourcePosition: e = j.Bottom,\n label: t,\n connectable: n = !0,\n isValidSourcePos: o\n}) {\n return [\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t }),\n ue(Kt, { type: \"source\", position: e, connectable: n, isValidConnection: o })\n ];\n};\ncn.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\"];\ncn.inheritAttrs = !1;\ncn.compatConfig = { MODE: 3 };\nconst Ta = cn, dn = function({\n targetPosition: e = j.Top,\n label: t,\n connectable: n = !0,\n isValidTargetPos: o\n}) {\n return [\n ue(Kt, { type: \"target\", position: e, connectable: n, isValidConnection: o }),\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t })\n ];\n};\ndn.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\"];\ndn.inheritAttrs = !1;\ndn.compatConfig = { MODE: 3 };\nconst Ia = dn;\nfunction Ho(e, t, n) {\n let o = e;\n do {\n if (o && o.matches(t))\n return !0;\n if (o === n)\n return !1;\n o = o.parentElement;\n } while (o);\n return !1;\n}\nfunction Pa(e, t, n, o, i) {\n return e.filter(\n (r) => (r.selected || r.id === i) && (!r.parentNode || !Mi(r, o)) && (r.draggable || t && typeof r.draggable > \"u\")\n ).map(\n (r) => {\n var a, s;\n return it({\n id: r.id,\n position: r.position || { x: 0, y: 0 },\n distance: {\n x: n.x - ((a = r.computedPosition) == null ? void 0 : a.x) || 0,\n y: n.y - ((s = r.computedPosition) == null ? void 0 : s.y) || 0\n },\n from: r.computedPosition,\n extent: r.extent,\n parentNode: r.parentNode,\n dimensions: r.dimensions\n });\n }\n );\n}\nfunction Mn({\n id: e,\n dragItems: t,\n findNode: n\n}) {\n const o = t.reduce((i, r) => {\n const a = n(r.id);\n return a && i.push(a), i;\n }, []);\n return [e ? o.find((i) => i.id === e) : o[0], o];\n}\nfunction zi(e) {\n if (Array.isArray(e))\n switch (e.length) {\n case 1:\n return [e[0], e[0], e[0], e[0]];\n case 2:\n return [e[0], e[1], e[0], e[1]];\n case 3:\n return [e[0], e[1], e[2], e[1]];\n case 4:\n return e;\n default:\n return [0, 0, 0, 0];\n }\n return [e, e, e, e];\n}\nfunction Da(e, t, n) {\n const [o, i, r, a] = typeof e != \"string\" ? zi(e.padding) : [0, 0, 0, 0];\n return n && Ie(n.computedPosition.x) && Ie(n.computedPosition.y) && Ie(n.dimensions.width) && Ie(n.dimensions.height) ? [\n [n.computedPosition.x + a, n.computedPosition.y + o],\n [\n n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - i,\n n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - r\n ]\n ] : !1;\n}\nfunction za(e, t, n, o) {\n let i = e.extent || n;\n if (i === \"parent\" || !Array.isArray(i) && (i == null ? void 0 : i.range) === \"parent\")\n if (e.parentNode && o && e.dimensions.width && e.dimensions.height) {\n const r = Da(i, e, o);\n r && (i = r);\n } else\n t(new ve(he.NODE_EXTENT_INVALID, e.id)), i = n;\n else if (Array.isArray(i)) {\n const r = (o == null ? void 0 : o.computedPosition.x) || 0, a = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i[0][0] + r, i[0][1] + a],\n [i[1][0] + r, i[1][1] + a]\n ];\n } else if (i != null && i.range && Array.isArray(i.range)) {\n const [r, a, s, l] = zi(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i.range[0][0] + u + l, i.range[0][1] + c + r],\n [i.range[1][0] + u - a, i.range[1][1] + c - s]\n ];\n }\n return i;\n}\nfunction go(e, t, n, o, i) {\n const r = za(e, n, o, i), a = so(t, r);\n return {\n position: {\n x: a.x - ((i == null ? void 0 : i.computedPosition.x) || 0),\n y: a.y - ((i == null ? void 0 : i.computedPosition.y) || 0)\n },\n computedPosition: a\n };\n}\nfunction Ai() {\n const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: a, emits: s } = fe();\n return (l, u = !1) => {\n const c = r.value ? i.value[0] : 5, v = r.value ? i.value[1] : 5, g = u ? 4 : 1, x = l.x * c * g, h = l.y * v * g, d = e.value.filter((w) => w.draggable || a && typeof w.draggable > \"u\").map((w) => {\n const y = { x: w.computedPosition.x + x, y: w.computedPosition.y + h }, { computedPosition: S } = go(\n w,\n y,\n s.error,\n t.value,\n w.parentNode ? o(w.parentNode) : void 0\n );\n return {\n id: w.id,\n position: S,\n from: w.position,\n distance: { x: l.x, y: l.y },\n dimensions: w.dimensions\n };\n });\n n(d, !0, !1);\n };\n}\nfunction Aa() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n dragStart: X(),\n drag: X(),\n dragStop: X()\n };\n}\nfunction Ba(e, t) {\n const n = Aa();\n return n.doubleClick.on((o) => {\n var i, r;\n t.nodeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.nodeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.nodeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.nodeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.nodeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.nodeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.dragStart.on((o) => {\n var i, r;\n t.nodeDragStart(o), (r = (i = e.events) == null ? void 0 : i.dragStart) == null || r.call(i, o);\n }), n.drag.on((o) => {\n var i, r;\n t.nodeDrag(o), (r = (i = e.events) == null ? void 0 : i.drag) == null || r.call(i, o);\n }), n.dragStop.on((o) => {\n var i, r;\n t.nodeDragStop(o), (r = (i = e.events) == null ? void 0 : i.dragStop) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nfunction Ra() {\n const { viewport: e, snapGrid: t, snapToGrid: n } = fe();\n return ({ sourceEvent: o }) => {\n const i = o.touches ? o.touches[0].clientX : o.clientX, r = o.touches ? o.touches[0].clientY : o.clientY, a = {\n x: (i - e.value.x) / e.value.zoom,\n y: (r - e.value.y) / e.value.zoom\n };\n return {\n xSnapped: n.value ? t.value[0] * Math.round(a.x / t.value[0]) : a.x,\n ySnapped: n.value ? t.value[1] * Math.round(a.y / t.value[1]) : a.y,\n ...a\n };\n };\n}\nfunction Lo(e, t, n) {\n const o = t.querySelectorAll(`.vue-flow__handle${e}`);\n if (!o || !o.length)\n return;\n const i = Array.from(o), r = t.getBoundingClientRect();\n return i.map((a) => {\n const s = a.getBoundingClientRect();\n return {\n id: a.getAttribute(\"data-handleid\"),\n position: a.getAttribute(\"data-handlepos\"),\n x: (s.left - r.left) / n,\n y: (s.top - r.top) / n,\n ...rn(a)\n };\n });\n}\nfunction Xn(e, t, n, o, i, r = !1, a) {\n i.value = !1, e.selected ? (r || e.selected && t) && (o([e]), Ue(a.blur)) : n([e]);\n}\nvar Va = { value: () => {\n} };\nfunction fn() {\n for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) {\n if (!(o = arguments[e] + \"\") || o in n || /[\\s.]/.test(o))\n throw new Error(\"illegal type: \" + o);\n n[o] = [];\n }\n return new Ht(n);\n}\nfunction Ht(e) {\n this._ = e;\n}\nfunction Ha(e, t) {\n return e.trim().split(/^|\\s+/).map(function(n) {\n var o = \"\", i = n.indexOf(\".\");\n if (i >= 0 && (o = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n))\n throw new Error(\"unknown type: \" + n);\n return { type: n, name: o };\n });\n}\nHt.prototype = fn.prototype = {\n constructor: Ht,\n on: function(e, t) {\n var n = this._, o = Ha(e + \"\", n), i, r = -1, a = o.length;\n if (arguments.length < 2) {\n for (; ++r < a; )\n if ((i = (e = o[r]).type) && (i = La(n[i], e.name)))\n return i;\n return;\n }\n if (t != null && typeof t != \"function\")\n throw new Error(\"invalid callback: \" + t);\n for (; ++r < a; )\n if (i = (e = o[r]).type)\n n[i] = Go(n[i], e.name, t);\n else if (t == null)\n for (i in n)\n n[i] = Go(n[i], e.name, null);\n return this;\n },\n copy: function() {\n var e = {}, t = this._;\n for (var n in t)\n e[n] = t[n].slice();\n return new Ht(e);\n },\n call: function(e, t) {\n if ((i = arguments.length - 2) > 0)\n for (var n = new Array(i), o = 0, i, r; o < i; ++o)\n n[o] = arguments[o + 2];\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (r = this._[e], o = 0, i = r.length; o < i; ++o)\n r[o].value.apply(t, n);\n },\n apply: function(e, t, n) {\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (var o = this._[e], i = 0, r = o.length; i < r; ++i)\n o[i].value.apply(t, n);\n }\n};\nfunction La(e, t) {\n for (var n = 0, o = e.length, i; n < o; ++n)\n if ((i = e[n]).name === t)\n return i.value;\n}\nfunction Go(e, t, n) {\n for (var o = 0, i = e.length; o < i; ++o)\n if (e[o].name === t) {\n e[o] = Va, e = e.slice(0, o).concat(e.slice(o + 1));\n break;\n }\n return n != null && e.push({ name: t, value: n }), e;\n}\nvar Zn = \"http://www.w3.org/1999/xhtml\";\nconst Fo = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: Zn,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction hn(e) {\n var t = e += \"\", n = t.indexOf(\":\");\n return n >= 0 && (t = e.slice(0, n)) !== \"xmlns\" && (e = e.slice(n + 1)), Fo.hasOwnProperty(t) ? { space: Fo[t], local: e } : e;\n}\nfunction Ga(e) {\n return function() {\n var t = this.ownerDocument, n = this.namespaceURI;\n return n === Zn && t.documentElement.namespaceURI === Zn ? t.createElement(e) : t.createElementNS(n, e);\n };\n}\nfunction Fa(e) {\n return function() {\n return this.ownerDocument.createElementNS(e.space, e.local);\n };\n}\nfunction Bi(e) {\n var t = hn(e);\n return (t.local ? Fa : Ga)(t);\n}\nfunction Ya() {\n}\nfunction vo(e) {\n return e == null ? Ya : function() {\n return this.querySelector(e);\n };\n}\nfunction Xa(e) {\n typeof e != \"function\" && (e = vo(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = new Array(a), l, u, c = 0; c < a; ++c)\n (l = r[c]) && (u = e.call(l, l.__data__, c, r)) && (\"__data__\" in l && (u.__data__ = l.__data__), s[c] = u);\n return new _e(o, this._parents);\n}\nfunction Za(e) {\n return e == null ? [] : Array.isArray(e) ? e : Array.from(e);\n}\nfunction Ua() {\n return [];\n}\nfunction Ri(e) {\n return e == null ? Ua : function() {\n return this.querySelectorAll(e);\n };\n}\nfunction Wa(e) {\n return function() {\n return Za(e.apply(this, arguments));\n };\n}\nfunction Ka(e) {\n typeof e == \"function\" ? e = Wa(e) : e = Ri(e);\n for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)\n for (var a = t[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && (o.push(e.call(l, l.__data__, u, a)), i.push(l));\n return new _e(o, i);\n}\nfunction Vi(e) {\n return function() {\n return this.matches(e);\n };\n}\nfunction Hi(e) {\n return function(t) {\n return t.matches(e);\n };\n}\nvar qa = Array.prototype.find;\nfunction ja(e) {\n return function() {\n return qa.call(this.children, e);\n };\n}\nfunction Qa() {\n return this.firstElementChild;\n}\nfunction Ja(e) {\n return this.select(e == null ? Qa : ja(typeof e == \"function\" ? e : Hi(e)));\n}\nvar es = Array.prototype.filter;\nfunction ts() {\n return Array.from(this.children);\n}\nfunction ns(e) {\n return function() {\n return es.call(this.children, e);\n };\n}\nfunction os(e) {\n return this.selectAll(e == null ? ts : ns(typeof e == \"function\" ? e : Hi(e)));\n}\nfunction is(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new _e(o, this._parents);\n}\nfunction Li(e) {\n return new Array(e.length);\n}\nfunction rs() {\n return new _e(this._enter || this._groups.map(Li), this._parents);\n}\nfunction qt(e, t) {\n this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;\n}\nqt.prototype = {\n constructor: qt,\n appendChild: function(e) {\n return this._parent.insertBefore(e, this._next);\n },\n insertBefore: function(e, t) {\n return this._parent.insertBefore(e, t);\n },\n querySelector: function(e) {\n return this._parent.querySelector(e);\n },\n querySelectorAll: function(e) {\n return this._parent.querySelectorAll(e);\n }\n};\nfunction as(e) {\n return function() {\n return e;\n };\n}\nfunction ss(e, t, n, o, i, r) {\n for (var a = 0, s, l = t.length, u = r.length; a < u; ++a)\n (s = t[a]) ? (s.__data__ = r[a], o[a] = s) : n[a] = new qt(e, r[a]);\n for (; a < l; ++a)\n (s = t[a]) && (i[a] = s);\n}\nfunction ls(e, t, n, o, i, r, a) {\n var s, l, u = /* @__PURE__ */ new Map(), c = t.length, v = r.length, g = new Array(c), x;\n for (s = 0; s < c; ++s)\n (l = t[s]) && (g[s] = x = a.call(l, l.__data__, s, t) + \"\", u.has(x) ? i[s] = l : u.set(x, l));\n for (s = 0; s < v; ++s)\n x = a.call(e, r[s], s, r) + \"\", (l = u.get(x)) ? (o[s] = l, l.__data__ = r[s], u.delete(x)) : n[s] = new qt(e, r[s]);\n for (s = 0; s < c; ++s)\n (l = t[s]) && u.get(g[s]) === l && (i[s] = l);\n}\nfunction us(e) {\n return e.__data__;\n}\nfunction cs(e, t) {\n if (!arguments.length)\n return Array.from(this, us);\n var n = t ? ls : ss, o = this._parents, i = this._groups;\n typeof e != \"function\" && (e = as(e));\n for (var r = i.length, a = new Array(r), s = new Array(r), l = new Array(r), u = 0; u < r; ++u) {\n var c = o[u], v = i[u], g = v.length, x = ds(e.call(c, c && c.__data__, u, o)), h = x.length, d = s[u] = new Array(h), w = a[u] = new Array(h), y = l[u] = new Array(g);\n n(c, v, d, w, y, x, t);\n for (var S = 0, V = 0, p, N; S < h; ++S)\n if (p = d[S]) {\n for (S >= V && (V = S + 1); !(N = w[V]) && ++V < h; )\n ;\n p._next = N || null;\n }\n }\n return a = new _e(a, o), a._enter = s, a._exit = l, a;\n}\nfunction ds(e) {\n return typeof e == \"object\" && \"length\" in e ? e : Array.from(e);\n}\nfunction fs() {\n return new _e(this._exit || this._groups.map(Li), this._parents);\n}\nfunction hs(e, t, n) {\n var o = this.enter(), i = this, r = this.exit();\n return typeof e == \"function\" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + \"\"), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;\n}\nfunction gs(e) {\n for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, a = Math.min(i, r), s = new Array(i), l = 0; l < a; ++l)\n for (var u = n[l], c = o[l], v = u.length, g = s[l] = new Array(v), x, h = 0; h < v; ++h)\n (x = u[h] || c[h]) && (g[h] = x);\n for (; l < i; ++l)\n s[l] = n[l];\n return new _e(s, this._parents);\n}\nfunction vs() {\n for (var e = this._groups, t = -1, n = e.length; ++t < n; )\n for (var o = e[t], i = o.length - 1, r = o[i], a; --i >= 0; )\n (a = o[i]) && (r && a.compareDocumentPosition(r) ^ 4 && r.parentNode.insertBefore(a, r), r = a);\n return this;\n}\nfunction ms(e) {\n e || (e = ps);\n function t(v, g) {\n return v && g ? e(v.__data__, g.__data__) : !v - !g;\n }\n for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {\n for (var a = n[r], s = a.length, l = i[r] = new Array(s), u, c = 0; c < s; ++c)\n (u = a[c]) && (l[c] = u);\n l.sort(t);\n }\n return new _e(i, this._parents).order();\n}\nfunction ps(e, t) {\n return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;\n}\nfunction ys() {\n var e = arguments[0];\n return arguments[0] = this, e.apply(null, arguments), this;\n}\nfunction xs() {\n return Array.from(this);\n}\nfunction _s() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length; i < r; ++i) {\n var a = o[i];\n if (a)\n return a;\n }\n return null;\n}\nfunction ws() {\n let e = 0;\n for (const t of this)\n ++e;\n return e;\n}\nfunction bs() {\n return !this.node();\n}\nfunction Es(e) {\n for (var t = this._groups, n = 0, o = t.length; n < o; ++n)\n for (var i = t[n], r = 0, a = i.length, s; r < a; ++r)\n (s = i[r]) && e.call(s, s.__data__, r, i);\n return this;\n}\nfunction Ss(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ns(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction Cs(e, t) {\n return function() {\n this.setAttribute(e, t);\n };\n}\nfunction Ms(e, t) {\n return function() {\n this.setAttributeNS(e.space, e.local, t);\n };\n}\nfunction $s(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttribute(e) : this.setAttribute(e, n);\n };\n}\nfunction ks(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);\n };\n}\nfunction Os(e, t) {\n var n = hn(e);\n if (arguments.length < 2) {\n var o = this.node();\n return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n);\n }\n return this.each((t == null ? n.local ? Ns : Ss : typeof t == \"function\" ? n.local ? ks : $s : n.local ? Ms : Cs)(n, t));\n}\nfunction Gi(e) {\n return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;\n}\nfunction Ts(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction Is(e, t, n) {\n return function() {\n this.style.setProperty(e, t, n);\n };\n}\nfunction Ps(e, t, n) {\n return function() {\n var o = t.apply(this, arguments);\n o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n);\n };\n}\nfunction Ds(e, t, n) {\n return arguments.length > 1 ? this.each((t == null ? Ts : typeof t == \"function\" ? Ps : Is)(e, t, n ?? \"\")) : ft(this.node(), e);\n}\nfunction ft(e, t) {\n return e.style.getPropertyValue(t) || Gi(e).getComputedStyle(e, null).getPropertyValue(t);\n}\nfunction zs(e) {\n return function() {\n delete this[e];\n };\n}\nfunction As(e, t) {\n return function() {\n this[e] = t;\n };\n}\nfunction Bs(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? delete this[e] : this[e] = n;\n };\n}\nfunction Rs(e, t) {\n return arguments.length > 1 ? this.each((t == null ? zs : typeof t == \"function\" ? Bs : As)(e, t)) : this.node()[e];\n}\nfunction Fi(e) {\n return e.trim().split(/^|\\s+/);\n}\nfunction mo(e) {\n return e.classList || new Yi(e);\n}\nfunction Yi(e) {\n this._node = e, this._names = Fi(e.getAttribute(\"class\") || \"\");\n}\nYi.prototype = {\n add: function(e) {\n var t = this._names.indexOf(e);\n t < 0 && (this._names.push(e), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n remove: function(e) {\n var t = this._names.indexOf(e);\n t >= 0 && (this._names.splice(t, 1), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n contains: function(e) {\n return this._names.indexOf(e) >= 0;\n }\n};\nfunction Xi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.add(t[o]);\n}\nfunction Zi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.remove(t[o]);\n}\nfunction Vs(e) {\n return function() {\n Xi(this, e);\n };\n}\nfunction Hs(e) {\n return function() {\n Zi(this, e);\n };\n}\nfunction Ls(e, t) {\n return function() {\n (t.apply(this, arguments) ? Xi : Zi)(this, e);\n };\n}\nfunction Gs(e, t) {\n var n = Fi(e + \"\");\n if (arguments.length < 2) {\n for (var o = mo(this.node()), i = -1, r = n.length; ++i < r; )\n if (!o.contains(n[i]))\n return !1;\n return !0;\n }\n return this.each((typeof t == \"function\" ? Ls : t ? Vs : Hs)(n, t));\n}\nfunction Fs() {\n this.textContent = \"\";\n}\nfunction Ys(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Xs(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.textContent = t ?? \"\";\n };\n}\nfunction Zs(e) {\n return arguments.length ? this.each(e == null ? Fs : (typeof e == \"function\" ? Xs : Ys)(e)) : this.node().textContent;\n}\nfunction Us() {\n this.innerHTML = \"\";\n}\nfunction Ws(e) {\n return function() {\n this.innerHTML = e;\n };\n}\nfunction Ks(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.innerHTML = t ?? \"\";\n };\n}\nfunction qs(e) {\n return arguments.length ? this.each(e == null ? Us : (typeof e == \"function\" ? Ks : Ws)(e)) : this.node().innerHTML;\n}\nfunction js() {\n this.nextSibling && this.parentNode.appendChild(this);\n}\nfunction Qs() {\n return this.each(js);\n}\nfunction Js() {\n this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction el() {\n return this.each(Js);\n}\nfunction tl(e) {\n var t = typeof e == \"function\" ? e : Bi(e);\n return this.select(function() {\n return this.appendChild(t.apply(this, arguments));\n });\n}\nfunction nl() {\n return null;\n}\nfunction ol(e, t) {\n var n = typeof e == \"function\" ? e : Bi(e), o = t == null ? nl : typeof t == \"function\" ? t : vo(t);\n return this.select(function() {\n return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);\n });\n}\nfunction il() {\n var e = this.parentNode;\n e && e.removeChild(this);\n}\nfunction rl() {\n return this.each(il);\n}\nfunction al() {\n var e = this.cloneNode(!1), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction sl() {\n var e = this.cloneNode(!0), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction ll(e) {\n return this.select(e ? sl : al);\n}\nfunction ul(e) {\n return arguments.length ? this.property(\"__data__\", e) : this.node().__data__;\n}\nfunction cl(e) {\n return function(t) {\n e.call(this, t, this.__data__);\n };\n}\nfunction dl(e) {\n return e.trim().split(/^|\\s+/).map(function(t) {\n var n = \"\", o = t.indexOf(\".\");\n return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };\n });\n}\nfunction fl(e) {\n return function() {\n var t = this.__on;\n if (t) {\n for (var n = 0, o = -1, i = t.length, r; n < i; ++n)\n r = t[n], (!e.type || r.type === e.type) && r.name === e.name ? this.removeEventListener(r.type, r.listener, r.options) : t[++o] = r;\n ++o ? t.length = o : delete this.__on;\n }\n };\n}\nfunction hl(e, t, n) {\n return function() {\n var o = this.__on, i, r = cl(t);\n if (o) {\n for (var a = 0, s = o.length; a < s; ++a)\n if ((i = o[a]).type === e.type && i.name === e.name) {\n this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;\n return;\n }\n }\n this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];\n };\n}\nfunction gl(e, t, n) {\n var o = dl(e + \"\"), i, r = o.length, a;\n if (arguments.length < 2) {\n var s = this.node().__on;\n if (s) {\n for (var l = 0, u = s.length, c; l < u; ++l)\n for (i = 0, c = s[l]; i < r; ++i)\n if ((a = o[i]).type === c.type && a.name === c.name)\n return c.value;\n }\n return;\n }\n for (s = t ? hl : fl, i = 0; i < r; ++i)\n this.each(s(o[i], t, n));\n return this;\n}\nfunction Ui(e, t, n) {\n var o = Gi(e), i = o.CustomEvent;\n typeof i == \"function\" ? i = new i(t, n) : (i = o.document.createEvent(\"Event\"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);\n}\nfunction vl(e, t) {\n return function() {\n return Ui(this, e, t);\n };\n}\nfunction ml(e, t) {\n return function() {\n return Ui(this, e, t.apply(this, arguments));\n };\n}\nfunction pl(e, t) {\n return this.each((typeof t == \"function\" ? ml : vl)(e, t));\n}\nfunction* yl() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length, a; i < r; ++i)\n (a = o[i]) && (yield a);\n}\nvar Wi = [null];\nfunction _e(e, t) {\n this._groups = e, this._parents = t;\n}\nfunction $t() {\n return new _e([[document.documentElement]], Wi);\n}\nfunction xl() {\n return this;\n}\n_e.prototype = $t.prototype = {\n constructor: _e,\n select: Xa,\n selectAll: Ka,\n selectChild: Ja,\n selectChildren: os,\n filter: is,\n data: cs,\n enter: rs,\n exit: fs,\n join: hs,\n merge: gs,\n selection: xl,\n order: vs,\n sort: ms,\n call: ys,\n nodes: xs,\n node: _s,\n size: ws,\n empty: bs,\n each: Es,\n attr: Os,\n style: Ds,\n property: Rs,\n classed: Gs,\n text: Zs,\n html: qs,\n raise: Qs,\n lower: el,\n append: tl,\n insert: ol,\n remove: rl,\n clone: ll,\n datum: ul,\n on: gl,\n dispatch: pl,\n [Symbol.iterator]: yl\n};\nfunction we(e) {\n return typeof e == \"string\" ? new _e([[document.querySelector(e)]], [document.documentElement]) : new _e([[e]], Wi);\n}\nfunction _l(e) {\n let t;\n for (; t = e.sourceEvent; )\n e = t;\n return e;\n}\nfunction Ne(e, t) {\n if (e = _l(e), t === void 0 && (t = e.currentTarget), t) {\n var n = t.ownerSVGElement || t;\n if (n.createSVGPoint) {\n var o = n.createSVGPoint();\n return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y];\n }\n if (t.getBoundingClientRect) {\n var i = t.getBoundingClientRect();\n return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];\n }\n }\n return [e.pageX, e.pageY];\n}\nconst wl = { passive: !1 }, bt = { capture: !0, passive: !1 };\nfunction $n(e) {\n e.stopImmediatePropagation();\n}\nfunction at(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Ki(e) {\n var t = e.document.documentElement, n = we(e).on(\"dragstart.drag\", at, bt);\n \"onselectstart\" in t ? n.on(\"selectstart.drag\", at, bt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = \"none\");\n}\nfunction qi(e, t) {\n var n = e.document.documentElement, o = we(e).on(\"dragstart.drag\", null);\n t && (o.on(\"click.drag\", at, bt), setTimeout(function() {\n o.on(\"click.drag\", null);\n }, 0)), \"onselectstart\" in n ? o.on(\"selectstart.drag\", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);\n}\nconst Pt = (e) => () => e;\nfunction Un(e, {\n sourceEvent: t,\n subject: n,\n target: o,\n identifier: i,\n active: r,\n x: a,\n y: s,\n dx: l,\n dy: u,\n dispatch: c\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n subject: { value: n, enumerable: !0, configurable: !0 },\n target: { value: o, enumerable: !0, configurable: !0 },\n identifier: { value: i, enumerable: !0, configurable: !0 },\n active: { value: r, enumerable: !0, configurable: !0 },\n x: { value: a, enumerable: !0, configurable: !0 },\n y: { value: s, enumerable: !0, configurable: !0 },\n dx: { value: l, enumerable: !0, configurable: !0 },\n dy: { value: u, enumerable: !0, configurable: !0 },\n _: { value: c }\n });\n}\nUn.prototype.on = function() {\n var e = this._.on.apply(this._, arguments);\n return e === this._ ? this : e;\n};\nfunction bl(e) {\n return !e.ctrlKey && !e.button;\n}\nfunction El() {\n return this.parentNode;\n}\nfunction Sl(e, t) {\n return t ?? { x: e.x, y: e.y };\n}\nfunction Nl() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Cl() {\n var e = bl, t = El, n = Sl, o = Nl, i = {}, r = fn(\"start\", \"drag\", \"end\"), a = 0, s, l, u, c, v = 0;\n function g(p) {\n p.on(\"mousedown.drag\", x).filter(o).on(\"touchstart.drag\", w).on(\"touchmove.drag\", y, wl).on(\"touchend.drag touchcancel.drag\", S).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function x(p, N) {\n if (!(c || !e.call(this, p, N))) {\n var T = V(this, t.call(this, p, N), p, N, \"mouse\");\n T && (we(p.view).on(\"mousemove.drag\", h, bt).on(\"mouseup.drag\", d, bt), Ki(p.view), $n(p), u = !1, s = p.clientX, l = p.clientY, T(\"start\", p));\n }\n }\n function h(p) {\n if (at(p), !u) {\n var N = p.clientX - s, T = p.clientY - l;\n u = N * N + T * T > v;\n }\n i.mouse(\"drag\", p);\n }\n function d(p) {\n we(p.view).on(\"mousemove.drag mouseup.drag\", null), qi(p.view, u), at(p), i.mouse(\"end\", p);\n }\n function w(p, N) {\n if (e.call(this, p, N)) {\n var T = p.changedTouches, _ = t.call(this, p, N), P = T.length, R, $;\n for (R = 0; R < P; ++R)\n ($ = V(this, _, p, N, T[R].identifier, T[R])) && ($n(p), $(\"start\", p, T[R]));\n }\n }\n function y(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (_ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && (at(p), P(\"drag\", p, N[_]));\n }\n function S(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (c && clearTimeout(c), c = setTimeout(function() {\n c = null;\n }, 500), _ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && ($n(p), P(\"end\", p, N[_]));\n }\n function V(p, N, T, _, P, R) {\n var $ = r.copy(), D = Ne(R || T, N), Q, ee, m;\n if ((m = n.call(p, new Un(\"beforestart\", {\n sourceEvent: T,\n target: g,\n identifier: P,\n active: a,\n x: D[0],\n y: D[1],\n dx: 0,\n dy: 0,\n dispatch: $\n }), _)) != null)\n return Q = m.x - D[0] || 0, ee = m.y - D[1] || 0, function A(E, G, Z) {\n var K = D, z;\n switch (E) {\n case \"start\":\n i[P] = A, z = a++;\n break;\n case \"end\":\n delete i[P], --a;\n case \"drag\":\n D = Ne(Z || G, N), z = a;\n break;\n }\n $.call(\n E,\n p,\n new Un(E, {\n sourceEvent: G,\n subject: m,\n target: g,\n identifier: P,\n active: z,\n x: D[0] + Q,\n y: D[1] + ee,\n dx: D[0] - K[0],\n dy: D[1] - K[1],\n dispatch: $\n }),\n _\n );\n };\n }\n return g.filter = function(p) {\n return arguments.length ? (e = typeof p == \"function\" ? p : Pt(!!p), g) : e;\n }, g.container = function(p) {\n return arguments.length ? (t = typeof p == \"function\" ? p : Pt(p), g) : t;\n }, g.subject = function(p) {\n return arguments.length ? (n = typeof p == \"function\" ? p : Pt(p), g) : n;\n }, g.touchable = function(p) {\n return arguments.length ? (o = typeof p == \"function\" ? p : Pt(!!p), g) : o;\n }, g.on = function() {\n var p = r.on.apply(r, arguments);\n return p === r ? g : p;\n }, g.clickDistance = function(p) {\n return arguments.length ? (v = (p = +p) * p, g) : Math.sqrt(v);\n }, g;\n}\nfunction ji(e) {\n const t = fe(), n = M(t, \"vueFlowRef\"), o = M(t, \"snapToGrid\"), i = M(t, \"snapGrid\"), r = M(t, \"noDragClassName\"), a = M(t, \"nodes\"), s = M(t, \"nodeExtent\"), l = M(t, \"viewport\"), u = M(t, \"autoPanOnNodeDrag\"), c = M(t, \"nodesDraggable\"), v = M(t, \"panBy\"), g = M(t, \"findNode\"), x = M(t, \"multiSelectionActive\"), h = M(t, \"nodesSelectionActive\"), d = M(t, \"selectNodesOnDrag\"), w = M(t, \"removeSelectedElements\"), y = M(t, \"addSelectedNodes\"), S = M(t, \"updateNodePositions\"), V = M(t, \"emits\"), { onStart: p, onDrag: N, onStop: T, el: _, disabled: P, id: R, selectable: $ } = e, D = ie(!1);\n let Q = ie([]), ee = ie(), m = ie(null), A = ie({ x: void 0, y: void 0 }), E = ie({ x: 0, y: 0 }), G = ie(null), Z = ie(0), K = ie(!1);\n const z = Ra(), W = ({ x: q, y: te }) => {\n A.value = { x: q, y: te };\n let re = !1;\n if (Q.value = Q.value.map((k) => {\n const H = { x: q - k.distance.x, y: te - k.distance.y };\n o.value && (H.x = i.value[0] * Math.round(H.x / i.value[0]), H.y = i.value[1] * Math.round(H.y / i.value[1]));\n const { computedPosition: f } = go(\n k,\n H,\n V.value.error,\n s.value,\n k.parentNode ? g.value(k.parentNode) : void 0\n );\n return re = re || k.position.x !== f.x || k.position.y !== f.y, k.position = f, k;\n }), !!re && (S.value(Q.value, !0, !0), D.value = !0, G.value)) {\n const [k, H] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n N({ event: G.value, node: k, nodes: H });\n }\n }, B = () => {\n if (!m.value)\n return;\n const [q, te] = Pi(E.value, m.value);\n if (q !== 0 || te !== 0) {\n const re = {\n x: (A.value.x ?? 0) - q / l.value.zoom,\n y: (A.value.y ?? 0) - te / l.value.zoom\n };\n v.value({ x: q, y: te }) && W(re);\n }\n Z.value = requestAnimationFrame(B);\n };\n return de([() => le(P), _], ([q, te]) => {\n if (te) {\n const re = we(te);\n if (q)\n re.on(\".drag\", null);\n else {\n const k = g.value(R);\n ee.value = Cl().on(\"start\", (H) => {\n var b;\n !d.value && !x.value && k && (k.selected || w.value()), k && le($) && d.value && Xn(\n k,\n x.value,\n y.value,\n w.value,\n h,\n !1,\n te\n );\n const f = z(H);\n if (A.value = f, Q.value = Pa(a.value, c.value, f, g.value, R), Q.value.length) {\n const [L, I] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n p({ event: H.sourceEvent, node: L, nodes: I });\n }\n m.value = ((b = n.value) == null ? void 0 : b.getBoundingClientRect()) || null, E.value = rt(H.sourceEvent, m.value);\n }).on(\"drag\", (H) => {\n const f = z(H);\n !K.value && u.value && (K.value = !0, B()), (A.value.x !== f.xSnapped || A.value.y !== f.ySnapped) && Q.value.length && (G.value = H.sourceEvent, E.value = rt(H.sourceEvent, m.value), W(f));\n }).on(\"end\", (H) => {\n if (D.value = !1, K.value = !1, cancelAnimationFrame(Z.value), Q.value.length) {\n S.value(Q.value, !1, !1);\n const [f, b] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n T({ event: H.sourceEvent, node: f, nodes: b });\n }\n }).filter((H) => {\n const f = H.target;\n return !H.button && (!r.value || !Ho(f, `.${r.value}`, te) && (!(k != null && k.dragHandle) || Ho(f, k.dragHandle, te)));\n }), re.call(ee.value);\n }\n }\n }), D;\n}\nconst Qi = \"vue-flow__node-desc\", Ji = \"vue-flow__edge-desc\", Ml = \"vue-flow__aria-live\", er = [\"Enter\", \" \", \"Escape\"], st = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction Wn(e) {\n var i, r;\n const t = ((r = (i = e.composedPath) == null ? void 0 : i.call(e)) == null ? void 0 : r[0]) || e.target, n = Ae(t.hasAttribute) ? t.hasAttribute(\"contenteditable\") : !1, o = Ae(t.closest) ? t.closest(\".nokey\") : null;\n return [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(t == null ? void 0 : t.nodeName) || n || !!o;\n}\nfunction $l(e) {\n return e.ctrlKey || e.metaKey || e.shiftKey;\n}\nfunction kl(e, t) {\n return (n) => e.some((o) => {\n const i = o.split(\"+\").map((r) => r.trim().toLowerCase());\n return i.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), i.every((r) => t.has(r)));\n });\n}\nconst _t = (e, t) => {\n const n = ao(), o = ie(le(e) === !0), i = ie(!1), r = ie(/* @__PURE__ */ new Set());\n return de(o, () => {\n t == null || t(o.value);\n }), de(\n () => le(e),\n (a) => {\n if (n && typeof n.addEventListener < \"u\" && ro(n, \"blur\", () => {\n o.value = !1;\n }), zr(a)) {\n o.value = a;\n return;\n }\n Array.isArray(a) && (a = kl(a, r.value)), a && (Mo(\n a,\n (s) => {\n i.value = $l(s), !(!i.value && Wn(s)) && (s.preventDefault(), o.value = !0);\n },\n { eventName: \"keydown\" }\n ), Mo(\n a,\n (s) => {\n if (o.value) {\n if (!i.value && Wn(s))\n return;\n i.value = !1, r.value.clear(), o.value = !1;\n }\n },\n { eventName: \"keyup\" }\n ));\n },\n {\n immediate: !0\n }\n ), o;\n}, Ol = ge({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"draggable\", \"selectable\", \"focusable\", \"connectable\", \"node\", \"resizeObserver\"],\n setup(e) {\n ut($i, e.id);\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"noPanClassName\"), r = M(t, \"selectNodesOnDrag\"), a = M(t, \"nodesSelectionActive\"), s = M(t, \"multiSelectionActive\"), l = M(t, \"emits\"), u = M(t, \"findNode\"), c = M(t, \"removeSelectedNodes\"), v = M(t, \"addSelectedNodes\"), g = M(t, \"updateNodeDimensions\"), x = M(t, \"onUpdateNodeInternals\"), h = M(t, \"getIntersectingNodes\"), d = M(t, \"getNodeTypes\"), w = M(t, \"nodeExtent\"), y = M(t, \"elevateNodesOnSelect\"), S = M(t, \"disableKeyboardA11y\"), V = M(t, \"ariaLiveMessage\"), p = M(t, \"snapToGrid\"), N = M(t, \"snapGrid\"), T = Ai(), _ = yt(e, \"node\"), P = J(() => u.value(_.value.parentNode)), R = J(() => sn([_.value], o.value)), $ = ie();\n ut(ki, $);\n const { emit: D, on: Q } = Ba(_.value, l.value), ee = ji({\n id: e.id,\n el: $,\n disabled: () => !e.draggable,\n selectable: () => e.selectable,\n onStart(k) {\n D.dragStart({ ...k, intersections: h.value(_.value) });\n },\n onDrag(k) {\n D.drag({ ...k, intersections: h.value(_.value) });\n },\n onStop(k) {\n D.dragStop({ ...k, intersections: h.value(_.value) });\n }\n }), m = J(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = J(() => {\n const k = (_.value.style instanceof Function ? _.value.style(_.value) : _.value.style) || {}, H = _.value.width instanceof Function ? _.value.width(_.value) : _.value.width, f = _.value.height instanceof Function ? _.value.height(_.value) : _.value.height;\n return H && (k.width = typeof H == \"string\" ? H : `${H}px`), f && (k.height = typeof f == \"string\" ? f : `${f}px`), k;\n }), E = () => Number(_.value.zIndex ?? A.value.zIndex ?? 0);\n return x.value((k) => {\n k.includes(e.id) && Z();\n }), Ve(() => {\n e.resizeObserver.observe($.value);\n }), gi(() => {\n e.resizeObserver.unobserve($.value);\n }), de(\n [() => _.value.type, () => _.value.sourcePosition, () => _.value.targetPosition],\n () => {\n g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n },\n { flush: \"pre\" }\n ), de(\n [\n () => _.value.position.x,\n () => _.value.position.y,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.x;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.y;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.z;\n },\n () => E(),\n () => _.value.selected,\n () => _.value.dimensions.height,\n () => _.value.dimensions.width,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.height;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.width;\n }\n ],\n ([k, H, f, b, L, I]) => {\n const F = {\n x: k,\n y: H,\n z: I + (y.value && _.value.selected ? 1e3 : 0)\n };\n Ie(f) && Ie(b) ? _.value.computedPosition = ma({ x: f, y: b, z: L }, F) : _.value.computedPosition = F;\n },\n { flush: \"pre\", immediate: !0 }\n ), de([() => _.value.extent, () => w.value], ([k, H], [f, b]) => {\n (k !== f || H !== b) && G();\n }), _.value.extent === \"parent\" || typeof _.value.extent == \"object\" && \"range\" in _.value.extent && _.value.extent.range === \"parent\" ? ye(() => _.value.initialized).toBe(!0).then(G) : G(), () => ue(\n \"div\",\n {\n ref: $,\n \"data-id\": _.value.id,\n class: [\n \"vue-flow__node\",\n `vue-flow__node-${e.type === !1 ? \"default\" : e.name}`,\n {\n [i.value]: e.draggable,\n dragging: ee == null ? void 0 : ee.value,\n selected: _.value.selected,\n selectable: e.selectable\n },\n m.value\n ],\n style: {\n zIndex: _.value.computedPosition.z ?? E(),\n transform: `translate(${_.value.computedPosition.x}px,${_.value.computedPosition.y}px)`,\n pointerEvents: e.selectable || e.draggable ? \"all\" : \"none\",\n visibility: _.value.initialized ? \"visible\" : \"hidden\",\n ...A.value\n },\n tabIndex: e.focusable ? 0 : void 0,\n role: e.focusable ? \"button\" : void 0,\n \"aria-describedby\": S.value ? void 0 : `${Qi}-${n.value}`,\n \"aria-label\": _.value.ariaLabel,\n onMouseenter: K,\n onMousemove: z,\n onMouseleave: W,\n onContextmenu: B,\n onClick: te,\n onDblclick: q,\n onKeydown: re\n },\n [\n ue(e.type === !1 ? d.value.default : e.type, {\n id: _.value.id,\n type: _.value.type,\n data: _.value.data,\n events: { ..._.value.events, ...Q },\n selected: !!_.value.selected,\n resizing: !!_.value.resizing,\n dragging: ee.value,\n connectable: e.connectable,\n position: _.value.position,\n dimensions: _.value.dimensions,\n isValidTargetPos: _.value.isValidTargetPos,\n isValidSourcePos: _.value.isValidSourcePos,\n parent: _.value.parentNode,\n zIndex: _.value.computedPosition.z,\n targetPosition: _.value.targetPosition,\n sourcePosition: _.value.sourcePosition,\n label: _.value.label,\n dragHandle: _.value.dragHandle,\n onUpdateNodeInternals: Z\n })\n ]\n );\n function G() {\n const k = _.value.computedPosition;\n p.value && (k.x = N.value[0] * Math.round(k.x / N.value[0]), k.y = N.value[1] * Math.round(k.y / N.value[1]));\n const { computedPosition: H, position: f } = go(_.value, k, l.value.error, w.value, P.value);\n (_.value.computedPosition.x !== H.x || _.value.computedPosition.y !== H.y) && (_.value.computedPosition = { ..._.value.computedPosition, ...H }), (_.value.position.x !== f.x || _.value.position.y !== f.y) && (_.value.position = f);\n }\n function Z() {\n $.value && g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n }\n function K(k) {\n ee != null && ee.value || D.mouseEnter({ event: k, node: _.value, connectedEdges: R.value });\n }\n function z(k) {\n ee != null && ee.value || D.mouseMove({ event: k, node: _.value, connectedEdges: R.value });\n }\n function W(k) {\n ee != null && ee.value || D.mouseLeave({ event: k, node: _.value, connectedEdges: R.value });\n }\n function B(k) {\n return D.contextMenu({ event: k, node: _.value, connectedEdges: R.value });\n }\n function q(k) {\n return D.doubleClick({ event: k, node: _.value, connectedEdges: R.value });\n }\n function te(k) {\n e.selectable && (!r.value || !e.draggable) && Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n !1,\n $.value\n ), D.click({ event: k, node: _.value, connectedEdges: R.value });\n }\n function re(k) {\n var H;\n if (!Wn(k))\n if (er.includes(k.key) && e.selectable) {\n const f = k.key === \"Escape\";\n f && ((H = $.value) == null || H.blur()), Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n f,\n $.value\n );\n } else\n !S.value && e.draggable && _.value.selected && st[k.key] && (V.value = `Moved selected node ${k.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~_.value.position.x}, y: ${~~_.value.position.y}`, T(\n {\n x: st[k.key].x,\n y: st[k.key].y\n },\n k.shiftKey\n ));\n }\n }\n}), Tl = Ol, Il = [\"transform\"], Pl = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"], Dl = [\"y\"], zl = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n}, Al = /* @__PURE__ */ ge({\n ...zl,\n props: {\n x: null,\n y: null,\n label: null,\n labelStyle: { default: {} },\n labelShowBg: { type: Boolean, default: !0 },\n labelBgStyle: { default: {} },\n labelBgPadding: { default: [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(e) {\n let t = ie({ x: 0, y: 0, width: 0, height: 0 });\n const n = ie(null), o = J(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`);\n Ve(i), de([() => e.x, () => e.y, n, () => e.label], i);\n function i() {\n if (!n.value)\n return;\n const r = n.value.getBBox();\n (r.width !== t.value.width || r.height !== t.value.height) && (t.value = r);\n }\n return (r, a) => (oe(), se(\"g\", {\n transform: C(o),\n class: \"vue-flow__edge-textwrapper\"\n }, [\n e.labelShowBg ? (oe(), se(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${C(t).width + 2 * e.labelBgPadding[0]}px`,\n height: `${C(t).height + 2 * e.labelBgPadding[1]}px`,\n x: -e.labelBgPadding[0],\n y: -e.labelBgPadding[1],\n style: Le(e.labelBgStyle),\n rx: e.labelBgBorderRadius,\n ry: e.labelBgBorderRadius\n }, null, 12, Pl)) : Ee(\"\", !0),\n ct(\"text\", vi(r.$attrs, {\n ref_key: \"el\",\n ref: n,\n class: \"vue-flow__edge-text\",\n y: C(t).height / 2,\n dy: \"0.3em\",\n style: e.labelStyle\n }), [\n xe(r.$slots, \"default\", {}, () => [\n C(Pe)(e.label) ? (oe(), se(Ce, { key: 1 }, [\n Cr(Vn(e.label), 1)\n ], 64)) : (oe(), ze(mi(e.label), { key: 0 }))\n ])\n ], 16, Dl)\n ], 8, Il));\n }\n}), gn = function({\n path: e,\n label: t,\n labelX: n,\n labelY: o,\n labelBgBorderRadius: i,\n labelBgPadding: r,\n labelBgStyle: a,\n labelShowBg: s = !0,\n labelStyle: l,\n markerStart: u,\n markerEnd: c,\n interactionWidth: v = 20\n}, { attrs: g }) {\n return [\n ue(\"path\", {\n style: g.style,\n class: [\"vue-flow__edge-path\", g.class].join(\" \"),\n d: e,\n \"marker-end\": c,\n \"marker-start\": u\n }),\n v ? ue(\"path\", {\n d: e,\n fill: \"none\",\n \"stroke-opacity\": 0,\n \"stroke-width\": v\n }) : null,\n t && Ie(n) && Ie(o) ? ue(Al, {\n x: n,\n y: o,\n label: t,\n labelStyle: l,\n labelShowBg: s,\n labelBgStyle: a,\n labelBgPadding: r,\n labelBgBorderRadius: i\n }) : null\n ];\n};\ngn.props = [\n \"path\",\n \"labelX\",\n \"labelY\",\n \"label\",\n \"labelBgBorderRadius\",\n \"labelBgPadding\",\n \"labelBgStyle\",\n \"labelShowBg\",\n \"labelStyle\",\n \"markerStart\",\n \"markerEnd\",\n \"interactionWidth\"\n];\ngn.inheritAttrs = !1;\ngn.compatConfig = { MODE: 3 };\nconst vn = gn;\nfunction tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, a = Math.abs(o - t) / 2, s = o < t ? o + a : o - a;\n return [r, s, i, a];\n}\nfunction nr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o,\n sourceControlX: i,\n sourceControlY: r,\n targetControlX: a,\n targetControlY: s\n}) {\n const l = e * 0.125 + i * 0.375 + a * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(l - e), v = Math.abs(u - t);\n return [l, u, c, v];\n}\nfunction Dt(e, t) {\n return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);\n}\nfunction Yo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {\n let a, s;\n switch (e) {\n case j.Left:\n a = t - Dt(t - o, r), s = n;\n break;\n case j.Right:\n a = t + Dt(o - t, r), s = n;\n break;\n case j.Top:\n a = t, s = n - Dt(n - i, r);\n break;\n case j.Bottom:\n a = t, s = n + Dt(i - n, r);\n break;\n }\n return [a, s];\n}\nfunction Kn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n curvature: a = 0.25\n}) {\n const [s, l] = Yo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i,\n c: a\n }), [u, c] = Yo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t,\n c: a\n }), [v, g, x, h] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: s,\n sourceControlY: l,\n targetControlX: u,\n targetControlY: c\n });\n return [\n `M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,\n v,\n g,\n x,\n h\n ];\n}\nconst mn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = Kn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nmn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nmn.inheritAttrs = !1;\nmn.compatConfig = { MODE: 3 };\nconst Bl = mn;\nfunction Xo({ pos: e, x1: t, y1: n, x2: o, y2: i }) {\n let r, a;\n switch (e) {\n case j.Left:\n case j.Right:\n r = 0.5 * (t + o), a = n;\n break;\n case j.Top:\n case j.Bottom:\n r = t, a = 0.5 * (n + i);\n break;\n }\n return [r, a];\n}\nfunction or({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top\n}) {\n const [a, s] = Xo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i\n }), [l, u] = Xo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t\n }), [c, v, g, x] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: a,\n sourceControlY: s,\n targetControlX: l,\n targetControlY: u\n });\n return [\n `M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,\n c,\n v,\n g,\n x\n ];\n}\nconst pn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = or({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\npn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\npn.inheritAttrs = !1;\npn.compatConfig = { MODE: 3 };\nconst Rl = pn, Zo = {\n [j.Left]: { x: -1, y: 0 },\n [j.Right]: { x: 1, y: 0 },\n [j.Top]: { x: 0, y: -1 },\n [j.Bottom]: { x: 0, y: 1 }\n};\nfunction Vl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n\n}) {\n return t === j.Left || t === j.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction Uo(e, t) {\n return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);\n}\nfunction Hl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n,\n targetPosition: o = j.Top,\n center: i,\n offset: r\n}) {\n const a = Zo[t], s = Zo[o], l = { x: e.x + a.x * r, y: e.y + a.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Vl({\n source: l,\n sourcePosition: t,\n target: u\n }), v = c.x !== 0 ? \"x\" : \"y\", g = c[v];\n let x, h, d;\n const [w, y, S, V] = tr({\n sourceX: e.x,\n sourceY: e.y,\n targetX: n.x,\n targetY: n.y\n });\n if (a[v] * s[v] === -1) {\n h = i.x || w, d = i.y || y;\n const N = [\n { x: h, y: l.y },\n { x: h, y: u.y }\n ], T = [\n { x: l.x, y: d },\n { x: u.x, y: d }\n ];\n a[v] === g ? x = v === \"x\" ? N : T : x = v === \"x\" ? T : N;\n } else {\n const N = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];\n if (v === \"x\" ? x = a.x === g ? T : N : x = a.y === g ? N : T, t !== o) {\n const _ = v === \"x\" ? \"y\" : \"x\", P = a[v] === s[_], R = l[_] > u[_], $ = l[_] < u[_];\n (a[v] === 1 && (!P && R || P && $) || a[v] !== 1 && (!P && $ || P && R)) && (x = v === \"x\" ? N : T);\n }\n h = x[0].x, d = x[0].y;\n }\n return [[e, l, ...x, u, n], h, d, S, V];\n}\nfunction Ll(e, t, n, o) {\n const i = Math.min(Uo(e, t) / 2, Uo(t, n) / 2, o), { x: r, y: a } = t;\n if (e.x === r && r === n.x || e.y === a && a === n.y)\n return `L${r} ${a}`;\n if (e.y === a) {\n const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;\n return `L ${r + i * u},${a}Q ${r},${a} ${r},${a + i * c}`;\n }\n const s = e.x < n.x ? 1 : -1, l = e.y < n.y ? -1 : 1;\n return `L ${r},${a + i * l}Q ${r},${a} ${r + i * s},${a}`;\n}\nfunction qn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n borderRadius: a = 5,\n centerX: s,\n centerY: l,\n offset: u = 20\n}) {\n const [c, v, g, x, h] = Hl({\n source: { x: e, y: t },\n sourcePosition: n,\n target: { x: o, y: i },\n targetPosition: r,\n center: { x: s, y: l },\n offset: u\n });\n return [c.reduce((w, y, S) => {\n let V;\n return S > 0 && S < c.length - 1 ? V = Ll(c[S - 1], y, c[S + 1], a) : V = `${S === 0 ? \"M\" : \"L\"}${y.x} ${y.y}`, w += V, w;\n }, \"\"), v, g, x, h];\n}\nconst yn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = qn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nyn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n];\nyn.inheritAttrs = !1;\nyn.compatConfig = { MODE: 3 };\nconst ir = yn, xn = function(e, { attrs: t }) {\n return ue(ir, { ...e, ...t, borderRadius: 0 });\n};\nxn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nxn.inheritAttrs = !1;\nxn.compatConfig = { MODE: 3 };\nconst Gl = xn;\nfunction rr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const [i, r, a, s] = tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n });\n return [`M ${e},${t}L ${n},${o}`, i, r, a, s];\n}\nconst _n = function(e, { attrs: t }) {\n const [n, o, i] = rr(e);\n return ue(vn, {\n path: n,\n labelX: o,\n labelY: i,\n ...e,\n ...t\n });\n};\n_n.props = [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\n_n.inheritAttrs = !1;\n_n.compatConfig = { MODE: 3 };\nconst Fl = _n;\nfunction Yl(e, t, n) {\n return n === j.Left ? e - t : n === j.Right ? e + t : e;\n}\nfunction Xl(e, t, n) {\n return n === j.Top ? e - t : n === j.Bottom ? e + t : e;\n}\nconst po = function({\n radius: e = 10,\n centerX: t = 0,\n centerY: n = 0,\n position: o = j.Top,\n type: i\n}) {\n return ue(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,\n cx: Yl(t, e, o),\n cy: Xl(n, e, o),\n r: e,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\npo.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\npo.compatConfig = { MODE: 3 };\nconst Wo = po;\nfunction Zl() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n updateStart: X(),\n update: X(),\n updateEnd: X()\n };\n}\nfunction Ul(e, t) {\n const n = Zl();\n return n.doubleClick.on((o) => {\n var i, r;\n t.edgeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.edgeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.edgeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.edgeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.edgeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.edgeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.updateStart.on((o) => {\n var i, r;\n t.edgeUpdateStart(o), (r = (i = e.events) == null ? void 0 : i.updateStart) == null || r.call(i, o);\n }), n.update.on((o) => {\n var i, r;\n t.edgeUpdate(o), (r = (i = e.events) == null ? void 0 : i.update) == null || r.call(i, o);\n }), n.updateEnd.on((o) => {\n var i, r;\n t.edgeUpdateEnd(o), (r = (i = e.events) == null ? void 0 : i.updateEnd) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nconst Wl = ge({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"updatable\", \"selectable\", \"focusable\", \"edge\"],\n setup(e) {\n const {\n id: t,\n addSelectedEdges: n,\n connectionMode: o,\n edgeUpdaterRadius: i,\n emits: r,\n nodesSelectionActive: a,\n noPanClassName: s,\n getEdgeTypes: l,\n removeSelectedEdges: u,\n findEdge: c,\n findNode: v,\n isValidConnection: g\n } = fe(), x = Ul(e.edge, r), h = yt(e, \"edge\");\n let d = ie(!1), w = ie(!1);\n const y = ie(\"\"), S = ie(null), V = ie(\"source\"), p = ie();\n ut(Oi, e.id), ut(Ti, p);\n const N = J(() => h.value.class instanceof Function ? h.value.class(h.value) : h.value.class), T = J(() => h.value.style instanceof Function ? h.value.style(h.value) : h.value.style), { handlePointerDown: _ } = Di({\n nodeId: y,\n handleId: S,\n type: V,\n isValidConnection: g.value,\n edgeUpdaterType: V,\n onEdgeUpdate: $,\n onEdgeUpdateEnd: D\n });\n return () => {\n const B = v(h.value.source), q = v(h.value.target);\n if (!B || !q || !h.value)\n return null;\n let te;\n o.value === Qe.Strict ? te = B.handleBounds.source : te = [...B.handleBounds.source || [], ...B.handleBounds.target || []];\n const re = Ao(te, h.value.sourceHandle);\n let k;\n o.value === Qe.Strict ? k = q.handleBounds.target : k = [...q.handleBounds.target || [], ...q.handleBounds.source || []];\n const H = Ao(k, h.value.targetHandle), f = re ? re.position : j.Bottom, b = H ? H.position : j.Top, { sourceX: L, sourceY: I, targetY: F, targetX: U } = wa(\n B,\n re,\n f,\n q,\n H,\n b\n );\n return h.value.sourceX = L, h.value.sourceY = I, h.value.targetX = U, h.value.targetY = F, ue(\n \"g\",\n {\n ref: p,\n key: e.id,\n \"data-id\": e.id,\n class: [\n \"vue-flow__edge\",\n `vue-flow__edge-${e.type === !1 ? \"default\" : e.name}`,\n s.value,\n N.value,\n {\n updating: d.value,\n selected: h.value.selected,\n animated: h.value.animated,\n inactive: !e.selectable\n }\n ],\n onClick: ee,\n onContextmenu: m,\n onDblclick: A,\n onMouseenter: E,\n onMousemove: G,\n onMouseleave: Z,\n onKeyDown: e.focusable ? W : void 0,\n tabIndex: e.focusable ? 0 : void 0,\n \"aria-label\": h.value.ariaLabel === null ? void 0 : h.value.ariaLabel || `Edge from ${h.value.source} to ${h.value.target}`,\n \"aria-describedby\": e.focusable ? `${Ji}-${t}` : void 0,\n role: e.focusable ? \"button\" : void 0\n },\n [\n w.value ? null : ue(e.type === !1 ? l.value.default : e.type, {\n id: e.id,\n sourceNode: B,\n targetNode: q,\n source: h.value.source,\n target: h.value.target,\n type: h.value.type,\n updatable: e.updatable,\n selected: h.value.selected,\n animated: h.value.animated,\n label: h.value.label,\n labelStyle: h.value.labelStyle,\n labelShowBg: h.value.labelShowBg,\n labelBgStyle: h.value.labelBgStyle,\n labelBgPadding: h.value.labelBgPadding,\n labelBgBorderRadius: h.value.labelBgBorderRadius,\n data: h.value.data,\n events: { ...h.value.events, ...x.on },\n style: T.value,\n markerStart: `url(#${Xe(h.value.markerStart, t)})`,\n markerEnd: `url(#${Xe(h.value.markerEnd, t)})`,\n sourcePosition: f,\n targetPosition: b,\n sourceX: L,\n sourceY: I,\n targetX: U,\n targetY: F,\n sourceHandleId: h.value.sourceHandle,\n targetHandleId: h.value.targetHandle,\n interactionWidth: h.value.interactionWidth\n }),\n [\n e.updatable === \"source\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: K,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: f,\n centerX: L,\n centerY: I,\n radius: i.value,\n type: \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n e.updatable === \"target\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: z,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: b,\n centerX: U,\n centerY: F,\n radius: i.value,\n type: \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function P() {\n d.value = !0;\n }\n function R() {\n d.value = !1;\n }\n function $(B, q) {\n x.emit.update({ event: B, edge: h.value, connection: q });\n }\n function D(B) {\n x.emit.updateEnd({ event: B, edge: h.value }), w.value = !1;\n }\n function Q(B, q) {\n B.button === 0 && (w.value = !0, y.value = q ? h.value.target : h.value.source, S.value = (q ? h.value.targetHandle : h.value.sourceHandle) ?? \"\", V.value = q ? \"target\" : \"source\", x.emit.updateStart({ event: B, edge: h.value }), _(B));\n }\n function ee(B) {\n const q = { event: B, edge: h.value };\n e.selectable && (a.value = !1, n([h.value])), x.emit.click(q);\n }\n function m(B) {\n x.emit.contextMenu({ event: B, edge: h.value });\n }\n function A(B) {\n x.emit.doubleClick({ event: B, edge: h.value });\n }\n function E(B) {\n x.emit.mouseEnter({ event: B, edge: h.value });\n }\n function G(B) {\n x.emit.mouseMove({ event: B, edge: h.value });\n }\n function Z(B) {\n x.emit.mouseLeave({ event: B, edge: h.value });\n }\n function K(B) {\n Q(B, !0);\n }\n function z(B) {\n Q(B, !1);\n }\n function W(B) {\n var q;\n er.includes(B.key) && e.selectable && (B.key === \"Escape\" ? ((q = p.value) == null || q.blur(), u([c(e.id)])) : n([c(e.id)]));\n }\n }\n}), Kl = Wl, ql = {\n height: \"0\",\n width: \"0\"\n}, jl = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n}, Rd = /* @__PURE__ */ ge({\n ...jl,\n setup(e) {\n const { viewportRef: t } = fe(), n = J(() => {\n var o;\n return (o = t.value) == null ? void 0 : o.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (o, i) => (oe(), se(\"svg\", null, [\n (oe(), se(\"foreignObject\", ql, [\n (oe(), ze(Mr, {\n to: C(n),\n disabled: !C(n)\n }, [\n xe(o.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]));\n }\n}), Ql = { class: \"vue-flow__connection\" }, Jl = [\"d\", \"marker-end\", \"marker-start\"], eu = {\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 }\n}, tu = /* @__PURE__ */ ge({\n ...eu,\n props: {\n sourceNode: null\n },\n setup(e) {\n var R;\n const t = fe(), n = M(t, \"connectionMode\"), o = M(t, \"connectionStartHandle\"), i = M(t, \"connectionEndHandle\"), r = M(t, \"connectionPosition\"), a = M(t, \"connectionLineType\"), s = M(t, \"connectionLineStyle\"), l = M(t, \"connectionLineOptions\"), u = M(t, \"connectionStatus\"), c = M(t, \"viewport\"), v = M(t, \"findNode\"), g = {\n [j.Left]: j.Right,\n [j.Right]: j.Left,\n [j.Top]: j.Bottom,\n [j.Bottom]: j.Top\n }, x = (R = He(ln)) == null ? void 0 : R[\"connection-line\"], h = J(() => o.value.handleId), d = J(() => o.value.type), w = J(() => {\n var $;\n return (($ = i.value) == null ? void 0 : $.handleId) && v.value(i.value.nodeId) || null;\n }), y = J(\n () => {\n var $, D;\n return (n.value === Qe.Strict ? ($ = e.sourceNode.handleBounds[d.value]) == null ? void 0 : $.find((Q) => Q.id === h.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((Q) => Q.id === h.value)) || ((D = e.sourceNode.handleBounds[d.value ?? \"source\"]) == null ? void 0 : D[0]);\n }\n ), S = J(() => {\n var $, D, Q;\n return w.value && (($ = i.value) == null ? void 0 : $.handleId) && ((n.value === Qe.Strict ? (D = w.value.handleBounds[d.value === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : D.find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n ) : [...w.value.handleBounds.source || [], ...w.value.handleBounds.target || []].find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n )) || ((Q = w.value.handleBounds[d.value ?? \"target\"]) == null ? void 0 : Q[0])) || null;\n }), V = J(() => {\n var $;\n return ($ = y.value) == null ? void 0 : $.position;\n }), p = J(() => y.value ? Wt(\n V.value || j.Top,\n { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition },\n y.value\n ) : {\n x: e.sourceNode.dimensions.width / 2,\n y: e.sourceNode.dimensions.height / 2\n }), N = J(() => V.value ? g[V.value] : void 0), T = J(() => (r.value.x - c.value.x) / c.value.zoom), _ = J(() => (r.value.y - c.value.y) / c.value.zoom), P = J(() => {\n let $;\n const D = {\n sourceX: p.value.x,\n sourceY: p.value.y,\n sourcePosition: V.value,\n targetX: T.value,\n targetY: _.value,\n targetPosition: N.value\n };\n switch (a.value ?? l.value.type) {\n case Ye.Bezier:\n [$] = Kn(D);\n break;\n case Ye.Step:\n [$] = qn({\n ...D,\n borderRadius: 0\n });\n break;\n case Ye.SmoothStep:\n [$] = qn(D);\n break;\n case Ye.SimpleBezier:\n [$] = or(D);\n break;\n case Ye.Straight:\n [$] = rr(D);\n break;\n default:\n [$] = Kn(D);\n break;\n }\n return $;\n });\n return ($, D) => {\n var Q;\n return oe(), se(\"g\", Ql, [\n C(x) ? (oe(), ze(mi(C(x)), $r(vi({ key: 0 }, {\n sourceX: C(p).x,\n sourceY: C(p).y,\n sourcePosition: (Q = C(y)) == null ? void 0 : Q.position,\n targetX: C(T),\n targetY: C(_),\n targetPosition: C(N),\n sourceNode: e.sourceNode,\n sourceHandle: C(y),\n targetNode: C(w),\n targetHandle: C(S),\n markerEnd: `url(#${C(Xe)(C(l).markerEnd)})`,\n markerStart: `url(#${C(Xe)(C(l).markerStart)})`,\n connectionStatus: C(u)\n })), null, 16)) : (oe(), se(\"path\", {\n key: 1,\n d: C(P),\n class: Ke([\"vue-flow__connection-path\", [C(l).class, C(u)]]),\n style: Le(C(s) || C(l).style || {}),\n \"marker-end\": `url(#${C(Xe)(C(l).markerEnd)})`,\n \"marker-start\": `url(#${C(Xe)(C(l).markerStart)})`\n }, null, 14, Jl))\n ]);\n };\n }\n}), nu = [\"tabIndex\"], ou = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n}, iu = /* @__PURE__ */ ge({\n ...ou,\n setup(e) {\n const t = fe(), n = M(t, \"emits\"), o = M(t, \"viewport\"), i = M(t, \"getSelectedNodes\"), r = M(t, \"noPanClassName\"), a = M(t, \"disableKeyboardA11y\"), s = M(t, \"userSelectionActive\"), l = Ai(), u = ie(), c = ji({\n el: u,\n onStart(d) {\n n.value.selectionDragStart(d);\n },\n onDrag(d) {\n n.value.selectionDrag(d);\n },\n onStop(d) {\n n.value.selectionDragStop(d);\n }\n });\n Ve(() => {\n var d;\n a.value || (d = u.value) == null || d.focus({ preventScroll: !0 });\n });\n const v = J(() => co(i.value)), g = J(() => ({\n width: `${v.value.width}px`,\n height: `${v.value.height}px`,\n top: `${v.value.y}px`,\n left: `${v.value.x}px`\n }));\n function x(d) {\n n.value.selectionContextMenu({ event: d, nodes: i.value });\n }\n function h(d) {\n a.value || st[d.key] && l(\n {\n x: st[d.key].x,\n y: st[d.key].y\n },\n d.shiftKey\n );\n }\n return (d, w) => !C(s) && C(v).width && C(v).height ? (oe(), se(\"div\", {\n key: 0,\n class: Ke([\"vue-flow__nodesselection vue-flow__container\", C(r)]),\n style: Le({ transform: `translate(${C(o).x}px,${C(o).y}px) scale(${C(o).zoom})` })\n }, [\n ct(\"div\", {\n ref_key: \"el\",\n ref: u,\n class: Ke([{ dragging: C(c) }, \"vue-flow__nodesselection-rect\"]),\n style: Le(C(g)),\n tabIndex: C(a) ? void 0 : -1,\n onContextmenu: x,\n onKeydown: h\n }, null, 46, nu)\n ], 6)) : Ee(\"\", !0);\n }\n}), ru = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n}, au = /* @__PURE__ */ ge({\n ...ru,\n setup(e) {\n const { userSelectionRect: t } = fe();\n return (n, o) => {\n var i, r, a, s;\n return oe(), se(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: Le({\n width: `${(i = C(t)) == null ? void 0 : i.width}px`,\n height: `${(r = C(t)) == null ? void 0 : r.height}px`,\n transform: `translate(${(a = C(t)) == null ? void 0 : a.x}px, ${(s = C(t)) == null ? void 0 : s.y}px)`\n })\n }, null, 4);\n };\n }\n}), su = {\n input: Ta,\n default: Oa,\n output: Ia\n}, lu = {\n default: Bl,\n straight: Fl,\n step: Gl,\n smoothstep: ir,\n simplebezier: Rl\n};\nfunction uu() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n nodeTypes: {},\n edgeTypes: {},\n initialized: !1,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: fo.Full,\n paneDragging: !1,\n preventScrolling: !0,\n zoomOnScroll: !0,\n zoomOnPinch: !0,\n zoomOnDoubleClick: !0,\n panOnScroll: !1,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: Ut.Free,\n panOnDrag: !0,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: !1,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: !1,\n userSelectionActive: !1,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: Ye.Bezier,\n style: {}\n },\n connectionMode: Qe.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: NaN, y: NaN },\n connectionRadius: 20,\n connectOnClick: !0,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: !1,\n edgesUpdatable: !1,\n edgesFocusable: !0,\n nodesFocusable: !0,\n nodesConnectable: !0,\n nodesDraggable: !0,\n elementsSelectable: !0,\n selectNodesOnDrag: !0,\n multiSelectionActive: !1,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: \"Meta\",\n zoomActivationKeyCode: \"Meta\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: ca(),\n applyDefault: !0,\n autoConnect: !1,\n fitViewOnInit: !1,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: !1,\n elevateNodesOnSelect: !0,\n autoPanOnNodeDrag: !0,\n autoPanOnConnect: !0,\n disableKeyboardA11y: !1,\n ariaLiveMessage: \"\",\n __experimentalFeatures: {\n nestedFlow: !1\n }\n };\n}\nfunction ar(e) {\n const t = uu();\n return e && Object.keys(e).forEach((n) => {\n const o = e[n];\n ce(o) && (t[n] = o);\n }), t;\n}\nfunction cu(e, t, n) {\n const o = J(() => (d) => e.nodes && !t.value.length ? e.nodes.find((w) => w.id === d) : e.nodes[t.value.indexOf(d)]), i = J(() => (d) => e.edges && !n.value.length ? e.edges.find((w) => w.id === d) : e.edges[n.value.indexOf(d)]), r = J(() => {\n var y;\n const d = {\n ...lu,\n ...e.edgeTypes\n }, w = Object.keys(d);\n return (y = e.edges) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), a = J(() => {\n var y;\n const d = {\n ...su,\n ...e.nodeTypes\n }, w = Object.keys(d);\n return (y = e.nodes) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), s = J(() => {\n const d = e.nodes.filter((w) => !w.hidden);\n return e.onlyRenderVisibleElements ? d && Ci(\n d,\n {\n x: 0,\n y: 0,\n width: e.dimensions.width,\n height: e.dimensions.height\n },\n e.viewport,\n !0\n ) : d ?? [];\n }), l = (d, w, y) => {\n if (w = w ?? o.value(d.source), y = y ?? o.value(d.target), !w || !y) {\n e.hooks.error.trigger(new ve(he.EDGE_ORPHANED, d.id));\n return;\n }\n return !d.hidden && !y.hidden && !w.hidden;\n }, u = J(() => e.onlyRenderVisibleElements ? e.edges.filter((d) => {\n const w = o.value(d.source), y = o.value(d.target);\n return l(d, w, y) && ba({\n sourcePos: w.computedPosition || { x: 0, y: 0 },\n targetPos: y.computedPosition || { x: 0, y: 0 },\n sourceWidth: w.dimensions.width,\n sourceHeight: w.dimensions.height,\n targetWidth: y.dimensions.width,\n targetHeight: y.dimensions.height,\n width: e.dimensions.width,\n height: e.dimensions.height,\n viewport: e.viewport\n });\n }) : e.edges.filter((d) => l(d))), c = J(() => [...s.value, ...u.value]), v = J(() => e.nodes.filter((d) => d.selected)), g = J(() => e.edges.filter((d) => d.selected)), x = J(() => [\n ...v.value ?? [],\n ...g.value ?? []\n ]), h = J(\n () => s.value.filter((d) => d.initialized && d.handleBounds !== void 0)\n );\n return {\n getNode: o,\n getEdge: i,\n getElements: c,\n getEdgeTypes: r,\n getNodeTypes: a,\n getEdges: u,\n getNodes: s,\n getSelectedElements: x,\n getSelectedNodes: v,\n getSelectedEdges: g,\n getNodesInitialized: h\n };\n}\nfunction yo(e, t, n) {\n e.prototype = t.prototype = n, n.constructor = e;\n}\nfunction sr(e, t) {\n var n = Object.create(e.prototype);\n for (var o in t)\n n[o] = t[o];\n return n;\n}\nfunction kt() {\n}\nvar Et = 0.7, jt = 1 / Et, lt = \"\\\\s*([+-]?\\\\d+)\\\\s*\", St = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", Me = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", du = /^#([0-9a-f]{3,8})$/, fu = new RegExp(`^rgb\\\\(${lt},${lt},${lt}\\\\)$`), hu = new RegExp(`^rgb\\\\(${Me},${Me},${Me}\\\\)$`), gu = new RegExp(`^rgba\\\\(${lt},${lt},${lt},${St}\\\\)$`), vu = new RegExp(`^rgba\\\\(${Me},${Me},${Me},${St}\\\\)$`), mu = new RegExp(`^hsl\\\\(${St},${Me},${Me}\\\\)$`), pu = new RegExp(`^hsla\\\\(${St},${Me},${Me},${St}\\\\)$`), Ko = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\nyo(kt, Nt, {\n copy(e) {\n return Object.assign(new this.constructor(), this, e);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: qo,\n // Deprecated! Use color.formatHex.\n formatHex: qo,\n formatHex8: yu,\n formatHsl: xu,\n formatRgb: jo,\n toString: jo\n});\nfunction qo() {\n return this.rgb().formatHex();\n}\nfunction yu() {\n return this.rgb().formatHex8();\n}\nfunction xu() {\n return lr(this).formatHsl();\n}\nfunction jo() {\n return this.rgb().formatRgb();\n}\nfunction Nt(e) {\n var t, n;\n return e = (e + \"\").trim().toLowerCase(), (t = du.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qo(t) : n === 3 ? new pe(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? zt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? zt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fu.exec(e)) ? new pe(t[1], t[2], t[3], 1) : (t = hu.exec(e)) ? new pe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = gu.exec(e)) ? zt(t[1], t[2], t[3], t[4]) : (t = vu.exec(e)) ? zt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = mu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, 1) : (t = pu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, t[4]) : Ko.hasOwnProperty(e) ? Qo(Ko[e]) : e === \"transparent\" ? new pe(NaN, NaN, NaN, 0) : null;\n}\nfunction Qo(e) {\n return new pe(e >> 16 & 255, e >> 8 & 255, e & 255, 1);\n}\nfunction zt(e, t, n, o) {\n return o <= 0 && (e = t = n = NaN), new pe(e, t, n, o);\n}\nfunction _u(e) {\n return e instanceof kt || (e = Nt(e)), e ? (e = e.rgb(), new pe(e.r, e.g, e.b, e.opacity)) : new pe();\n}\nfunction jn(e, t, n, o) {\n return arguments.length === 1 ? _u(e) : new pe(e, t, n, o ?? 1);\n}\nfunction pe(e, t, n, o) {\n this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;\n}\nyo(pe, jn, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new pe(We(this.r), We(this.g), We(this.b), Qt(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: Jo,\n // Deprecated! Use color.formatHex.\n formatHex: Jo,\n formatHex8: wu,\n formatRgb: ei,\n toString: ei\n}));\nfunction Jo() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`;\n}\nfunction wu() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction ei() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"rgb(\" : \"rgba(\"}${We(this.r)}, ${We(this.g)}, ${We(this.b)}${e === 1 ? \")\" : `, ${e})`}`;\n}\nfunction Qt(e) {\n return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));\n}\nfunction We(e) {\n return Math.max(0, Math.min(255, Math.round(e) || 0));\n}\nfunction Ze(e) {\n return e = We(e), (e < 16 ? \"0\" : \"\") + e.toString(16);\n}\nfunction ti(e, t, n, o) {\n return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, n, o);\n}\nfunction lr(e) {\n if (e instanceof be)\n return new be(e.h, e.s, e.l, e.opacity);\n if (e instanceof kt || (e = Nt(e)), !e)\n return new be();\n if (e instanceof be)\n return e;\n e = e.rgb();\n var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), a = NaN, s = r - i, l = (r + i) / 2;\n return s ? (t === r ? a = (n - o) / s + (n < o) * 6 : n === r ? a = (o - t) / s + 2 : a = (t - n) / s + 4, s /= l < 0.5 ? r + i : 2 - r - i, a *= 60) : s = l > 0 && l < 1 ? 0 : a, new be(a, s, l, e.opacity);\n}\nfunction bu(e, t, n, o) {\n return arguments.length === 1 ? lr(e) : new be(e, t, n, o ?? 1);\n}\nfunction be(e, t, n, o) {\n this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;\n}\nyo(be, bu, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n rgb() {\n var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - o;\n return new pe(\n kn(e >= 240 ? e - 240 : e + 120, i, o),\n kn(e, i, o),\n kn(e < 120 ? e + 240 : e - 120, i, o),\n this.opacity\n );\n },\n clamp() {\n return new be(ni(this.h), At(this.s), At(this.l), Qt(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"hsl(\" : \"hsla(\"}${ni(this.h)}, ${At(this.s) * 100}%, ${At(this.l) * 100}%${e === 1 ? \")\" : `, ${e})`}`;\n }\n}));\nfunction ni(e) {\n return e = (e || 0) % 360, e < 0 ? e + 360 : e;\n}\nfunction At(e) {\n return Math.max(0, Math.min(1, e || 0));\n}\nfunction kn(e, t, n) {\n return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;\n}\nconst ur = (e) => () => e;\nfunction Eu(e, t) {\n return function(n) {\n return e + n * t;\n };\n}\nfunction Su(e, t, n) {\n return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {\n return Math.pow(e + o * t, n);\n };\n}\nfunction Nu(e) {\n return (e = +e) == 1 ? cr : function(t, n) {\n return n - t ? Su(t, n, e) : ur(isNaN(t) ? n : t);\n };\n}\nfunction cr(e, t) {\n var n = t - e;\n return n ? Eu(e, n) : ur(isNaN(e) ? t : e);\n}\nconst oi = function e(t) {\n var n = Nu(t);\n function o(i, r) {\n var a = n((i = jn(i)).r, (r = jn(r)).r), s = n(i.g, r.g), l = n(i.b, r.b), u = cr(i.opacity, r.opacity);\n return function(c) {\n return i.r = a(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + \"\";\n };\n }\n return o.gamma = e, o;\n}(1);\nfunction Re(e, t) {\n return e = +e, t = +t, function(n) {\n return e * (1 - n) + t * n;\n };\n}\nvar Qn = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, On = new RegExp(Qn.source, \"g\");\nfunction Cu(e) {\n return function() {\n return e;\n };\n}\nfunction Mu(e) {\n return function(t) {\n return e(t) + \"\";\n };\n}\nfunction $u(e, t) {\n var n = Qn.lastIndex = On.lastIndex = 0, o, i, r, a = -1, s = [], l = [];\n for (e = e + \"\", t = t + \"\"; (o = Qn.exec(e)) && (i = On.exec(t)); )\n (r = i.index) > n && (r = t.slice(n, r), s[a] ? s[a] += r : s[++a] = r), (o = o[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, l.push({ i: a, x: Re(o, i) })), n = On.lastIndex;\n return n < t.length && (r = t.slice(n), s[a] ? s[a] += r : s[++a] = r), s.length < 2 ? l[0] ? Mu(l[0].x) : Cu(t) : (t = l.length, function(u) {\n for (var c = 0, v; c < t; ++c)\n s[(v = l[c]).i] = v.x(u);\n return s.join(\"\");\n });\n}\nvar ii = 180 / Math.PI, Jn = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction dr(e, t, n, o, i, r) {\n var a, s, l;\n return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * o) && (n -= e * l, o -= t * l), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, l /= s), e * o < t * n && (e = -e, t = -t, l = -l, a = -a), {\n translateX: i,\n translateY: r,\n rotate: Math.atan2(t, e) * ii,\n skewX: Math.atan(l) * ii,\n scaleX: a,\n scaleY: s\n };\n}\nvar Bt;\nfunction ku(e) {\n const t = new (typeof DOMMatrix == \"function\" ? DOMMatrix : WebKitCSSMatrix)(e + \"\");\n return t.isIdentity ? Jn : dr(t.a, t.b, t.c, t.d, t.e, t.f);\n}\nfunction Ou(e) {\n return e == null || (Bt || (Bt = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\")), Bt.setAttribute(\"transform\", e), !(e = Bt.transform.baseVal.consolidate())) ? Jn : (e = e.matrix, dr(e.a, e.b, e.c, e.d, e.e, e.f));\n}\nfunction fr(e, t, n, o) {\n function i(u) {\n return u.length ? u.pop() + \" \" : \"\";\n }\n function r(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(\"translate(\", null, t, null, n);\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v || g) && x.push(\"translate(\" + v + t + g + n);\n }\n function a(u, c, v, g) {\n u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), g.push({ i: v.push(i(v) + \"rotate(\", null, o) - 2, x: Re(u, c) })) : c && v.push(i(v) + \"rotate(\" + c + o);\n }\n function s(u, c, v, g) {\n u !== c ? g.push({ i: v.push(i(v) + \"skewX(\", null, o) - 2, x: Re(u, c) }) : c && v.push(i(v) + \"skewX(\" + c + o);\n }\n function l(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(i(x) + \"scale(\", null, \",\", null, \")\");\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v !== 1 || g !== 1) && x.push(i(x) + \"scale(\" + v + \",\" + g + \")\");\n }\n return function(u, c) {\n var v = [], g = [];\n return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, v, g), a(u.rotate, c.rotate, v, g), s(u.skewX, c.skewX, v, g), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, v, g), u = c = null, function(x) {\n for (var h = -1, d = g.length, w; ++h < d; )\n v[(w = g[h]).i] = w.x(x);\n return v.join(\"\");\n };\n };\n}\nvar Tu = fr(ku, \"px, \", \"px)\", \"deg)\"), Iu = fr(Ou, \", \", \")\", \")\"), Pu = 1e-12;\nfunction ri(e) {\n return ((e = Math.exp(e)) + 1 / e) / 2;\n}\nfunction Du(e) {\n return ((e = Math.exp(e)) - 1 / e) / 2;\n}\nfunction zu(e) {\n return ((e = Math.exp(2 * e)) - 1) / (e + 1);\n}\nconst Au = function e(t, n, o) {\n function i(r, a) {\n var s = r[0], l = r[1], u = r[2], c = a[0], v = a[1], g = a[2], x = c - s, h = v - l, d = x * x + h * h, w, y;\n if (d < Pu)\n y = Math.log(g / u) / t, w = function(_) {\n return [\n s + _ * x,\n l + _ * h,\n u * Math.exp(t * _ * y)\n ];\n };\n else {\n var S = Math.sqrt(d), V = (g * g - u * u + o * d) / (2 * u * n * S), p = (g * g - u * u - o * d) / (2 * g * n * S), N = Math.log(Math.sqrt(V * V + 1) - V), T = Math.log(Math.sqrt(p * p + 1) - p);\n y = (T - N) / t, w = function(_) {\n var P = _ * y, R = ri(N), $ = u / (n * S) * (R * zu(t * P + N) - Du(N));\n return [\n s + $ * x,\n l + $ * h,\n u * R / ri(t * P + N)\n ];\n };\n }\n return w.duration = y * 1e3 * t / Math.SQRT2, w;\n }\n return i.rho = function(r) {\n var a = Math.max(1e-3, +r), s = a * a, l = s * s;\n return e(a, s, l);\n }, i;\n}(Math.SQRT2, 2, 4);\nvar ht = 0, mt = 0, gt = 0, hr = 1e3, Jt, pt, en = 0, Je = 0, wn = 0, Ct = typeof performance == \"object\" && performance.now ? performance : Date, gr = typeof window == \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {\n setTimeout(e, 17);\n};\nfunction xo() {\n return Je || (gr(Bu), Je = Ct.now() + wn);\n}\nfunction Bu() {\n Je = 0;\n}\nfunction tn() {\n this._call = this._time = this._next = null;\n}\ntn.prototype = vr.prototype = {\n constructor: tn,\n restart: function(e, t, n) {\n if (typeof e != \"function\")\n throw new TypeError(\"callback is not a function\");\n n = (n == null ? xo() : +n) + (t == null ? 0 : +t), !this._next && pt !== this && (pt ? pt._next = this : Jt = this, pt = this), this._call = e, this._time = n, eo();\n },\n stop: function() {\n this._call && (this._call = null, this._time = 1 / 0, eo());\n }\n};\nfunction vr(e, t, n) {\n var o = new tn();\n return o.restart(e, t, n), o;\n}\nfunction Ru() {\n xo(), ++ht;\n for (var e = Jt, t; e; )\n (t = Je - e._time) >= 0 && e._call.call(void 0, t), e = e._next;\n --ht;\n}\nfunction ai() {\n Je = (en = Ct.now()) + wn, ht = mt = 0;\n try {\n Ru();\n } finally {\n ht = 0, Hu(), Je = 0;\n }\n}\nfunction Vu() {\n var e = Ct.now(), t = e - en;\n t > hr && (wn -= t, en = e);\n}\nfunction Hu() {\n for (var e, t = Jt, n, o = 1 / 0; t; )\n t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Jt = n);\n pt = e, eo(o);\n}\nfunction eo(e) {\n if (!ht) {\n mt && (mt = clearTimeout(mt));\n var t = e - Je;\n t > 24 ? (e < 1 / 0 && (mt = setTimeout(ai, e - Ct.now() - wn)), gt && (gt = clearInterval(gt))) : (gt || (en = Ct.now(), gt = setInterval(Vu, hr)), ht = 1, gr(ai));\n }\n}\nfunction si(e, t, n) {\n var o = new tn();\n return t = t == null ? 0 : +t, o.restart((i) => {\n o.stop(), e(i + t);\n }, t, n), o;\n}\nvar Lu = fn(\"start\", \"end\", \"cancel\", \"interrupt\"), Gu = [], mr = 0, li = 1, to = 2, Lt = 3, ui = 4, no = 5, Gt = 6;\nfunction bn(e, t, n, o, i, r) {\n var a = e.__transition;\n if (!a)\n e.__transition = {};\n else if (n in a)\n return;\n Fu(e, n, {\n name: t,\n index: o,\n // For context during callback.\n group: i,\n // For context during callback.\n on: Lu,\n tween: Gu,\n time: r.time,\n delay: r.delay,\n duration: r.duration,\n ease: r.ease,\n timer: null,\n state: mr\n });\n}\nfunction _o(e, t) {\n var n = Se(e, t);\n if (n.state > mr)\n throw new Error(\"too late; already scheduled\");\n return n;\n}\nfunction ke(e, t) {\n var n = Se(e, t);\n if (n.state > Lt)\n throw new Error(\"too late; already running\");\n return n;\n}\nfunction Se(e, t) {\n var n = e.__transition;\n if (!n || !(n = n[t]))\n throw new Error(\"transition not found\");\n return n;\n}\nfunction Fu(e, t, n) {\n var o = e.__transition, i;\n o[t] = n, n.timer = vr(r, 0, n.time);\n function r(u) {\n n.state = li, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);\n }\n function a(u) {\n var c, v, g, x;\n if (n.state !== li)\n return l();\n for (c in o)\n if (x = o[c], x.name === n.name) {\n if (x.state === Lt)\n return si(a);\n x.state === ui ? (x.state = Gt, x.timer.stop(), x.on.call(\"interrupt\", e, e.__data__, x.index, x.group), delete o[c]) : +c < t && (x.state = Gt, x.timer.stop(), x.on.call(\"cancel\", e, e.__data__, x.index, x.group), delete o[c]);\n }\n if (si(function() {\n n.state === Lt && (n.state = ui, n.timer.restart(s, n.delay, n.time), s(u));\n }), n.state = to, n.on.call(\"start\", e, e.__data__, n.index, n.group), n.state === to) {\n for (n.state = Lt, i = new Array(g = n.tween.length), c = 0, v = -1; c < g; ++c)\n (x = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++v] = x);\n i.length = v + 1;\n }\n }\n function s(u) {\n for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(l), n.state = no, 1), v = -1, g = i.length; ++v < g; )\n i[v].call(e, c);\n n.state === no && (n.on.call(\"end\", e, e.__data__, n.index, n.group), l());\n }\n function l() {\n n.state = Gt, n.timer.stop(), delete o[t];\n for (var u in o)\n return;\n delete e.__transition;\n }\n}\nfunction Ft(e, t) {\n var n = e.__transition, o, i, r = !0, a;\n if (n) {\n t = t == null ? null : t + \"\";\n for (a in n) {\n if ((o = n[a]).name !== t) {\n r = !1;\n continue;\n }\n i = o.state > to && o.state < no, o.state = Gt, o.timer.stop(), o.on.call(i ? \"interrupt\" : \"cancel\", e, e.__data__, o.index, o.group), delete n[a];\n }\n r && delete e.__transition;\n }\n}\nfunction Yu(e) {\n return this.each(function() {\n Ft(this, e);\n });\n}\nfunction Xu(e, t) {\n var n, o;\n return function() {\n var i = ke(this, e), r = i.tween;\n if (r !== n) {\n o = n = r;\n for (var a = 0, s = o.length; a < s; ++a)\n if (o[a].name === t) {\n o = o.slice(), o.splice(a, 1);\n break;\n }\n }\n i.tween = o;\n };\n}\nfunction Zu(e, t, n) {\n var o, i;\n if (typeof n != \"function\")\n throw new Error();\n return function() {\n var r = ke(this, e), a = r.tween;\n if (a !== o) {\n i = (o = a).slice();\n for (var s = { name: t, value: n }, l = 0, u = i.length; l < u; ++l)\n if (i[l].name === t) {\n i[l] = s;\n break;\n }\n l === u && i.push(s);\n }\n r.tween = i;\n };\n}\nfunction Uu(e, t) {\n var n = this._id;\n if (e += \"\", arguments.length < 2) {\n for (var o = Se(this.node(), n).tween, i = 0, r = o.length, a; i < r; ++i)\n if ((a = o[i]).name === e)\n return a.value;\n return null;\n }\n return this.each((t == null ? Xu : Zu)(n, e, t));\n}\nfunction wo(e, t, n) {\n var o = e._id;\n return e.each(function() {\n var i = ke(this, o);\n (i.value || (i.value = {}))[t] = n.apply(this, arguments);\n }), function(i) {\n return Se(i, o).value[t];\n };\n}\nfunction pr(e, t) {\n var n;\n return (typeof t == \"number\" ? Re : t instanceof Nt ? oi : (n = Nt(t)) ? (t = n, oi) : $u)(e, t);\n}\nfunction Wu(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ku(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction qu(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttribute(e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction ju(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttributeNS(e.space, e.local);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction Qu(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttribute(e) : (a = this.getAttribute(e), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction Ju(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttributeNS(e.space, e.local) : (a = this.getAttributeNS(e.space, e.local), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction ec(e, t) {\n var n = hn(e), o = n === \"transform\" ? Iu : pr;\n return this.attrTween(e, typeof t == \"function\" ? (n.local ? Ju : Qu)(n, o, wo(this, \"attr.\" + e, t)) : t == null ? (n.local ? Ku : Wu)(n) : (n.local ? ju : qu)(n, o, t));\n}\nfunction tc(e, t) {\n return function(n) {\n this.setAttribute(e, t.call(this, n));\n };\n}\nfunction nc(e, t) {\n return function(n) {\n this.setAttributeNS(e.space, e.local, t.call(this, n));\n };\n}\nfunction oc(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && nc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction ic(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && tc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction rc(e, t) {\n var n = \"attr.\" + e;\n if (arguments.length < 2)\n return (n = this.tween(n)) && n._value;\n if (t == null)\n return this.tween(n, null);\n if (typeof t != \"function\")\n throw new Error();\n var o = hn(e);\n return this.tween(n, (o.local ? oc : ic)(o, t));\n}\nfunction ac(e, t) {\n return function() {\n _o(this, e).delay = +t.apply(this, arguments);\n };\n}\nfunction sc(e, t) {\n return t = +t, function() {\n _o(this, e).delay = t;\n };\n}\nfunction lc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? ac : sc)(t, e)) : Se(this.node(), t).delay;\n}\nfunction uc(e, t) {\n return function() {\n ke(this, e).duration = +t.apply(this, arguments);\n };\n}\nfunction cc(e, t) {\n return t = +t, function() {\n ke(this, e).duration = t;\n };\n}\nfunction dc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? uc : cc)(t, e)) : Se(this.node(), t).duration;\n}\nfunction fc(e, t) {\n if (typeof t != \"function\")\n throw new Error();\n return function() {\n ke(this, e).ease = t;\n };\n}\nfunction hc(e) {\n var t = this._id;\n return arguments.length ? this.each(fc(t, e)) : Se(this.node(), t).ease;\n}\nfunction gc(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n if (typeof n != \"function\")\n throw new Error();\n ke(this, e).ease = n;\n };\n}\nfunction vc(e) {\n if (typeof e != \"function\")\n throw new Error();\n return this.each(gc(this._id, e));\n}\nfunction mc(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new Be(o, this._parents, this._name, this._id);\n}\nfunction pc(e) {\n if (e._id !== this._id)\n throw new Error();\n for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), a = new Array(o), s = 0; s < r; ++s)\n for (var l = t[s], u = n[s], c = l.length, v = a[s] = new Array(c), g, x = 0; x < c; ++x)\n (g = l[x] || u[x]) && (v[x] = g);\n for (; s < o; ++s)\n a[s] = t[s];\n return new Be(a, this._parents, this._name, this._id);\n}\nfunction yc(e) {\n return (e + \"\").trim().split(/^|\\s+/).every(function(t) {\n var n = t.indexOf(\".\");\n return n >= 0 && (t = t.slice(0, n)), !t || t === \"start\";\n });\n}\nfunction xc(e, t, n) {\n var o, i, r = yc(t) ? _o : ke;\n return function() {\n var a = r(this, e), s = a.on;\n s !== o && (i = (o = s).copy()).on(t, n), a.on = i;\n };\n}\nfunction _c(e, t) {\n var n = this._id;\n return arguments.length < 2 ? Se(this.node(), n).on.on(e) : this.each(xc(n, e, t));\n}\nfunction wc(e) {\n return function() {\n var t = this.parentNode;\n for (var n in this.__transition)\n if (+n !== e)\n return;\n t && t.removeChild(this);\n };\n}\nfunction bc() {\n return this.on(\"end.remove\", wc(this._id));\n}\nfunction Ec(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = vo(e));\n for (var o = this._groups, i = o.length, r = new Array(i), a = 0; a < i; ++a)\n for (var s = o[a], l = s.length, u = r[a] = new Array(l), c, v, g = 0; g < l; ++g)\n (c = s[g]) && (v = e.call(c, c.__data__, g, s)) && (\"__data__\" in c && (v.__data__ = c.__data__), u[g] = v, bn(u[g], t, n, g, u, Se(c, n)));\n return new Be(r, this._parents, t, n);\n}\nfunction Sc(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = Ri(e));\n for (var o = this._groups, i = o.length, r = [], a = [], s = 0; s < i; ++s)\n for (var l = o[s], u = l.length, c, v = 0; v < u; ++v)\n if (c = l[v]) {\n for (var g = e.call(c, c.__data__, v, l), x, h = Se(c, n), d = 0, w = g.length; d < w; ++d)\n (x = g[d]) && bn(x, t, n, d, g, h);\n r.push(g), a.push(c);\n }\n return new Be(r, a, t, n);\n}\nvar Nc = $t.prototype.constructor;\nfunction Cc() {\n return new Nc(this._groups, this._parents);\n}\nfunction Mc(e, t) {\n var n, o, i;\n return function() {\n var r = ft(this, e), a = (this.style.removeProperty(e), ft(this, e));\n return r === a ? null : r === n && a === o ? i : i = t(n = r, o = a);\n };\n}\nfunction yr(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction $c(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = ft(this, e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction kc(e, t, n) {\n var o, i, r;\n return function() {\n var a = ft(this, e), s = n(this), l = s + \"\";\n return s == null && (l = s = (this.style.removeProperty(e), ft(this, e))), a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s));\n };\n}\nfunction Oc(e, t) {\n var n, o, i, r = \"style.\" + t, a = \"end.\" + r, s;\n return function() {\n var l = ke(this, e), u = l.on, c = l.value[r] == null ? s || (s = yr(t)) : void 0;\n (u !== n || i !== c) && (o = (n = u).copy()).on(a, i = c), l.on = o;\n };\n}\nfunction Tc(e, t, n) {\n var o = (e += \"\") == \"transform\" ? Tu : pr;\n return t == null ? this.styleTween(e, Mc(e, o)).on(\"end.style.\" + e, yr(e)) : typeof t == \"function\" ? this.styleTween(e, kc(e, o, wo(this, \"style.\" + e, t))).each(Oc(this._id, e)) : this.styleTween(e, $c(e, o, t), n).on(\"end.style.\" + e, null);\n}\nfunction Ic(e, t, n) {\n return function(o) {\n this.style.setProperty(e, t.call(this, o), n);\n };\n}\nfunction Pc(e, t, n) {\n var o, i;\n function r() {\n var a = t.apply(this, arguments);\n return a !== i && (o = (i = a) && Ic(e, a, n)), o;\n }\n return r._value = t, r;\n}\nfunction Dc(e, t, n) {\n var o = \"style.\" + (e += \"\");\n if (arguments.length < 2)\n return (o = this.tween(o)) && o._value;\n if (t == null)\n return this.tween(o, null);\n if (typeof t != \"function\")\n throw new Error();\n return this.tween(o, Pc(e, t, n ?? \"\"));\n}\nfunction zc(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Ac(e) {\n return function() {\n var t = e(this);\n this.textContent = t ?? \"\";\n };\n}\nfunction Bc(e) {\n return this.tween(\"text\", typeof e == \"function\" ? Ac(wo(this, \"text\", e)) : zc(e == null ? \"\" : e + \"\"));\n}\nfunction Rc(e) {\n return function(t) {\n this.textContent = e.call(this, t);\n };\n}\nfunction Vc(e) {\n var t, n;\n function o() {\n var i = e.apply(this, arguments);\n return i !== n && (t = (n = i) && Rc(i)), t;\n }\n return o._value = e, o;\n}\nfunction Hc(e) {\n var t = \"text\";\n if (arguments.length < 1)\n return (t = this.tween(t)) && t._value;\n if (e == null)\n return this.tween(t, null);\n if (typeof e != \"function\")\n throw new Error();\n return this.tween(t, Vc(e));\n}\nfunction Lc() {\n for (var e = this._name, t = this._id, n = xr(), o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n if (l = a[u]) {\n var c = Se(l, t);\n bn(l, e, n, u, a, {\n time: c.time + c.delay + c.duration,\n delay: 0,\n duration: c.duration,\n ease: c.ease\n });\n }\n return new Be(o, this._parents, e, n);\n}\nfunction Gc() {\n var e, t, n = this, o = n._id, i = n.size();\n return new Promise(function(r, a) {\n var s = { value: a }, l = { value: function() {\n --i === 0 && r();\n } };\n n.each(function() {\n var u = ke(this, o), c = u.on;\n c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(l)), u.on = t;\n }), i === 0 && r();\n });\n}\nvar Fc = 0;\nfunction Be(e, t, n, o) {\n this._groups = e, this._parents = t, this._name = n, this._id = o;\n}\nfunction xr() {\n return ++Fc;\n}\nvar Oe = $t.prototype;\nBe.prototype = {\n constructor: Be,\n select: Ec,\n selectAll: Sc,\n selectChild: Oe.selectChild,\n selectChildren: Oe.selectChildren,\n filter: mc,\n merge: pc,\n selection: Cc,\n transition: Lc,\n call: Oe.call,\n nodes: Oe.nodes,\n node: Oe.node,\n size: Oe.size,\n empty: Oe.empty,\n each: Oe.each,\n on: _c,\n attr: ec,\n attrTween: rc,\n style: Tc,\n styleTween: Dc,\n text: Bc,\n textTween: Hc,\n remove: bc,\n tween: Uu,\n delay: lc,\n duration: dc,\n ease: hc,\n easeVarying: vc,\n end: Gc,\n [Symbol.iterator]: Oe[Symbol.iterator]\n};\nfunction Yc(e) {\n return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;\n}\nvar Xc = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: Yc\n};\nfunction Zc(e, t) {\n for (var n; !(n = e.__transition) || !(n = n[t]); )\n if (!(e = e.parentNode))\n throw new Error(`transition ${t} not found`);\n return n;\n}\nfunction Uc(e) {\n var t, n;\n e instanceof Be ? (t = e._id, e = e._name) : (t = xr(), (n = Xc).time = xo(), e = e == null ? null : e + \"\");\n for (var o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && bn(l, e, t, u, a, n || Zc(l, t));\n return new Be(o, this._parents, e, t);\n}\n$t.prototype.interrupt = Yu;\n$t.prototype.transition = Uc;\nconst Rt = (e) => () => e;\nfunction Wc(e, {\n sourceEvent: t,\n target: n,\n transform: o,\n dispatch: i\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n target: { value: n, enumerable: !0, configurable: !0 },\n transform: { value: o, enumerable: !0, configurable: !0 },\n _: { value: i }\n });\n}\nfunction De(e, t, n) {\n this.k = e, this.x = t, this.y = n;\n}\nDe.prototype = {\n constructor: De,\n scale: function(e) {\n return e === 1 ? this : new De(this.k * e, this.x, this.y);\n },\n translate: function(e, t) {\n return e === 0 & t === 0 ? this : new De(this.k, this.x + this.k * e, this.y + this.k * t);\n },\n apply: function(e) {\n return [e[0] * this.k + this.x, e[1] * this.k + this.y];\n },\n applyX: function(e) {\n return e * this.k + this.x;\n },\n applyY: function(e) {\n return e * this.k + this.y;\n },\n invert: function(e) {\n return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];\n },\n invertX: function(e) {\n return (e - this.x) / this.k;\n },\n invertY: function(e) {\n return (e - this.y) / this.k;\n },\n rescaleX: function(e) {\n return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));\n },\n rescaleY: function(e) {\n return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar et = new De(1, 0, 0);\nDe.prototype;\nfunction Tn(e) {\n e.stopImmediatePropagation();\n}\nfunction vt(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Kc(e) {\n return (!e.ctrlKey || e.type === \"wheel\") && !e.button;\n}\nfunction qc() {\n var e = this;\n return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute(\"viewBox\") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction ci() {\n return this.__zoom || et;\n}\nfunction jc(e) {\n return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);\n}\nfunction Qc() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Jc(e, t, n) {\n var o = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], r = e.invertY(t[0][1]) - n[0][1], a = e.invertY(t[1][1]) - n[1][1];\n return e.translate(\n i > o ? (o + i) / 2 : Math.min(0, o) || Math.max(0, i),\n a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a)\n );\n}\nfunction ed() {\n var e = Kc, t = qc, n = Jc, o = jc, i = Qc, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Au, u = fn(\"start\", \"zoom\", \"end\"), c, v, g, x = 500, h = 150, d = 0, w = 10;\n function y(m) {\n m.property(\"__zoom\", ci).on(\"wheel.zoom\", P, { passive: !1 }).on(\"mousedown.zoom\", R).on(\"dblclick.zoom\", $).filter(i).on(\"touchstart.zoom\", D).on(\"touchmove.zoom\", Q).on(\"touchend.zoom touchcancel.zoom\", ee).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n y.transform = function(m, A, E, G) {\n var Z = m.selection ? m.selection() : m;\n Z.property(\"__zoom\", ci), m !== Z ? N(m, A, E, G) : Z.interrupt().each(function() {\n T(this, arguments).event(G).start().zoom(null, typeof A == \"function\" ? A.apply(this, arguments) : A).end();\n });\n }, y.scaleBy = function(m, A, E, G) {\n y.scaleTo(m, function() {\n var Z = this.__zoom.k, K = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return Z * K;\n }, E, G);\n }, y.scaleTo = function(m, A, E, G) {\n y.transform(m, function() {\n var Z = t.apply(this, arguments), K = this.__zoom, z = E == null ? p(Z) : typeof E == \"function\" ? E.apply(this, arguments) : E, W = K.invert(z), B = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return n(V(S(K, B), z, W), Z, a);\n }, E, G);\n }, y.translateBy = function(m, A, E, G) {\n y.transform(m, function() {\n return n(this.__zoom.translate(\n typeof A == \"function\" ? A.apply(this, arguments) : A,\n typeof E == \"function\" ? E.apply(this, arguments) : E\n ), t.apply(this, arguments), a);\n }, null, G);\n }, y.translateTo = function(m, A, E, G, Z) {\n y.transform(m, function() {\n var K = t.apply(this, arguments), z = this.__zoom, W = G == null ? p(K) : typeof G == \"function\" ? G.apply(this, arguments) : G;\n return n(et.translate(W[0], W[1]).scale(z.k).translate(\n typeof A == \"function\" ? -A.apply(this, arguments) : -A,\n typeof E == \"function\" ? -E.apply(this, arguments) : -E\n ), K, a);\n }, G, Z);\n };\n function S(m, A) {\n return A = Math.max(r[0], Math.min(r[1], A)), A === m.k ? m : new De(A, m.x, m.y);\n }\n function V(m, A, E) {\n var G = A[0] - E[0] * m.k, Z = A[1] - E[1] * m.k;\n return G === m.x && Z === m.y ? m : new De(m.k, G, Z);\n }\n function p(m) {\n return [(+m[0][0] + +m[1][0]) / 2, (+m[0][1] + +m[1][1]) / 2];\n }\n function N(m, A, E, G) {\n m.on(\"start.zoom\", function() {\n T(this, arguments).event(G).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n T(this, arguments).event(G).end();\n }).tween(\"zoom\", function() {\n var Z = this, K = arguments, z = T(Z, K).event(G), W = t.apply(Z, K), B = E == null ? p(W) : typeof E == \"function\" ? E.apply(Z, K) : E, q = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), te = Z.__zoom, re = typeof A == \"function\" ? A.apply(Z, K) : A, k = l(te.invert(B).concat(q / te.k), re.invert(B).concat(q / re.k));\n return function(H) {\n if (H === 1)\n H = re;\n else {\n var f = k(H), b = q / f[2];\n H = new De(b, B[0] - f[0] * b, B[1] - f[1] * b);\n }\n z.zoom(null, H);\n };\n });\n }\n function T(m, A, E) {\n return !E && m.__zooming || new _(m, A);\n }\n function _(m, A) {\n this.that = m, this.args = A, this.active = 0, this.sourceEvent = null, this.extent = t.apply(m, A), this.taps = 0;\n }\n _.prototype = {\n event: function(m) {\n return m && (this.sourceEvent = m), this;\n },\n start: function() {\n return ++this.active === 1 && (this.that.__zooming = this, this.emit(\"start\")), this;\n },\n zoom: function(m, A) {\n return this.mouse && m !== \"mouse\" && (this.mouse[1] = A.invert(this.mouse[0])), this.touch0 && m !== \"touch\" && (this.touch0[1] = A.invert(this.touch0[0])), this.touch1 && m !== \"touch\" && (this.touch1[1] = A.invert(this.touch1[0])), this.that.__zoom = A, this.emit(\"zoom\"), this;\n },\n end: function() {\n return --this.active === 0 && (delete this.that.__zooming, this.emit(\"end\")), this;\n },\n emit: function(m) {\n var A = we(this.that).datum();\n u.call(\n m,\n this.that,\n new Wc(m, {\n sourceEvent: this.sourceEvent,\n target: y,\n type: m,\n transform: this.that.__zoom,\n dispatch: u\n }),\n A\n );\n }\n };\n function P(m, ...A) {\n if (!e.apply(this, arguments))\n return;\n var E = T(this, A).event(m), G = this.__zoom, Z = Math.max(r[0], Math.min(r[1], G.k * Math.pow(2, o.apply(this, arguments)))), K = Ne(m);\n if (E.wheel)\n (E.mouse[0][0] !== K[0] || E.mouse[0][1] !== K[1]) && (E.mouse[1] = G.invert(E.mouse[0] = K)), clearTimeout(E.wheel);\n else {\n if (G.k === Z)\n return;\n E.mouse = [K, G.invert(K)], Ft(this), E.start();\n }\n vt(m), E.wheel = setTimeout(z, h), E.zoom(\"mouse\", n(V(S(G, Z), E.mouse[0], E.mouse[1]), E.extent, a));\n function z() {\n E.wheel = null, E.end();\n }\n }\n function R(m, ...A) {\n if (g || !e.apply(this, arguments))\n return;\n var E = m.currentTarget, G = T(this, A, !0).event(m), Z = we(m.view).on(\"mousemove.zoom\", B, !0).on(\"mouseup.zoom\", q, !0), K = Ne(m, E), z = m.clientX, W = m.clientY;\n Ki(m.view), Tn(m), G.mouse = [K, this.__zoom.invert(K)], Ft(this), G.start();\n function B(te) {\n if (vt(te), !G.moved) {\n var re = te.clientX - z, k = te.clientY - W;\n G.moved = re * re + k * k > d;\n }\n G.event(te).zoom(\"mouse\", n(V(G.that.__zoom, G.mouse[0] = Ne(te, E), G.mouse[1]), G.extent, a));\n }\n function q(te) {\n Z.on(\"mousemove.zoom mouseup.zoom\", null), qi(te.view, G.moved), vt(te), G.event(te).end();\n }\n }\n function $(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = this.__zoom, G = Ne(m.changedTouches ? m.changedTouches[0] : m, this), Z = E.invert(G), K = E.k * (m.shiftKey ? 0.5 : 2), z = n(V(S(E, K), G, Z), t.apply(this, A), a);\n vt(m), s > 0 ? we(this).transition().duration(s).call(N, z, G, m) : we(this).call(y.transform, z, G, m);\n }\n }\n function D(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = m.touches, G = E.length, Z = T(this, A, m.changedTouches.length === G).event(m), K, z, W, B;\n for (Tn(m), z = 0; z < G; ++z)\n W = E[z], B = Ne(W, this), B = [B, this.__zoom.invert(B), W.identifier], Z.touch0 ? !Z.touch1 && Z.touch0[2] !== B[2] && (Z.touch1 = B, Z.taps = 0) : (Z.touch0 = B, K = !0, Z.taps = 1 + !!c);\n c && (c = clearTimeout(c)), K && (Z.taps < 2 && (v = B[0], c = setTimeout(function() {\n c = null;\n }, x)), Ft(this), Z.start());\n }\n }\n function Q(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z, W, B;\n for (vt(m), K = 0; K < Z; ++K)\n z = G[K], W = Ne(z, this), E.touch0 && E.touch0[2] === z.identifier ? E.touch0[0] = W : E.touch1 && E.touch1[2] === z.identifier && (E.touch1[0] = W);\n if (z = E.that.__zoom, E.touch1) {\n var q = E.touch0[0], te = E.touch0[1], re = E.touch1[0], k = E.touch1[1], H = (H = re[0] - q[0]) * H + (H = re[1] - q[1]) * H, f = (f = k[0] - te[0]) * f + (f = k[1] - te[1]) * f;\n z = S(z, Math.sqrt(H / f)), W = [(q[0] + re[0]) / 2, (q[1] + re[1]) / 2], B = [(te[0] + k[0]) / 2, (te[1] + k[1]) / 2];\n } else if (E.touch0)\n W = E.touch0[0], B = E.touch0[1];\n else\n return;\n E.zoom(\"touch\", n(V(z, W, B), E.extent, a));\n }\n }\n function ee(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z;\n for (Tn(m), g && clearTimeout(g), g = setTimeout(function() {\n g = null;\n }, x), K = 0; K < Z; ++K)\n z = G[K], E.touch0 && E.touch0[2] === z.identifier ? delete E.touch0 : E.touch1 && E.touch1[2] === z.identifier && delete E.touch1;\n if (E.touch1 && !E.touch0 && (E.touch0 = E.touch1, delete E.touch1), E.touch0)\n E.touch0[1] = this.__zoom.invert(E.touch0[0]);\n else if (E.end(), E.taps === 2 && (z = Ne(z, this), Math.hypot(v[0] - z[0], v[1] - z[1]) < w)) {\n var W = we(this).on(\"dblclick.zoom\");\n W && W.apply(this, arguments);\n }\n }\n }\n return y.wheelDelta = function(m) {\n return arguments.length ? (o = typeof m == \"function\" ? m : Rt(+m), y) : o;\n }, y.filter = function(m) {\n return arguments.length ? (e = typeof m == \"function\" ? m : Rt(!!m), y) : e;\n }, y.touchable = function(m) {\n return arguments.length ? (i = typeof m == \"function\" ? m : Rt(!!m), y) : i;\n }, y.extent = function(m) {\n return arguments.length ? (t = typeof m == \"function\" ? m : Rt([[+m[0][0], +m[0][1]], [+m[1][0], +m[1][1]]]), y) : t;\n }, y.scaleExtent = function(m) {\n return arguments.length ? (r[0] = +m[0], r[1] = +m[1], y) : [r[0], r[1]];\n }, y.translateExtent = function(m) {\n return arguments.length ? (a[0][0] = +m[0][0], a[1][0] = +m[1][0], a[0][1] = +m[0][1], a[1][1] = +m[1][1], y) : [[a[0][0], a[0][1]], [a[1][0], a[1][1]]];\n }, y.constrain = function(m) {\n return arguments.length ? (n = m, y) : n;\n }, y.duration = function(m) {\n return arguments.length ? (s = +m, y) : s;\n }, y.interpolate = function(m) {\n return arguments.length ? (l = m, y) : l;\n }, y.on = function() {\n var m = u.on.apply(u, arguments);\n return m === u ? y : m;\n }, y.clickDistance = function(m) {\n return arguments.length ? (d = (m = +m) * m, y) : Math.sqrt(d);\n }, y.tapDistance = function(m) {\n return arguments.length ? (w = +m, y) : w;\n }, y;\n}\nconst In = 0.1;\nfunction Ge() {\n}\nconst td = {\n zoomIn: Ge,\n zoomOut: Ge,\n zoomTo: Ge,\n fitView: Ge,\n setCenter: Ge,\n fitBounds: Ge,\n project: (e) => e,\n setTransform: Ge,\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n initialized: !1\n}, nd = (e, t) => {\n const n = e, o = M(n, \"nodes\"), i = M(n, \"d3Zoom\"), r = M(n, \"d3Selection\"), a = M(n, \"dimensions\"), s = M(n, \"translateExtent\"), l = M(n, \"minZoom\"), u = M(n, \"maxZoom\"), c = M(n, \"viewport\"), v = M(n, \"snapToGrid\"), g = M(n, \"snapGrid\"), x = M(n, \"hooks\"), h = t, d = M(h, \"getNodes\"), w = ie(!1);\n x.value.nodesInitialized.on(() => {\n w.value = !0;\n });\n const y = J(() => !!i.value && !!r.value && !!a.value.width && !!a.value.height && w.value);\n function S(p, N) {\n r.value && i.value && i.value.scaleBy(Pn(r.value, N), p);\n }\n function V(p, N, T, _) {\n const { x: P, y: R } = so({ x: -p, y: -N }, s.value), $ = et.translate(-P, -R).scale(T);\n r.value && i.value && i.value.transform(Pn(r.value, _), $);\n }\n return J(() => y.value ? {\n initialized: !0,\n zoomIn: (p) => {\n S(1.2, p == null ? void 0 : p.duration);\n },\n zoomOut: (p) => {\n S(1 / 1.2, p == null ? void 0 : p.duration);\n },\n zoomTo: (p, N) => {\n r.value && i.value && i.value.scaleTo(Pn(r.value, N == null ? void 0 : N.duration), p);\n },\n setTransform: (p, N) => {\n V(p.x, p.y, p.zoom, N == null ? void 0 : N.duration);\n },\n getTransform: () => ({\n x: c.value.x,\n y: c.value.y,\n zoom: c.value.zoom\n }),\n fitView: (p = {\n padding: In,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!o.value.length)\n return;\n const N = (p.includeHiddenNodes ? o.value : d.value).filter(($) => {\n var ee;\n const D = $.initialized && $.dimensions.width && $.dimensions.height;\n let Q = !0;\n return (ee = p.nodes) != null && ee.length && (Q = p.nodes.includes($.id)), D && Q;\n }), T = co(N), { x: _, y: P, zoom: R } = Zt(\n T,\n a.value.width,\n a.value.height,\n p.minZoom ?? l.value,\n p.maxZoom ?? u.value,\n p.padding ?? In,\n p.offset\n );\n V(_, P, R, p == null ? void 0 : p.duration);\n },\n setCenter: (p, N, T) => {\n const _ = typeof (T == null ? void 0 : T.zoom) < \"u\" ? T.zoom : u.value, P = a.value.width / 2 - p * _, R = a.value.height / 2 - N * _;\n V(P, R, _, T == null ? void 0 : T.duration);\n },\n fitBounds: (p, N = { padding: In }) => {\n const { x: T, y: _, zoom: P } = Zt(\n p,\n a.value.width,\n a.value.height,\n l.value,\n u.value,\n N.padding\n );\n V(T, _, P, N == null ? void 0 : N.duration);\n },\n project: (p) => uo(p, c.value, v.value, g.value)\n } : td);\n};\nfunction Pn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Dn(e, t) {\n if (t) {\n const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height;\n if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) {\n let i = {};\n if (Ae(t.style) ? i = { ...t.style(t) } : t.style && (i = { ...t.style }), i.width = i.width ?? `${t.dimensions.width}px`, i.height = i.height ?? `${t.dimensions.height}px`, n > 0)\n if (Pe(i.width)) {\n const r = Number(i.width.replace(\"px\", \"\"));\n i.width = `${r + n}px`;\n } else\n i.width += n;\n if (o > 0)\n if (Pe(i.height)) {\n const r = Number(i.height.replace(\"px\", \"\"));\n i.height = `${r + o}px`;\n } else\n i.height += o;\n if (e.position.x < 0) {\n const r = Math.abs(e.position.x);\n if (t.position.x = t.position.x - r, Pe(i.width)) {\n const a = Number(i.width.replace(\"px\", \"\"));\n i.width = `${a + r}px`;\n } else\n i.width += r;\n e.position.x = 0;\n }\n if (e.position.y < 0) {\n const r = Math.abs(e.position.y);\n if (t.position.y = t.position.y - r, Pe(i.height)) {\n const a = Number(i.height.replace(\"px\", \"\"));\n i.height = `${a + r}px`;\n } else\n i.height += r;\n e.position.y = 0;\n }\n t.dimensions.width = Number(i.width.toString().replace(\"px\", \"\")), t.dimensions.height = Number(i.height.toString().replace(\"px\", \"\")), Ae(t.style) ? t.style = (r) => {\n const a = t.style;\n return {\n ...a(r),\n ...i\n };\n } : t.style = {\n ...t.style,\n ...i\n };\n }\n }\n}\nfunction nn(e, t) {\n e.filter((i) => i.type === \"add\" || i.type === \"remove\").forEach((i) => {\n if (i.type === \"add\")\n t.findIndex((a) => a.id === i.item.id) === -1 && t.push(i.item);\n else if (i.type === \"remove\") {\n const r = t.findIndex((a) => a.id === i.id);\n r !== -1 && t.splice(r, 1);\n }\n });\n const o = t.map((i) => i.id);\n return t.forEach((i) => {\n var a, s;\n const r = e.filter((l) => l.id === i.id);\n for (const l of r)\n switch (l.type) {\n case \"select\":\n i.selected = l.selected;\n break;\n case \"position\":\n if (nt(i) && (typeof l.position < \"u\" && (i.position = l.position), typeof l.dragging < \"u\" && (i.dragging = l.dragging), i.expandParent && i.parentNode)) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && Dn(i, u);\n }\n break;\n case \"dimensions\":\n if (nt(i)) {\n if (typeof l.dimensions < \"u\" && (i.dimensions = l.dimensions), typeof l.updateStyle < \"u\" && (i.style = {\n ...i.style || {},\n width: `${(a = l.dimensions) == null ? void 0 : a.width}px`,\n height: `${(s = l.dimensions) == null ? void 0 : s.height}px`\n }), typeof l.resizing < \"u\" && (i.resizing = l.resizing), i.expandParent && i.parentNode) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && (u.initialized ? Dn(i, u) : Ue(() => {\n Dn(i, u);\n }));\n }\n i.initialized || (i.initialized = !0);\n }\n break;\n }\n }), t;\n}\nfunction Vd(e, t) {\n return nn(e, t);\n}\nfunction Hd(e, t) {\n return nn(e, t);\n}\nfunction Te(e, t) {\n return {\n id: e,\n type: \"select\",\n selected: t\n };\n}\nfunction di(e) {\n return {\n item: e,\n type: \"add\"\n };\n}\nfunction zn(e) {\n return {\n id: e,\n type: \"remove\"\n };\n}\nfunction An(e, t) {\n return e.reduce(\n (n, o) => {\n let i = t.includes(o.id);\n ce(o.selectable) && !o.selectable && (i = !1);\n const r = nt(o) ? \"changedNodes\" : \"changedEdges\";\n return !o.selected && i ? n[r].push(Te(o.id, !0)) : o.selected && !i && n[r].push(Te(o.id, !1)), n;\n },\n { changedNodes: [], changedEdges: [] }\n );\n}\nfunction od(e, t, n, o) {\n let i = !1;\n const r = nd(e, t), a = (f) => {\n const b = f ?? n.value ?? [];\n e.hooks.updateNodeInternals.trigger(b);\n }, s = (f) => {\n if (f)\n return e.nodes && !n.value.length ? e.nodes.find((b) => b.id === f) : e.nodes[n.value.indexOf(f)];\n }, l = (f) => {\n if (f)\n return e.edges && !o.value.length ? e.edges.find((b) => b.id === f) : e.edges[o.value.indexOf(f)];\n }, u = (f, b, L) => {\n const I = [];\n f.forEach((F) => {\n var Y, ne;\n const U = {\n id: F.id,\n type: \"position\",\n dragging: L,\n from: F.from\n };\n if (b && (U.position = F.position, F.parentNode)) {\n const O = s(F.parentNode);\n U.position = {\n x: U.position.x - (((Y = O == null ? void 0 : O.computedPosition) == null ? void 0 : Y.x) ?? 0),\n y: U.position.y - (((ne = O == null ? void 0 : O.computedPosition) == null ? void 0 : ne.y) ?? 0)\n };\n }\n I.push(U);\n }), I != null && I.length && e.hooks.nodesChange.trigger(I);\n }, c = (f) => {\n var F;\n if (!e.vueFlowRef)\n return;\n const b = e.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!b)\n return;\n let L;\n if ((F = e.__experimentalFeatures) != null && F.nestedFlow) {\n let U = [b], Y = b, ne;\n for (; !ne && Y; )\n Y = Y.parentElement, ne = Y == null ? void 0 : Y.classList.contains(\"vue-flow__transformationpane\"), ne && (U = [Y, ...U]);\n U.forEach((O) => {\n const ae = window.getComputedStyle(O), { m22: me } = new window.DOMMatrixReadOnly(ae.transform);\n L ? L *= me : L = me;\n });\n } else {\n const U = window.getComputedStyle(b), { m22: Y } = new window.DOMMatrixReadOnly(U.transform);\n L = Y;\n }\n const I = f.reduce((U, Y) => {\n const ne = s(Y.id);\n if (ne) {\n const O = rn(Y.nodeElement);\n !!(O.width && O.height && (ne.dimensions.width !== O.width || ne.dimensions.height !== O.height || Y.forceUpdate)) && (ne.handleBounds.source = Lo(\".source\", Y.nodeElement, L), ne.handleBounds.target = Lo(\".target\", Y.nodeElement, L), ne.dimensions = O, ne.initialized = !0, U.push({\n id: ne.id,\n type: \"dimensions\",\n dimensions: O\n }));\n }\n return U;\n }, []);\n e.fitViewOnInit && !i && (ye(() => r.value.initialized).toBe(!0).then(() => {\n r.value.fitView();\n }), i = !0), I.length && e.hooks.nodesChange.trigger(I);\n }, v = (f, b) => {\n const L = f.map((U) => U.id);\n let I, F = [];\n if (e.multiSelectionActive)\n I = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, g = (f, b) => {\n const L = f.map((U) => U.id);\n let I = [], F;\n if (e.multiSelectionActive)\n F = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, x = (f, b) => {\n const L = f.filter(xt).map((Y) => Y.id), I = f.filter($e).map((Y) => Y.id);\n let { changedNodes: F, changedEdges: U } = An([...e.nodes, ...e.edges], [...L, ...I]);\n e.multiSelectionActive && (F = L.map((Y) => Te(Y, b)), U = I.map((Y) => Te(Y, b))), F.length && e.hooks.nodesChange.trigger(F), U.length && e.hooks.edgesChange.trigger(U);\n }, h = (f) => {\n v(f, !0);\n }, d = (f) => {\n g(f, !0);\n }, w = (f) => {\n x(f, !0);\n }, y = (f) => {\n if (!f.length)\n return v(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.nodesChange.trigger(L);\n }, S = (f) => {\n if (!f.length)\n return g(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.edgesChange.trigger(L);\n }, V = (f) => {\n if (!f || !f.length)\n return x([], !1);\n const { changedNodes: b, changedEdges: L } = f.reduce(\n (I, F) => {\n const U = Te(F.id, !1);\n return xt(F) ? I.changedNodes.push(U) : I.changedEdges.push(U), I;\n },\n { changedNodes: [], changedEdges: [] }\n );\n b.length && e.hooks.nodesChange.trigger(b), L.length && e.hooks.edgesChange.trigger(L);\n }, p = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([f, e.maxZoom]), e.minZoom = f;\n }, N = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([e.minZoom, f]), e.maxZoom = f;\n }, T = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.translateExtent(f), e.translateExtent = f;\n }, _ = (f) => {\n e.nodeExtent = f, a(n.value);\n }, P = (f) => {\n e.nodesDraggable = f, e.nodesConnectable = f, e.elementsSelectable = f;\n }, R = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f;\n !e.initialized && !b.length || (e.nodes = Do(b, e.nodes, s, e.hooks.error.trigger));\n }, $ = (f) => {\n const b = f instanceof Function ? f(e.edges) : f;\n if (!e.initialized && !b.length)\n return;\n const L = e.isValidConnection ? b.filter(\n (I) => e.isValidConnection(I, {\n edges: e.edges,\n sourceNode: s(I.source),\n targetNode: s(I.target)\n })\n ) : b;\n e.edges = L.reduce((I, F) => {\n const U = s(F.source), Y = s(F.target), ne = !U || typeof U > \"u\", O = !Y || typeof Y > \"u\";\n if (ne && O ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, F.id, F.source, F.target)) : (ne && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, F.id, F.source)), O && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, F.id, F.target))), ne || O)\n return I;\n const ae = l(F.id);\n return I.push({\n ...lo(F, Object.assign({}, ae, e.defaultEdgeOptions)),\n sourceNode: U,\n targetNode: Y\n }), I;\n }, []);\n }, D = (f) => {\n const b = f instanceof Function ? f([...e.nodes, ...e.edges]) : f;\n !e.initialized && !b.length || (R(b.filter(xt)), $(b.filter($e)));\n }, Q = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f, I = Do(b, e.nodes, s, e.hooks.error.trigger).map(di);\n I.length && e.hooks.nodesChange.trigger(I);\n }, ee = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, I = (e.isValidConnection ? b.filter(\n (F) => e.isValidConnection(F, {\n edges: e.edges,\n sourceNode: s(F.source),\n targetNode: s(F.target)\n })\n ) : b).reduce((F, U) => {\n const Y = pa(\n {\n ...U,\n ...e.defaultEdgeOptions\n },\n e.edges,\n e.hooks.error.trigger\n );\n if (Y) {\n const ne = s(Y.source), O = s(Y.target), ae = !ne || typeof ne > \"u\", me = !O || typeof O > \"u\";\n if (ae && me ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (ae && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, Y.id, Y.source)), me && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, Y.id, Y.target))), ae || me)\n return F;\n F.push(\n di({\n ...Y,\n sourceNode: ne,\n targetNode: O\n })\n );\n }\n return F;\n }, []);\n I.length && e.hooks.edgesChange.trigger(I);\n }, m = (f, b = !0) => {\n const L = f instanceof Function ? f(e.nodes) : f, I = [], F = [];\n L.forEach((U) => {\n const Y = typeof U == \"string\" ? s(U) : U;\n if (!(ce(Y.deletable) && !Y.deletable) && (I.push(zn(Y.id)), b)) {\n const ne = sn([Y], e.edges).filter((O) => ce(O.deletable) ? O.deletable : !0);\n F.push(...ne.map((O) => zn(O.id)));\n }\n }), F.length && e.hooks.edgesChange.trigger(F), I.length && e.hooks.nodesChange.trigger(I);\n }, A = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, L = [];\n b.forEach((I) => {\n const F = typeof I == \"string\" ? l(I) : I;\n ce(F.deletable) && !F.deletable || L.push(zn(typeof I == \"string\" ? I : I.id));\n }), e.hooks.edgesChange.trigger(L);\n }, E = (f, b, L = !0) => ya(f, b, e.edges, l, L, e.hooks.error.trigger), G = (f) => nn(f, e.nodes), Z = (f) => nn(f, e.edges), K = (f, b, L, I = !1) => {\n I ? e.connectionClickStartHandle = f : e.connectionStartHandle = f, e.connectionEndHandle = null, e.connectionStatus = null, b && (e.connectionPosition = b);\n }, z = (f, b = null, L = null) => {\n e.connectionStartHandle && (e.connectionPosition = f, e.connectionEndHandle = b, e.connectionStatus = L);\n }, W = (f, b) => {\n e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, b ? e.connectionClickStartHandle = null : e.connectionStartHandle = null;\n }, B = (f) => {\n const b = ha(f), L = b ? null : s(f.id);\n return !b && !L ? [null, null, b] : [b ? f : Io(L), L, b];\n }, q = (f, b = !0, L) => {\n const [I, F, U] = B(f);\n return I ? (L || e.nodes).filter((Y) => {\n if (!U && (Y.id === F.id || !Y.computedPosition))\n return !1;\n const ne = Io(Y), O = Fn(ne, I);\n return b && O > 0 || O >= Number(f.width) * Number(f.height);\n }) : [];\n }, te = (f, b, L = !0) => {\n const [I] = B(f);\n if (!I)\n return !1;\n const F = Fn(I, b);\n return L && F > 0 || F >= Number(f.width) * Number(f.height);\n }, re = (f) => {\n const { viewport: b, dimensions: L, d3Zoom: I, d3Selection: F, translateExtent: U } = e;\n if (!I || !F || !f.x && !f.y)\n return !1;\n const Y = et.translate(b.x + f.x, b.y + f.y).scale(b.zoom), ne = [\n [0, 0],\n [L.width, L.height]\n ], O = I.constrain()(Y, ne, U), ae = e.viewport.x !== O.x || e.viewport.y !== O.y || e.viewport.zoom !== O.k;\n return I.transform(F, O), ae;\n }, k = (f) => {\n const b = f instanceof Function ? f(e) : f, L = [\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"nodeExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n ], I = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n ce(b.defaultEdgeOptions) && (e.defaultEdgeOptions = b.defaultEdgeOptions);\n const F = b.modelValue || b.nodes || b.edges ? [] : void 0;\n F && (b.modelValue && F.push(...b.modelValue), b.nodes && F.push(...b.nodes), b.edges && F.push(...b.edges), D(F));\n const U = () => {\n ce(b.maxZoom) && N(b.maxZoom), ce(b.minZoom) && p(b.minZoom), ce(b.translateExtent) && T(b.translateExtent), ce(b.nodeExtent) && _(b.nodeExtent);\n };\n Object.keys(b).forEach((Y) => {\n const ne = Y, O = b[ne];\n ![...L, ...I].includes(ne) && ce(O) && (e[ne] = O);\n }), e.d3Zoom ? U() : ye(() => e.d3Zoom).not.toBeUndefined().then(U), e.initialized || (e.initialized = !0);\n };\n return {\n updateNodePositions: u,\n updateNodeDimensions: c,\n setElements: D,\n setNodes: R,\n setEdges: $,\n addNodes: Q,\n addEdges: ee,\n removeNodes: m,\n removeEdges: A,\n findNode: s,\n findEdge: l,\n updateEdge: E,\n applyEdgeChanges: Z,\n applyNodeChanges: G,\n addSelectedElements: w,\n addSelectedNodes: h,\n addSelectedEdges: d,\n setMinZoom: p,\n setMaxZoom: N,\n setTranslateExtent: T,\n setNodeExtent: _,\n removeSelectedElements: V,\n removeSelectedNodes: y,\n removeSelectedEdges: S,\n startConnection: K,\n updateConnection: z,\n endConnection: W,\n setInteractive: P,\n setState: k,\n getIntersectingNodes: q,\n isNodeIntersecting: te,\n panBy: re,\n fitView: async (f = { padding: 0.1 }) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitView(f);\n },\n zoomIn: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomIn(f);\n },\n zoomOut: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomOut(f);\n },\n zoomTo: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomTo(f, b);\n },\n setTransform: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setTransform(f, b);\n },\n getTransform: () => r.value.getTransform(),\n setCenter: async (f, b, L) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setCenter(f, b, L);\n },\n fitBounds: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitBounds(f, b);\n },\n project: (f) => r.value.project(f),\n toObject: () => JSON.parse(\n JSON.stringify({\n nodes: e.nodes.map((f) => {\n const {\n computedPosition: b,\n handleBounds: L,\n selected: I,\n dimensions: F,\n isParent: U,\n resizing: Y,\n dragging: ne,\n initialized: O,\n ...ae\n } = f;\n return ae;\n }),\n edges: e.edges.map((f) => {\n const { selected: b, sourceNode: L, targetNode: I, ...F } = f;\n return F;\n }),\n position: [e.viewport.x, e.viewport.y],\n zoom: e.viewport.zoom\n })\n ),\n updateNodeInternals: a,\n $reset: () => {\n const f = ar();\n if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) {\n const b = et.translate(f.defaultViewport.x ?? 0, f.defaultViewport.y ?? 0).scale(je(f.defaultViewport.zoom ?? 1, f.minZoom, f.maxZoom)), L = e.viewportRef.getBoundingClientRect(), I = [\n [0, 0],\n [L.width, L.height]\n ], F = e.d3Zoom.constrain()(b, I, f.translateExtent);\n e.d3Zoom.transform(e.d3Selection, F);\n }\n k(f);\n },\n $destroy: () => {\n }\n };\n}\nclass ot {\n constructor() {\n this.currentId = 0, this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n return ot.instance || (ot.instance = new ot()), ot.instance;\n }\n set(t, n) {\n return this.flows.set(t, n);\n }\n get(t) {\n return this.flows.get(t);\n }\n remove(t) {\n return this.flows.delete(t);\n }\n create(t, n) {\n const o = ar(n), i = kr(o), r = J(() => i.nodes.map((g) => g.id)), a = J(() => i.edges.map((g) => g.id)), s = cu(i, r, a), l = od(i, s, r, a), u = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n const h = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;\n u[h] = x.on;\n });\n const c = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n c[g] = x.trigger;\n }), l.setState(i);\n const v = {\n ...u,\n ...s,\n ...l,\n ...Or(i),\n emits: c,\n id: t,\n vueFlowVersion: \"1.19.4\",\n $destroy: () => {\n this.remove(t);\n }\n };\n return this.set(t, v), v;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nconst fe = (e) => {\n const t = ot.getInstance(), n = hi(), o = e == null ? void 0 : e.id, i = (n == null ? void 0 : n.vueFlowId) || o;\n let r, a = !1;\n if (n) {\n const s = He(zo, null);\n typeof s < \"u\" && s !== null && (r = s);\n }\n if (r || i && (r = t.get(i)), !r || r && o && o !== r.id) {\n const s = o ?? t.getId();\n r = t.create(s, e), n && (a = !0);\n } else\n e && r.setState(e);\n return n && (ut(zo, r), n.vueFlowId = r.id, a && Mt(() => {\n if (r) {\n const s = t.get(r.id);\n s ? s.$destroy() : wt(`No store instance found for id ${r.id} in storage.`);\n }\n })), r;\n};\nfunction id(e, t, n) {\n const o = Tr();\n return o.run(() => {\n [\n () => {\n o.run(() => {\n let h, d, w = !!(n.nodes.value.length || n.edges.value.length);\n h = tt([e.modelValue, () => {\n var y, S;\n return (S = (y = e.modelValue) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setElements(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],\n ([y, S]) => {\n var V;\n (V = e.modelValue) != null && V.value && Array.isArray(e.modelValue.value) && (h == null || h.pause(), e.modelValue.value = [...y, ...S], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.nodes.value.length;\n h = tt([e.nodes, () => {\n var y, S;\n return (S = (y = e.nodes) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setNodes(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, () => n.nodes.value.length],\n ([y]) => {\n var S;\n (S = e.nodes) != null && S.value && Array.isArray(e.nodes.value) && (h == null || h.pause(), e.nodes.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.edges.value.length;\n h = tt([e.edges, () => {\n var y, S;\n return (S = (y = e.edges) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setEdges(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.edges, () => n.edges.value.length],\n ([y]) => {\n var S;\n (S = e.edges) != null && S.value && Array.isArray(e.edges.value) && (h == null || h.pause(), e.edges.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.minZoom,\n () => {\n t.minZoom && ce(t.minZoom) && n.setMinZoom(t.minZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.maxZoom,\n () => {\n t.maxZoom && ce(t.maxZoom) && n.setMaxZoom(t.maxZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.translateExtent,\n () => {\n t.translateExtent && ce(t.translateExtent) && n.setTranslateExtent(t.translateExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.nodeExtent,\n () => {\n t.nodeExtent && ce(t.nodeExtent) && n.setNodeExtent(t.nodeExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.applyDefault,\n () => {\n ce(t.applyDefault) && (n.applyDefault.value = t.applyDefault);\n }\n ), de(\n n.applyDefault,\n (h, d, w) => {\n n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), w(() => {\n n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n o.run(() => {\n const h = async (d) => {\n let w = d;\n Ae(t.autoConnect) && (w = await t.autoConnect(d)), w !== !1 && n.addEdges([w]);\n };\n de(\n () => t.autoConnect,\n () => {\n ce(t.autoConnect) && (n.autoConnect.value = t.autoConnect);\n }\n ), de(\n n.autoConnect,\n (d, w, y) => {\n d ? n.onConnect(h) : n.hooks.value.connect.off(h), y(() => {\n n.hooks.value.connect.off(h);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n const h = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n Object.keys(t).forEach((d) => {\n if (!h.includes(d)) {\n const w = M(t, d), y = n[d];\n o.run(() => {\n de(\n w,\n (S) => {\n ce(S) && (y.value = S);\n },\n { flush: \"pre\" }\n );\n });\n }\n });\n }\n ].forEach((h) => h());\n }), () => o.stop();\n}\nfunction fi(e, t) {\n return {\n x: e.clientX - t.left,\n y: e.clientY - t.top\n };\n}\nconst rd = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n}, ad = /* @__PURE__ */ ge({\n ...rd,\n props: {\n isSelecting: { type: Boolean }\n },\n setup(e) {\n const {\n id: t,\n vueFlowRef: n,\n getNodes: o,\n getEdges: i,\n viewport: r,\n emits: a,\n userSelectionActive: s,\n removeSelectedElements: l,\n panOnDrag: u,\n userSelectionRect: c,\n elementsSelectable: v,\n nodesSelectionActive: g,\n addSelectedElements: x,\n getSelectedEdges: h,\n getSelectedNodes: d,\n removeNodes: w,\n removeEdges: y,\n selectionMode: S,\n deleteKeyCode: V,\n multiSelectionKeyCode: p,\n multiSelectionActive: N\n } = fe(), T = ie(null), _ = ie(0), P = ie(0), R = ie(), $ = J(() => v.value && (e.isSelecting || s.value));\n _t(V, (z) => {\n if (!z)\n return;\n const W = o.value.reduce((B, q) => ((!q.selected && q.parentNode && B.find((te) => te.id === q.parentNode) || q.selected) && B.push(q), B), []);\n (W || h.value) && (h.value.length > 0 && y(h.value), W.length > 0 && w(W), g.value = !1, l());\n }), _t(p, (z) => {\n N.value = z;\n });\n function D() {\n s.value = !1, c.value = null, _.value = 0, P.value = 0;\n }\n function Q(z) {\n z.target !== T.value || $.value || (a.paneClick(z), l(), g.value = !1);\n }\n function ee(z) {\n var W;\n if (z.target === T.value) {\n if (Array.isArray(u.value) && ((W = u.value) != null && W.includes(2))) {\n z.preventDefault();\n return;\n }\n a.paneContextMenu(z);\n }\n }\n function m(z) {\n z.target === T.value && a.paneScroll(z);\n }\n function A(z) {\n if (R.value = n.value.getBoundingClientRect(), !$.value || !v || !e.isSelecting || z.button !== 0 || z.target !== T.value || !R.value)\n return;\n const { x: W, y: B } = fi(z, R.value);\n l(), c.value = {\n width: 0,\n height: 0,\n startX: W,\n startY: B,\n x: W,\n y: B\n }, s.value = !0, a.selectionStart(z);\n }\n function E(z) {\n if (!$.value)\n return a.paneMouseMove(z);\n if (!e.isSelecting || !R.value || !c.value)\n return;\n s.value || (s.value = !0), g.value && (g.value = !1);\n const W = fi(z, R.value), B = c.value.startX ?? 0, q = c.value.startY ?? 0, te = {\n ...c.value,\n x: W.x < B ? W.x : B,\n y: W.y < q ? W.y : q,\n width: Math.abs(W.x - B),\n height: Math.abs(W.y - q)\n }, re = Ci(\n o.value,\n c.value,\n r.value,\n S.value === fo.Partial\n ), k = sn(re, i.value);\n _.value = re.length, P.value = k.length, c.value = te, x([...re, ...k]);\n }\n function G(z) {\n $.value && z.button === 0 && (!s.value && c.value && z.target === T.value && Q(z), g.value = _.value > 0, D(), a.selectionEnd(z));\n }\n function Z(z) {\n var W;\n if (!$.value)\n return a.paneMouseLeave(z);\n s.value && (g.value = _.value > 0, (W = a.selectionEnd) == null || W.call(a, z)), D();\n }\n function K(z) {\n $.value || a.paneMouseEnter(z);\n }\n return (z, W) => (oe(), se(\"div\", {\n ref_key: \"container\",\n ref: T,\n key: `pane-${C(t)}`,\n class: Ke([\"vue-flow__pane vue-flow__container\", { selection: e.isSelecting }]),\n onClick: Q,\n onContextmenu: ee,\n onWheelPassive: m,\n onMouseenter: K,\n onMousedown: A,\n onMousemove: E,\n onMouseup: G,\n onMouseleave: Z\n }, [\n xe(z.$slots, \"default\"),\n C(s) && C(c) ? (oe(), ze(au, { key: 0 })) : Ee(\"\", !0),\n C(g) && C(d).length ? (oe(), ze(iu, { key: 1 })) : Ee(\"\", !0)\n ], 34));\n }\n}), sd = { class: \"vue-flow__nodes vue-flow__container\" }, ld = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n}, ud = /* @__PURE__ */ ge({\n ...ld,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"nodesDraggable\"), i = M(n, \"nodesFocusable\"), r = M(n, \"elementsSelectable\"), a = M(n, \"nodesConnectable\"), s = M(n, \"getNodes\"), l = M(n, \"getNodesInitialized\"), u = M(n, \"getNodeTypes\"), c = M(n, \"updateNodeDimensions\"), v = M(n, \"emits\");\n let g = ie();\n ye(() => s.value.length > 0 && l.value.length === s.value.length).toBe(!0).then(() => {\n Ue(() => {\n v.value.nodesInitialized(l.value);\n });\n }), Ve(() => {\n g.value = new ResizeObserver((S) => {\n const V = S.map((p) => ({\n id: p.target.getAttribute(\"data-id\"),\n nodeElement: p.target,\n forceUpdate: !0\n }));\n c.value(V);\n });\n }), gi(() => {\n var S;\n return (S = g.value) == null ? void 0 : S.disconnect();\n });\n function x(S) {\n return typeof S > \"u\" ? o.value : S;\n }\n function h(S) {\n return typeof S > \"u\" ? r.value : S;\n }\n function d(S) {\n return typeof S > \"u\" ? a.value : S;\n }\n function w(S) {\n return typeof S > \"u\" ? i.value : S;\n }\n function y(S, V) {\n const p = S || \"default\";\n let N = V ?? u.value[p];\n const T = on();\n if (typeof N == \"string\" && T) {\n const P = Object.keys(T.appContext.components);\n P && P.includes(p) && (N = pi(p, !1));\n }\n if (typeof N != \"string\")\n return N;\n const _ = t == null ? void 0 : t[`node-${p}`];\n return _ || (v.value.error(new ve(he.NODE_TYPE_MISSING, N)), !1);\n }\n return (S, V) => (oe(), se(\"div\", sd, [\n C(g) ? (oe(!0), se(Ce, { key: 0 }, dt(C(s), (p) => (oe(), ze(C(Tl), {\n id: p.id,\n key: p.id,\n \"resize-observer\": C(g),\n type: y(p.type, p.template),\n name: p.type || \"default\",\n draggable: x(p.draggable),\n selectable: h(p.selectable),\n connectable: d(p.connectable),\n focusable: w(p.focusable),\n node: p\n }, null, 8, [\"id\", \"resize-observer\", \"type\", \"name\", \"draggable\", \"selectable\", \"connectable\", \"focusable\", \"node\"]))), 128)) : Ee(\"\", !0)\n ]));\n }\n}), cd = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"], dd = [\"stroke\", \"stroke-width\", \"fill\"], fd = [\"stroke\", \"stroke-width\"], hd = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n}, gd = /* @__PURE__ */ ge({\n ...hd,\n props: {\n id: null,\n type: null,\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(e) {\n return (t, n) => (oe(), se(\"marker\", {\n id: e.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${e.width}`,\n markerHeight: `${e.height}`,\n markerUnits: e.markerUnits,\n orient: e.orient\n }, [\n e.type === C(Yn).ArrowClosed ? (oe(), se(\"polyline\", {\n key: 0,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: e.color,\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 8, dd)) : Ee(\"\", !0),\n e.type === C(Yn).Arrow ? (oe(), se(\"polyline\", {\n key: 1,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 8, fd)) : Ee(\"\", !0)\n ], 8, cd));\n }\n}), vd = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n}, md = /* @__PURE__ */ ge({\n ...vd,\n setup(e) {\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"connectionLineOptions\"), r = M(t, \"defaultMarkerColor\"), a = J(() => {\n const s = [], l = [], u = (c) => {\n if (c) {\n const v = Xe(c, n.value);\n s.includes(v) || (typeof c == \"object\" ? l.push({ ...c, id: v, color: c.color || r.value }) : l.push({ id: v, color: r.value, type: c }), s.push(v));\n }\n };\n return [i.value.markerEnd, i.value.markerStart].forEach(u), o.value.reduce((c, v) => ([v.markerStart, v.markerEnd].forEach(u), c.sort((g, x) => g.id.localeCompare(x.id))), l), l;\n });\n return (s, l) => (oe(), se(\"defs\", null, [\n (oe(!0), se(Ce, null, dt(C(a), (u) => (oe(), ze(gd, {\n id: u.id,\n key: u.id,\n type: u.type,\n color: u.color,\n width: u.width,\n height: u.height,\n markerUnits: u.markerUnits,\n \"stroke-width\": u.strokeWidth,\n orient: u.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]))), 128))\n ]));\n }\n}), pd = {\n key: 0,\n class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\"\n}, yd = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n}, xd = /* @__PURE__ */ ge({\n ...yd,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"connectionStartHandle\"), i = M(n, \"nodesConnectable\"), r = M(n, \"edgesUpdatable\"), a = M(n, \"edgesFocusable\"), s = M(n, \"elementsSelectable\"), l = M(n, \"getSelectedNodes\"), u = M(n, \"findNode\"), c = M(n, \"edges\"), v = M(n, \"getEdges\"), g = M(n, \"getNodesInitialized\"), x = M(n, \"getEdgeTypes\"), h = M(n, \"elevateEdgesOnSelect\"), d = M(n, \"dimensions\"), w = M(n, \"emits\"), y = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P;\n return (P = o.value) != null && P.nodeId ? u.value(o.value.nodeId) : !1;\n }\n ), S = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P, R;\n return !!(y.value && (typeof y.value.connectable > \"u\" ? i.value : y.value.connectable) && ((P = o.value) != null && P.nodeId) && ((R = o.value) != null && R.type));\n }\n ), V = Sn(\n [\n () => c.value.map((P) => P.zIndex),\n () => h.value ? [l.value.length] : [0],\n () => h.value ? g.value.map((P) => P.computedPosition.z) : []\n ],\n () => Ea(v.value, u.value, h.value)\n );\n function p(P) {\n return typeof P > \"u\" ? s.value : P;\n }\n function N(P) {\n return typeof P > \"u\" ? r.value : P;\n }\n function T(P) {\n return typeof P > \"u\" ? a.value : P;\n }\n function _(P, R) {\n const $ = P || \"default\";\n let D = R ?? x.value[$];\n const Q = on();\n if (typeof D == \"string\" && Q) {\n const m = Object.keys(Q.appContext.components);\n m && m.includes($) && (D = pi($, !1));\n }\n if (D && typeof D != \"string\")\n return D;\n const ee = t == null ? void 0 : t[`edge-${$}`];\n return ee || (w.value.error(new ve(he.EDGE_TYPE_MISSING, D)), !1);\n }\n return (P, R) => C(d).width && C(d).height ? (oe(), se(Ce, { key: 0 }, [\n (oe(!0), se(Ce, null, dt(C(V), ($) => (oe(), se(\"svg\", {\n key: $.level,\n class: \"vue-flow__edges vue-flow__container\",\n style: Le(`z-index: ${$.level}`)\n }, [\n $.isMaxLevel ? (oe(), ze(md, { key: 0 })) : Ee(\"\", !0),\n ct(\"g\", null, [\n (oe(!0), se(Ce, null, dt($.edges, (D) => (oe(), ze(C(Kl), {\n id: D.id,\n key: D.id,\n edge: D,\n type: _(D.type, D.template),\n name: D.type || \"default\",\n selectable: p(D.selectable),\n updatable: N(D.updatable),\n focusable: T(D.focusable)\n }, null, 8, [\"id\", \"edge\", \"type\", \"name\", \"selectable\", \"updatable\", \"focusable\"]))), 128))\n ])\n ], 4))), 128)),\n C(S) && C(y) ? (oe(), se(\"svg\", pd, [\n qe(tu, { \"source-node\": C(y) }, null, 8, [\"source-node\"])\n ])) : Ee(\"\", !0)\n ], 64)) : Ee(\"\", !0);\n }\n}), _d = /* @__PURE__ */ ct(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1), wd = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n}, bd = /* @__PURE__ */ ge({\n ...wd,\n setup(e) {\n const { id: t, viewport: n, emits: o, d3Zoom: i, d3Selection: r, dimensions: a, ...s } = fe(), l = ie(!oo);\n return ye(() => i.value && r.value && a.value.width > 0 && a.value.height > 0).toBeTruthy().then(() => {\n o.paneReady({\n id: t,\n viewport: n,\n emits: o,\n d3Zoom: i,\n d3Selection: r,\n dimensions: a,\n ...s\n }), setTimeout(() => {\n l.value = !0;\n }, 0);\n }), (u, c) => (oe(), se(\"div\", {\n key: `transform-${C(t)}`,\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: Le({\n transform: `translate(${C(n).x}px,${C(n).y}px) scale(${C(n).zoom})`,\n opacity: C(l) ? void 0 : 0\n })\n }, [\n qe(xd),\n _d,\n qe(ud),\n xe(u.$slots, \"default\")\n ], 4));\n }\n}), Ed = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n}, Sd = /* @__PURE__ */ ge({\n ...Ed,\n setup(e) {\n const {\n id: t,\n minZoom: n,\n maxZoom: o,\n defaultViewport: i,\n translateExtent: r,\n dimensions: a,\n zoomActivationKeyCode: s,\n selectionKeyCode: l,\n panActivationKeyCode: u,\n panOnScroll: c,\n panOnScrollMode: v,\n panOnScrollSpeed: g,\n panOnDrag: x,\n zoomOnDoubleClick: h,\n zoomOnPinch: d,\n zoomOnScroll: w,\n preventScrolling: y,\n noWheelClassName: S,\n noPanClassName: V,\n emits: p,\n connectionStartHandle: N,\n userSelectionActive: T,\n paneDragging: _,\n d3Zoom: P,\n d3Selection: R,\n d3ZoomHandler: $,\n viewport: D,\n viewportRef: Q\n } = fe(), ee = ie(), m = ie(!1), A = ie(!1);\n let E = !1, G = 0, Z = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const K = _t(u), z = J(() => !m.value && x.value && K.value), W = J(\n () => l.value !== !0 && m.value || l.value === !0 && !z.value\n );\n Ve(() => {\n oa(ee, re);\n const H = ao();\n ro(H, \"resize\", re);\n }), Ve(() => {\n const H = ee.value, f = H.getBoundingClientRect(), b = ed().scaleExtent([n.value, o.value]).translateExtent(r.value), L = we(H).call(b), I = L.on(\"wheel.zoom\"), F = et.translate(i.value.x ?? 0, i.value.y ?? 0).scale(je(i.value.zoom ?? 1, n.value, o.value)), U = [\n [0, 0],\n [f.width, f.height]\n ], Y = b.constrain()(F, U, r.value);\n b.transform(L, Y), P.value = b, R.value = L, $.value = I, D.value = { x: Y.x, y: Y.y, zoom: Y.k }, Q.value = H, _t(l, (O) => {\n m.value = O;\n });\n const ne = _t(s);\n bo(() => {\n m.value && T.value && !A.value ? b.on(\"zoom\", null) : !m.value && !T.value && b.on(\"zoom\", (O) => {\n D.value = { x: O.transform.x, y: O.transform.y, zoom: O.transform.k };\n const ae = te(O.transform);\n E = B(x.value, G ?? 0), p.viewportChange(ae), p.move({ event: O, flowTransform: ae });\n });\n }), b.on(\"start\", (O) => {\n var me;\n if (!O.sourceEvent)\n return null;\n G = O.sourceEvent.button, A.value = !0;\n const ae = te(O.transform);\n ((me = O.sourceEvent) == null ? void 0 : me.type) === \"mousedown\" && (_.value = !0), Z = ae, p.viewportChangeStart(ae), p.moveStart({ event: O, flowTransform: ae });\n }), b.on(\"end\", (O) => {\n if (!O.sourceEvent)\n return null;\n if (A.value = !1, _.value = !1, B(x.value, G ?? 0) && !E && p.paneContextMenu(O.sourceEvent), E = !1, q(Z, O.transform)) {\n const ae = te(O.transform);\n Z = ae, p.viewportChangeEnd(ae), p.moveEnd({ event: O, flowTransform: ae });\n }\n }), bo(() => {\n c.value && !ne.value && !T.value ? L.on(\n \"wheel.zoom\",\n (O) => {\n if (k(O, S.value))\n return !1;\n O.preventDefault(), O.stopImmediatePropagation();\n const ae = L.property(\"__zoom\").k || 1;\n if (O.ctrlKey && d.value) {\n const Tt = Ne(O), _r = -O.deltaY * (O.deltaMode === 1 ? 0.05 : O.deltaMode ? 1 : 2e-3) * 10, wr = ae * 2 ** _r;\n b.scaleTo(L, wr, Tt);\n return;\n }\n const me = O.deltaMode === 1 ? 20 : 1, En = v.value === Ut.Vertical ? 0 : O.deltaX * me, Ot = v.value === Ut.Horizontal ? 0 : O.deltaY * me;\n b.translateBy(\n L,\n -(En / ae) * g.value,\n -(Ot / ae) * g.value\n );\n },\n { passive: !1 }\n ) : typeof I < \"u\" && L.on(\n \"wheel.zoom\",\n function(O, ae) {\n if (!y.value || k(O, S.value))\n return null;\n O.preventDefault(), I.call(this, O, ae);\n },\n { passive: !1 }\n );\n }), b.filter((O) => {\n var Ot, Tt;\n const ae = ne.value || w.value, me = d.value && O.ctrlKey;\n if (O.button === 1 && O.type === \"mousedown\" && ((Ot = O.target) != null && Ot.closest(\".vue-flow__node\") || (Tt = O.target) != null && Tt.closest(\".vue-flow__edge\")))\n return !0;\n if (!x.value && !ae && !c.value && !h.value && !d.value || T.value || !h.value && O.type === \"dblclick\" || k(O, S.value) && O.type === \"wheel\" || k(O, V.value) && O.type !== \"wheel\" || !d.value && O.ctrlKey && O.type === \"wheel\" || !ae && !c.value && !me && O.type === \"wheel\" || !x.value && (O.type === \"mousedown\" || O.type === \"touchstart\") || Array.isArray(x.value) && !x.value.includes(O.button) && (O.type === \"mousedown\" || O.type === \"touchstart\"))\n return !1;\n const En = Array.isArray(x.value) && x.value.includes(O.button) || !O.button || O.button <= 1;\n return (!O.ctrlKey || O.type === \"wheel\") && En;\n });\n });\n function B(H, f) {\n return f === 2 && Array.isArray(H) && H.includes(2);\n }\n function q(H, f) {\n return H.x !== f.x && !isNaN(f.x) || H.y !== f.y && !isNaN(f.y) || H.zoom !== f.k && !isNaN(f.k);\n }\n function te(H) {\n return {\n x: H.x,\n y: H.y,\n zoom: H.k\n };\n }\n function re() {\n if (!ee.value)\n return;\n const { width: H, height: f } = rn(ee.value);\n (H === 0 || f === 0) && p.error(new ve(he.MISSING_VIEWPORT_DIMENSIONS)), a.value.width = H || 500, a.value.height = f || 500;\n }\n function k(H, f) {\n return H.target.closest(`.${f}`);\n }\n return (H, f) => (oe(), se(Ce, null, [\n (oe(), se(\"div\", {\n ref_key: \"viewportEl\",\n ref: ee,\n key: `viewport-${C(t)}`,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n qe(ad, {\n \"is-selecting\": C(W),\n class: Ke({ connecting: !!C(N), dragging: C(_), draggable: !!C(x) })\n }, {\n default: Fe(() => [\n qe(bd, null, {\n default: Fe(() => [\n xe(H.$slots, \"zoom-pane\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"class\"])\n ])),\n xe(H.$slots, \"default\")\n ], 64));\n }\n}), Nd = [\"id\"], Cd = [\"id\"], Md = [\"id\"], $d = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n}, kd = /* @__PURE__ */ ge({\n ...$d,\n setup(e) {\n const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = fe(), i = {\n position: \"absolute\",\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: \"hidden\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n clipPath: \"inset(100%)\"\n };\n return (r, a) => (oe(), se(Ce, null, [\n ct(\"div\", {\n id: `${C(Qi)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select a node. \" + Vn(C(n) ? \"\" : \"You can then use the arrow keys to move the node around.\") + \" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. \", 9, Nd),\n ct(\"div\", {\n id: `${C(Ji)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, Cd),\n C(n) ? Ee(\"\", !0) : (oe(), se(\"div\", {\n key: 0,\n id: `${C(Ml)}-${C(t)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n style: i\n }, Vn(C(o)), 9, Md))\n ], 64));\n }\n}), Od = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n}, Ld = /* @__PURE__ */ ge({\n ...Od,\n props: {\n id: null,\n modelValue: null,\n nodes: null,\n edges: null,\n edgeTypes: null,\n nodeTypes: null,\n connectionMode: null,\n connectionLineType: null,\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: null,\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: null,\n selectionKeyCode: null,\n multiSelectionKeyCode: null,\n zoomActivationKeyCode: null,\n panActivationKeyCode: null,\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: null,\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: null,\n maxZoom: null,\n defaultViewport: null,\n translateExtent: null,\n nodeExtent: null,\n defaultMarkerColor: null,\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: null,\n panOnScrollMode: null,\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: null,\n edgeUpdaterRadius: null,\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: null,\n noWheelClassName: null,\n noPanClassName: null,\n defaultEdgeOptions: null,\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n __experimentalFeatures: null\n },\n emits: [\"nodesChange\", \"edgesChange\", \"nodeDoubleClick\", \"nodeClick\", \"nodeMouseEnter\", \"nodeMouseMove\", \"nodeMouseLeave\", \"nodeContextMenu\", \"nodeDragStart\", \"nodeDrag\", \"nodeDragStop\", \"nodesInitialized\", \"miniMapNodeClick\", \"miniMapNodeDoubleClick\", \"miniMapNodeMouseEnter\", \"miniMapNodeMouseMove\", \"miniMapNodeMouseLeave\", \"connect\", \"connectStart\", \"connectEnd\", \"clickConnectStart\", \"clickConnectEnd\", \"moveStart\", \"move\", \"moveEnd\", \"selectionDragStart\", \"selectionDrag\", \"selectionDragStop\", \"selectionContextMenu\", \"selectionStart\", \"selectionEnd\", \"viewportChangeStart\", \"viewportChange\", \"viewportChangeEnd\", \"paneReady\", \"paneScroll\", \"paneClick\", \"paneContextMenu\", \"paneMouseEnter\", \"paneMouseMove\", \"paneMouseLeave\", \"edgeContextMenu\", \"edgeMouseEnter\", \"edgeMouseMove\", \"edgeMouseLeave\", \"edgeDoubleClick\", \"edgeClick\", \"edgeUpdateStart\", \"edgeUpdate\", \"edgeUpdateEnd\", \"updateNodeInternals\", \"error\", \"update:modelValue\", \"update:nodes\", \"update:edges\"],\n setup(e, { expose: t, emit: n }) {\n const o = e, i = yt(o, \"modelValue\", n), r = yt(o, \"nodes\", n), a = yt(o, \"edges\", n), { vueFlowRef: s, hooks: l, getNodeTypes: u, getEdgeTypes: c, ...v } = fe(o), g = id({ modelValue: i, nodes: r, edges: a }, o, {\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n });\n da(n, l);\n const x = ie();\n return ut(ln, Ir()), Pr(() => {\n g();\n }), Ve(() => {\n s.value = x.value;\n }), t({\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n }), (h, d) => (oe(), se(\"div\", {\n ref_key: \"el\",\n ref: x,\n class: \"vue-flow\"\n }, [\n qe(Sd, null, {\n nodes: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(u)), (w) => xe(h.$slots, `node-${w}`)), 256))\n ]),\n edges: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(c)), (w) => xe(h.$slots, `edge-${w}`)), 256))\n ]),\n \"connection-name\": Fe(() => [\n xe(h.$slots, \"connection-line\")\n ]),\n \"zoom-pane\": Fe(() => [\n xe(h.$slots, \"zoom-pane\")\n ]),\n default: Fe(() => [\n xe(h.$slots, \"default\")\n ]),\n _: 3\n }),\n qe(kd)\n ], 512));\n }\n}), Td = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n}, Gd = /* @__PURE__ */ ge({\n ...Td,\n props: {\n position: null\n },\n setup(e) {\n const t = e, { userSelectionActive: n } = fe(), o = J(() => `${t.position}`.split(\"-\"));\n return (i, r) => (oe(), se(\"div\", {\n class: Ke([\"vue-flow__panel\", C(o)]),\n style: Le({ pointerEvents: C(n) ? \"none\" : \"all\" })\n }, [\n xe(i.$slots, \"default\")\n ], 6));\n }\n}), Bn = 0.1, Fd = (e) => {\n const t = fe({ id: e }), n = M(t, \"nodes\"), o = M(t, \"d3Zoom\"), i = M(t, \"d3Selection\"), r = M(t, \"dimensions\"), a = M(t, \"translateExtent\"), s = M(t, \"minZoom\"), l = M(t, \"maxZoom\"), u = M(t, \"viewport\"), c = M(t, \"snapToGrid\"), v = M(t, \"snapGrid\"), g = M(t, \"getNodes\");\n return {\n zoomIn: (d) => {\n x(1.2, d == null ? void 0 : d.duration);\n },\n zoomOut: (d) => {\n x(1 / 1.2, d == null ? void 0 : d.duration);\n },\n zoomTo: (d, w) => {\n i.value && o.value && o.value.scaleTo(Rn(i.value, w == null ? void 0 : w.duration), d);\n },\n setTransform: (d, w) => {\n h(d.x, d.y, d.zoom, w == null ? void 0 : w.duration);\n },\n getTransform: () => ({\n x: u.value.x,\n y: u.value.y,\n zoom: u.value.zoom\n }),\n fitView: (d = {\n padding: Bn,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!n.value.length)\n return;\n const w = (d.includeHiddenNodes ? n.value : g.value).filter((N) => {\n var P;\n const T = N.initialized && N.dimensions.width && N.dimensions.height;\n let _ = !0;\n return (P = d.nodes) != null && P.length && (_ = d.nodes.includes(N.id)), T && _;\n }), y = co(w), { x: S, y: V, zoom: p } = Zt(\n y,\n r.value.width,\n r.value.height,\n d.minZoom ?? s.value,\n d.maxZoom ?? l.value,\n d.padding ?? Bn,\n d.offset\n );\n h(S, V, p, d == null ? void 0 : d.duration);\n },\n setCenter: (d, w, y) => {\n const S = typeof (y == null ? void 0 : y.zoom) < \"u\" ? y.zoom : l.value, V = r.value.width / 2 - d * S, p = r.value.height / 2 - w * S;\n h(V, p, S, y == null ? void 0 : y.duration);\n },\n fitBounds: (d, w = { padding: Bn }) => {\n const { x: y, y: S, zoom: V } = Zt(d, r.value.width, r.value.height, s.value, l.value, w.padding);\n h(y, S, V, w == null ? void 0 : w.duration);\n },\n project: (d) => uo(d, u.value, c.value, v.value)\n };\n function x(d, w) {\n i.value && o.value && o.value.scaleBy(Rn(i.value, w), d);\n }\n function h(d, w, y, S) {\n const { x: V, y: p } = so({ x: -d, y: -w }, a.value), N = et.translate(-V, -p).scale(y);\n i.value && o.value && o.value.transform(Rn(i.value, S), N);\n }\n};\nfunction Rn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Yd(e) {\n const t = e ?? He(Oi, \"\"), n = He(Ti, null), { findEdge: o, emits: i } = fe(), r = o(t);\n return r || i.error(new ve(he.EDGE_NOT_FOUND, t)), {\n id: t,\n edge: r,\n edgeEl: n\n };\n}\nexport {\n vn as BaseEdge,\n Bl as BezierEdge,\n Ye as ConnectionLineType,\n Qe as ConnectionMode,\n Rd as EdgeLabelRenderer,\n Al as EdgeText,\n he as ErrorCode,\n ot as GlobalVueFlowStorage,\n Kt as Handle,\n Yn as MarkerType,\n $i as NodeIdInjection,\n Ut as PanOnScrollMode,\n Gd as Panel,\n xa as PanelPosition,\n j as Position,\n fo as SelectionMode,\n Rl as SimpleBezierEdge,\n ir as SmoothStepEdge,\n Gl as StepEdge,\n Fl as StraightEdge,\n Ld as VueFlow,\n ve as VueFlowError,\n zo as VueFlowInjection,\n zd as addEdge,\n nn as applyChanges,\n Vd as applyEdgeChanges,\n Hd as applyNodeChanges,\n je as clamp,\n Ei as connectionExists,\n lu as defaultEdgeTypes,\n su as defaultNodeTypes,\n nr as getBezierEdgeCenter,\n Kn as getBezierPath,\n Bd as getBoundsofRects,\n sn as getConnectedEdges,\n Dd as getIncomers,\n Xe as getMarkerId,\n Ci as getNodesInside,\n Pd as getOutgoers,\n co as getRectOfNodes,\n or as getSimpleBezierPath,\n tr as getSimpleEdgeCenter,\n qn as getSmoothStepPath,\n rr as getStraightPath,\n Zt as getTransformForBounds,\n va as graphPosToZoomedPos,\n $e as isEdge,\n fa as isGraphEdge,\n nt as isGraphNode,\n xt as isNode,\n uo as pointToRendererPoint,\n va as rendererPointToPoint,\n Ad as updateEdge,\n Yd as useEdge,\n Ra as useGetPointerPosition,\n Di as useHandle,\n _a as useNode,\n fe as useVueFlow,\n Fd as useZoomPanHelper\n};\n","\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","import { App } from 'vue'\n\nimport NodeEditor from '@/components/NodeEditor.vue'\nimport StateEditor from '@/components/StateEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('NodeEditor', NodeEditor)\n\tapp.component('StateEditor', StateEditor)\n}\n\nexport { install, NodeEditor, StateEditor }\n"],"names":["Eo","oo","Dr","zr","Ae","Ie","Pe","Ar","C","Br","i","r","yi","Rr","ie","Er","So","Vr","Sn","a","de","s","l","u","br","v","g","Mt","hi","Vt","Hr","on","Ve","Ue","Hn","x","h","d","w","S","V","p","Sr","y","N","T","ye","No","Lr","Gr","Fr","Yr","Xr","Zr","Ur","Yt","xi","_i","Co","Wr","Kr","qr","tt","wi","io","ro","jr","Mo","Qr","Jr","Ln","Gn","$o","ea","ta","na","oa","ko","ia","Oo","ra","aa","To","sa","la","yt","J","X","ua","wt","ca","da","Nr","he","Nn","ve","ao","Io","Fn","rn","je","so","Po","$e","fa","xt","nt","ha","ga","it","ce","lo","an","Ei","va","uo","Si","Xt","Ni","co","Ci","sn","Zt","ma","Mi","Xe","o","pa","ya","Do","j","fo","Ye","Qe","Yn","zo","$i","ki","Oi","Ti","ln","_a","He","fe","ho","rt","n","Wt","Ao","wa","ba","Ea","Cn","Bo","Sa","Ro","Ii","Na","Ca","Vo","Pi","It","Di","_","P","R","$","D","Q","m","G","A","E","Z","Y","L","f","B","F","I","U","ne","W","b","K","q","z","te","k","H","ee","Ma","$a","ka","Kt","ge","M","oe","se","Ke","xe","un","ue","Oa","cn","Ta","dn","Ia","Ho","Pa","Mn","zi","Da","za","go","Ai","Aa","Ba","Ra","Lo","Xn","Va","fn","Ht","Ha","La","Go","Zn","Fo","hn","Ga","Fa","Bi","Ya","vo","Xa","_e","Za","Ua","Ri","Wa","Ka","Vi","Hi","qa","ja","Qa","Ja","es","ts","ns","os","is","Li","rs","qt","as","ss","ls","us","cs","ds","fs","hs","gs","vs","ms","ps","ys","xs","_s","ws","bs","Es","Ss","Ns","Cs","Ms","$s","ks","Os","Gi","Ts","Is","Ps","Ds","ft","zs","As","Bs","Rs","Fi","mo","Yi","Xi","Zi","Vs","Hs","Ls","Gs","Fs","Ys","Xs","Zs","Us","Ws","Ks","qs","js","Qs","Js","el","tl","nl","ol","il","rl","al","sl","ll","ul","cl","dl","fl","hl","gl","Ui","vl","ml","pl","yl","Wi","$t","xl","we","_l","Ne","wl","bt","$n","Ki","qi","Pt","Un","bl","El","Sl","Nl","Cl","ji","Qi","Ji","Ml","er","st","Wn","t","$l","kl","_t","Ol","ut","gi","Tl","Il","Pl","Dl","zl","Al","Le","Ee","ct","vi","Ce","Cr","Vn","ze","mi","gn","tr","nr","Dt","Yo","Kn","mn","Bl","Xo","or","pn","Rl","Zo","Vl","Uo","Hl","Ll","qn","yn","ir","xn","Gl","rr","_n","Fl","Yl","Xl","po","Wo","Zl","Ul","Wl","Kl","ql","jl","Rd","Mr","Ql","Jl","eu","tu","c","$r","nu","ou","iu","ru","au","su","lu","uu","ar","cu","yo","sr","kt","jt","lt","Me","du","fu","hu","gu","vu","mu","pu","Ko","qo","yu","xu","jo","lr","Qo","pe","zt","ti","_u","jn","We","Qt","Jo","wu","ei","Ze","be","bu","ni","At","ur","Eu","Su","Nu","cr","oi","Re","Qn","On","Cu","Mu","$u","ii","Jn","dr","Bt","ku","Ou","fr","Tu","Iu","Pu","ri","Du","zu","Au","ht","mt","gt","hr","Jt","pt","en","Je","wn","Ct","gr","xo","Bu","tn","vr","eo","Ru","ai","Hu","Vu","si","Lu","Gu","mr","li","to","Lt","ui","no","Gt","Fu","_o","Se","ke","Ft","Yu","Xu","Zu","Uu","wo","pr","Wu","Ku","qu","ju","Qu","Ju","ec","tc","nc","oc","ic","rc","ac","lc","uc","cc","dc","hc","gc","vc","mc","Be","pc","yc","wc","bc","Ec","Sc","Nc","Cc","Mc","yr","$c","kc","Oc","Tc","Ic","Pc","Dc","Ac","Bc","Rc","Vc","Hc","Lc","xr","Gc","Yc","Xc","Uc","Rt","De","et","Tn","vt","Kc","qc","ci","jc","Qc","Jc","ed","In","Ge","td","nd","Pn","Dn","nn","Te","di","zn","An","od","O","ae","me","ot","kr","Or","id","Tr","fi","rd","ad","ld","ud","pi","dt","cd","dd","hd","gd","vd","md","pd","yd","qe","wd","bd","Ed","Sd","bo","Tt","_r","wr","En","Ot","Fe","Nd","Cd","Md","$d","kd","Od","Ld","Ir","Pr","props","__props","emit","__emit","positionMap","Position","sourcePosition","computed","targetPosition","labelInput","ref","newLabel","showInput","lastClick","nodeOnClick","now","showLabelInput","nextTick","submitNewLabel","__default__","useVueFlow","labelOnClick","path","getBezierPath","containerClass","vueFlowInstance","hover","activeElementKey","vueFlowElements","activeElementIndex","elements","_elements","key","newValue","getNodes","onPaneReady","onMounted","handleKeypress","onBeforeUnmount","shiftTerminal","currentTerminal","shiftOutput","shiftInput","onWheel","$event","e","fitView","addNode","newNodePosition","makeEdge","activeNode","nodeId","edgeId","onConnect","onEdgeDoubleClick","labelChanged","states","stateHash","hasInputs","stateElements","edges","edgeKey","target","onElementsChange","idToLabel","label","install","app","NodeEditor","StateEditor"],"mappings":";AACA,IAAIA;AACJ,MAAMC,KAAK,OAAO,SAAS,KAAKC,KAAK,CAAC,MAAM,OAAO,IAAI,KAAKC,KAAK,CAAC,MAAM,OAAO,KAAK,WAAWC,KAAK,CAAC,MAAM,OAAO,KAAK,YAAYC,KAAK,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAK,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAK,MAAM;AAClN;AACAN,OAAQD,KAAK,UAAU,OAAO,SAAS,OAAO,cAAc,QAAQA,GAAG,aAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AACrI,SAAS,GAAG,GAAG;AACb,SAAO,OAAO,KAAK,aAAa,EAAC,IAAKQ,EAAE,CAAC;AAC3C;AACA,SAASC,GAAG,GAAG,GAAG;AAChB,WAAS,KAAK,GAAG;AACf,WAAO,IAAI,QAAQ,CAACC,GAAGC,MAAM;AAC3B,cAAQ,QAAQ,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,SAAS,MAAM,MAAM,GAAG,CAAC,EAAE,KAAKD,CAAC,EAAE,MAAMC,CAAC;AAAA,IACnG,CAAK;AAAA,EACF;AACD,SAAO;AACT;AACA,MAAMC,KAAK,CAAC,MAAM;AAClB,SAASC,GAAG,IAAID,IAAI;AAClB,QAAM,IAAIE,GAAG,EAAE;AACf,WAAS,IAAI;AACX,MAAE,QAAQ;AAAA,EACX;AACD,WAAS,IAAI;AACX,MAAE,QAAQ;AAAA,EACX;AACD,QAAMJ,IAAI,IAAIC,MAAM;AAClB,MAAE,SAAS,EAAE,GAAGA,CAAC;AAAA,EACrB;AACE,SAAO,EAAE,UAAUI,GAAG,CAAC,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAaL,EAAC;A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C,UAAI0B,IAAS,CAAA,GACTI,IAAQ,CAAA,GACRI,IAAY,CAAA;AAChB,eAASjsB,IAAI,GAAGA,IAAI+pB,EAAS,QAAQ/pB,KAAK;AACrC,YAAA6S,IAAKkX,EAAS/pB,CAAC;AACf,QAAA6S,EAAG,QAAQ,UAEP4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,IAAI,CAAC;AAAA,QAAA,IAEIA,EAAG,QAAQ,WAEd4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,MAAM;AAAA,QAAA,IAEGA,EAAG,UAAUA,EAAG,UAE1BgZ,EAAMhZ,EAAG,MAAM,IAAIgZ,EAAMhZ,EAAG,MAAM,KAAK,IACvCgZ,EAAMhZ,EAAG,MAAM,EAAEA,EAAG,KAAK,IAAI;AAAA,UAC5B,QAAQA,EAAG;AAAA,QAAA,KAIL4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,IAAI,CAAC;AAAA,QAAA,GAGGoZ,EAAApZ,EAAG,EAAE,IAAIA,EAAG;AAAA,MACvB;AAEA,eAASoX,KAAO4B,GAAO;AAElB,YAAAK,IAAQD,EAAUhC,CAAG;AAChB,iBAAA6B,KAAWD,EAAM5B,CAAG;AACrB,UAAAwB,EAAAS,CAAK,EAAE,GAAGJ,CAAO,IAAID,EAAM5B,CAAG,EAAE6B,CAAO;AAAA,MAEhD;AACA,MAAA3D,EAAK,qBAAqBsD,CAAM;AAAA,IAAA;;;;;;;;;;ACjHjC,SAASU,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,cAAcC,EAAU,GAClCD,EAAA,UAAU,eAAeE,EAAW;AACzC;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"node-editor.js","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.23/node_modules/@vue-flow/core/dist/vue-flow-core.mjs","../src/components/EditableNode.vue","../src/components/EditableEdge.vue","../src/components/NodeEditor.vue","../src/components/StateEditor.vue","../src/index.ts"],"sourcesContent":["import { unref as C, ref as ie, watch as de, customRef as br, getCurrentScope as hi, onScopeDispose as Vt, getCurrentInstance as on, onMounted as Ve, nextTick as Ue, readonly as Er, isRef as Sr, computed as J, onBeforeMount as Nr, markRaw as it, inject as He, defineComponent as ge, toRef as M, openBlock as oe, createElementBlock as se, normalizeClass as Ke, renderSlot as xe, h as ue, provide as ut, onBeforeUnmount as gi, normalizeStyle as Le, createCommentVNode as Ee, createElementVNode as ct, mergeProps as vi, createBlock as ze, resolveDynamicComponent as mi, Fragment as Ce, createTextVNode as Cr, toDisplayString as Vn, Teleport as Mr, normalizeProps as $r, reactive as kr, toRefs as Or, effectScope as Tr, renderList as dt, resolveComponent as pi, createVNode as qe, watchEffect as bo, withCtx as Fe, useSlots as Ir, onUnmounted as Pr } from \"vue\";\nvar Eo;\nconst oo = typeof window < \"u\", Dr = (e) => typeof e < \"u\", zr = (e) => typeof e == \"boolean\", Ae = (e) => typeof e == \"function\", Ie = (e) => typeof e == \"number\", Pe = (e) => typeof e == \"string\", Ar = () => {\n};\noo && ((Eo = window == null ? void 0 : window.navigator) != null && Eo.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction le(e) {\n return typeof e == \"function\" ? e() : C(e);\n}\nfunction Br(e, t) {\n function n(...o) {\n return new Promise((i, r) => {\n Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(i).catch(r);\n });\n }\n return n;\n}\nconst yi = (e) => e();\nfunction Rr(e = yi) {\n const t = ie(!0);\n function n() {\n t.value = !1;\n }\n function o() {\n t.value = !0;\n }\n const i = (...r) => {\n t.value && e(...r);\n };\n return { isActive: Er(t), pause: n, resume: o, eventFilter: i };\n}\nfunction So(e, t = !1, n = \"Timeout\") {\n return new Promise((o, i) => {\n setTimeout(t ? () => i(n) : o, e);\n });\n}\nfunction Vr(e) {\n return e;\n}\nfunction Sn(e, t) {\n let n, o, i;\n const r = ie(!0), a = () => {\n r.value = !0, i();\n };\n de(e, a, { flush: \"sync\" });\n const s = Ae(t) ? t : t.get, l = Ae(t) ? void 0 : t.set, u = br((c, v) => (o = c, i = v, {\n get() {\n return r.value && (n = s(), r.value = !1), o(), n;\n },\n set(g) {\n l == null || l(g);\n }\n }));\n return Object.isExtensible(u) && (u.trigger = a), u;\n}\nfunction Mt(e) {\n return hi() ? (Vt(e), !0) : !1;\n}\nfunction Hr(e, t = !0) {\n on() ? Ve(e) : t ? e() : Ue(e);\n}\nfunction Hn(e, t = !1) {\n function n(v, { flush: g = \"sync\", deep: x = !1, timeout: h, throwOnTimeout: d } = {}) {\n let w = null;\n const S = [new Promise((V) => {\n w = de(e, (p) => {\n v(p) !== t && (w == null || w(), V(p));\n }, {\n flush: g,\n deep: x,\n immediate: !0\n });\n })];\n return h != null && S.push(So(h, d).then(() => le(e)).finally(() => w == null ? void 0 : w())), Promise.race(S);\n }\n function o(v, g) {\n if (!Sr(v))\n return n((p) => p === v, g);\n const { flush: x = \"sync\", deep: h = !1, timeout: d, throwOnTimeout: w } = g ?? {};\n let y = null;\n const V = [new Promise((p) => {\n y = de([e, v], ([N, T]) => {\n t !== (N === T) && (y == null || y(), p(N));\n }, {\n flush: x,\n deep: h,\n immediate: !0\n });\n })];\n return d != null && V.push(So(d, w).then(() => le(e)).finally(() => (y == null || y(), le(e)))), Promise.race(V);\n }\n function i(v) {\n return n((g) => Boolean(g), v);\n }\n function r(v) {\n return o(null, v);\n }\n function a(v) {\n return o(void 0, v);\n }\n function s(v) {\n return n(Number.isNaN, v);\n }\n function l(v, g) {\n return n((x) => {\n const h = Array.from(x);\n return h.includes(v) || h.includes(le(v));\n }, g);\n }\n function u(v) {\n return c(1, v);\n }\n function c(v = 1, g) {\n let x = -1;\n return n(() => (x += 1, x >= v), g);\n }\n return Array.isArray(le(e)) ? {\n toMatch: n,\n toContains: l,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n } : {\n toMatch: n,\n toBe: o,\n toBeTruthy: i,\n toBeNull: r,\n toBeNaN: s,\n toBeUndefined: a,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n };\n}\nfunction ye(e) {\n return Hn(e);\n}\nvar No = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Gr = Object.prototype.propertyIsEnumerable, Fr = (e, t) => {\n var n = {};\n for (var o in e)\n Lr.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && No)\n for (var o of No(e))\n t.indexOf(o) < 0 && Gr.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction Yr(e, t, n = {}) {\n const o = n, {\n eventFilter: i = yi\n } = o, r = Fr(o, [\n \"eventFilter\"\n ]);\n return de(e, Br(i, t), r);\n}\nvar Xr = Object.defineProperty, Zr = Object.defineProperties, Ur = Object.getOwnPropertyDescriptors, Yt = Object.getOwnPropertySymbols, xi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, Co = (e, t, n) => t in e ? Xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wr = (e, t) => {\n for (var n in t || (t = {}))\n xi.call(t, n) && Co(e, n, t[n]);\n if (Yt)\n for (var n of Yt(t))\n _i.call(t, n) && Co(e, n, t[n]);\n return e;\n}, Kr = (e, t) => Zr(e, Ur(t)), qr = (e, t) => {\n var n = {};\n for (var o in e)\n xi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && Yt)\n for (var o of Yt(e))\n t.indexOf(o) < 0 && _i.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction tt(e, t, n = {}) {\n const o = n, {\n eventFilter: i\n } = o, r = qr(o, [\n \"eventFilter\"\n ]), { eventFilter: a, pause: s, resume: l, isActive: u } = Rr(i);\n return { stop: Yr(e, t, Kr(Wr({}, r), {\n eventFilter: a\n })), pause: s, resume: l, isActive: u };\n}\nfunction wi(e) {\n var t;\n const n = le(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst io = oo ? window : void 0;\nfunction ro(...e) {\n let t, n, o, i;\n if (Pe(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = io) : [t, n, o, i] = e, !t)\n return Ar;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const r = [], a = () => {\n r.forEach((c) => c()), r.length = 0;\n }, s = (c, v, g, x) => (c.addEventListener(v, g, x), () => c.removeEventListener(v, g, x)), l = de(() => [wi(t), le(i)], ([c, v]) => {\n a(), c && r.push(...n.flatMap((g) => o.map((x) => s(c, g, x, v))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n l(), a();\n };\n return Mt(u), u;\n}\nconst jr = (e) => typeof e == \"function\" ? e : typeof e == \"string\" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;\nfunction Mo(...e) {\n let t, n, o = {};\n e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == \"object\" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);\n const { target: i = io, eventName: r = \"keydown\", passive: a = !1 } = o, s = jr(t);\n return ro(i, r, (u) => {\n s(u) && n(u);\n }, a);\n}\nfunction Qr(e, t = !1) {\n const n = ie(), o = () => n.value = Boolean(e());\n return o(), Hr(o, t), n;\n}\nfunction Jr(e) {\n return JSON.parse(JSON.stringify(e));\n}\nconst Ln = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Gn = \"__vueuse_ssr_handlers__\";\nLn[Gn] = Ln[Gn] || {};\nLn[Gn];\nvar $o = Object.getOwnPropertySymbols, ea = Object.prototype.hasOwnProperty, ta = Object.prototype.propertyIsEnumerable, na = (e, t) => {\n var n = {};\n for (var o in e)\n ea.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && $o)\n for (var o of $o(e))\n t.indexOf(o) < 0 && ta.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction oa(e, t, n = {}) {\n const o = n, { window: i = io } = o, r = na(o, [\"window\"]);\n let a;\n const s = Qr(() => i && \"ResizeObserver\" in i), l = () => {\n a && (a.disconnect(), a = void 0);\n }, u = de(() => wi(e), (v) => {\n l(), s.value && i && v && (a = new ResizeObserver(t), a.observe(v, r));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n l(), u();\n };\n return Mt(c), {\n isSupported: s,\n stop: c\n };\n}\nvar ko;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(ko || (ko = {}));\nvar ia = Object.defineProperty, Oo = Object.getOwnPropertySymbols, ra = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, To = (e, t, n) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t) => {\n for (var n in t || (t = {}))\n ra.call(t, n) && To(e, n, t[n]);\n if (Oo)\n for (var n of Oo(t))\n aa.call(t, n) && To(e, n, t[n]);\n return e;\n};\nconst la = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nsa({\n linear: Vr\n}, la);\nfunction yt(e, t, n, o = {}) {\n var i, r, a;\n const {\n clone: s = !1,\n passive: l = !1,\n eventName: u,\n deep: c = !1,\n defaultValue: v\n } = o, g = on(), x = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((a = (r = g == null ? void 0 : g.proxy) == null ? void 0 : r.$emit) == null ? void 0 : a.bind(g == null ? void 0 : g.proxy));\n let h = u;\n t || (t = \"modelValue\"), h = u || h || `update:${t.toString()}`;\n const d = (y) => s ? Ae(s) ? s(y) : Jr(y) : y, w = () => Dr(e[t]) ? d(e[t]) : v;\n if (l) {\n const y = w(), S = ie(y);\n return de(() => e[t], (V) => S.value = d(V)), de(S, (V) => {\n (V !== e[t] || c) && x(h, V);\n }, { deep: c }), S;\n } else\n return J({\n get() {\n return w();\n },\n set(y) {\n x(h, y);\n }\n });\n}\nfunction X(e = () => {\n}) {\n const t = ie(/* @__PURE__ */ new Set());\n e && t.value.add(e);\n const n = (r) => {\n t.value.delete(r);\n };\n return {\n on: (r) => {\n t.value.has(e) && t.value.delete(e), t.value.add(r);\n const a = () => n(r);\n return Mt(a), {\n off: a\n };\n },\n off: n,\n trigger: (r) => Promise.all(Array.from(t.value).map((a) => a(r))),\n fns: t\n };\n}\nconst ua = [\"production\", \"prod\"];\nfunction wt(e, ...t) {\n ua.includes(process.env.NODE_ENV || \"\") || console.warn(`[Vue Flow]: ${e}`, ...t);\n}\nfunction ca() {\n return {\n edgesChange: X(),\n nodesChange: X(),\n nodeDoubleClick: X(),\n nodeClick: X(),\n nodeMouseEnter: X(),\n nodeMouseMove: X(),\n nodeMouseLeave: X(),\n nodeContextMenu: X(),\n nodeDragStart: X(),\n nodeDrag: X(),\n nodeDragStop: X(),\n nodesInitialized: X(),\n miniMapNodeClick: X(),\n miniMapNodeDoubleClick: X(),\n miniMapNodeMouseEnter: X(),\n miniMapNodeMouseMove: X(),\n miniMapNodeMouseLeave: X(),\n connect: X(),\n connectStart: X(),\n connectEnd: X(),\n clickConnectStart: X(),\n clickConnectEnd: X(),\n paneReady: X(),\n move: X(),\n moveStart: X(),\n moveEnd: X(),\n selectionDragStart: X(),\n selectionDrag: X(),\n selectionDragStop: X(),\n selectionContextMenu: X(),\n selectionStart: X(),\n selectionEnd: X(),\n viewportChangeStart: X(),\n viewportChange: X(),\n viewportChangeEnd: X(),\n paneScroll: X(),\n paneClick: X(),\n paneContextMenu: X(),\n paneMouseEnter: X(),\n paneMouseMove: X(),\n paneMouseLeave: X(),\n edgeContextMenu: X(),\n edgeMouseEnter: X(),\n edgeMouseMove: X(),\n edgeMouseLeave: X(),\n edgeDoubleClick: X(),\n edgeClick: X(),\n edgeUpdateStart: X(),\n edgeUpdate: X(),\n edgeUpdateEnd: X(),\n updateNodeInternals: X(),\n error: X((e) => wt(e.message))\n };\n}\nfunction da(e, t) {\n Nr(() => {\n for (const [n, o] of Object.entries(t.value)) {\n const i = (r) => {\n e(n, r);\n };\n o.on(i), Mt(() => {\n o.off(i);\n });\n }\n });\n}\nvar he = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = \"MISSING_VIEWPORT_DIMENSIONS\", e.NODE_NOT_FOUND = \"NODE_NOT_FOUND\", e.NODE_MISSING_PARENT = \"NODE_MISSING_PARENT\", e.NODE_TYPE_MISSING = \"NODE_TYPE_MISSING\", e.NODE_EXTENT_INVALID = \"NODE_EXTENT_INVALID\", e.EDGE_INVALID = \"EDGE_INVALID\", e.EDGE_NOT_FOUND = \"EDGE_NOT_FOUND\", e.EDGE_SOURCE_MISSING = \"EDGE_SOURCE_MISSING\", e.EDGE_TARGET_MISSING = \"EDGE_TARGET_MISSING\", e.EDGE_TYPE_MISSING = \"EDGE_TYPE_MISSING\", e.EDGE_SOURCE_TARGET_SAME = \"EDGE_SOURCE_TARGET_SAME\", e.EDGE_SOURCE_TARGET_MISSING = \"EDGE_SOURCE_TARGET_MISSING\", e.EDGE_ORPHANED = \"EDGE_ORPHANED\", e))(he || {});\nconst Nn = {\n MISSING_VIEWPORT_DIMENSIONS: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n NODE_NOT_FOUND: (e) => `Node not found\nNode: ${e}`,\n NODE_MISSING_PARENT: (e, t) => `Node is missing a parent\nNode: ${e}\nParent: ${t}`,\n NODE_TYPE_MISSING: (e) => `Node type is missing\nType: ${e}`,\n NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent\nNode: ${e}`,\n EDGE_INVALID: (e) => `An edge needs a source and a target\nEdge: ${e}`,\n EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing\nEdge: ${e} \nSource: ${t}`,\n EDGE_TARGET_MISSING: (e, t) => `Edge target is missing\nEdge: ${e} \nTarget: ${t}`,\n EDGE_TYPE_MISSING: (e) => `Edge type is missing\nType: ${e}`,\n EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,\n EDGE_NOT_FOUND: (e) => `Edge not found\nEdge: ${e}`\n};\nclass ve extends Error {\n constructor(t, ...n) {\n var o;\n super((o = Nn[t]) == null ? void 0 : o.call(Nn, ...n)), this.code = t;\n }\n}\nconst ao = () => typeof window < \"u\" ? window : { chrome: !1 };\nfunction Io(e) {\n return {\n ...e.computedPosition || { x: 0, y: 0 },\n width: e.dimensions.width || 0,\n height: e.dimensions.height || 0\n };\n}\nfunction Fn(e, t) {\n const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));\n return Math.ceil(n * o);\n}\nfunction rn(e) {\n return {\n width: e.offsetWidth,\n height: e.offsetHeight\n };\n}\nfunction je(e, t = 0, n = 1) {\n return Math.min(Math.max(e, t), n);\n}\nfunction so(e, t) {\n return {\n x: je(e.x, t[0][0], t[1][0]),\n y: je(e.y, t[0][1], t[1][1])\n };\n}\nfunction Po(e) {\n const t = e.getRootNode(), n = ao();\n return \"elementFromPoint\" in t ? t : n.document;\n}\nfunction $e(e) {\n return e && \"id\" in e && \"source\" in e && \"target\" in e;\n}\nfunction fa(e) {\n return $e(e) && \"sourceNode\" in e && \"targetNode\" in e;\n}\nfunction xt(e) {\n return e && \"id\" in e && !$e(e);\n}\nfunction nt(e) {\n return xt(e) && \"computedPosition\" in e;\n}\nfunction ha(e) {\n return !!e.width && !!e.height && !!e.x && !!e.y;\n}\nfunction ga(e, t = {}) {\n let n = t;\n return nt(e) || (n = {\n type: e.type ?? t.type ?? \"default\",\n dimensions: it({\n width: 0,\n height: 0\n }),\n handleBounds: {\n source: [],\n target: []\n },\n computedPosition: it({\n z: 0,\n ...e.position\n }),\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: !1,\n dragging: !1,\n resizing: !1,\n initialized: !1,\n ...t,\n data: ce(e.data) ? e.data : {},\n events: it(ce(e.events) ? e.events : {})\n }), Object.assign({}, n, e, { id: e.id.toString() });\n}\nfunction lo(e, t = {}) {\n const n = ce(e.events) ? e.events : t.events && ce(t.events) ? t.events : {}, o = ce(e.data) ? e.data : t.data && ce(t.data) ? t.data : {};\n return t = fa(e) ? t : {\n ...t,\n sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle,\n targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle,\n type: e.type ?? t.type ?? \"default\",\n source: e.source.toString() || t.source,\n target: e.target.toString() || t.target,\n updatable: e.updatable ?? t.updatable,\n selectable: e.selectable ?? t.selectable,\n focusable: e.focusable ?? t.focusable,\n data: o,\n events: it(n),\n label: (e.label && !Pe(e.label) ? it(e.label) : e.label) || t.label,\n interactionWidth: e.interactionWidth || t.interactionWidth\n }, Object.assign({}, t, e, { id: e.id.toString() });\n}\nfunction bi(e, t, n) {\n if (!xt(e))\n return [];\n const o = n === \"source\" ? \"target\" : \"source\", i = t.filter((r) => $e(r) && r[o] === e.id).map((r) => $e(r) && r[n]);\n return t.filter((r) => i.includes(r.id));\n}\nfunction Pd(e, t) {\n return bi(e, t, \"target\");\n}\nfunction Dd(e, t) {\n return bi(e, t, \"source\");\n}\nfunction an({ source: e, sourceHandle: t, target: n, targetHandle: o }) {\n return `vueflow__edge-${e}${t ?? \"\"}-${n}${o ?? \"\"}`;\n}\nfunction Ei(e, t) {\n return t.some(\n (n) => $e(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle)\n );\n}\nfunction zd(e, t, n) {\n if (!e.source || !e.target)\n return wt(\"Can't create edge. An edge needs a source and a target.\"), t;\n let o;\n return $e(e) ? o = { ...e } : o = {\n ...e,\n id: an(e)\n }, o = lo(o, n), Ei(o, t) || t.push(o), t;\n}\nfunction Ad(e, t, n) {\n if (!t.source || !t.target)\n return wt(\"Can't create new edge. An edge needs a source and a target.\"), n;\n const o = n.find((r) => $e(r) && r.id === e.id);\n if (!o)\n return wt(`The old edge with id=${e.id} does not exist.`), n;\n const i = {\n ...e,\n id: an(t),\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(o), 1, i), n.filter((r) => r.id !== e.id);\n}\nfunction va({ x: e, y: t }, { x: n, y: o, zoom: i }) {\n return {\n x: e * i + n,\n y: t * i + o\n };\n}\nfunction uo({ x: e, y: t }, { x: n, y: o, zoom: i }, r, [a, s]) {\n const l = {\n x: (e - n) / i,\n y: (t - o) / i\n };\n return r ? {\n x: a * Math.round(l.x / a),\n y: s * Math.round(l.y / s)\n } : l;\n}\nfunction Si(e, t) {\n return {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x2, t.x2),\n y2: Math.max(e.y2, t.y2)\n };\n}\nfunction Xt({ x: e, y: t, width: n, height: o }) {\n return {\n x: e,\n y: t,\n x2: e + n,\n y2: t + o\n };\n}\nfunction Ni({ x: e, y: t, x2: n, y2: o }) {\n return {\n x: e,\n y: t,\n width: n - e,\n height: o - t\n };\n}\nfunction Bd(e, t) {\n return Ni(Si(Xt(e), Xt(t)));\n}\nfunction co(e) {\n const t = e.reduce(\n (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: i = { width: 0, height: 0 } } = {}) => Si(\n n,\n Xt({\n ...o,\n ...i\n })\n ),\n { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }\n );\n return Ni(t);\n}\nfunction Ci(e, t, { x: n, y: o, zoom: i } = { x: 0, y: 0, zoom: 1 }, r = !1, a = !1) {\n const s = {\n x: (t.x - n) / i,\n y: (t.y - o) / i,\n width: t.width / i,\n height: t.height / i\n };\n return e.filter((l) => {\n const { computedPosition: u = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: v } = l;\n if (a && !v)\n return !1;\n const g = { ...u, width: c.width || 0, height: c.height || 0 }, x = Fn(s, g), h = typeof c.width > \"u\" || typeof c.height > \"u\" || c.width === 0 || c.height === 0, d = r && x > 0, w = c.width * c.height;\n return h || d || x >= w;\n });\n}\nfunction sn(e, t) {\n const n = e.map((o) => Pe(o) ? o : o.id);\n return t.filter((o) => n.includes(o.source) || n.includes(o.target));\n}\nfunction Zt(e, t, n, o, i, r = 0.1, a = { x: 0, y: 0 }) {\n const s = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), u = Math.min(s, l), c = je(u, o, i), v = e.x + e.width / 2, g = e.y + e.height / 2, x = t / 2 - v * c + (a.x ?? 0), h = n / 2 - g * c + (a.y ?? 0);\n return { x, y: h, zoom: c };\n}\nfunction ma(e, t) {\n return {\n x: t.x + e.x,\n y: t.y + e.y,\n z: (e.z > t.z ? e.z : t.z) + 1\n };\n}\nfunction Mi(e, t) {\n if (!e.parentNode)\n return !1;\n const n = t(e.parentNode);\n return n ? n.selected ? !0 : Mi(n, t) : !1;\n}\nfunction Xe(e, t) {\n return typeof e > \"u\" ? \"\" : typeof e == \"string\" ? e : `${t ? `${t}__` : \"\"}${Object.keys(e).sort().map((o) => `${o}=${e[o]}`).join(\"&\")}`;\n}\nfunction ce(e) {\n return typeof C(e) < \"u\";\n}\nfunction pa(e, t, n) {\n if (!e.source || !e.target)\n return n(new ve(he.EDGE_INVALID, e.id)), !1;\n let o;\n return $e(e) ? o = e : o = {\n ...e,\n id: an(e)\n }, o = lo(o), Ei(o, t) ? !1 : o;\n}\nfunction ya(e, t, n, o, i, r) {\n if (!t.source || !t.target)\n return r(new ve(he.EDGE_INVALID, e.id)), !1;\n const a = o(e.id);\n if (!a)\n return r(new ve(he.EDGE_NOT_FOUND, e.id)), !1;\n const { id: s, ...l } = e, u = {\n ...l,\n id: i ? an(t) : s,\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(a), 1, u), u;\n}\nfunction Do(e, t, n, o) {\n const i = {}, r = e.map((s) => {\n const l = ga(s, {\n ...n(s.id),\n parentNode: s.parentNode\n });\n return s.parentNode && (i[s.parentNode] = !0), l;\n }), a = [...r, ...t];\n return r.forEach((s) => {\n const l = a.find((u) => u.id === s.parentNode);\n s.parentNode && !l && o(new ve(he.NODE_MISSING_PARENT, s.id, s.parentNode)), (s.parentNode || i[s.id]) && (i[s.id] && (s.isParent = !0), l && (l.isParent = !0));\n }), r;\n}\nvar j = /* @__PURE__ */ ((e) => (e.Left = \"left\", e.Top = \"top\", e.Right = \"right\", e.Bottom = \"bottom\", e))(j || {}), fo = /* @__PURE__ */ ((e) => (e.Partial = \"partial\", e.Full = \"full\", e))(fo || {}), Ye = /* @__PURE__ */ ((e) => (e.Bezier = \"default\", e.SimpleBezier = \"simple-bezier\", e.Straight = \"straight\", e.Step = \"step\", e.SmoothStep = \"smoothstep\", e))(Ye || {}), Qe = /* @__PURE__ */ ((e) => (e.Strict = \"strict\", e.Loose = \"loose\", e))(Qe || {}), Yn = /* @__PURE__ */ ((e) => (e.Arrow = \"arrow\", e.ArrowClosed = \"arrowclosed\", e))(Yn || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = \"free\", e.Vertical = \"vertical\", e.Horizontal = \"horizontal\", e))(Ut || {}), xa = /* @__PURE__ */ ((e) => (e.TopLeft = \"top-left\", e.TopCenter = \"top-center\", e.TopRight = \"top-right\", e.BottomLeft = \"bottom-left\", e.BottomCenter = \"bottom-center\", e.BottomRight = \"bottom-right\", e))(xa || {});\nconst zo = Symbol(\"vueFlow\"), $i = Symbol(\"nodeId\"), ki = Symbol(\"nodeRef\"), Oi = Symbol(\"edgeId\"), Ti = Symbol(\"edgeRef\"), ln = Symbol(\"slots\");\nfunction _a(e) {\n const t = e ?? He($i, \"\"), n = He(ki, null), { findNode: o, edges: i, emits: r } = fe(), a = o(t);\n return a || r.error(new ve(he.NODE_NOT_FOUND, t)), {\n id: t,\n nodeEl: n,\n node: a,\n parentNode: J(() => o(a.parentNode)),\n connectedEdges: J(() => sn([a], i.value))\n };\n}\nfunction ho(e) {\n return \"clientX\" in e;\n}\nfunction rt(e, t) {\n var r, a;\n const n = ho(e), o = n ? e.clientX : (r = e.touches) == null ? void 0 : r[0].clientX, i = n ? e.clientY : (a = e.touches) == null ? void 0 : a[0].clientY;\n return {\n x: o - ((t == null ? void 0 : t.left) ?? 0),\n y: i - ((t == null ? void 0 : t.top) ?? 0)\n };\n}\nfunction Wt(e, t, n) {\n const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, i = ((n == null ? void 0 : n.y) ?? 0) + t.y, r = (n == null ? void 0 : n.width) ?? t.width, a = (n == null ? void 0 : n.height) ?? t.height;\n switch (e) {\n case j.Top:\n return {\n x: o + r / 2,\n y: i\n };\n case j.Right:\n return {\n x: o + r,\n y: i + a / 2\n };\n case j.Bottom:\n return {\n x: o + r / 2,\n y: i + a\n };\n case j.Left:\n return {\n x: o,\n y: i + a / 2\n };\n }\n}\nfunction Ao(e = [], t) {\n return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null;\n}\nfunction wa(e, t, n, o, i, r) {\n const a = Wt(\n n,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n t\n ), s = Wt(\n r,\n {\n ...o.dimensions,\n ...o.computedPosition\n },\n i\n );\n return {\n sourceX: a.x,\n sourceY: a.y,\n targetX: s.x,\n targetY: s.y\n };\n}\nfunction ba({\n sourcePos: e,\n targetPos: t,\n sourceWidth: n,\n sourceHeight: o,\n targetWidth: i,\n targetHeight: r,\n width: a,\n height: s,\n viewport: l\n}) {\n const u = {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x + n, t.x + i),\n y2: Math.max(e.y + o, t.y + r)\n };\n u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);\n const c = Xt({\n x: (0 - l.x) / l.zoom,\n y: (0 - l.y) / l.zoom,\n width: a / l.zoom,\n height: s / l.zoom\n }), v = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), g = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));\n return Math.ceil(v * g) > 0;\n}\nfunction Ea(e, t, n = !1) {\n let o = -1;\n const i = e.reduce((r, a) => {\n const s = Ie(a.zIndex);\n let l = s ? a.zIndex : 0;\n const u = t(a.source), c = t(a.target);\n return !u || !c || (n && (l = s ? a.zIndex : Math.max(u.computedPosition.z || 0, c.computedPosition.z || 0)), r[l] ? r[l].push(a) : r[l] = [a], o = l > o ? l : o), r;\n }, {});\n return Object.entries(Object.keys(i).length ? i : { 0: [] }).map(([r, a]) => {\n const s = +r;\n return {\n edges: a,\n level: s,\n isMaxLevel: s === o\n };\n });\n}\nfunction Cn(e) {\n e == null || e.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction Bo(e, t, n, o) {\n return (t[n] || []).reduce((i, r) => (`${e.id}-${r.id}-${n}` !== o && i.push({\n id: r.id || null,\n type: n,\n nodeId: e.id,\n ...Wt(\n r.position,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n r\n )\n }), i), []);\n}\nfunction Sa(e, t, n) {\n let o = null, i = 1 / 0;\n return n.forEach((r) => {\n const a = Math.sqrt((r.x - e.x) ** 2 + (r.y - e.y) ** 2);\n a <= t && a < i && (i = a, o = r);\n }), o;\n}\nfunction Ro(e, t, n, o, i, r, a, s, l, u) {\n const c = r === \"target\", v = s.querySelector(`.vue-flow__handle[data-id=\"${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}\"]`), { x: g, y: x } = rt(e), h = s.elementFromPoint(g, x), d = h != null && h.classList.contains(\"vue-flow__handle\") ? h : v, w = {\n handleDomNode: d,\n isValid: !1,\n connection: { source: \"\", target: \"\", sourceHandle: null, targetHandle: null },\n endHandle: null\n };\n if (d) {\n const y = Ii(void 0, d), S = d.getAttribute(\"data-nodeid\"), V = d.getAttribute(\"data-handleid\"), p = d.classList.contains(\"connectable\"), N = d.classList.contains(\"connectableend\"), T = {\n source: c ? S : o,\n sourceHandle: c ? V : i,\n target: c ? o : S,\n targetHandle: c ? i : V\n };\n w.connection = T, p && N && (n === Qe.Strict ? c && y === \"source\" || !c && y === \"target\" : S !== o || V !== i) && (w.endHandle = {\n nodeId: S,\n handleId: V,\n type: y\n }, w.isValid = a(T, {\n edges: l,\n sourceNode: u(T.source),\n targetNode: u(T.target)\n }));\n }\n return w;\n}\nfunction Na({ nodes: e, nodeId: t, handleId: n, handleType: o }) {\n return e.reduce((i, r) => {\n const { handleBounds: a } = r;\n let s = [], l = [];\n return a && (s = Bo(r, a, \"source\", `${t}-${n}-${o}`), l = Bo(r, a, \"target\", `${t}-${n}-${o}`)), i.push(...s, ...l), i;\n }, []);\n}\nfunction Ii(e, t) {\n return e || (t != null && t.classList.contains(\"target\") ? \"target\" : t != null && t.classList.contains(\"source\") ? \"source\" : null);\n}\nfunction Ca(e, t) {\n let n = null;\n return t ? n = \"valid\" : e && !t && (n = \"invalid\"), n;\n}\nfunction Vo(e, t, n) {\n return e < t ? je(Math.abs(e - t), 1, 50) / 50 : e > n ? -je(Math.abs(e - n), 1, 50) / 50 : 0;\n}\nfunction Pi(e, t) {\n const n = Vo(e.x, 35, t.width - 35) * 20, o = Vo(e.y, 35, t.height - 35) * 20;\n return [n, o];\n}\nfunction It() {\n return !0;\n}\nfunction Di({\n handleId: e,\n nodeId: t,\n type: n,\n isValidConnection: o,\n edgeUpdaterType: i,\n onEdgeUpdate: r,\n onEdgeUpdateEnd: a\n}) {\n const s = J(() => le(n) === \"target\"), {\n vueFlowRef: l,\n connectionMode: u,\n connectionRadius: c,\n connectOnClick: v,\n connectionClickStartHandle: g,\n nodesConnectable: x,\n autoPanOnConnect: h,\n findNode: d,\n panBy: w,\n getNodes: y,\n startConnection: S,\n updateConnection: V,\n endConnection: p,\n emits: N,\n viewport: T,\n edges: _,\n isValidConnection: P\n } = fe();\n let R = null, $ = !1, D = null;\n function Q(m) {\n var G;\n const A = ho(m), E = Po(m.target);\n if (A && m.button === 0 || !A) {\n let Z = function(Y) {\n L = rt(Y, f), B = Sa(\n uo(L, T.value, !1, [1, 1]),\n c.value,\n F\n ), I || (U(), I = !0);\n const ne = Ro(\n Y,\n B,\n u.value,\n le(t),\n le(e),\n s.value ? \"target\" : \"source\",\n W,\n E,\n _.value,\n d\n );\n if (R = ne.connection, $ = ne.isValid, D = ne.handleDomNode, V(\n B && $ ? va(\n {\n x: B.x,\n y: B.y\n },\n T.value\n ) : L,\n ne.endHandle,\n Ca(!!B, $)\n ), !B && !$ && !D)\n return Cn(b);\n R && R.source !== R.target && D && (Cn(b), b = D, D.classList.add(\"connecting\", \"vue-flow__handle-connecting\"), D.classList.toggle(\"valid\", $), D.classList.toggle(\"vue-flow__handle-valid\", $));\n }, K = function(Y) {\n (B || D) && R && $ && (r ? r(Y, R) : N.connect(R)), N.connectEnd(Y), i && (a == null || a(Y)), Cn(b), cancelAnimationFrame(q), p(Y), I = !1, $ = !1, R = null, D = null, E.removeEventListener(\"mousemove\", Z), E.removeEventListener(\"mouseup\", K), E.removeEventListener(\"touchmove\", Z), E.removeEventListener(\"touchend\", K);\n };\n const z = d(le(t));\n let W = o || P.value || It;\n !W && z && (W = (s ? z.isValidSourcePos : z.isValidTargetPos) || It);\n let B, q = 0;\n const { x: te, y: re } = rt(m), k = E == null ? void 0 : E.elementFromPoint(te, re), H = Ii(le(i), k), f = (G = l.value) == null ? void 0 : G.getBoundingClientRect();\n if (!f || !H)\n return;\n let b, L = rt(m, f), I = !1;\n const F = Na({\n nodes: y.value,\n nodeId: le(t),\n handleId: le(e),\n handleType: H\n }), U = () => {\n if (!h)\n return;\n const [Y, ne] = Pi(L, f);\n w({ x: Y, y: ne }), q = requestAnimationFrame(U);\n };\n S(\n {\n nodeId: le(t),\n handleId: le(e),\n type: H\n },\n {\n x: te - f.left,\n y: re - f.top\n },\n m\n ), N.connectStart({ event: m, nodeId: le(t), handleId: le(e), handleType: H }), E.addEventListener(\"mousemove\", Z), E.addEventListener(\"mouseup\", K), E.addEventListener(\"touchmove\", Z), E.addEventListener(\"touchend\", K);\n }\n }\n function ee(m) {\n if (v.value)\n if (!g.value)\n N.clickConnectStart({ event: m, nodeId: le(t), handleId: le(e) }), S(\n { nodeId: le(t), type: le(n), handleId: le(e) },\n void 0,\n m,\n !0\n );\n else {\n let A = o || P.value || It;\n const E = d(le(t));\n if (!A && E && (A = (s ? E.isValidSourcePos : E.isValidTargetPos) || It), E && (typeof E.connectable > \"u\" ? x.value : E.connectable) === !1)\n return;\n const G = Po(m.target), { connection: Z, isValid: K } = Ro(\n m,\n {\n nodeId: le(t),\n id: le(e),\n type: le(n)\n },\n u.value,\n g.value.nodeId,\n g.value.handleId || null,\n g.value.type,\n A,\n G,\n _.value,\n d\n ), z = Z.source === Z.target;\n K && !z && N.connect(Z), N.clickConnectEnd(m), p(m, !0);\n }\n }\n return {\n handlePointerDown: Q,\n handleClick: ee\n };\n}\nfunction Ma(e, t) {\n const n = {};\n for (const o in e)\n t.includes(o) || Object.defineProperty(n, o, {\n enumerable: !0,\n get: () => e[o]\n });\n return n;\n}\nconst $a = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"], ka = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n}, Kt = /* @__PURE__ */ ge({\n ...ka,\n props: {\n id: null,\n type: null,\n position: { default: j.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: !0 },\n connectableEnd: { type: Boolean, default: !0 }\n },\n setup(e) {\n const t = Ma(e, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\", \"isValidConnection\"]), n = M(t, \"type\", \"source\"), {\n connectionStartHandle: o,\n connectionClickStartHandle: i,\n connectionEndHandle: r,\n vueFlowRef: a,\n nodesConnectable: s,\n noDragClassName: l,\n noPanClassName: u\n } = fe(), { id: c, node: v, nodeEl: g, connectedEdges: x } = _a(), h = ie(), d = J(() => e.id ?? `${c}__handle-${e.position}`), w = J(() => typeof e.connectableStart < \"u\" ? e.connectableStart : !0), y = J(() => typeof e.connectableEnd < \"u\" ? e.connectableEnd : !0), { handlePointerDown: S, handleClick: V } = Di({\n nodeId: c,\n handleId: d,\n isValidConnection: e.isValidConnection,\n type: n\n }), p = J(() => Pe(e.connectable) && e.connectable === \"single\" ? !x.value.some((R) => {\n const $ = R[`${n.value}Handle`];\n return R[n.value] !== c ? !1 : $ ? $ === d.value : !0;\n }) : Ae(e.connectable) ? e.connectable(v, x.value) : ce(e.connectable) ? e.connectable : s.value), N = J(\n () => {\n var R, $, D, Q, ee, m;\n return ((R = o.value) == null ? void 0 : R.nodeId) === c && (($ = o.value) == null ? void 0 : $.handleId) === d.value && ((D = o.value) == null ? void 0 : D.type) === n.value || ((Q = r.value) == null ? void 0 : Q.nodeId) === c && ((ee = r.value) == null ? void 0 : ee.handleId) === d.value && ((m = r.value) == null ? void 0 : m.type) === n.value;\n }\n ), T = J(\n () => {\n var R, $, D;\n return ((R = i.value) == null ? void 0 : R.nodeId) === c && (($ = i.value) == null ? void 0 : $.handleId) === d.value && ((D = i.value) == null ? void 0 : D.type) === n.value;\n }\n );\n ye(() => v.initialized).toBe(!0, { flush: \"post\" }).then(() => {\n var E;\n const R = (E = v.handleBounds[n.value]) == null ? void 0 : E.find((G) => G.id === d.value);\n if (!a.value || R)\n return;\n const $ = a.value.querySelector(\".vue-flow__transformationpane\");\n if (!g || !h.value || !$ || !d.value)\n return;\n const D = g.value.getBoundingClientRect(), Q = h.value.getBoundingClientRect(), ee = window.getComputedStyle($), { m22: m } = new window.DOMMatrixReadOnly(ee.transform), A = {\n id: d.value,\n position: e.position,\n x: (Q.left - D.left) / m,\n y: (Q.top - D.top) / m,\n ...rn(h.value)\n };\n v.handleBounds[n.value] = [...v.handleBounds[n.value] ?? [], A];\n });\n function _(R) {\n const $ = ho(R);\n p.value && w.value && ($ && R.button === 0 || !$) && S(R);\n }\n function P(R) {\n !c || !i.value && !w.value || p.value && V(R);\n }\n return (R, $) => (oe(), se(\"div\", {\n ref_key: \"handle\",\n ref: h,\n \"data-id\": `${C(c)}-${C(d)}-${C(n)}`,\n \"data-handleid\": C(d),\n \"data-nodeid\": C(c),\n \"data-handlepos\": e.position,\n class: Ke([\"vue-flow__handle\", [\n `vue-flow__handle-${e.position}`,\n `vue-flow__handle-${C(d)}`,\n C(l),\n C(u),\n C(n),\n {\n connectable: C(p),\n connecting: C(T),\n connectablestart: C(w),\n connectableend: C(y),\n connectionindicator: C(p) && (C(w) && !C(N) || C(y) && C(N))\n }\n ]]),\n onMousedown: _,\n onTouchstartPassive: _,\n onClick: P\n }, [\n xe(R.$slots, \"default\", { id: e.id })\n ], 42, $a));\n }\n}), un = function({\n sourcePosition: e = j.Bottom,\n targetPosition: t = j.Top,\n label: n,\n connectable: o = !0,\n isValidTargetPos: i,\n isValidSourcePos: r\n}) {\n return [\n ue(Kt, { type: \"target\", position: t, connectable: o, isValidConnection: i }),\n typeof n != \"string\" && n ? ue(n) : ue(\"div\", { innerHTML: n }),\n ue(Kt, { type: \"source\", position: e, connectable: o, isValidConnection: r })\n ];\n};\nun.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\"];\nun.inheritAttrs = !1;\nun.compatConfig = { MODE: 3 };\nconst Oa = un, cn = function({\n sourcePosition: e = j.Bottom,\n label: t,\n connectable: n = !0,\n isValidSourcePos: o\n}) {\n return [\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t }),\n ue(Kt, { type: \"source\", position: e, connectable: n, isValidConnection: o })\n ];\n};\ncn.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\"];\ncn.inheritAttrs = !1;\ncn.compatConfig = { MODE: 3 };\nconst Ta = cn, dn = function({\n targetPosition: e = j.Top,\n label: t,\n connectable: n = !0,\n isValidTargetPos: o\n}) {\n return [\n ue(Kt, { type: \"target\", position: e, connectable: n, isValidConnection: o }),\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t })\n ];\n};\ndn.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\"];\ndn.inheritAttrs = !1;\ndn.compatConfig = { MODE: 3 };\nconst Ia = dn;\nfunction Ho(e, t, n) {\n let o = e;\n do {\n if (o && o.matches(t))\n return !0;\n if (o === n)\n return !1;\n o = o.parentElement;\n } while (o);\n return !1;\n}\nfunction Pa(e, t, n, o, i) {\n return e.filter(\n (r) => (r.selected || r.id === i) && (!r.parentNode || !Mi(r, o)) && (r.draggable || t && typeof r.draggable > \"u\")\n ).map(\n (r) => {\n var a, s;\n return it({\n id: r.id,\n position: r.position || { x: 0, y: 0 },\n distance: {\n x: n.x - ((a = r.computedPosition) == null ? void 0 : a.x) || 0,\n y: n.y - ((s = r.computedPosition) == null ? void 0 : s.y) || 0\n },\n from: r.computedPosition,\n extent: r.extent,\n parentNode: r.parentNode,\n dimensions: r.dimensions\n });\n }\n );\n}\nfunction Mn({\n id: e,\n dragItems: t,\n findNode: n\n}) {\n const o = t.reduce((i, r) => {\n const a = n(r.id);\n return a && i.push(a), i;\n }, []);\n return [e ? o.find((i) => i.id === e) : o[0], o];\n}\nfunction zi(e) {\n if (Array.isArray(e))\n switch (e.length) {\n case 1:\n return [e[0], e[0], e[0], e[0]];\n case 2:\n return [e[0], e[1], e[0], e[1]];\n case 3:\n return [e[0], e[1], e[2], e[1]];\n case 4:\n return e;\n default:\n return [0, 0, 0, 0];\n }\n return [e, e, e, e];\n}\nfunction Da(e, t, n) {\n const [o, i, r, a] = typeof e != \"string\" ? zi(e.padding) : [0, 0, 0, 0];\n return n && Ie(n.computedPosition.x) && Ie(n.computedPosition.y) && Ie(n.dimensions.width) && Ie(n.dimensions.height) ? [\n [n.computedPosition.x + a, n.computedPosition.y + o],\n [\n n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - i,\n n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - r\n ]\n ] : !1;\n}\nfunction za(e, t, n, o) {\n let i = e.extent || n;\n if (i === \"parent\" || !Array.isArray(i) && (i == null ? void 0 : i.range) === \"parent\")\n if (e.parentNode && o && e.dimensions.width && e.dimensions.height) {\n const r = Da(i, e, o);\n r && (i = r);\n } else\n t(new ve(he.NODE_EXTENT_INVALID, e.id)), i = n;\n else if (Array.isArray(i)) {\n const r = (o == null ? void 0 : o.computedPosition.x) || 0, a = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i[0][0] + r, i[0][1] + a],\n [i[1][0] + r, i[1][1] + a]\n ];\n } else if (i != null && i.range && Array.isArray(i.range)) {\n const [r, a, s, l] = zi(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i.range[0][0] + u + l, i.range[0][1] + c + r],\n [i.range[1][0] + u - a, i.range[1][1] + c - s]\n ];\n }\n return i;\n}\nfunction go(e, t, n, o, i) {\n const r = za(e, n, o, i), a = so(t, r);\n return {\n position: {\n x: a.x - ((i == null ? void 0 : i.computedPosition.x) || 0),\n y: a.y - ((i == null ? void 0 : i.computedPosition.y) || 0)\n },\n computedPosition: a\n };\n}\nfunction Ai() {\n const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: a, emits: s } = fe();\n return (l, u = !1) => {\n const c = r.value ? i.value[0] : 5, v = r.value ? i.value[1] : 5, g = u ? 4 : 1, x = l.x * c * g, h = l.y * v * g, d = e.value.filter((w) => w.draggable || a && typeof w.draggable > \"u\").map((w) => {\n const y = { x: w.computedPosition.x + x, y: w.computedPosition.y + h }, { computedPosition: S } = go(\n w,\n y,\n s.error,\n t.value,\n w.parentNode ? o(w.parentNode) : void 0\n );\n return {\n id: w.id,\n position: S,\n from: w.position,\n distance: { x: l.x, y: l.y },\n dimensions: w.dimensions\n };\n });\n n(d, !0, !1);\n };\n}\nfunction Aa() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n dragStart: X(),\n drag: X(),\n dragStop: X()\n };\n}\nfunction Ba(e, t) {\n const n = Aa();\n return n.doubleClick.on((o) => {\n var i, r;\n t.nodeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.nodeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.nodeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.nodeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.nodeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.nodeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.dragStart.on((o) => {\n var i, r;\n t.nodeDragStart(o), (r = (i = e.events) == null ? void 0 : i.dragStart) == null || r.call(i, o);\n }), n.drag.on((o) => {\n var i, r;\n t.nodeDrag(o), (r = (i = e.events) == null ? void 0 : i.drag) == null || r.call(i, o);\n }), n.dragStop.on((o) => {\n var i, r;\n t.nodeDragStop(o), (r = (i = e.events) == null ? void 0 : i.dragStop) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nfunction Ra() {\n const { viewport: e, snapGrid: t, snapToGrid: n } = fe();\n return ({ sourceEvent: o }) => {\n const i = o.touches ? o.touches[0].clientX : o.clientX, r = o.touches ? o.touches[0].clientY : o.clientY, a = {\n x: (i - e.value.x) / e.value.zoom,\n y: (r - e.value.y) / e.value.zoom\n };\n return {\n xSnapped: n.value ? t.value[0] * Math.round(a.x / t.value[0]) : a.x,\n ySnapped: n.value ? t.value[1] * Math.round(a.y / t.value[1]) : a.y,\n ...a\n };\n };\n}\nfunction Lo(e, t, n) {\n const o = t.querySelectorAll(`.vue-flow__handle${e}`);\n if (!o || !o.length)\n return;\n const i = Array.from(o), r = t.getBoundingClientRect();\n return i.map((a) => {\n const s = a.getBoundingClientRect();\n return {\n id: a.getAttribute(\"data-handleid\"),\n position: a.getAttribute(\"data-handlepos\"),\n x: (s.left - r.left) / n,\n y: (s.top - r.top) / n,\n ...rn(a)\n };\n });\n}\nfunction Xn(e, t, n, o, i, r = !1, a) {\n i.value = !1, e.selected ? (r || e.selected && t) && (o([e]), Ue(a.blur)) : n([e]);\n}\nvar Va = { value: () => {\n} };\nfunction fn() {\n for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) {\n if (!(o = arguments[e] + \"\") || o in n || /[\\s.]/.test(o))\n throw new Error(\"illegal type: \" + o);\n n[o] = [];\n }\n return new Ht(n);\n}\nfunction Ht(e) {\n this._ = e;\n}\nfunction Ha(e, t) {\n return e.trim().split(/^|\\s+/).map(function(n) {\n var o = \"\", i = n.indexOf(\".\");\n if (i >= 0 && (o = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n))\n throw new Error(\"unknown type: \" + n);\n return { type: n, name: o };\n });\n}\nHt.prototype = fn.prototype = {\n constructor: Ht,\n on: function(e, t) {\n var n = this._, o = Ha(e + \"\", n), i, r = -1, a = o.length;\n if (arguments.length < 2) {\n for (; ++r < a; )\n if ((i = (e = o[r]).type) && (i = La(n[i], e.name)))\n return i;\n return;\n }\n if (t != null && typeof t != \"function\")\n throw new Error(\"invalid callback: \" + t);\n for (; ++r < a; )\n if (i = (e = o[r]).type)\n n[i] = Go(n[i], e.name, t);\n else if (t == null)\n for (i in n)\n n[i] = Go(n[i], e.name, null);\n return this;\n },\n copy: function() {\n var e = {}, t = this._;\n for (var n in t)\n e[n] = t[n].slice();\n return new Ht(e);\n },\n call: function(e, t) {\n if ((i = arguments.length - 2) > 0)\n for (var n = new Array(i), o = 0, i, r; o < i; ++o)\n n[o] = arguments[o + 2];\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (r = this._[e], o = 0, i = r.length; o < i; ++o)\n r[o].value.apply(t, n);\n },\n apply: function(e, t, n) {\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (var o = this._[e], i = 0, r = o.length; i < r; ++i)\n o[i].value.apply(t, n);\n }\n};\nfunction La(e, t) {\n for (var n = 0, o = e.length, i; n < o; ++n)\n if ((i = e[n]).name === t)\n return i.value;\n}\nfunction Go(e, t, n) {\n for (var o = 0, i = e.length; o < i; ++o)\n if (e[o].name === t) {\n e[o] = Va, e = e.slice(0, o).concat(e.slice(o + 1));\n break;\n }\n return n != null && e.push({ name: t, value: n }), e;\n}\nvar Zn = \"http://www.w3.org/1999/xhtml\";\nconst Fo = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: Zn,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction hn(e) {\n var t = e += \"\", n = t.indexOf(\":\");\n return n >= 0 && (t = e.slice(0, n)) !== \"xmlns\" && (e = e.slice(n + 1)), Fo.hasOwnProperty(t) ? { space: Fo[t], local: e } : e;\n}\nfunction Ga(e) {\n return function() {\n var t = this.ownerDocument, n = this.namespaceURI;\n return n === Zn && t.documentElement.namespaceURI === Zn ? t.createElement(e) : t.createElementNS(n, e);\n };\n}\nfunction Fa(e) {\n return function() {\n return this.ownerDocument.createElementNS(e.space, e.local);\n };\n}\nfunction Bi(e) {\n var t = hn(e);\n return (t.local ? Fa : Ga)(t);\n}\nfunction Ya() {\n}\nfunction vo(e) {\n return e == null ? Ya : function() {\n return this.querySelector(e);\n };\n}\nfunction Xa(e) {\n typeof e != \"function\" && (e = vo(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = new Array(a), l, u, c = 0; c < a; ++c)\n (l = r[c]) && (u = e.call(l, l.__data__, c, r)) && (\"__data__\" in l && (u.__data__ = l.__data__), s[c] = u);\n return new _e(o, this._parents);\n}\nfunction Za(e) {\n return e == null ? [] : Array.isArray(e) ? e : Array.from(e);\n}\nfunction Ua() {\n return [];\n}\nfunction Ri(e) {\n return e == null ? Ua : function() {\n return this.querySelectorAll(e);\n };\n}\nfunction Wa(e) {\n return function() {\n return Za(e.apply(this, arguments));\n };\n}\nfunction Ka(e) {\n typeof e == \"function\" ? e = Wa(e) : e = Ri(e);\n for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)\n for (var a = t[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && (o.push(e.call(l, l.__data__, u, a)), i.push(l));\n return new _e(o, i);\n}\nfunction Vi(e) {\n return function() {\n return this.matches(e);\n };\n}\nfunction Hi(e) {\n return function(t) {\n return t.matches(e);\n };\n}\nvar qa = Array.prototype.find;\nfunction ja(e) {\n return function() {\n return qa.call(this.children, e);\n };\n}\nfunction Qa() {\n return this.firstElementChild;\n}\nfunction Ja(e) {\n return this.select(e == null ? Qa : ja(typeof e == \"function\" ? e : Hi(e)));\n}\nvar es = Array.prototype.filter;\nfunction ts() {\n return Array.from(this.children);\n}\nfunction ns(e) {\n return function() {\n return es.call(this.children, e);\n };\n}\nfunction os(e) {\n return this.selectAll(e == null ? ts : ns(typeof e == \"function\" ? e : Hi(e)));\n}\nfunction is(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new _e(o, this._parents);\n}\nfunction Li(e) {\n return new Array(e.length);\n}\nfunction rs() {\n return new _e(this._enter || this._groups.map(Li), this._parents);\n}\nfunction qt(e, t) {\n this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;\n}\nqt.prototype = {\n constructor: qt,\n appendChild: function(e) {\n return this._parent.insertBefore(e, this._next);\n },\n insertBefore: function(e, t) {\n return this._parent.insertBefore(e, t);\n },\n querySelector: function(e) {\n return this._parent.querySelector(e);\n },\n querySelectorAll: function(e) {\n return this._parent.querySelectorAll(e);\n }\n};\nfunction as(e) {\n return function() {\n return e;\n };\n}\nfunction ss(e, t, n, o, i, r) {\n for (var a = 0, s, l = t.length, u = r.length; a < u; ++a)\n (s = t[a]) ? (s.__data__ = r[a], o[a] = s) : n[a] = new qt(e, r[a]);\n for (; a < l; ++a)\n (s = t[a]) && (i[a] = s);\n}\nfunction ls(e, t, n, o, i, r, a) {\n var s, l, u = /* @__PURE__ */ new Map(), c = t.length, v = r.length, g = new Array(c), x;\n for (s = 0; s < c; ++s)\n (l = t[s]) && (g[s] = x = a.call(l, l.__data__, s, t) + \"\", u.has(x) ? i[s] = l : u.set(x, l));\n for (s = 0; s < v; ++s)\n x = a.call(e, r[s], s, r) + \"\", (l = u.get(x)) ? (o[s] = l, l.__data__ = r[s], u.delete(x)) : n[s] = new qt(e, r[s]);\n for (s = 0; s < c; ++s)\n (l = t[s]) && u.get(g[s]) === l && (i[s] = l);\n}\nfunction us(e) {\n return e.__data__;\n}\nfunction cs(e, t) {\n if (!arguments.length)\n return Array.from(this, us);\n var n = t ? ls : ss, o = this._parents, i = this._groups;\n typeof e != \"function\" && (e = as(e));\n for (var r = i.length, a = new Array(r), s = new Array(r), l = new Array(r), u = 0; u < r; ++u) {\n var c = o[u], v = i[u], g = v.length, x = ds(e.call(c, c && c.__data__, u, o)), h = x.length, d = s[u] = new Array(h), w = a[u] = new Array(h), y = l[u] = new Array(g);\n n(c, v, d, w, y, x, t);\n for (var S = 0, V = 0, p, N; S < h; ++S)\n if (p = d[S]) {\n for (S >= V && (V = S + 1); !(N = w[V]) && ++V < h; )\n ;\n p._next = N || null;\n }\n }\n return a = new _e(a, o), a._enter = s, a._exit = l, a;\n}\nfunction ds(e) {\n return typeof e == \"object\" && \"length\" in e ? e : Array.from(e);\n}\nfunction fs() {\n return new _e(this._exit || this._groups.map(Li), this._parents);\n}\nfunction hs(e, t, n) {\n var o = this.enter(), i = this, r = this.exit();\n return typeof e == \"function\" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + \"\"), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;\n}\nfunction gs(e) {\n for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, a = Math.min(i, r), s = new Array(i), l = 0; l < a; ++l)\n for (var u = n[l], c = o[l], v = u.length, g = s[l] = new Array(v), x, h = 0; h < v; ++h)\n (x = u[h] || c[h]) && (g[h] = x);\n for (; l < i; ++l)\n s[l] = n[l];\n return new _e(s, this._parents);\n}\nfunction vs() {\n for (var e = this._groups, t = -1, n = e.length; ++t < n; )\n for (var o = e[t], i = o.length - 1, r = o[i], a; --i >= 0; )\n (a = o[i]) && (r && a.compareDocumentPosition(r) ^ 4 && r.parentNode.insertBefore(a, r), r = a);\n return this;\n}\nfunction ms(e) {\n e || (e = ps);\n function t(v, g) {\n return v && g ? e(v.__data__, g.__data__) : !v - !g;\n }\n for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {\n for (var a = n[r], s = a.length, l = i[r] = new Array(s), u, c = 0; c < s; ++c)\n (u = a[c]) && (l[c] = u);\n l.sort(t);\n }\n return new _e(i, this._parents).order();\n}\nfunction ps(e, t) {\n return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;\n}\nfunction ys() {\n var e = arguments[0];\n return arguments[0] = this, e.apply(null, arguments), this;\n}\nfunction xs() {\n return Array.from(this);\n}\nfunction _s() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length; i < r; ++i) {\n var a = o[i];\n if (a)\n return a;\n }\n return null;\n}\nfunction ws() {\n let e = 0;\n for (const t of this)\n ++e;\n return e;\n}\nfunction bs() {\n return !this.node();\n}\nfunction Es(e) {\n for (var t = this._groups, n = 0, o = t.length; n < o; ++n)\n for (var i = t[n], r = 0, a = i.length, s; r < a; ++r)\n (s = i[r]) && e.call(s, s.__data__, r, i);\n return this;\n}\nfunction Ss(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ns(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction Cs(e, t) {\n return function() {\n this.setAttribute(e, t);\n };\n}\nfunction Ms(e, t) {\n return function() {\n this.setAttributeNS(e.space, e.local, t);\n };\n}\nfunction $s(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttribute(e) : this.setAttribute(e, n);\n };\n}\nfunction ks(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);\n };\n}\nfunction Os(e, t) {\n var n = hn(e);\n if (arguments.length < 2) {\n var o = this.node();\n return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n);\n }\n return this.each((t == null ? n.local ? Ns : Ss : typeof t == \"function\" ? n.local ? ks : $s : n.local ? Ms : Cs)(n, t));\n}\nfunction Gi(e) {\n return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;\n}\nfunction Ts(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction Is(e, t, n) {\n return function() {\n this.style.setProperty(e, t, n);\n };\n}\nfunction Ps(e, t, n) {\n return function() {\n var o = t.apply(this, arguments);\n o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n);\n };\n}\nfunction Ds(e, t, n) {\n return arguments.length > 1 ? this.each((t == null ? Ts : typeof t == \"function\" ? Ps : Is)(e, t, n ?? \"\")) : ft(this.node(), e);\n}\nfunction ft(e, t) {\n return e.style.getPropertyValue(t) || Gi(e).getComputedStyle(e, null).getPropertyValue(t);\n}\nfunction zs(e) {\n return function() {\n delete this[e];\n };\n}\nfunction As(e, t) {\n return function() {\n this[e] = t;\n };\n}\nfunction Bs(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? delete this[e] : this[e] = n;\n };\n}\nfunction Rs(e, t) {\n return arguments.length > 1 ? this.each((t == null ? zs : typeof t == \"function\" ? Bs : As)(e, t)) : this.node()[e];\n}\nfunction Fi(e) {\n return e.trim().split(/^|\\s+/);\n}\nfunction mo(e) {\n return e.classList || new Yi(e);\n}\nfunction Yi(e) {\n this._node = e, this._names = Fi(e.getAttribute(\"class\") || \"\");\n}\nYi.prototype = {\n add: function(e) {\n var t = this._names.indexOf(e);\n t < 0 && (this._names.push(e), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n remove: function(e) {\n var t = this._names.indexOf(e);\n t >= 0 && (this._names.splice(t, 1), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n contains: function(e) {\n return this._names.indexOf(e) >= 0;\n }\n};\nfunction Xi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.add(t[o]);\n}\nfunction Zi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.remove(t[o]);\n}\nfunction Vs(e) {\n return function() {\n Xi(this, e);\n };\n}\nfunction Hs(e) {\n return function() {\n Zi(this, e);\n };\n}\nfunction Ls(e, t) {\n return function() {\n (t.apply(this, arguments) ? Xi : Zi)(this, e);\n };\n}\nfunction Gs(e, t) {\n var n = Fi(e + \"\");\n if (arguments.length < 2) {\n for (var o = mo(this.node()), i = -1, r = n.length; ++i < r; )\n if (!o.contains(n[i]))\n return !1;\n return !0;\n }\n return this.each((typeof t == \"function\" ? Ls : t ? Vs : Hs)(n, t));\n}\nfunction Fs() {\n this.textContent = \"\";\n}\nfunction Ys(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Xs(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.textContent = t ?? \"\";\n };\n}\nfunction Zs(e) {\n return arguments.length ? this.each(e == null ? Fs : (typeof e == \"function\" ? Xs : Ys)(e)) : this.node().textContent;\n}\nfunction Us() {\n this.innerHTML = \"\";\n}\nfunction Ws(e) {\n return function() {\n this.innerHTML = e;\n };\n}\nfunction Ks(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.innerHTML = t ?? \"\";\n };\n}\nfunction qs(e) {\n return arguments.length ? this.each(e == null ? Us : (typeof e == \"function\" ? Ks : Ws)(e)) : this.node().innerHTML;\n}\nfunction js() {\n this.nextSibling && this.parentNode.appendChild(this);\n}\nfunction Qs() {\n return this.each(js);\n}\nfunction Js() {\n this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction el() {\n return this.each(Js);\n}\nfunction tl(e) {\n var t = typeof e == \"function\" ? e : Bi(e);\n return this.select(function() {\n return this.appendChild(t.apply(this, arguments));\n });\n}\nfunction nl() {\n return null;\n}\nfunction ol(e, t) {\n var n = typeof e == \"function\" ? e : Bi(e), o = t == null ? nl : typeof t == \"function\" ? t : vo(t);\n return this.select(function() {\n return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);\n });\n}\nfunction il() {\n var e = this.parentNode;\n e && e.removeChild(this);\n}\nfunction rl() {\n return this.each(il);\n}\nfunction al() {\n var e = this.cloneNode(!1), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction sl() {\n var e = this.cloneNode(!0), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction ll(e) {\n return this.select(e ? sl : al);\n}\nfunction ul(e) {\n return arguments.length ? this.property(\"__data__\", e) : this.node().__data__;\n}\nfunction cl(e) {\n return function(t) {\n e.call(this, t, this.__data__);\n };\n}\nfunction dl(e) {\n return e.trim().split(/^|\\s+/).map(function(t) {\n var n = \"\", o = t.indexOf(\".\");\n return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };\n });\n}\nfunction fl(e) {\n return function() {\n var t = this.__on;\n if (t) {\n for (var n = 0, o = -1, i = t.length, r; n < i; ++n)\n r = t[n], (!e.type || r.type === e.type) && r.name === e.name ? this.removeEventListener(r.type, r.listener, r.options) : t[++o] = r;\n ++o ? t.length = o : delete this.__on;\n }\n };\n}\nfunction hl(e, t, n) {\n return function() {\n var o = this.__on, i, r = cl(t);\n if (o) {\n for (var a = 0, s = o.length; a < s; ++a)\n if ((i = o[a]).type === e.type && i.name === e.name) {\n this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;\n return;\n }\n }\n this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];\n };\n}\nfunction gl(e, t, n) {\n var o = dl(e + \"\"), i, r = o.length, a;\n if (arguments.length < 2) {\n var s = this.node().__on;\n if (s) {\n for (var l = 0, u = s.length, c; l < u; ++l)\n for (i = 0, c = s[l]; i < r; ++i)\n if ((a = o[i]).type === c.type && a.name === c.name)\n return c.value;\n }\n return;\n }\n for (s = t ? hl : fl, i = 0; i < r; ++i)\n this.each(s(o[i], t, n));\n return this;\n}\nfunction Ui(e, t, n) {\n var o = Gi(e), i = o.CustomEvent;\n typeof i == \"function\" ? i = new i(t, n) : (i = o.document.createEvent(\"Event\"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);\n}\nfunction vl(e, t) {\n return function() {\n return Ui(this, e, t);\n };\n}\nfunction ml(e, t) {\n return function() {\n return Ui(this, e, t.apply(this, arguments));\n };\n}\nfunction pl(e, t) {\n return this.each((typeof t == \"function\" ? ml : vl)(e, t));\n}\nfunction* yl() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length, a; i < r; ++i)\n (a = o[i]) && (yield a);\n}\nvar Wi = [null];\nfunction _e(e, t) {\n this._groups = e, this._parents = t;\n}\nfunction $t() {\n return new _e([[document.documentElement]], Wi);\n}\nfunction xl() {\n return this;\n}\n_e.prototype = $t.prototype = {\n constructor: _e,\n select: Xa,\n selectAll: Ka,\n selectChild: Ja,\n selectChildren: os,\n filter: is,\n data: cs,\n enter: rs,\n exit: fs,\n join: hs,\n merge: gs,\n selection: xl,\n order: vs,\n sort: ms,\n call: ys,\n nodes: xs,\n node: _s,\n size: ws,\n empty: bs,\n each: Es,\n attr: Os,\n style: Ds,\n property: Rs,\n classed: Gs,\n text: Zs,\n html: qs,\n raise: Qs,\n lower: el,\n append: tl,\n insert: ol,\n remove: rl,\n clone: ll,\n datum: ul,\n on: gl,\n dispatch: pl,\n [Symbol.iterator]: yl\n};\nfunction we(e) {\n return typeof e == \"string\" ? new _e([[document.querySelector(e)]], [document.documentElement]) : new _e([[e]], Wi);\n}\nfunction _l(e) {\n let t;\n for (; t = e.sourceEvent; )\n e = t;\n return e;\n}\nfunction Ne(e, t) {\n if (e = _l(e), t === void 0 && (t = e.currentTarget), t) {\n var n = t.ownerSVGElement || t;\n if (n.createSVGPoint) {\n var o = n.createSVGPoint();\n return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y];\n }\n if (t.getBoundingClientRect) {\n var i = t.getBoundingClientRect();\n return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];\n }\n }\n return [e.pageX, e.pageY];\n}\nconst wl = { passive: !1 }, bt = { capture: !0, passive: !1 };\nfunction $n(e) {\n e.stopImmediatePropagation();\n}\nfunction at(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Ki(e) {\n var t = e.document.documentElement, n = we(e).on(\"dragstart.drag\", at, bt);\n \"onselectstart\" in t ? n.on(\"selectstart.drag\", at, bt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = \"none\");\n}\nfunction qi(e, t) {\n var n = e.document.documentElement, o = we(e).on(\"dragstart.drag\", null);\n t && (o.on(\"click.drag\", at, bt), setTimeout(function() {\n o.on(\"click.drag\", null);\n }, 0)), \"onselectstart\" in n ? o.on(\"selectstart.drag\", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);\n}\nconst Pt = (e) => () => e;\nfunction Un(e, {\n sourceEvent: t,\n subject: n,\n target: o,\n identifier: i,\n active: r,\n x: a,\n y: s,\n dx: l,\n dy: u,\n dispatch: c\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n subject: { value: n, enumerable: !0, configurable: !0 },\n target: { value: o, enumerable: !0, configurable: !0 },\n identifier: { value: i, enumerable: !0, configurable: !0 },\n active: { value: r, enumerable: !0, configurable: !0 },\n x: { value: a, enumerable: !0, configurable: !0 },\n y: { value: s, enumerable: !0, configurable: !0 },\n dx: { value: l, enumerable: !0, configurable: !0 },\n dy: { value: u, enumerable: !0, configurable: !0 },\n _: { value: c }\n });\n}\nUn.prototype.on = function() {\n var e = this._.on.apply(this._, arguments);\n return e === this._ ? this : e;\n};\nfunction bl(e) {\n return !e.ctrlKey && !e.button;\n}\nfunction El() {\n return this.parentNode;\n}\nfunction Sl(e, t) {\n return t ?? { x: e.x, y: e.y };\n}\nfunction Nl() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Cl() {\n var e = bl, t = El, n = Sl, o = Nl, i = {}, r = fn(\"start\", \"drag\", \"end\"), a = 0, s, l, u, c, v = 0;\n function g(p) {\n p.on(\"mousedown.drag\", x).filter(o).on(\"touchstart.drag\", w).on(\"touchmove.drag\", y, wl).on(\"touchend.drag touchcancel.drag\", S).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function x(p, N) {\n if (!(c || !e.call(this, p, N))) {\n var T = V(this, t.call(this, p, N), p, N, \"mouse\");\n T && (we(p.view).on(\"mousemove.drag\", h, bt).on(\"mouseup.drag\", d, bt), Ki(p.view), $n(p), u = !1, s = p.clientX, l = p.clientY, T(\"start\", p));\n }\n }\n function h(p) {\n if (at(p), !u) {\n var N = p.clientX - s, T = p.clientY - l;\n u = N * N + T * T > v;\n }\n i.mouse(\"drag\", p);\n }\n function d(p) {\n we(p.view).on(\"mousemove.drag mouseup.drag\", null), qi(p.view, u), at(p), i.mouse(\"end\", p);\n }\n function w(p, N) {\n if (e.call(this, p, N)) {\n var T = p.changedTouches, _ = t.call(this, p, N), P = T.length, R, $;\n for (R = 0; R < P; ++R)\n ($ = V(this, _, p, N, T[R].identifier, T[R])) && ($n(p), $(\"start\", p, T[R]));\n }\n }\n function y(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (_ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && (at(p), P(\"drag\", p, N[_]));\n }\n function S(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (c && clearTimeout(c), c = setTimeout(function() {\n c = null;\n }, 500), _ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && ($n(p), P(\"end\", p, N[_]));\n }\n function V(p, N, T, _, P, R) {\n var $ = r.copy(), D = Ne(R || T, N), Q, ee, m;\n if ((m = n.call(p, new Un(\"beforestart\", {\n sourceEvent: T,\n target: g,\n identifier: P,\n active: a,\n x: D[0],\n y: D[1],\n dx: 0,\n dy: 0,\n dispatch: $\n }), _)) != null)\n return Q = m.x - D[0] || 0, ee = m.y - D[1] || 0, function A(E, G, Z) {\n var K = D, z;\n switch (E) {\n case \"start\":\n i[P] = A, z = a++;\n break;\n case \"end\":\n delete i[P], --a;\n case \"drag\":\n D = Ne(Z || G, N), z = a;\n break;\n }\n $.call(\n E,\n p,\n new Un(E, {\n sourceEvent: G,\n subject: m,\n target: g,\n identifier: P,\n active: z,\n x: D[0] + Q,\n y: D[1] + ee,\n dx: D[0] - K[0],\n dy: D[1] - K[1],\n dispatch: $\n }),\n _\n );\n };\n }\n return g.filter = function(p) {\n return arguments.length ? (e = typeof p == \"function\" ? p : Pt(!!p), g) : e;\n }, g.container = function(p) {\n return arguments.length ? (t = typeof p == \"function\" ? p : Pt(p), g) : t;\n }, g.subject = function(p) {\n return arguments.length ? (n = typeof p == \"function\" ? p : Pt(p), g) : n;\n }, g.touchable = function(p) {\n return arguments.length ? (o = typeof p == \"function\" ? p : Pt(!!p), g) : o;\n }, g.on = function() {\n var p = r.on.apply(r, arguments);\n return p === r ? g : p;\n }, g.clickDistance = function(p) {\n return arguments.length ? (v = (p = +p) * p, g) : Math.sqrt(v);\n }, g;\n}\nfunction ji(e) {\n const t = fe(), n = M(t, \"vueFlowRef\"), o = M(t, \"snapToGrid\"), i = M(t, \"snapGrid\"), r = M(t, \"noDragClassName\"), a = M(t, \"nodes\"), s = M(t, \"nodeExtent\"), l = M(t, \"viewport\"), u = M(t, \"autoPanOnNodeDrag\"), c = M(t, \"nodesDraggable\"), v = M(t, \"panBy\"), g = M(t, \"findNode\"), x = M(t, \"multiSelectionActive\"), h = M(t, \"nodesSelectionActive\"), d = M(t, \"selectNodesOnDrag\"), w = M(t, \"removeSelectedElements\"), y = M(t, \"addSelectedNodes\"), S = M(t, \"updateNodePositions\"), V = M(t, \"emits\"), { onStart: p, onDrag: N, onStop: T, el: _, disabled: P, id: R, selectable: $ } = e, D = ie(!1);\n let Q = ie([]), ee = ie(), m = ie(null), A = ie({ x: void 0, y: void 0 }), E = ie({ x: 0, y: 0 }), G = ie(null), Z = ie(0), K = ie(!1);\n const z = Ra(), W = ({ x: q, y: te }) => {\n A.value = { x: q, y: te };\n let re = !1;\n if (Q.value = Q.value.map((k) => {\n const H = { x: q - k.distance.x, y: te - k.distance.y };\n o.value && (H.x = i.value[0] * Math.round(H.x / i.value[0]), H.y = i.value[1] * Math.round(H.y / i.value[1]));\n const { computedPosition: f } = go(\n k,\n H,\n V.value.error,\n s.value,\n k.parentNode ? g.value(k.parentNode) : void 0\n );\n return re = re || k.position.x !== f.x || k.position.y !== f.y, k.position = f, k;\n }), !!re && (S.value(Q.value, !0, !0), D.value = !0, G.value)) {\n const [k, H] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n N({ event: G.value, node: k, nodes: H });\n }\n }, B = () => {\n if (!m.value)\n return;\n const [q, te] = Pi(E.value, m.value);\n if (q !== 0 || te !== 0) {\n const re = {\n x: (A.value.x ?? 0) - q / l.value.zoom,\n y: (A.value.y ?? 0) - te / l.value.zoom\n };\n v.value({ x: q, y: te }) && W(re);\n }\n Z.value = requestAnimationFrame(B);\n };\n return de([() => le(P), _], ([q, te]) => {\n if (te) {\n const re = we(te);\n if (q)\n re.on(\".drag\", null);\n else {\n const k = g.value(R);\n ee.value = Cl().on(\"start\", (H) => {\n var b;\n !d.value && !x.value && k && (k.selected || w.value()), k && le($) && d.value && Xn(\n k,\n x.value,\n y.value,\n w.value,\n h,\n !1,\n te\n );\n const f = z(H);\n if (A.value = f, Q.value = Pa(a.value, c.value, f, g.value, R), Q.value.length) {\n const [L, I] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n p({ event: H.sourceEvent, node: L, nodes: I });\n }\n m.value = ((b = n.value) == null ? void 0 : b.getBoundingClientRect()) || null, E.value = rt(H.sourceEvent, m.value);\n }).on(\"drag\", (H) => {\n const f = z(H);\n !K.value && u.value && (K.value = !0, B()), (A.value.x !== f.xSnapped || A.value.y !== f.ySnapped) && Q.value.length && (G.value = H.sourceEvent, E.value = rt(H.sourceEvent, m.value), W(f));\n }).on(\"end\", (H) => {\n if (D.value = !1, K.value = !1, cancelAnimationFrame(Z.value), Q.value.length) {\n S.value(Q.value, !1, !1);\n const [f, b] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n T({ event: H.sourceEvent, node: f, nodes: b });\n }\n }).filter((H) => {\n const f = H.target;\n return !H.button && (!r.value || !Ho(f, `.${r.value}`, te) && (!(k != null && k.dragHandle) || Ho(f, k.dragHandle, te)));\n }), re.call(ee.value);\n }\n }\n }), D;\n}\nconst Qi = \"vue-flow__node-desc\", Ji = \"vue-flow__edge-desc\", Ml = \"vue-flow__aria-live\", er = [\"Enter\", \" \", \"Escape\"], st = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction Wn(e) {\n var i, r;\n const t = ((r = (i = e.composedPath) == null ? void 0 : i.call(e)) == null ? void 0 : r[0]) || e.target, n = Ae(t.hasAttribute) ? t.hasAttribute(\"contenteditable\") : !1, o = Ae(t.closest) ? t.closest(\".nokey\") : null;\n return [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(t == null ? void 0 : t.nodeName) || n || !!o;\n}\nfunction $l(e) {\n return e.ctrlKey || e.metaKey || e.shiftKey;\n}\nfunction kl(e, t) {\n return (n) => e.some((o) => {\n const i = o.split(\"+\").map((r) => r.trim().toLowerCase());\n return i.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), i.every((r) => t.has(r)));\n });\n}\nconst _t = (e, t) => {\n const n = ao(), o = ie(le(e) === !0), i = ie(!1), r = ie(/* @__PURE__ */ new Set());\n return de(o, () => {\n t == null || t(o.value);\n }), de(\n () => le(e),\n (a) => {\n if (n && typeof n.addEventListener < \"u\" && ro(n, \"blur\", () => {\n o.value = !1;\n }), zr(a)) {\n o.value = a;\n return;\n }\n Array.isArray(a) && (a = kl(a, r.value)), a && (Mo(\n a,\n (s) => {\n i.value = $l(s), !(!i.value && Wn(s)) && (s.preventDefault(), o.value = !0);\n },\n { eventName: \"keydown\" }\n ), Mo(\n a,\n (s) => {\n if (o.value) {\n if (!i.value && Wn(s))\n return;\n i.value = !1, r.value.clear(), o.value = !1;\n }\n },\n { eventName: \"keyup\" }\n ));\n },\n {\n immediate: !0\n }\n ), o;\n}, Ol = ge({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"draggable\", \"selectable\", \"focusable\", \"connectable\", \"node\", \"resizeObserver\"],\n setup(e) {\n ut($i, e.id);\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"noPanClassName\"), r = M(t, \"selectNodesOnDrag\"), a = M(t, \"nodesSelectionActive\"), s = M(t, \"multiSelectionActive\"), l = M(t, \"emits\"), u = M(t, \"findNode\"), c = M(t, \"removeSelectedNodes\"), v = M(t, \"addSelectedNodes\"), g = M(t, \"updateNodeDimensions\"), x = M(t, \"onUpdateNodeInternals\"), h = M(t, \"getIntersectingNodes\"), d = M(t, \"getNodeTypes\"), w = M(t, \"nodeExtent\"), y = M(t, \"elevateNodesOnSelect\"), S = M(t, \"disableKeyboardA11y\"), V = M(t, \"ariaLiveMessage\"), p = M(t, \"snapToGrid\"), N = M(t, \"snapGrid\"), T = Ai(), _ = yt(e, \"node\"), P = J(() => u.value(_.value.parentNode)), R = J(() => sn([_.value], o.value)), $ = ie();\n ut(ki, $);\n const { emit: D, on: Q } = Ba(_.value, l.value), ee = ji({\n id: e.id,\n el: $,\n disabled: () => !e.draggable,\n selectable: () => e.selectable,\n onStart(k) {\n D.dragStart({ ...k, intersections: h.value(_.value) });\n },\n onDrag(k) {\n D.drag({ ...k, intersections: h.value(_.value) });\n },\n onStop(k) {\n D.dragStop({ ...k, intersections: h.value(_.value) });\n }\n }), m = J(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = J(() => {\n const k = (_.value.style instanceof Function ? _.value.style(_.value) : _.value.style) || {}, H = _.value.width instanceof Function ? _.value.width(_.value) : _.value.width, f = _.value.height instanceof Function ? _.value.height(_.value) : _.value.height;\n return H && (k.width = typeof H == \"string\" ? H : `${H}px`), f && (k.height = typeof f == \"string\" ? f : `${f}px`), k;\n }), E = () => Number(_.value.zIndex ?? A.value.zIndex ?? 0);\n return x.value((k) => {\n k.includes(e.id) && Z();\n }), Ve(() => {\n e.resizeObserver.observe($.value);\n }), gi(() => {\n e.resizeObserver.unobserve($.value);\n }), de(\n [() => _.value.type, () => _.value.sourcePosition, () => _.value.targetPosition],\n () => {\n g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n },\n { flush: \"pre\" }\n ), de(\n [\n () => _.value.position.x,\n () => _.value.position.y,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.x;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.y;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.z;\n },\n () => E(),\n () => _.value.selected,\n () => _.value.dimensions.height,\n () => _.value.dimensions.width,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.height;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.width;\n }\n ],\n ([k, H, f, b, L, I]) => {\n const F = {\n x: k,\n y: H,\n z: I + (y.value && _.value.selected ? 1e3 : 0)\n };\n Ie(f) && Ie(b) ? _.value.computedPosition = ma({ x: f, y: b, z: L }, F) : _.value.computedPosition = F;\n },\n { flush: \"pre\", immediate: !0 }\n ), de([() => _.value.extent, () => w.value], ([k, H], [f, b]) => {\n (k !== f || H !== b) && G();\n }), _.value.extent === \"parent\" || typeof _.value.extent == \"object\" && \"range\" in _.value.extent && _.value.extent.range === \"parent\" ? ye(() => _.value.initialized).toBe(!0).then(G) : G(), () => ue(\n \"div\",\n {\n ref: $,\n \"data-id\": _.value.id,\n class: [\n \"vue-flow__node\",\n `vue-flow__node-${e.type === !1 ? \"default\" : e.name}`,\n {\n [i.value]: e.draggable,\n dragging: ee == null ? void 0 : ee.value,\n selected: _.value.selected,\n selectable: e.selectable\n },\n m.value\n ],\n style: {\n zIndex: _.value.computedPosition.z ?? E(),\n transform: `translate(${_.value.computedPosition.x}px,${_.value.computedPosition.y}px)`,\n pointerEvents: e.selectable || e.draggable ? \"all\" : \"none\",\n visibility: _.value.initialized ? \"visible\" : \"hidden\",\n ...A.value\n },\n tabIndex: e.focusable ? 0 : void 0,\n role: e.focusable ? \"button\" : void 0,\n \"aria-describedby\": S.value ? void 0 : `${Qi}-${n.value}`,\n \"aria-label\": _.value.ariaLabel,\n onMouseenter: K,\n onMousemove: z,\n onMouseleave: W,\n onContextmenu: B,\n onClick: te,\n onDblclick: q,\n onKeydown: re\n },\n [\n ue(e.type === !1 ? d.value.default : e.type, {\n id: _.value.id,\n type: _.value.type,\n data: _.value.data,\n events: { ..._.value.events, ...Q },\n selected: !!_.value.selected,\n resizing: !!_.value.resizing,\n dragging: ee.value,\n connectable: e.connectable,\n position: _.value.position,\n dimensions: _.value.dimensions,\n isValidTargetPos: _.value.isValidTargetPos,\n isValidSourcePos: _.value.isValidSourcePos,\n parent: _.value.parentNode,\n zIndex: _.value.computedPosition.z,\n targetPosition: _.value.targetPosition,\n sourcePosition: _.value.sourcePosition,\n label: _.value.label,\n dragHandle: _.value.dragHandle,\n onUpdateNodeInternals: Z\n })\n ]\n );\n function G() {\n const k = _.value.computedPosition;\n p.value && (k.x = N.value[0] * Math.round(k.x / N.value[0]), k.y = N.value[1] * Math.round(k.y / N.value[1]));\n const { computedPosition: H, position: f } = go(_.value, k, l.value.error, w.value, P.value);\n (_.value.computedPosition.x !== H.x || _.value.computedPosition.y !== H.y) && (_.value.computedPosition = { ..._.value.computedPosition, ...H }), (_.value.position.x !== f.x || _.value.position.y !== f.y) && (_.value.position = f);\n }\n function Z() {\n $.value && g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n }\n function K(k) {\n ee != null && ee.value || D.mouseEnter({ event: k, node: _.value, connectedEdges: R.value });\n }\n function z(k) {\n ee != null && ee.value || D.mouseMove({ event: k, node: _.value, connectedEdges: R.value });\n }\n function W(k) {\n ee != null && ee.value || D.mouseLeave({ event: k, node: _.value, connectedEdges: R.value });\n }\n function B(k) {\n return D.contextMenu({ event: k, node: _.value, connectedEdges: R.value });\n }\n function q(k) {\n return D.doubleClick({ event: k, node: _.value, connectedEdges: R.value });\n }\n function te(k) {\n e.selectable && (!r.value || !e.draggable) && Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n !1,\n $.value\n ), D.click({ event: k, node: _.value, connectedEdges: R.value });\n }\n function re(k) {\n var H;\n if (!Wn(k))\n if (er.includes(k.key) && e.selectable) {\n const f = k.key === \"Escape\";\n f && ((H = $.value) == null || H.blur()), Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n f,\n $.value\n );\n } else\n !S.value && e.draggable && _.value.selected && st[k.key] && (V.value = `Moved selected node ${k.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~_.value.position.x}, y: ${~~_.value.position.y}`, T(\n {\n x: st[k.key].x,\n y: st[k.key].y\n },\n k.shiftKey\n ));\n }\n }\n}), Tl = Ol, Il = [\"transform\"], Pl = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"], Dl = [\"y\"], zl = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n}, Al = /* @__PURE__ */ ge({\n ...zl,\n props: {\n x: null,\n y: null,\n label: null,\n labelStyle: { default: {} },\n labelShowBg: { type: Boolean, default: !0 },\n labelBgStyle: { default: {} },\n labelBgPadding: { default: [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(e) {\n let t = ie({ x: 0, y: 0, width: 0, height: 0 });\n const n = ie(null), o = J(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`);\n Ve(i), de([() => e.x, () => e.y, n, () => e.label], i);\n function i() {\n if (!n.value)\n return;\n const r = n.value.getBBox();\n (r.width !== t.value.width || r.height !== t.value.height) && (t.value = r);\n }\n return (r, a) => (oe(), se(\"g\", {\n transform: C(o),\n class: \"vue-flow__edge-textwrapper\"\n }, [\n e.labelShowBg ? (oe(), se(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${C(t).width + 2 * e.labelBgPadding[0]}px`,\n height: `${C(t).height + 2 * e.labelBgPadding[1]}px`,\n x: -e.labelBgPadding[0],\n y: -e.labelBgPadding[1],\n style: Le(e.labelBgStyle),\n rx: e.labelBgBorderRadius,\n ry: e.labelBgBorderRadius\n }, null, 12, Pl)) : Ee(\"\", !0),\n ct(\"text\", vi(r.$attrs, {\n ref_key: \"el\",\n ref: n,\n class: \"vue-flow__edge-text\",\n y: C(t).height / 2,\n dy: \"0.3em\",\n style: e.labelStyle\n }), [\n xe(r.$slots, \"default\", {}, () => [\n C(Pe)(e.label) ? (oe(), se(Ce, { key: 1 }, [\n Cr(Vn(e.label), 1)\n ], 64)) : (oe(), ze(mi(e.label), { key: 0 }))\n ])\n ], 16, Dl)\n ], 8, Il));\n }\n}), gn = function({\n path: e,\n label: t,\n labelX: n,\n labelY: o,\n labelBgBorderRadius: i,\n labelBgPadding: r,\n labelBgStyle: a,\n labelShowBg: s = !0,\n labelStyle: l,\n markerStart: u,\n markerEnd: c,\n interactionWidth: v = 20\n}, { attrs: g }) {\n return [\n ue(\"path\", {\n style: g.style,\n class: [\"vue-flow__edge-path\", g.class].join(\" \"),\n d: e,\n \"marker-end\": c,\n \"marker-start\": u\n }),\n v ? ue(\"path\", {\n d: e,\n fill: \"none\",\n \"stroke-opacity\": 0,\n \"stroke-width\": v\n }) : null,\n t && Ie(n) && Ie(o) ? ue(Al, {\n x: n,\n y: o,\n label: t,\n labelStyle: l,\n labelShowBg: s,\n labelBgStyle: a,\n labelBgPadding: r,\n labelBgBorderRadius: i\n }) : null\n ];\n};\ngn.props = [\n \"path\",\n \"labelX\",\n \"labelY\",\n \"label\",\n \"labelBgBorderRadius\",\n \"labelBgPadding\",\n \"labelBgStyle\",\n \"labelShowBg\",\n \"labelStyle\",\n \"markerStart\",\n \"markerEnd\",\n \"interactionWidth\"\n];\ngn.inheritAttrs = !1;\ngn.compatConfig = { MODE: 3 };\nconst vn = gn;\nfunction tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, a = Math.abs(o - t) / 2, s = o < t ? o + a : o - a;\n return [r, s, i, a];\n}\nfunction nr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o,\n sourceControlX: i,\n sourceControlY: r,\n targetControlX: a,\n targetControlY: s\n}) {\n const l = e * 0.125 + i * 0.375 + a * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(l - e), v = Math.abs(u - t);\n return [l, u, c, v];\n}\nfunction Dt(e, t) {\n return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);\n}\nfunction Yo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {\n let a, s;\n switch (e) {\n case j.Left:\n a = t - Dt(t - o, r), s = n;\n break;\n case j.Right:\n a = t + Dt(o - t, r), s = n;\n break;\n case j.Top:\n a = t, s = n - Dt(n - i, r);\n break;\n case j.Bottom:\n a = t, s = n + Dt(i - n, r);\n break;\n }\n return [a, s];\n}\nfunction Kn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n curvature: a = 0.25\n}) {\n const [s, l] = Yo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i,\n c: a\n }), [u, c] = Yo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t,\n c: a\n }), [v, g, x, h] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: s,\n sourceControlY: l,\n targetControlX: u,\n targetControlY: c\n });\n return [\n `M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,\n v,\n g,\n x,\n h\n ];\n}\nconst mn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = Kn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nmn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nmn.inheritAttrs = !1;\nmn.compatConfig = { MODE: 3 };\nconst Bl = mn;\nfunction Xo({ pos: e, x1: t, y1: n, x2: o, y2: i }) {\n let r, a;\n switch (e) {\n case j.Left:\n case j.Right:\n r = 0.5 * (t + o), a = n;\n break;\n case j.Top:\n case j.Bottom:\n r = t, a = 0.5 * (n + i);\n break;\n }\n return [r, a];\n}\nfunction or({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top\n}) {\n const [a, s] = Xo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i\n }), [l, u] = Xo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t\n }), [c, v, g, x] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: a,\n sourceControlY: s,\n targetControlX: l,\n targetControlY: u\n });\n return [\n `M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,\n c,\n v,\n g,\n x\n ];\n}\nconst pn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = or({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\npn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\npn.inheritAttrs = !1;\npn.compatConfig = { MODE: 3 };\nconst Rl = pn, Zo = {\n [j.Left]: { x: -1, y: 0 },\n [j.Right]: { x: 1, y: 0 },\n [j.Top]: { x: 0, y: -1 },\n [j.Bottom]: { x: 0, y: 1 }\n};\nfunction Vl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n\n}) {\n return t === j.Left || t === j.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction Uo(e, t) {\n return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);\n}\nfunction Hl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n,\n targetPosition: o = j.Top,\n center: i,\n offset: r\n}) {\n const a = Zo[t], s = Zo[o], l = { x: e.x + a.x * r, y: e.y + a.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Vl({\n source: l,\n sourcePosition: t,\n target: u\n }), v = c.x !== 0 ? \"x\" : \"y\", g = c[v];\n let x, h, d;\n const [w, y, S, V] = tr({\n sourceX: e.x,\n sourceY: e.y,\n targetX: n.x,\n targetY: n.y\n });\n if (a[v] * s[v] === -1) {\n h = i.x || w, d = i.y || y;\n const N = [\n { x: h, y: l.y },\n { x: h, y: u.y }\n ], T = [\n { x: l.x, y: d },\n { x: u.x, y: d }\n ];\n a[v] === g ? x = v === \"x\" ? N : T : x = v === \"x\" ? T : N;\n } else {\n const N = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];\n if (v === \"x\" ? x = a.x === g ? T : N : x = a.y === g ? N : T, t !== o) {\n const _ = v === \"x\" ? \"y\" : \"x\", P = a[v] === s[_], R = l[_] > u[_], $ = l[_] < u[_];\n (a[v] === 1 && (!P && R || P && $) || a[v] !== 1 && (!P && $ || P && R)) && (x = v === \"x\" ? N : T);\n }\n h = x[0].x, d = x[0].y;\n }\n return [[e, l, ...x, u, n], h, d, S, V];\n}\nfunction Ll(e, t, n, o) {\n const i = Math.min(Uo(e, t) / 2, Uo(t, n) / 2, o), { x: r, y: a } = t;\n if (e.x === r && r === n.x || e.y === a && a === n.y)\n return `L${r} ${a}`;\n if (e.y === a) {\n const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;\n return `L ${r + i * u},${a}Q ${r},${a} ${r},${a + i * c}`;\n }\n const s = e.x < n.x ? 1 : -1, l = e.y < n.y ? -1 : 1;\n return `L ${r},${a + i * l}Q ${r},${a} ${r + i * s},${a}`;\n}\nfunction qn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n borderRadius: a = 5,\n centerX: s,\n centerY: l,\n offset: u = 20\n}) {\n const [c, v, g, x, h] = Hl({\n source: { x: e, y: t },\n sourcePosition: n,\n target: { x: o, y: i },\n targetPosition: r,\n center: { x: s, y: l },\n offset: u\n });\n return [c.reduce((w, y, S) => {\n let V;\n return S > 0 && S < c.length - 1 ? V = Ll(c[S - 1], y, c[S + 1], a) : V = `${S === 0 ? \"M\" : \"L\"}${y.x} ${y.y}`, w += V, w;\n }, \"\"), v, g, x, h];\n}\nconst yn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = qn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nyn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n];\nyn.inheritAttrs = !1;\nyn.compatConfig = { MODE: 3 };\nconst ir = yn, xn = function(e, { attrs: t }) {\n return ue(ir, { ...e, ...t, borderRadius: 0 });\n};\nxn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nxn.inheritAttrs = !1;\nxn.compatConfig = { MODE: 3 };\nconst Gl = xn;\nfunction rr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const [i, r, a, s] = tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n });\n return [`M ${e},${t}L ${n},${o}`, i, r, a, s];\n}\nconst _n = function(e, { attrs: t }) {\n const [n, o, i] = rr(e);\n return ue(vn, {\n path: n,\n labelX: o,\n labelY: i,\n ...e,\n ...t\n });\n};\n_n.props = [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\n_n.inheritAttrs = !1;\n_n.compatConfig = { MODE: 3 };\nconst Fl = _n;\nfunction Yl(e, t, n) {\n return n === j.Left ? e - t : n === j.Right ? e + t : e;\n}\nfunction Xl(e, t, n) {\n return n === j.Top ? e - t : n === j.Bottom ? e + t : e;\n}\nconst po = function({\n radius: e = 10,\n centerX: t = 0,\n centerY: n = 0,\n position: o = j.Top,\n type: i\n}) {\n return ue(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,\n cx: Yl(t, e, o),\n cy: Xl(n, e, o),\n r: e,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\npo.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\npo.compatConfig = { MODE: 3 };\nconst Wo = po;\nfunction Zl() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n updateStart: X(),\n update: X(),\n updateEnd: X()\n };\n}\nfunction Ul(e, t) {\n const n = Zl();\n return n.doubleClick.on((o) => {\n var i, r;\n t.edgeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.edgeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.edgeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.edgeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.edgeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.edgeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.updateStart.on((o) => {\n var i, r;\n t.edgeUpdateStart(o), (r = (i = e.events) == null ? void 0 : i.updateStart) == null || r.call(i, o);\n }), n.update.on((o) => {\n var i, r;\n t.edgeUpdate(o), (r = (i = e.events) == null ? void 0 : i.update) == null || r.call(i, o);\n }), n.updateEnd.on((o) => {\n var i, r;\n t.edgeUpdateEnd(o), (r = (i = e.events) == null ? void 0 : i.updateEnd) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nconst Wl = ge({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"updatable\", \"selectable\", \"focusable\", \"edge\"],\n setup(e) {\n const {\n id: t,\n addSelectedEdges: n,\n connectionMode: o,\n edgeUpdaterRadius: i,\n emits: r,\n nodesSelectionActive: a,\n noPanClassName: s,\n getEdgeTypes: l,\n removeSelectedEdges: u,\n findEdge: c,\n findNode: v,\n isValidConnection: g\n } = fe(), x = Ul(e.edge, r), h = yt(e, \"edge\");\n let d = ie(!1), w = ie(!1);\n const y = ie(\"\"), S = ie(null), V = ie(\"source\"), p = ie();\n ut(Oi, e.id), ut(Ti, p);\n const N = J(() => h.value.class instanceof Function ? h.value.class(h.value) : h.value.class), T = J(() => h.value.style instanceof Function ? h.value.style(h.value) : h.value.style), { handlePointerDown: _ } = Di({\n nodeId: y,\n handleId: S,\n type: V,\n isValidConnection: g.value,\n edgeUpdaterType: V,\n onEdgeUpdate: $,\n onEdgeUpdateEnd: D\n });\n return () => {\n const B = v(h.value.source), q = v(h.value.target);\n if (!B || !q || !h.value)\n return null;\n let te;\n o.value === Qe.Strict ? te = B.handleBounds.source : te = [...B.handleBounds.source || [], ...B.handleBounds.target || []];\n const re = Ao(te, h.value.sourceHandle);\n let k;\n o.value === Qe.Strict ? k = q.handleBounds.target : k = [...q.handleBounds.target || [], ...q.handleBounds.source || []];\n const H = Ao(k, h.value.targetHandle), f = re ? re.position : j.Bottom, b = H ? H.position : j.Top, { sourceX: L, sourceY: I, targetY: F, targetX: U } = wa(\n B,\n re,\n f,\n q,\n H,\n b\n );\n return h.value.sourceX = L, h.value.sourceY = I, h.value.targetX = U, h.value.targetY = F, ue(\n \"g\",\n {\n ref: p,\n key: e.id,\n \"data-id\": e.id,\n class: [\n \"vue-flow__edge\",\n `vue-flow__edge-${e.type === !1 ? \"default\" : e.name}`,\n s.value,\n N.value,\n {\n updating: d.value,\n selected: h.value.selected,\n animated: h.value.animated,\n inactive: !e.selectable\n }\n ],\n onClick: ee,\n onContextmenu: m,\n onDblclick: A,\n onMouseenter: E,\n onMousemove: G,\n onMouseleave: Z,\n onKeyDown: e.focusable ? W : void 0,\n tabIndex: e.focusable ? 0 : void 0,\n \"aria-label\": h.value.ariaLabel === null ? void 0 : h.value.ariaLabel || `Edge from ${h.value.source} to ${h.value.target}`,\n \"aria-describedby\": e.focusable ? `${Ji}-${t}` : void 0,\n role: e.focusable ? \"button\" : void 0\n },\n [\n w.value ? null : ue(e.type === !1 ? l.value.default : e.type, {\n id: e.id,\n sourceNode: B,\n targetNode: q,\n source: h.value.source,\n target: h.value.target,\n type: h.value.type,\n updatable: e.updatable,\n selected: h.value.selected,\n animated: h.value.animated,\n label: h.value.label,\n labelStyle: h.value.labelStyle,\n labelShowBg: h.value.labelShowBg,\n labelBgStyle: h.value.labelBgStyle,\n labelBgPadding: h.value.labelBgPadding,\n labelBgBorderRadius: h.value.labelBgBorderRadius,\n data: h.value.data,\n events: { ...h.value.events, ...x.on },\n style: T.value,\n markerStart: `url(#${Xe(h.value.markerStart, t)})`,\n markerEnd: `url(#${Xe(h.value.markerEnd, t)})`,\n sourcePosition: f,\n targetPosition: b,\n sourceX: L,\n sourceY: I,\n targetX: U,\n targetY: F,\n sourceHandleId: h.value.sourceHandle,\n targetHandleId: h.value.targetHandle,\n interactionWidth: h.value.interactionWidth\n }),\n [\n e.updatable === \"source\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: K,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: f,\n centerX: L,\n centerY: I,\n radius: i.value,\n type: \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n e.updatable === \"target\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: z,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: b,\n centerX: U,\n centerY: F,\n radius: i.value,\n type: \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function P() {\n d.value = !0;\n }\n function R() {\n d.value = !1;\n }\n function $(B, q) {\n x.emit.update({ event: B, edge: h.value, connection: q });\n }\n function D(B) {\n x.emit.updateEnd({ event: B, edge: h.value }), w.value = !1;\n }\n function Q(B, q) {\n B.button === 0 && (w.value = !0, y.value = q ? h.value.target : h.value.source, S.value = (q ? h.value.targetHandle : h.value.sourceHandle) ?? \"\", V.value = q ? \"target\" : \"source\", x.emit.updateStart({ event: B, edge: h.value }), _(B));\n }\n function ee(B) {\n const q = { event: B, edge: h.value };\n e.selectable && (a.value = !1, n([h.value])), x.emit.click(q);\n }\n function m(B) {\n x.emit.contextMenu({ event: B, edge: h.value });\n }\n function A(B) {\n x.emit.doubleClick({ event: B, edge: h.value });\n }\n function E(B) {\n x.emit.mouseEnter({ event: B, edge: h.value });\n }\n function G(B) {\n x.emit.mouseMove({ event: B, edge: h.value });\n }\n function Z(B) {\n x.emit.mouseLeave({ event: B, edge: h.value });\n }\n function K(B) {\n Q(B, !0);\n }\n function z(B) {\n Q(B, !1);\n }\n function W(B) {\n var q;\n er.includes(B.key) && e.selectable && (B.key === \"Escape\" ? ((q = p.value) == null || q.blur(), u([c(e.id)])) : n([c(e.id)]));\n }\n }\n}), Kl = Wl, ql = {\n height: \"0\",\n width: \"0\"\n}, jl = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n}, Rd = /* @__PURE__ */ ge({\n ...jl,\n setup(e) {\n const { viewportRef: t } = fe(), n = J(() => {\n var o;\n return (o = t.value) == null ? void 0 : o.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (o, i) => (oe(), se(\"svg\", null, [\n (oe(), se(\"foreignObject\", ql, [\n (oe(), ze(Mr, {\n to: C(n),\n disabled: !C(n)\n }, [\n xe(o.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]));\n }\n}), Ql = { class: \"vue-flow__connection\" }, Jl = [\"d\", \"marker-end\", \"marker-start\"], eu = {\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 }\n}, tu = /* @__PURE__ */ ge({\n ...eu,\n props: {\n sourceNode: null\n },\n setup(e) {\n var R;\n const t = fe(), n = M(t, \"connectionMode\"), o = M(t, \"connectionStartHandle\"), i = M(t, \"connectionEndHandle\"), r = M(t, \"connectionPosition\"), a = M(t, \"connectionLineType\"), s = M(t, \"connectionLineStyle\"), l = M(t, \"connectionLineOptions\"), u = M(t, \"connectionStatus\"), c = M(t, \"viewport\"), v = M(t, \"findNode\"), g = {\n [j.Left]: j.Right,\n [j.Right]: j.Left,\n [j.Top]: j.Bottom,\n [j.Bottom]: j.Top\n }, x = (R = He(ln)) == null ? void 0 : R[\"connection-line\"], h = J(() => o.value.handleId), d = J(() => o.value.type), w = J(() => {\n var $;\n return (($ = i.value) == null ? void 0 : $.handleId) && v.value(i.value.nodeId) || null;\n }), y = J(\n () => {\n var $, D;\n return (n.value === Qe.Strict ? ($ = e.sourceNode.handleBounds[d.value]) == null ? void 0 : $.find((Q) => Q.id === h.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((Q) => Q.id === h.value)) || ((D = e.sourceNode.handleBounds[d.value ?? \"source\"]) == null ? void 0 : D[0]);\n }\n ), S = J(() => {\n var $, D, Q;\n return w.value && (($ = i.value) == null ? void 0 : $.handleId) && ((n.value === Qe.Strict ? (D = w.value.handleBounds[d.value === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : D.find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n ) : [...w.value.handleBounds.source || [], ...w.value.handleBounds.target || []].find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n )) || ((Q = w.value.handleBounds[d.value ?? \"target\"]) == null ? void 0 : Q[0])) || null;\n }), V = J(() => {\n var $;\n return ($ = y.value) == null ? void 0 : $.position;\n }), p = J(() => y.value ? Wt(\n V.value || j.Top,\n { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition },\n y.value\n ) : {\n x: e.sourceNode.dimensions.width / 2,\n y: e.sourceNode.dimensions.height / 2\n }), N = J(() => V.value ? g[V.value] : void 0), T = J(() => (r.value.x - c.value.x) / c.value.zoom), _ = J(() => (r.value.y - c.value.y) / c.value.zoom), P = J(() => {\n let $;\n const D = {\n sourceX: p.value.x,\n sourceY: p.value.y,\n sourcePosition: V.value,\n targetX: T.value,\n targetY: _.value,\n targetPosition: N.value\n };\n switch (a.value ?? l.value.type) {\n case Ye.Bezier:\n [$] = Kn(D);\n break;\n case Ye.Step:\n [$] = qn({\n ...D,\n borderRadius: 0\n });\n break;\n case Ye.SmoothStep:\n [$] = qn(D);\n break;\n case Ye.SimpleBezier:\n [$] = or(D);\n break;\n case Ye.Straight:\n [$] = rr(D);\n break;\n default:\n [$] = Kn(D);\n break;\n }\n return $;\n });\n return ($, D) => {\n var Q;\n return oe(), se(\"g\", Ql, [\n C(x) ? (oe(), ze(mi(C(x)), $r(vi({ key: 0 }, {\n sourceX: C(p).x,\n sourceY: C(p).y,\n sourcePosition: (Q = C(y)) == null ? void 0 : Q.position,\n targetX: C(T),\n targetY: C(_),\n targetPosition: C(N),\n sourceNode: e.sourceNode,\n sourceHandle: C(y),\n targetNode: C(w),\n targetHandle: C(S),\n markerEnd: `url(#${C(Xe)(C(l).markerEnd)})`,\n markerStart: `url(#${C(Xe)(C(l).markerStart)})`,\n connectionStatus: C(u)\n })), null, 16)) : (oe(), se(\"path\", {\n key: 1,\n d: C(P),\n class: Ke([\"vue-flow__connection-path\", [C(l).class, C(u)]]),\n style: Le(C(s) || C(l).style || {}),\n \"marker-end\": `url(#${C(Xe)(C(l).markerEnd)})`,\n \"marker-start\": `url(#${C(Xe)(C(l).markerStart)})`\n }, null, 14, Jl))\n ]);\n };\n }\n}), nu = [\"tabIndex\"], ou = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n}, iu = /* @__PURE__ */ ge({\n ...ou,\n setup(e) {\n const t = fe(), n = M(t, \"emits\"), o = M(t, \"viewport\"), i = M(t, \"getSelectedNodes\"), r = M(t, \"noPanClassName\"), a = M(t, \"disableKeyboardA11y\"), s = M(t, \"userSelectionActive\"), l = Ai(), u = ie(), c = ji({\n el: u,\n onStart(d) {\n n.value.selectionDragStart(d);\n },\n onDrag(d) {\n n.value.selectionDrag(d);\n },\n onStop(d) {\n n.value.selectionDragStop(d);\n }\n });\n Ve(() => {\n var d;\n a.value || (d = u.value) == null || d.focus({ preventScroll: !0 });\n });\n const v = J(() => co(i.value)), g = J(() => ({\n width: `${v.value.width}px`,\n height: `${v.value.height}px`,\n top: `${v.value.y}px`,\n left: `${v.value.x}px`\n }));\n function x(d) {\n n.value.selectionContextMenu({ event: d, nodes: i.value });\n }\n function h(d) {\n a.value || st[d.key] && l(\n {\n x: st[d.key].x,\n y: st[d.key].y\n },\n d.shiftKey\n );\n }\n return (d, w) => !C(s) && C(v).width && C(v).height ? (oe(), se(\"div\", {\n key: 0,\n class: Ke([\"vue-flow__nodesselection vue-flow__container\", C(r)]),\n style: Le({ transform: `translate(${C(o).x}px,${C(o).y}px) scale(${C(o).zoom})` })\n }, [\n ct(\"div\", {\n ref_key: \"el\",\n ref: u,\n class: Ke([{ dragging: C(c) }, \"vue-flow__nodesselection-rect\"]),\n style: Le(C(g)),\n tabIndex: C(a) ? void 0 : -1,\n onContextmenu: x,\n onKeydown: h\n }, null, 46, nu)\n ], 6)) : Ee(\"\", !0);\n }\n}), ru = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n}, au = /* @__PURE__ */ ge({\n ...ru,\n setup(e) {\n const { userSelectionRect: t } = fe();\n return (n, o) => {\n var i, r, a, s;\n return oe(), se(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: Le({\n width: `${(i = C(t)) == null ? void 0 : i.width}px`,\n height: `${(r = C(t)) == null ? void 0 : r.height}px`,\n transform: `translate(${(a = C(t)) == null ? void 0 : a.x}px, ${(s = C(t)) == null ? void 0 : s.y}px)`\n })\n }, null, 4);\n };\n }\n}), su = {\n input: Ta,\n default: Oa,\n output: Ia\n}, lu = {\n default: Bl,\n straight: Fl,\n step: Gl,\n smoothstep: ir,\n simplebezier: Rl\n};\nfunction uu() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n nodeTypes: {},\n edgeTypes: {},\n initialized: !1,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: fo.Full,\n paneDragging: !1,\n preventScrolling: !0,\n zoomOnScroll: !0,\n zoomOnPinch: !0,\n zoomOnDoubleClick: !0,\n panOnScroll: !1,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: Ut.Free,\n panOnDrag: !0,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: !1,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: !1,\n userSelectionActive: !1,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: Ye.Bezier,\n style: {}\n },\n connectionMode: Qe.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: NaN, y: NaN },\n connectionRadius: 20,\n connectOnClick: !0,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: !1,\n edgesUpdatable: !1,\n edgesFocusable: !0,\n nodesFocusable: !0,\n nodesConnectable: !0,\n nodesDraggable: !0,\n elementsSelectable: !0,\n selectNodesOnDrag: !0,\n multiSelectionActive: !1,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: \"Meta\",\n zoomActivationKeyCode: \"Meta\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: ca(),\n applyDefault: !0,\n autoConnect: !1,\n fitViewOnInit: !1,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: !1,\n elevateNodesOnSelect: !0,\n autoPanOnNodeDrag: !0,\n autoPanOnConnect: !0,\n disableKeyboardA11y: !1,\n ariaLiveMessage: \"\",\n __experimentalFeatures: {\n nestedFlow: !1\n }\n };\n}\nfunction ar(e) {\n const t = uu();\n return e && Object.keys(e).forEach((n) => {\n const o = e[n];\n ce(o) && (t[n] = o);\n }), t;\n}\nfunction cu(e, t, n) {\n const o = J(() => (d) => e.nodes && !t.value.length ? e.nodes.find((w) => w.id === d) : e.nodes[t.value.indexOf(d)]), i = J(() => (d) => e.edges && !n.value.length ? e.edges.find((w) => w.id === d) : e.edges[n.value.indexOf(d)]), r = J(() => {\n var y;\n const d = {\n ...lu,\n ...e.edgeTypes\n }, w = Object.keys(d);\n return (y = e.edges) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), a = J(() => {\n var y;\n const d = {\n ...su,\n ...e.nodeTypes\n }, w = Object.keys(d);\n return (y = e.nodes) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), s = J(() => {\n const d = e.nodes.filter((w) => !w.hidden);\n return e.onlyRenderVisibleElements ? d && Ci(\n d,\n {\n x: 0,\n y: 0,\n width: e.dimensions.width,\n height: e.dimensions.height\n },\n e.viewport,\n !0\n ) : d ?? [];\n }), l = (d, w, y) => {\n if (w = w ?? o.value(d.source), y = y ?? o.value(d.target), !w || !y) {\n e.hooks.error.trigger(new ve(he.EDGE_ORPHANED, d.id));\n return;\n }\n return !d.hidden && !y.hidden && !w.hidden;\n }, u = J(() => e.onlyRenderVisibleElements ? e.edges.filter((d) => {\n const w = o.value(d.source), y = o.value(d.target);\n return l(d, w, y) && ba({\n sourcePos: w.computedPosition || { x: 0, y: 0 },\n targetPos: y.computedPosition || { x: 0, y: 0 },\n sourceWidth: w.dimensions.width,\n sourceHeight: w.dimensions.height,\n targetWidth: y.dimensions.width,\n targetHeight: y.dimensions.height,\n width: e.dimensions.width,\n height: e.dimensions.height,\n viewport: e.viewport\n });\n }) : e.edges.filter((d) => l(d))), c = J(() => [...s.value, ...u.value]), v = J(() => e.nodes.filter((d) => d.selected)), g = J(() => e.edges.filter((d) => d.selected)), x = J(() => [\n ...v.value ?? [],\n ...g.value ?? []\n ]), h = J(\n () => s.value.filter((d) => d.initialized && d.handleBounds !== void 0)\n );\n return {\n getNode: o,\n getEdge: i,\n getElements: c,\n getEdgeTypes: r,\n getNodeTypes: a,\n getEdges: u,\n getNodes: s,\n getSelectedElements: x,\n getSelectedNodes: v,\n getSelectedEdges: g,\n getNodesInitialized: h\n };\n}\nfunction yo(e, t, n) {\n e.prototype = t.prototype = n, n.constructor = e;\n}\nfunction sr(e, t) {\n var n = Object.create(e.prototype);\n for (var o in t)\n n[o] = t[o];\n return n;\n}\nfunction kt() {\n}\nvar Et = 0.7, jt = 1 / Et, lt = \"\\\\s*([+-]?\\\\d+)\\\\s*\", St = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", Me = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", du = /^#([0-9a-f]{3,8})$/, fu = new RegExp(`^rgb\\\\(${lt},${lt},${lt}\\\\)$`), hu = new RegExp(`^rgb\\\\(${Me},${Me},${Me}\\\\)$`), gu = new RegExp(`^rgba\\\\(${lt},${lt},${lt},${St}\\\\)$`), vu = new RegExp(`^rgba\\\\(${Me},${Me},${Me},${St}\\\\)$`), mu = new RegExp(`^hsl\\\\(${St},${Me},${Me}\\\\)$`), pu = new RegExp(`^hsla\\\\(${St},${Me},${Me},${St}\\\\)$`), Ko = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\nyo(kt, Nt, {\n copy(e) {\n return Object.assign(new this.constructor(), this, e);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: qo,\n // Deprecated! Use color.formatHex.\n formatHex: qo,\n formatHex8: yu,\n formatHsl: xu,\n formatRgb: jo,\n toString: jo\n});\nfunction qo() {\n return this.rgb().formatHex();\n}\nfunction yu() {\n return this.rgb().formatHex8();\n}\nfunction xu() {\n return lr(this).formatHsl();\n}\nfunction jo() {\n return this.rgb().formatRgb();\n}\nfunction Nt(e) {\n var t, n;\n return e = (e + \"\").trim().toLowerCase(), (t = du.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qo(t) : n === 3 ? new pe(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? zt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? zt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fu.exec(e)) ? new pe(t[1], t[2], t[3], 1) : (t = hu.exec(e)) ? new pe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = gu.exec(e)) ? zt(t[1], t[2], t[3], t[4]) : (t = vu.exec(e)) ? zt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = mu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, 1) : (t = pu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, t[4]) : Ko.hasOwnProperty(e) ? Qo(Ko[e]) : e === \"transparent\" ? new pe(NaN, NaN, NaN, 0) : null;\n}\nfunction Qo(e) {\n return new pe(e >> 16 & 255, e >> 8 & 255, e & 255, 1);\n}\nfunction zt(e, t, n, o) {\n return o <= 0 && (e = t = n = NaN), new pe(e, t, n, o);\n}\nfunction _u(e) {\n return e instanceof kt || (e = Nt(e)), e ? (e = e.rgb(), new pe(e.r, e.g, e.b, e.opacity)) : new pe();\n}\nfunction jn(e, t, n, o) {\n return arguments.length === 1 ? _u(e) : new pe(e, t, n, o ?? 1);\n}\nfunction pe(e, t, n, o) {\n this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;\n}\nyo(pe, jn, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new pe(We(this.r), We(this.g), We(this.b), Qt(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: Jo,\n // Deprecated! Use color.formatHex.\n formatHex: Jo,\n formatHex8: wu,\n formatRgb: ei,\n toString: ei\n}));\nfunction Jo() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`;\n}\nfunction wu() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction ei() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"rgb(\" : \"rgba(\"}${We(this.r)}, ${We(this.g)}, ${We(this.b)}${e === 1 ? \")\" : `, ${e})`}`;\n}\nfunction Qt(e) {\n return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));\n}\nfunction We(e) {\n return Math.max(0, Math.min(255, Math.round(e) || 0));\n}\nfunction Ze(e) {\n return e = We(e), (e < 16 ? \"0\" : \"\") + e.toString(16);\n}\nfunction ti(e, t, n, o) {\n return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, n, o);\n}\nfunction lr(e) {\n if (e instanceof be)\n return new be(e.h, e.s, e.l, e.opacity);\n if (e instanceof kt || (e = Nt(e)), !e)\n return new be();\n if (e instanceof be)\n return e;\n e = e.rgb();\n var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), a = NaN, s = r - i, l = (r + i) / 2;\n return s ? (t === r ? a = (n - o) / s + (n < o) * 6 : n === r ? a = (o - t) / s + 2 : a = (t - n) / s + 4, s /= l < 0.5 ? r + i : 2 - r - i, a *= 60) : s = l > 0 && l < 1 ? 0 : a, new be(a, s, l, e.opacity);\n}\nfunction bu(e, t, n, o) {\n return arguments.length === 1 ? lr(e) : new be(e, t, n, o ?? 1);\n}\nfunction be(e, t, n, o) {\n this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;\n}\nyo(be, bu, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n rgb() {\n var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - o;\n return new pe(\n kn(e >= 240 ? e - 240 : e + 120, i, o),\n kn(e, i, o),\n kn(e < 120 ? e + 240 : e - 120, i, o),\n this.opacity\n );\n },\n clamp() {\n return new be(ni(this.h), At(this.s), At(this.l), Qt(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"hsl(\" : \"hsla(\"}${ni(this.h)}, ${At(this.s) * 100}%, ${At(this.l) * 100}%${e === 1 ? \")\" : `, ${e})`}`;\n }\n}));\nfunction ni(e) {\n return e = (e || 0) % 360, e < 0 ? e + 360 : e;\n}\nfunction At(e) {\n return Math.max(0, Math.min(1, e || 0));\n}\nfunction kn(e, t, n) {\n return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;\n}\nconst ur = (e) => () => e;\nfunction Eu(e, t) {\n return function(n) {\n return e + n * t;\n };\n}\nfunction Su(e, t, n) {\n return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {\n return Math.pow(e + o * t, n);\n };\n}\nfunction Nu(e) {\n return (e = +e) == 1 ? cr : function(t, n) {\n return n - t ? Su(t, n, e) : ur(isNaN(t) ? n : t);\n };\n}\nfunction cr(e, t) {\n var n = t - e;\n return n ? Eu(e, n) : ur(isNaN(e) ? t : e);\n}\nconst oi = function e(t) {\n var n = Nu(t);\n function o(i, r) {\n var a = n((i = jn(i)).r, (r = jn(r)).r), s = n(i.g, r.g), l = n(i.b, r.b), u = cr(i.opacity, r.opacity);\n return function(c) {\n return i.r = a(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + \"\";\n };\n }\n return o.gamma = e, o;\n}(1);\nfunction Re(e, t) {\n return e = +e, t = +t, function(n) {\n return e * (1 - n) + t * n;\n };\n}\nvar Qn = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, On = new RegExp(Qn.source, \"g\");\nfunction Cu(e) {\n return function() {\n return e;\n };\n}\nfunction Mu(e) {\n return function(t) {\n return e(t) + \"\";\n };\n}\nfunction $u(e, t) {\n var n = Qn.lastIndex = On.lastIndex = 0, o, i, r, a = -1, s = [], l = [];\n for (e = e + \"\", t = t + \"\"; (o = Qn.exec(e)) && (i = On.exec(t)); )\n (r = i.index) > n && (r = t.slice(n, r), s[a] ? s[a] += r : s[++a] = r), (o = o[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, l.push({ i: a, x: Re(o, i) })), n = On.lastIndex;\n return n < t.length && (r = t.slice(n), s[a] ? s[a] += r : s[++a] = r), s.length < 2 ? l[0] ? Mu(l[0].x) : Cu(t) : (t = l.length, function(u) {\n for (var c = 0, v; c < t; ++c)\n s[(v = l[c]).i] = v.x(u);\n return s.join(\"\");\n });\n}\nvar ii = 180 / Math.PI, Jn = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction dr(e, t, n, o, i, r) {\n var a, s, l;\n return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * o) && (n -= e * l, o -= t * l), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, l /= s), e * o < t * n && (e = -e, t = -t, l = -l, a = -a), {\n translateX: i,\n translateY: r,\n rotate: Math.atan2(t, e) * ii,\n skewX: Math.atan(l) * ii,\n scaleX: a,\n scaleY: s\n };\n}\nvar Bt;\nfunction ku(e) {\n const t = new (typeof DOMMatrix == \"function\" ? DOMMatrix : WebKitCSSMatrix)(e + \"\");\n return t.isIdentity ? Jn : dr(t.a, t.b, t.c, t.d, t.e, t.f);\n}\nfunction Ou(e) {\n return e == null || (Bt || (Bt = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\")), Bt.setAttribute(\"transform\", e), !(e = Bt.transform.baseVal.consolidate())) ? Jn : (e = e.matrix, dr(e.a, e.b, e.c, e.d, e.e, e.f));\n}\nfunction fr(e, t, n, o) {\n function i(u) {\n return u.length ? u.pop() + \" \" : \"\";\n }\n function r(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(\"translate(\", null, t, null, n);\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v || g) && x.push(\"translate(\" + v + t + g + n);\n }\n function a(u, c, v, g) {\n u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), g.push({ i: v.push(i(v) + \"rotate(\", null, o) - 2, x: Re(u, c) })) : c && v.push(i(v) + \"rotate(\" + c + o);\n }\n function s(u, c, v, g) {\n u !== c ? g.push({ i: v.push(i(v) + \"skewX(\", null, o) - 2, x: Re(u, c) }) : c && v.push(i(v) + \"skewX(\" + c + o);\n }\n function l(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(i(x) + \"scale(\", null, \",\", null, \")\");\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v !== 1 || g !== 1) && x.push(i(x) + \"scale(\" + v + \",\" + g + \")\");\n }\n return function(u, c) {\n var v = [], g = [];\n return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, v, g), a(u.rotate, c.rotate, v, g), s(u.skewX, c.skewX, v, g), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, v, g), u = c = null, function(x) {\n for (var h = -1, d = g.length, w; ++h < d; )\n v[(w = g[h]).i] = w.x(x);\n return v.join(\"\");\n };\n };\n}\nvar Tu = fr(ku, \"px, \", \"px)\", \"deg)\"), Iu = fr(Ou, \", \", \")\", \")\"), Pu = 1e-12;\nfunction ri(e) {\n return ((e = Math.exp(e)) + 1 / e) / 2;\n}\nfunction Du(e) {\n return ((e = Math.exp(e)) - 1 / e) / 2;\n}\nfunction zu(e) {\n return ((e = Math.exp(2 * e)) - 1) / (e + 1);\n}\nconst Au = function e(t, n, o) {\n function i(r, a) {\n var s = r[0], l = r[1], u = r[2], c = a[0], v = a[1], g = a[2], x = c - s, h = v - l, d = x * x + h * h, w, y;\n if (d < Pu)\n y = Math.log(g / u) / t, w = function(_) {\n return [\n s + _ * x,\n l + _ * h,\n u * Math.exp(t * _ * y)\n ];\n };\n else {\n var S = Math.sqrt(d), V = (g * g - u * u + o * d) / (2 * u * n * S), p = (g * g - u * u - o * d) / (2 * g * n * S), N = Math.log(Math.sqrt(V * V + 1) - V), T = Math.log(Math.sqrt(p * p + 1) - p);\n y = (T - N) / t, w = function(_) {\n var P = _ * y, R = ri(N), $ = u / (n * S) * (R * zu(t * P + N) - Du(N));\n return [\n s + $ * x,\n l + $ * h,\n u * R / ri(t * P + N)\n ];\n };\n }\n return w.duration = y * 1e3 * t / Math.SQRT2, w;\n }\n return i.rho = function(r) {\n var a = Math.max(1e-3, +r), s = a * a, l = s * s;\n return e(a, s, l);\n }, i;\n}(Math.SQRT2, 2, 4);\nvar ht = 0, mt = 0, gt = 0, hr = 1e3, Jt, pt, en = 0, Je = 0, wn = 0, Ct = typeof performance == \"object\" && performance.now ? performance : Date, gr = typeof window == \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {\n setTimeout(e, 17);\n};\nfunction xo() {\n return Je || (gr(Bu), Je = Ct.now() + wn);\n}\nfunction Bu() {\n Je = 0;\n}\nfunction tn() {\n this._call = this._time = this._next = null;\n}\ntn.prototype = vr.prototype = {\n constructor: tn,\n restart: function(e, t, n) {\n if (typeof e != \"function\")\n throw new TypeError(\"callback is not a function\");\n n = (n == null ? xo() : +n) + (t == null ? 0 : +t), !this._next && pt !== this && (pt ? pt._next = this : Jt = this, pt = this), this._call = e, this._time = n, eo();\n },\n stop: function() {\n this._call && (this._call = null, this._time = 1 / 0, eo());\n }\n};\nfunction vr(e, t, n) {\n var o = new tn();\n return o.restart(e, t, n), o;\n}\nfunction Ru() {\n xo(), ++ht;\n for (var e = Jt, t; e; )\n (t = Je - e._time) >= 0 && e._call.call(void 0, t), e = e._next;\n --ht;\n}\nfunction ai() {\n Je = (en = Ct.now()) + wn, ht = mt = 0;\n try {\n Ru();\n } finally {\n ht = 0, Hu(), Je = 0;\n }\n}\nfunction Vu() {\n var e = Ct.now(), t = e - en;\n t > hr && (wn -= t, en = e);\n}\nfunction Hu() {\n for (var e, t = Jt, n, o = 1 / 0; t; )\n t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Jt = n);\n pt = e, eo(o);\n}\nfunction eo(e) {\n if (!ht) {\n mt && (mt = clearTimeout(mt));\n var t = e - Je;\n t > 24 ? (e < 1 / 0 && (mt = setTimeout(ai, e - Ct.now() - wn)), gt && (gt = clearInterval(gt))) : (gt || (en = Ct.now(), gt = setInterval(Vu, hr)), ht = 1, gr(ai));\n }\n}\nfunction si(e, t, n) {\n var o = new tn();\n return t = t == null ? 0 : +t, o.restart((i) => {\n o.stop(), e(i + t);\n }, t, n), o;\n}\nvar Lu = fn(\"start\", \"end\", \"cancel\", \"interrupt\"), Gu = [], mr = 0, li = 1, to = 2, Lt = 3, ui = 4, no = 5, Gt = 6;\nfunction bn(e, t, n, o, i, r) {\n var a = e.__transition;\n if (!a)\n e.__transition = {};\n else if (n in a)\n return;\n Fu(e, n, {\n name: t,\n index: o,\n // For context during callback.\n group: i,\n // For context during callback.\n on: Lu,\n tween: Gu,\n time: r.time,\n delay: r.delay,\n duration: r.duration,\n ease: r.ease,\n timer: null,\n state: mr\n });\n}\nfunction _o(e, t) {\n var n = Se(e, t);\n if (n.state > mr)\n throw new Error(\"too late; already scheduled\");\n return n;\n}\nfunction ke(e, t) {\n var n = Se(e, t);\n if (n.state > Lt)\n throw new Error(\"too late; already running\");\n return n;\n}\nfunction Se(e, t) {\n var n = e.__transition;\n if (!n || !(n = n[t]))\n throw new Error(\"transition not found\");\n return n;\n}\nfunction Fu(e, t, n) {\n var o = e.__transition, i;\n o[t] = n, n.timer = vr(r, 0, n.time);\n function r(u) {\n n.state = li, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);\n }\n function a(u) {\n var c, v, g, x;\n if (n.state !== li)\n return l();\n for (c in o)\n if (x = o[c], x.name === n.name) {\n if (x.state === Lt)\n return si(a);\n x.state === ui ? (x.state = Gt, x.timer.stop(), x.on.call(\"interrupt\", e, e.__data__, x.index, x.group), delete o[c]) : +c < t && (x.state = Gt, x.timer.stop(), x.on.call(\"cancel\", e, e.__data__, x.index, x.group), delete o[c]);\n }\n if (si(function() {\n n.state === Lt && (n.state = ui, n.timer.restart(s, n.delay, n.time), s(u));\n }), n.state = to, n.on.call(\"start\", e, e.__data__, n.index, n.group), n.state === to) {\n for (n.state = Lt, i = new Array(g = n.tween.length), c = 0, v = -1; c < g; ++c)\n (x = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++v] = x);\n i.length = v + 1;\n }\n }\n function s(u) {\n for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(l), n.state = no, 1), v = -1, g = i.length; ++v < g; )\n i[v].call(e, c);\n n.state === no && (n.on.call(\"end\", e, e.__data__, n.index, n.group), l());\n }\n function l() {\n n.state = Gt, n.timer.stop(), delete o[t];\n for (var u in o)\n return;\n delete e.__transition;\n }\n}\nfunction Ft(e, t) {\n var n = e.__transition, o, i, r = !0, a;\n if (n) {\n t = t == null ? null : t + \"\";\n for (a in n) {\n if ((o = n[a]).name !== t) {\n r = !1;\n continue;\n }\n i = o.state > to && o.state < no, o.state = Gt, o.timer.stop(), o.on.call(i ? \"interrupt\" : \"cancel\", e, e.__data__, o.index, o.group), delete n[a];\n }\n r && delete e.__transition;\n }\n}\nfunction Yu(e) {\n return this.each(function() {\n Ft(this, e);\n });\n}\nfunction Xu(e, t) {\n var n, o;\n return function() {\n var i = ke(this, e), r = i.tween;\n if (r !== n) {\n o = n = r;\n for (var a = 0, s = o.length; a < s; ++a)\n if (o[a].name === t) {\n o = o.slice(), o.splice(a, 1);\n break;\n }\n }\n i.tween = o;\n };\n}\nfunction Zu(e, t, n) {\n var o, i;\n if (typeof n != \"function\")\n throw new Error();\n return function() {\n var r = ke(this, e), a = r.tween;\n if (a !== o) {\n i = (o = a).slice();\n for (var s = { name: t, value: n }, l = 0, u = i.length; l < u; ++l)\n if (i[l].name === t) {\n i[l] = s;\n break;\n }\n l === u && i.push(s);\n }\n r.tween = i;\n };\n}\nfunction Uu(e, t) {\n var n = this._id;\n if (e += \"\", arguments.length < 2) {\n for (var o = Se(this.node(), n).tween, i = 0, r = o.length, a; i < r; ++i)\n if ((a = o[i]).name === e)\n return a.value;\n return null;\n }\n return this.each((t == null ? Xu : Zu)(n, e, t));\n}\nfunction wo(e, t, n) {\n var o = e._id;\n return e.each(function() {\n var i = ke(this, o);\n (i.value || (i.value = {}))[t] = n.apply(this, arguments);\n }), function(i) {\n return Se(i, o).value[t];\n };\n}\nfunction pr(e, t) {\n var n;\n return (typeof t == \"number\" ? Re : t instanceof Nt ? oi : (n = Nt(t)) ? (t = n, oi) : $u)(e, t);\n}\nfunction Wu(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ku(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction qu(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttribute(e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction ju(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttributeNS(e.space, e.local);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction Qu(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttribute(e) : (a = this.getAttribute(e), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction Ju(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttributeNS(e.space, e.local) : (a = this.getAttributeNS(e.space, e.local), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction ec(e, t) {\n var n = hn(e), o = n === \"transform\" ? Iu : pr;\n return this.attrTween(e, typeof t == \"function\" ? (n.local ? Ju : Qu)(n, o, wo(this, \"attr.\" + e, t)) : t == null ? (n.local ? Ku : Wu)(n) : (n.local ? ju : qu)(n, o, t));\n}\nfunction tc(e, t) {\n return function(n) {\n this.setAttribute(e, t.call(this, n));\n };\n}\nfunction nc(e, t) {\n return function(n) {\n this.setAttributeNS(e.space, e.local, t.call(this, n));\n };\n}\nfunction oc(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && nc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction ic(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && tc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction rc(e, t) {\n var n = \"attr.\" + e;\n if (arguments.length < 2)\n return (n = this.tween(n)) && n._value;\n if (t == null)\n return this.tween(n, null);\n if (typeof t != \"function\")\n throw new Error();\n var o = hn(e);\n return this.tween(n, (o.local ? oc : ic)(o, t));\n}\nfunction ac(e, t) {\n return function() {\n _o(this, e).delay = +t.apply(this, arguments);\n };\n}\nfunction sc(e, t) {\n return t = +t, function() {\n _o(this, e).delay = t;\n };\n}\nfunction lc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? ac : sc)(t, e)) : Se(this.node(), t).delay;\n}\nfunction uc(e, t) {\n return function() {\n ke(this, e).duration = +t.apply(this, arguments);\n };\n}\nfunction cc(e, t) {\n return t = +t, function() {\n ke(this, e).duration = t;\n };\n}\nfunction dc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? uc : cc)(t, e)) : Se(this.node(), t).duration;\n}\nfunction fc(e, t) {\n if (typeof t != \"function\")\n throw new Error();\n return function() {\n ke(this, e).ease = t;\n };\n}\nfunction hc(e) {\n var t = this._id;\n return arguments.length ? this.each(fc(t, e)) : Se(this.node(), t).ease;\n}\nfunction gc(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n if (typeof n != \"function\")\n throw new Error();\n ke(this, e).ease = n;\n };\n}\nfunction vc(e) {\n if (typeof e != \"function\")\n throw new Error();\n return this.each(gc(this._id, e));\n}\nfunction mc(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new Be(o, this._parents, this._name, this._id);\n}\nfunction pc(e) {\n if (e._id !== this._id)\n throw new Error();\n for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), a = new Array(o), s = 0; s < r; ++s)\n for (var l = t[s], u = n[s], c = l.length, v = a[s] = new Array(c), g, x = 0; x < c; ++x)\n (g = l[x] || u[x]) && (v[x] = g);\n for (; s < o; ++s)\n a[s] = t[s];\n return new Be(a, this._parents, this._name, this._id);\n}\nfunction yc(e) {\n return (e + \"\").trim().split(/^|\\s+/).every(function(t) {\n var n = t.indexOf(\".\");\n return n >= 0 && (t = t.slice(0, n)), !t || t === \"start\";\n });\n}\nfunction xc(e, t, n) {\n var o, i, r = yc(t) ? _o : ke;\n return function() {\n var a = r(this, e), s = a.on;\n s !== o && (i = (o = s).copy()).on(t, n), a.on = i;\n };\n}\nfunction _c(e, t) {\n var n = this._id;\n return arguments.length < 2 ? Se(this.node(), n).on.on(e) : this.each(xc(n, e, t));\n}\nfunction wc(e) {\n return function() {\n var t = this.parentNode;\n for (var n in this.__transition)\n if (+n !== e)\n return;\n t && t.removeChild(this);\n };\n}\nfunction bc() {\n return this.on(\"end.remove\", wc(this._id));\n}\nfunction Ec(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = vo(e));\n for (var o = this._groups, i = o.length, r = new Array(i), a = 0; a < i; ++a)\n for (var s = o[a], l = s.length, u = r[a] = new Array(l), c, v, g = 0; g < l; ++g)\n (c = s[g]) && (v = e.call(c, c.__data__, g, s)) && (\"__data__\" in c && (v.__data__ = c.__data__), u[g] = v, bn(u[g], t, n, g, u, Se(c, n)));\n return new Be(r, this._parents, t, n);\n}\nfunction Sc(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = Ri(e));\n for (var o = this._groups, i = o.length, r = [], a = [], s = 0; s < i; ++s)\n for (var l = o[s], u = l.length, c, v = 0; v < u; ++v)\n if (c = l[v]) {\n for (var g = e.call(c, c.__data__, v, l), x, h = Se(c, n), d = 0, w = g.length; d < w; ++d)\n (x = g[d]) && bn(x, t, n, d, g, h);\n r.push(g), a.push(c);\n }\n return new Be(r, a, t, n);\n}\nvar Nc = $t.prototype.constructor;\nfunction Cc() {\n return new Nc(this._groups, this._parents);\n}\nfunction Mc(e, t) {\n var n, o, i;\n return function() {\n var r = ft(this, e), a = (this.style.removeProperty(e), ft(this, e));\n return r === a ? null : r === n && a === o ? i : i = t(n = r, o = a);\n };\n}\nfunction yr(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction $c(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = ft(this, e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction kc(e, t, n) {\n var o, i, r;\n return function() {\n var a = ft(this, e), s = n(this), l = s + \"\";\n return s == null && (l = s = (this.style.removeProperty(e), ft(this, e))), a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s));\n };\n}\nfunction Oc(e, t) {\n var n, o, i, r = \"style.\" + t, a = \"end.\" + r, s;\n return function() {\n var l = ke(this, e), u = l.on, c = l.value[r] == null ? s || (s = yr(t)) : void 0;\n (u !== n || i !== c) && (o = (n = u).copy()).on(a, i = c), l.on = o;\n };\n}\nfunction Tc(e, t, n) {\n var o = (e += \"\") == \"transform\" ? Tu : pr;\n return t == null ? this.styleTween(e, Mc(e, o)).on(\"end.style.\" + e, yr(e)) : typeof t == \"function\" ? this.styleTween(e, kc(e, o, wo(this, \"style.\" + e, t))).each(Oc(this._id, e)) : this.styleTween(e, $c(e, o, t), n).on(\"end.style.\" + e, null);\n}\nfunction Ic(e, t, n) {\n return function(o) {\n this.style.setProperty(e, t.call(this, o), n);\n };\n}\nfunction Pc(e, t, n) {\n var o, i;\n function r() {\n var a = t.apply(this, arguments);\n return a !== i && (o = (i = a) && Ic(e, a, n)), o;\n }\n return r._value = t, r;\n}\nfunction Dc(e, t, n) {\n var o = \"style.\" + (e += \"\");\n if (arguments.length < 2)\n return (o = this.tween(o)) && o._value;\n if (t == null)\n return this.tween(o, null);\n if (typeof t != \"function\")\n throw new Error();\n return this.tween(o, Pc(e, t, n ?? \"\"));\n}\nfunction zc(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Ac(e) {\n return function() {\n var t = e(this);\n this.textContent = t ?? \"\";\n };\n}\nfunction Bc(e) {\n return this.tween(\"text\", typeof e == \"function\" ? Ac(wo(this, \"text\", e)) : zc(e == null ? \"\" : e + \"\"));\n}\nfunction Rc(e) {\n return function(t) {\n this.textContent = e.call(this, t);\n };\n}\nfunction Vc(e) {\n var t, n;\n function o() {\n var i = e.apply(this, arguments);\n return i !== n && (t = (n = i) && Rc(i)), t;\n }\n return o._value = e, o;\n}\nfunction Hc(e) {\n var t = \"text\";\n if (arguments.length < 1)\n return (t = this.tween(t)) && t._value;\n if (e == null)\n return this.tween(t, null);\n if (typeof e != \"function\")\n throw new Error();\n return this.tween(t, Vc(e));\n}\nfunction Lc() {\n for (var e = this._name, t = this._id, n = xr(), o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n if (l = a[u]) {\n var c = Se(l, t);\n bn(l, e, n, u, a, {\n time: c.time + c.delay + c.duration,\n delay: 0,\n duration: c.duration,\n ease: c.ease\n });\n }\n return new Be(o, this._parents, e, n);\n}\nfunction Gc() {\n var e, t, n = this, o = n._id, i = n.size();\n return new Promise(function(r, a) {\n var s = { value: a }, l = { value: function() {\n --i === 0 && r();\n } };\n n.each(function() {\n var u = ke(this, o), c = u.on;\n c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(l)), u.on = t;\n }), i === 0 && r();\n });\n}\nvar Fc = 0;\nfunction Be(e, t, n, o) {\n this._groups = e, this._parents = t, this._name = n, this._id = o;\n}\nfunction xr() {\n return ++Fc;\n}\nvar Oe = $t.prototype;\nBe.prototype = {\n constructor: Be,\n select: Ec,\n selectAll: Sc,\n selectChild: Oe.selectChild,\n selectChildren: Oe.selectChildren,\n filter: mc,\n merge: pc,\n selection: Cc,\n transition: Lc,\n call: Oe.call,\n nodes: Oe.nodes,\n node: Oe.node,\n size: Oe.size,\n empty: Oe.empty,\n each: Oe.each,\n on: _c,\n attr: ec,\n attrTween: rc,\n style: Tc,\n styleTween: Dc,\n text: Bc,\n textTween: Hc,\n remove: bc,\n tween: Uu,\n delay: lc,\n duration: dc,\n ease: hc,\n easeVarying: vc,\n end: Gc,\n [Symbol.iterator]: Oe[Symbol.iterator]\n};\nfunction Yc(e) {\n return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;\n}\nvar Xc = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: Yc\n};\nfunction Zc(e, t) {\n for (var n; !(n = e.__transition) || !(n = n[t]); )\n if (!(e = e.parentNode))\n throw new Error(`transition ${t} not found`);\n return n;\n}\nfunction Uc(e) {\n var t, n;\n e instanceof Be ? (t = e._id, e = e._name) : (t = xr(), (n = Xc).time = xo(), e = e == null ? null : e + \"\");\n for (var o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && bn(l, e, t, u, a, n || Zc(l, t));\n return new Be(o, this._parents, e, t);\n}\n$t.prototype.interrupt = Yu;\n$t.prototype.transition = Uc;\nconst Rt = (e) => () => e;\nfunction Wc(e, {\n sourceEvent: t,\n target: n,\n transform: o,\n dispatch: i\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n target: { value: n, enumerable: !0, configurable: !0 },\n transform: { value: o, enumerable: !0, configurable: !0 },\n _: { value: i }\n });\n}\nfunction De(e, t, n) {\n this.k = e, this.x = t, this.y = n;\n}\nDe.prototype = {\n constructor: De,\n scale: function(e) {\n return e === 1 ? this : new De(this.k * e, this.x, this.y);\n },\n translate: function(e, t) {\n return e === 0 & t === 0 ? this : new De(this.k, this.x + this.k * e, this.y + this.k * t);\n },\n apply: function(e) {\n return [e[0] * this.k + this.x, e[1] * this.k + this.y];\n },\n applyX: function(e) {\n return e * this.k + this.x;\n },\n applyY: function(e) {\n return e * this.k + this.y;\n },\n invert: function(e) {\n return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];\n },\n invertX: function(e) {\n return (e - this.x) / this.k;\n },\n invertY: function(e) {\n return (e - this.y) / this.k;\n },\n rescaleX: function(e) {\n return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));\n },\n rescaleY: function(e) {\n return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar et = new De(1, 0, 0);\nDe.prototype;\nfunction Tn(e) {\n e.stopImmediatePropagation();\n}\nfunction vt(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Kc(e) {\n return (!e.ctrlKey || e.type === \"wheel\") && !e.button;\n}\nfunction qc() {\n var e = this;\n return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute(\"viewBox\") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction ci() {\n return this.__zoom || et;\n}\nfunction jc(e) {\n return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);\n}\nfunction Qc() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Jc(e, t, n) {\n var o = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], r = e.invertY(t[0][1]) - n[0][1], a = e.invertY(t[1][1]) - n[1][1];\n return e.translate(\n i > o ? (o + i) / 2 : Math.min(0, o) || Math.max(0, i),\n a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a)\n );\n}\nfunction ed() {\n var e = Kc, t = qc, n = Jc, o = jc, i = Qc, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Au, u = fn(\"start\", \"zoom\", \"end\"), c, v, g, x = 500, h = 150, d = 0, w = 10;\n function y(m) {\n m.property(\"__zoom\", ci).on(\"wheel.zoom\", P, { passive: !1 }).on(\"mousedown.zoom\", R).on(\"dblclick.zoom\", $).filter(i).on(\"touchstart.zoom\", D).on(\"touchmove.zoom\", Q).on(\"touchend.zoom touchcancel.zoom\", ee).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n y.transform = function(m, A, E, G) {\n var Z = m.selection ? m.selection() : m;\n Z.property(\"__zoom\", ci), m !== Z ? N(m, A, E, G) : Z.interrupt().each(function() {\n T(this, arguments).event(G).start().zoom(null, typeof A == \"function\" ? A.apply(this, arguments) : A).end();\n });\n }, y.scaleBy = function(m, A, E, G) {\n y.scaleTo(m, function() {\n var Z = this.__zoom.k, K = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return Z * K;\n }, E, G);\n }, y.scaleTo = function(m, A, E, G) {\n y.transform(m, function() {\n var Z = t.apply(this, arguments), K = this.__zoom, z = E == null ? p(Z) : typeof E == \"function\" ? E.apply(this, arguments) : E, W = K.invert(z), B = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return n(V(S(K, B), z, W), Z, a);\n }, E, G);\n }, y.translateBy = function(m, A, E, G) {\n y.transform(m, function() {\n return n(this.__zoom.translate(\n typeof A == \"function\" ? A.apply(this, arguments) : A,\n typeof E == \"function\" ? E.apply(this, arguments) : E\n ), t.apply(this, arguments), a);\n }, null, G);\n }, y.translateTo = function(m, A, E, G, Z) {\n y.transform(m, function() {\n var K = t.apply(this, arguments), z = this.__zoom, W = G == null ? p(K) : typeof G == \"function\" ? G.apply(this, arguments) : G;\n return n(et.translate(W[0], W[1]).scale(z.k).translate(\n typeof A == \"function\" ? -A.apply(this, arguments) : -A,\n typeof E == \"function\" ? -E.apply(this, arguments) : -E\n ), K, a);\n }, G, Z);\n };\n function S(m, A) {\n return A = Math.max(r[0], Math.min(r[1], A)), A === m.k ? m : new De(A, m.x, m.y);\n }\n function V(m, A, E) {\n var G = A[0] - E[0] * m.k, Z = A[1] - E[1] * m.k;\n return G === m.x && Z === m.y ? m : new De(m.k, G, Z);\n }\n function p(m) {\n return [(+m[0][0] + +m[1][0]) / 2, (+m[0][1] + +m[1][1]) / 2];\n }\n function N(m, A, E, G) {\n m.on(\"start.zoom\", function() {\n T(this, arguments).event(G).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n T(this, arguments).event(G).end();\n }).tween(\"zoom\", function() {\n var Z = this, K = arguments, z = T(Z, K).event(G), W = t.apply(Z, K), B = E == null ? p(W) : typeof E == \"function\" ? E.apply(Z, K) : E, q = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), te = Z.__zoom, re = typeof A == \"function\" ? A.apply(Z, K) : A, k = l(te.invert(B).concat(q / te.k), re.invert(B).concat(q / re.k));\n return function(H) {\n if (H === 1)\n H = re;\n else {\n var f = k(H), b = q / f[2];\n H = new De(b, B[0] - f[0] * b, B[1] - f[1] * b);\n }\n z.zoom(null, H);\n };\n });\n }\n function T(m, A, E) {\n return !E && m.__zooming || new _(m, A);\n }\n function _(m, A) {\n this.that = m, this.args = A, this.active = 0, this.sourceEvent = null, this.extent = t.apply(m, A), this.taps = 0;\n }\n _.prototype = {\n event: function(m) {\n return m && (this.sourceEvent = m), this;\n },\n start: function() {\n return ++this.active === 1 && (this.that.__zooming = this, this.emit(\"start\")), this;\n },\n zoom: function(m, A) {\n return this.mouse && m !== \"mouse\" && (this.mouse[1] = A.invert(this.mouse[0])), this.touch0 && m !== \"touch\" && (this.touch0[1] = A.invert(this.touch0[0])), this.touch1 && m !== \"touch\" && (this.touch1[1] = A.invert(this.touch1[0])), this.that.__zoom = A, this.emit(\"zoom\"), this;\n },\n end: function() {\n return --this.active === 0 && (delete this.that.__zooming, this.emit(\"end\")), this;\n },\n emit: function(m) {\n var A = we(this.that).datum();\n u.call(\n m,\n this.that,\n new Wc(m, {\n sourceEvent: this.sourceEvent,\n target: y,\n type: m,\n transform: this.that.__zoom,\n dispatch: u\n }),\n A\n );\n }\n };\n function P(m, ...A) {\n if (!e.apply(this, arguments))\n return;\n var E = T(this, A).event(m), G = this.__zoom, Z = Math.max(r[0], Math.min(r[1], G.k * Math.pow(2, o.apply(this, arguments)))), K = Ne(m);\n if (E.wheel)\n (E.mouse[0][0] !== K[0] || E.mouse[0][1] !== K[1]) && (E.mouse[1] = G.invert(E.mouse[0] = K)), clearTimeout(E.wheel);\n else {\n if (G.k === Z)\n return;\n E.mouse = [K, G.invert(K)], Ft(this), E.start();\n }\n vt(m), E.wheel = setTimeout(z, h), E.zoom(\"mouse\", n(V(S(G, Z), E.mouse[0], E.mouse[1]), E.extent, a));\n function z() {\n E.wheel = null, E.end();\n }\n }\n function R(m, ...A) {\n if (g || !e.apply(this, arguments))\n return;\n var E = m.currentTarget, G = T(this, A, !0).event(m), Z = we(m.view).on(\"mousemove.zoom\", B, !0).on(\"mouseup.zoom\", q, !0), K = Ne(m, E), z = m.clientX, W = m.clientY;\n Ki(m.view), Tn(m), G.mouse = [K, this.__zoom.invert(K)], Ft(this), G.start();\n function B(te) {\n if (vt(te), !G.moved) {\n var re = te.clientX - z, k = te.clientY - W;\n G.moved = re * re + k * k > d;\n }\n G.event(te).zoom(\"mouse\", n(V(G.that.__zoom, G.mouse[0] = Ne(te, E), G.mouse[1]), G.extent, a));\n }\n function q(te) {\n Z.on(\"mousemove.zoom mouseup.zoom\", null), qi(te.view, G.moved), vt(te), G.event(te).end();\n }\n }\n function $(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = this.__zoom, G = Ne(m.changedTouches ? m.changedTouches[0] : m, this), Z = E.invert(G), K = E.k * (m.shiftKey ? 0.5 : 2), z = n(V(S(E, K), G, Z), t.apply(this, A), a);\n vt(m), s > 0 ? we(this).transition().duration(s).call(N, z, G, m) : we(this).call(y.transform, z, G, m);\n }\n }\n function D(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = m.touches, G = E.length, Z = T(this, A, m.changedTouches.length === G).event(m), K, z, W, B;\n for (Tn(m), z = 0; z < G; ++z)\n W = E[z], B = Ne(W, this), B = [B, this.__zoom.invert(B), W.identifier], Z.touch0 ? !Z.touch1 && Z.touch0[2] !== B[2] && (Z.touch1 = B, Z.taps = 0) : (Z.touch0 = B, K = !0, Z.taps = 1 + !!c);\n c && (c = clearTimeout(c)), K && (Z.taps < 2 && (v = B[0], c = setTimeout(function() {\n c = null;\n }, x)), Ft(this), Z.start());\n }\n }\n function Q(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z, W, B;\n for (vt(m), K = 0; K < Z; ++K)\n z = G[K], W = Ne(z, this), E.touch0 && E.touch0[2] === z.identifier ? E.touch0[0] = W : E.touch1 && E.touch1[2] === z.identifier && (E.touch1[0] = W);\n if (z = E.that.__zoom, E.touch1) {\n var q = E.touch0[0], te = E.touch0[1], re = E.touch1[0], k = E.touch1[1], H = (H = re[0] - q[0]) * H + (H = re[1] - q[1]) * H, f = (f = k[0] - te[0]) * f + (f = k[1] - te[1]) * f;\n z = S(z, Math.sqrt(H / f)), W = [(q[0] + re[0]) / 2, (q[1] + re[1]) / 2], B = [(te[0] + k[0]) / 2, (te[1] + k[1]) / 2];\n } else if (E.touch0)\n W = E.touch0[0], B = E.touch0[1];\n else\n return;\n E.zoom(\"touch\", n(V(z, W, B), E.extent, a));\n }\n }\n function ee(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z;\n for (Tn(m), g && clearTimeout(g), g = setTimeout(function() {\n g = null;\n }, x), K = 0; K < Z; ++K)\n z = G[K], E.touch0 && E.touch0[2] === z.identifier ? delete E.touch0 : E.touch1 && E.touch1[2] === z.identifier && delete E.touch1;\n if (E.touch1 && !E.touch0 && (E.touch0 = E.touch1, delete E.touch1), E.touch0)\n E.touch0[1] = this.__zoom.invert(E.touch0[0]);\n else if (E.end(), E.taps === 2 && (z = Ne(z, this), Math.hypot(v[0] - z[0], v[1] - z[1]) < w)) {\n var W = we(this).on(\"dblclick.zoom\");\n W && W.apply(this, arguments);\n }\n }\n }\n return y.wheelDelta = function(m) {\n return arguments.length ? (o = typeof m == \"function\" ? m : Rt(+m), y) : o;\n }, y.filter = function(m) {\n return arguments.length ? (e = typeof m == \"function\" ? m : Rt(!!m), y) : e;\n }, y.touchable = function(m) {\n return arguments.length ? (i = typeof m == \"function\" ? m : Rt(!!m), y) : i;\n }, y.extent = function(m) {\n return arguments.length ? (t = typeof m == \"function\" ? m : Rt([[+m[0][0], +m[0][1]], [+m[1][0], +m[1][1]]]), y) : t;\n }, y.scaleExtent = function(m) {\n return arguments.length ? (r[0] = +m[0], r[1] = +m[1], y) : [r[0], r[1]];\n }, y.translateExtent = function(m) {\n return arguments.length ? (a[0][0] = +m[0][0], a[1][0] = +m[1][0], a[0][1] = +m[0][1], a[1][1] = +m[1][1], y) : [[a[0][0], a[0][1]], [a[1][0], a[1][1]]];\n }, y.constrain = function(m) {\n return arguments.length ? (n = m, y) : n;\n }, y.duration = function(m) {\n return arguments.length ? (s = +m, y) : s;\n }, y.interpolate = function(m) {\n return arguments.length ? (l = m, y) : l;\n }, y.on = function() {\n var m = u.on.apply(u, arguments);\n return m === u ? y : m;\n }, y.clickDistance = function(m) {\n return arguments.length ? (d = (m = +m) * m, y) : Math.sqrt(d);\n }, y.tapDistance = function(m) {\n return arguments.length ? (w = +m, y) : w;\n }, y;\n}\nconst In = 0.1;\nfunction Ge() {\n}\nconst td = {\n zoomIn: Ge,\n zoomOut: Ge,\n zoomTo: Ge,\n fitView: Ge,\n setCenter: Ge,\n fitBounds: Ge,\n project: (e) => e,\n setTransform: Ge,\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n initialized: !1\n}, nd = (e, t) => {\n const n = e, o = M(n, \"nodes\"), i = M(n, \"d3Zoom\"), r = M(n, \"d3Selection\"), a = M(n, \"dimensions\"), s = M(n, \"translateExtent\"), l = M(n, \"minZoom\"), u = M(n, \"maxZoom\"), c = M(n, \"viewport\"), v = M(n, \"snapToGrid\"), g = M(n, \"snapGrid\"), x = M(n, \"hooks\"), h = t, d = M(h, \"getNodes\"), w = ie(!1);\n x.value.nodesInitialized.on(() => {\n w.value = !0;\n });\n const y = J(() => !!i.value && !!r.value && !!a.value.width && !!a.value.height && w.value);\n function S(p, N) {\n r.value && i.value && i.value.scaleBy(Pn(r.value, N), p);\n }\n function V(p, N, T, _) {\n const { x: P, y: R } = so({ x: -p, y: -N }, s.value), $ = et.translate(-P, -R).scale(T);\n r.value && i.value && i.value.transform(Pn(r.value, _), $);\n }\n return J(() => y.value ? {\n initialized: !0,\n zoomIn: (p) => {\n S(1.2, p == null ? void 0 : p.duration);\n },\n zoomOut: (p) => {\n S(1 / 1.2, p == null ? void 0 : p.duration);\n },\n zoomTo: (p, N) => {\n r.value && i.value && i.value.scaleTo(Pn(r.value, N == null ? void 0 : N.duration), p);\n },\n setTransform: (p, N) => {\n V(p.x, p.y, p.zoom, N == null ? void 0 : N.duration);\n },\n getTransform: () => ({\n x: c.value.x,\n y: c.value.y,\n zoom: c.value.zoom\n }),\n fitView: (p = {\n padding: In,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!o.value.length)\n return;\n const N = (p.includeHiddenNodes ? o.value : d.value).filter(($) => {\n var ee;\n const D = $.initialized && $.dimensions.width && $.dimensions.height;\n let Q = !0;\n return (ee = p.nodes) != null && ee.length && (Q = p.nodes.includes($.id)), D && Q;\n }), T = co(N), { x: _, y: P, zoom: R } = Zt(\n T,\n a.value.width,\n a.value.height,\n p.minZoom ?? l.value,\n p.maxZoom ?? u.value,\n p.padding ?? In,\n p.offset\n );\n V(_, P, R, p == null ? void 0 : p.duration);\n },\n setCenter: (p, N, T) => {\n const _ = typeof (T == null ? void 0 : T.zoom) < \"u\" ? T.zoom : u.value, P = a.value.width / 2 - p * _, R = a.value.height / 2 - N * _;\n V(P, R, _, T == null ? void 0 : T.duration);\n },\n fitBounds: (p, N = { padding: In }) => {\n const { x: T, y: _, zoom: P } = Zt(\n p,\n a.value.width,\n a.value.height,\n l.value,\n u.value,\n N.padding\n );\n V(T, _, P, N == null ? void 0 : N.duration);\n },\n project: (p) => uo(p, c.value, v.value, g.value)\n } : td);\n};\nfunction Pn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Dn(e, t) {\n if (t) {\n const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height;\n if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) {\n let i = {};\n if (Ae(t.style) ? i = { ...t.style(t) } : t.style && (i = { ...t.style }), i.width = i.width ?? `${t.dimensions.width}px`, i.height = i.height ?? `${t.dimensions.height}px`, n > 0)\n if (Pe(i.width)) {\n const r = Number(i.width.replace(\"px\", \"\"));\n i.width = `${r + n}px`;\n } else\n i.width += n;\n if (o > 0)\n if (Pe(i.height)) {\n const r = Number(i.height.replace(\"px\", \"\"));\n i.height = `${r + o}px`;\n } else\n i.height += o;\n if (e.position.x < 0) {\n const r = Math.abs(e.position.x);\n if (t.position.x = t.position.x - r, Pe(i.width)) {\n const a = Number(i.width.replace(\"px\", \"\"));\n i.width = `${a + r}px`;\n } else\n i.width += r;\n e.position.x = 0;\n }\n if (e.position.y < 0) {\n const r = Math.abs(e.position.y);\n if (t.position.y = t.position.y - r, Pe(i.height)) {\n const a = Number(i.height.replace(\"px\", \"\"));\n i.height = `${a + r}px`;\n } else\n i.height += r;\n e.position.y = 0;\n }\n t.dimensions.width = Number(i.width.toString().replace(\"px\", \"\")), t.dimensions.height = Number(i.height.toString().replace(\"px\", \"\")), Ae(t.style) ? t.style = (r) => {\n const a = t.style;\n return {\n ...a(r),\n ...i\n };\n } : t.style = {\n ...t.style,\n ...i\n };\n }\n }\n}\nfunction nn(e, t) {\n e.filter((i) => i.type === \"add\" || i.type === \"remove\").forEach((i) => {\n if (i.type === \"add\")\n t.findIndex((a) => a.id === i.item.id) === -1 && t.push(i.item);\n else if (i.type === \"remove\") {\n const r = t.findIndex((a) => a.id === i.id);\n r !== -1 && t.splice(r, 1);\n }\n });\n const o = t.map((i) => i.id);\n return t.forEach((i) => {\n var a, s;\n const r = e.filter((l) => l.id === i.id);\n for (const l of r)\n switch (l.type) {\n case \"select\":\n i.selected = l.selected;\n break;\n case \"position\":\n if (nt(i) && (typeof l.position < \"u\" && (i.position = l.position), typeof l.dragging < \"u\" && (i.dragging = l.dragging), i.expandParent && i.parentNode)) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && Dn(i, u);\n }\n break;\n case \"dimensions\":\n if (nt(i)) {\n if (typeof l.dimensions < \"u\" && (i.dimensions = l.dimensions), typeof l.updateStyle < \"u\" && (i.style = {\n ...i.style || {},\n width: `${(a = l.dimensions) == null ? void 0 : a.width}px`,\n height: `${(s = l.dimensions) == null ? void 0 : s.height}px`\n }), typeof l.resizing < \"u\" && (i.resizing = l.resizing), i.expandParent && i.parentNode) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && (u.initialized ? Dn(i, u) : Ue(() => {\n Dn(i, u);\n }));\n }\n i.initialized || (i.initialized = !0);\n }\n break;\n }\n }), t;\n}\nfunction Vd(e, t) {\n return nn(e, t);\n}\nfunction Hd(e, t) {\n return nn(e, t);\n}\nfunction Te(e, t) {\n return {\n id: e,\n type: \"select\",\n selected: t\n };\n}\nfunction di(e) {\n return {\n item: e,\n type: \"add\"\n };\n}\nfunction zn(e) {\n return {\n id: e,\n type: \"remove\"\n };\n}\nfunction An(e, t) {\n return e.reduce(\n (n, o) => {\n let i = t.includes(o.id);\n ce(o.selectable) && !o.selectable && (i = !1);\n const r = nt(o) ? \"changedNodes\" : \"changedEdges\";\n return !o.selected && i ? n[r].push(Te(o.id, !0)) : o.selected && !i && n[r].push(Te(o.id, !1)), n;\n },\n { changedNodes: [], changedEdges: [] }\n );\n}\nfunction od(e, t, n, o) {\n let i = !1;\n const r = nd(e, t), a = (f) => {\n const b = f ?? n.value ?? [];\n e.hooks.updateNodeInternals.trigger(b);\n }, s = (f) => {\n if (f)\n return e.nodes && !n.value.length ? e.nodes.find((b) => b.id === f) : e.nodes[n.value.indexOf(f)];\n }, l = (f) => {\n if (f)\n return e.edges && !o.value.length ? e.edges.find((b) => b.id === f) : e.edges[o.value.indexOf(f)];\n }, u = (f, b, L) => {\n const I = [];\n f.forEach((F) => {\n var Y, ne;\n const U = {\n id: F.id,\n type: \"position\",\n dragging: L,\n from: F.from\n };\n if (b && (U.position = F.position, F.parentNode)) {\n const O = s(F.parentNode);\n U.position = {\n x: U.position.x - (((Y = O == null ? void 0 : O.computedPosition) == null ? void 0 : Y.x) ?? 0),\n y: U.position.y - (((ne = O == null ? void 0 : O.computedPosition) == null ? void 0 : ne.y) ?? 0)\n };\n }\n I.push(U);\n }), I != null && I.length && e.hooks.nodesChange.trigger(I);\n }, c = (f) => {\n var F;\n if (!e.vueFlowRef)\n return;\n const b = e.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!b)\n return;\n let L;\n if ((F = e.__experimentalFeatures) != null && F.nestedFlow) {\n let U = [b], Y = b, ne;\n for (; !ne && Y; )\n Y = Y.parentElement, ne = Y == null ? void 0 : Y.classList.contains(\"vue-flow__transformationpane\"), ne && (U = [Y, ...U]);\n U.forEach((O) => {\n const ae = window.getComputedStyle(O), { m22: me } = new window.DOMMatrixReadOnly(ae.transform);\n L ? L *= me : L = me;\n });\n } else {\n const U = window.getComputedStyle(b), { m22: Y } = new window.DOMMatrixReadOnly(U.transform);\n L = Y;\n }\n const I = f.reduce((U, Y) => {\n const ne = s(Y.id);\n if (ne) {\n const O = rn(Y.nodeElement);\n !!(O.width && O.height && (ne.dimensions.width !== O.width || ne.dimensions.height !== O.height || Y.forceUpdate)) && (ne.handleBounds.source = Lo(\".source\", Y.nodeElement, L), ne.handleBounds.target = Lo(\".target\", Y.nodeElement, L), ne.dimensions = O, ne.initialized = !0, U.push({\n id: ne.id,\n type: \"dimensions\",\n dimensions: O\n }));\n }\n return U;\n }, []);\n e.fitViewOnInit && !i && (ye(() => r.value.initialized).toBe(!0).then(() => {\n r.value.fitView();\n }), i = !0), I.length && e.hooks.nodesChange.trigger(I);\n }, v = (f, b) => {\n const L = f.map((U) => U.id);\n let I, F = [];\n if (e.multiSelectionActive)\n I = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, g = (f, b) => {\n const L = f.map((U) => U.id);\n let I = [], F;\n if (e.multiSelectionActive)\n F = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, x = (f, b) => {\n const L = f.filter(xt).map((Y) => Y.id), I = f.filter($e).map((Y) => Y.id);\n let { changedNodes: F, changedEdges: U } = An([...e.nodes, ...e.edges], [...L, ...I]);\n e.multiSelectionActive && (F = L.map((Y) => Te(Y, b)), U = I.map((Y) => Te(Y, b))), F.length && e.hooks.nodesChange.trigger(F), U.length && e.hooks.edgesChange.trigger(U);\n }, h = (f) => {\n v(f, !0);\n }, d = (f) => {\n g(f, !0);\n }, w = (f) => {\n x(f, !0);\n }, y = (f) => {\n if (!f.length)\n return v(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.nodesChange.trigger(L);\n }, S = (f) => {\n if (!f.length)\n return g(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.edgesChange.trigger(L);\n }, V = (f) => {\n if (!f || !f.length)\n return x([], !1);\n const { changedNodes: b, changedEdges: L } = f.reduce(\n (I, F) => {\n const U = Te(F.id, !1);\n return xt(F) ? I.changedNodes.push(U) : I.changedEdges.push(U), I;\n },\n { changedNodes: [], changedEdges: [] }\n );\n b.length && e.hooks.nodesChange.trigger(b), L.length && e.hooks.edgesChange.trigger(L);\n }, p = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([f, e.maxZoom]), e.minZoom = f;\n }, N = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([e.minZoom, f]), e.maxZoom = f;\n }, T = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.translateExtent(f), e.translateExtent = f;\n }, _ = (f) => {\n e.nodeExtent = f, a(n.value);\n }, P = (f) => {\n e.nodesDraggable = f, e.nodesConnectable = f, e.elementsSelectable = f;\n }, R = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f;\n !e.initialized && !b.length || (e.nodes = Do(b, e.nodes, s, e.hooks.error.trigger));\n }, $ = (f) => {\n const b = f instanceof Function ? f(e.edges) : f;\n if (!e.initialized && !b.length)\n return;\n const L = e.isValidConnection ? b.filter(\n (I) => e.isValidConnection(I, {\n edges: e.edges,\n sourceNode: s(I.source),\n targetNode: s(I.target)\n })\n ) : b;\n e.edges = L.reduce((I, F) => {\n const U = s(F.source), Y = s(F.target), ne = !U || typeof U > \"u\", O = !Y || typeof Y > \"u\";\n if (ne && O ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, F.id, F.source, F.target)) : (ne && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, F.id, F.source)), O && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, F.id, F.target))), ne || O)\n return I;\n const ae = l(F.id);\n return I.push({\n ...lo(F, Object.assign({}, ae, e.defaultEdgeOptions)),\n sourceNode: U,\n targetNode: Y\n }), I;\n }, []);\n }, D = (f) => {\n const b = f instanceof Function ? f([...e.nodes, ...e.edges]) : f;\n !e.initialized && !b.length || (R(b.filter(xt)), $(b.filter($e)));\n }, Q = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f, I = Do(b, e.nodes, s, e.hooks.error.trigger).map(di);\n I.length && e.hooks.nodesChange.trigger(I);\n }, ee = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, I = (e.isValidConnection ? b.filter(\n (F) => e.isValidConnection(F, {\n edges: e.edges,\n sourceNode: s(F.source),\n targetNode: s(F.target)\n })\n ) : b).reduce((F, U) => {\n const Y = pa(\n {\n ...U,\n ...e.defaultEdgeOptions\n },\n e.edges,\n e.hooks.error.trigger\n );\n if (Y) {\n const ne = s(Y.source), O = s(Y.target), ae = !ne || typeof ne > \"u\", me = !O || typeof O > \"u\";\n if (ae && me ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (ae && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, Y.id, Y.source)), me && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, Y.id, Y.target))), ae || me)\n return F;\n F.push(\n di({\n ...Y,\n sourceNode: ne,\n targetNode: O\n })\n );\n }\n return F;\n }, []);\n I.length && e.hooks.edgesChange.trigger(I);\n }, m = (f, b = !0) => {\n const L = f instanceof Function ? f(e.nodes) : f, I = [], F = [];\n L.forEach((U) => {\n const Y = typeof U == \"string\" ? s(U) : U;\n if (!(ce(Y.deletable) && !Y.deletable) && (I.push(zn(Y.id)), b)) {\n const ne = sn([Y], e.edges).filter((O) => ce(O.deletable) ? O.deletable : !0);\n F.push(...ne.map((O) => zn(O.id)));\n }\n }), F.length && e.hooks.edgesChange.trigger(F), I.length && e.hooks.nodesChange.trigger(I);\n }, A = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, L = [];\n b.forEach((I) => {\n const F = typeof I == \"string\" ? l(I) : I;\n ce(F.deletable) && !F.deletable || L.push(zn(typeof I == \"string\" ? I : I.id));\n }), e.hooks.edgesChange.trigger(L);\n }, E = (f, b, L = !0) => ya(f, b, e.edges, l, L, e.hooks.error.trigger), G = (f) => nn(f, e.nodes), Z = (f) => nn(f, e.edges), K = (f, b, L, I = !1) => {\n I ? e.connectionClickStartHandle = f : e.connectionStartHandle = f, e.connectionEndHandle = null, e.connectionStatus = null, b && (e.connectionPosition = b);\n }, z = (f, b = null, L = null) => {\n e.connectionStartHandle && (e.connectionPosition = f, e.connectionEndHandle = b, e.connectionStatus = L);\n }, W = (f, b) => {\n e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, b ? e.connectionClickStartHandle = null : e.connectionStartHandle = null;\n }, B = (f) => {\n const b = ha(f), L = b ? null : s(f.id);\n return !b && !L ? [null, null, b] : [b ? f : Io(L), L, b];\n }, q = (f, b = !0, L) => {\n const [I, F, U] = B(f);\n return I ? (L || e.nodes).filter((Y) => {\n if (!U && (Y.id === F.id || !Y.computedPosition))\n return !1;\n const ne = Io(Y), O = Fn(ne, I);\n return b && O > 0 || O >= Number(f.width) * Number(f.height);\n }) : [];\n }, te = (f, b, L = !0) => {\n const [I] = B(f);\n if (!I)\n return !1;\n const F = Fn(I, b);\n return L && F > 0 || F >= Number(f.width) * Number(f.height);\n }, re = (f) => {\n const { viewport: b, dimensions: L, d3Zoom: I, d3Selection: F, translateExtent: U } = e;\n if (!I || !F || !f.x && !f.y)\n return !1;\n const Y = et.translate(b.x + f.x, b.y + f.y).scale(b.zoom), ne = [\n [0, 0],\n [L.width, L.height]\n ], O = I.constrain()(Y, ne, U), ae = e.viewport.x !== O.x || e.viewport.y !== O.y || e.viewport.zoom !== O.k;\n return I.transform(F, O), ae;\n }, k = (f) => {\n const b = f instanceof Function ? f(e) : f, L = [\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"nodeExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n ], I = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n ce(b.defaultEdgeOptions) && (e.defaultEdgeOptions = b.defaultEdgeOptions);\n const F = b.modelValue || b.nodes || b.edges ? [] : void 0;\n F && (b.modelValue && F.push(...b.modelValue), b.nodes && F.push(...b.nodes), b.edges && F.push(...b.edges), D(F));\n const U = () => {\n ce(b.maxZoom) && N(b.maxZoom), ce(b.minZoom) && p(b.minZoom), ce(b.translateExtent) && T(b.translateExtent), ce(b.nodeExtent) && _(b.nodeExtent);\n };\n Object.keys(b).forEach((Y) => {\n const ne = Y, O = b[ne];\n ![...L, ...I].includes(ne) && ce(O) && (e[ne] = O);\n }), e.d3Zoom ? U() : ye(() => e.d3Zoom).not.toBeUndefined().then(U), e.initialized || (e.initialized = !0);\n };\n return {\n updateNodePositions: u,\n updateNodeDimensions: c,\n setElements: D,\n setNodes: R,\n setEdges: $,\n addNodes: Q,\n addEdges: ee,\n removeNodes: m,\n removeEdges: A,\n findNode: s,\n findEdge: l,\n updateEdge: E,\n applyEdgeChanges: Z,\n applyNodeChanges: G,\n addSelectedElements: w,\n addSelectedNodes: h,\n addSelectedEdges: d,\n setMinZoom: p,\n setMaxZoom: N,\n setTranslateExtent: T,\n setNodeExtent: _,\n removeSelectedElements: V,\n removeSelectedNodes: y,\n removeSelectedEdges: S,\n startConnection: K,\n updateConnection: z,\n endConnection: W,\n setInteractive: P,\n setState: k,\n getIntersectingNodes: q,\n isNodeIntersecting: te,\n panBy: re,\n fitView: async (f = { padding: 0.1 }) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitView(f);\n },\n zoomIn: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomIn(f);\n },\n zoomOut: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomOut(f);\n },\n zoomTo: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomTo(f, b);\n },\n setTransform: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setTransform(f, b);\n },\n getTransform: () => r.value.getTransform(),\n setCenter: async (f, b, L) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setCenter(f, b, L);\n },\n fitBounds: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitBounds(f, b);\n },\n project: (f) => r.value.project(f),\n toObject: () => JSON.parse(\n JSON.stringify({\n nodes: e.nodes.map((f) => {\n const {\n computedPosition: b,\n handleBounds: L,\n selected: I,\n dimensions: F,\n isParent: U,\n resizing: Y,\n dragging: ne,\n initialized: O,\n ...ae\n } = f;\n return ae;\n }),\n edges: e.edges.map((f) => {\n const { selected: b, sourceNode: L, targetNode: I, ...F } = f;\n return F;\n }),\n position: [e.viewport.x, e.viewport.y],\n zoom: e.viewport.zoom\n })\n ),\n updateNodeInternals: a,\n $reset: () => {\n const f = ar();\n if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) {\n const b = et.translate(f.defaultViewport.x ?? 0, f.defaultViewport.y ?? 0).scale(je(f.defaultViewport.zoom ?? 1, f.minZoom, f.maxZoom)), L = e.viewportRef.getBoundingClientRect(), I = [\n [0, 0],\n [L.width, L.height]\n ], F = e.d3Zoom.constrain()(b, I, f.translateExtent);\n e.d3Zoom.transform(e.d3Selection, F);\n }\n k(f);\n },\n $destroy: () => {\n }\n };\n}\nclass ot {\n constructor() {\n this.currentId = 0, this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n return ot.instance || (ot.instance = new ot()), ot.instance;\n }\n set(t, n) {\n return this.flows.set(t, n);\n }\n get(t) {\n return this.flows.get(t);\n }\n remove(t) {\n return this.flows.delete(t);\n }\n create(t, n) {\n const o = ar(n), i = kr(o), r = J(() => i.nodes.map((g) => g.id)), a = J(() => i.edges.map((g) => g.id)), s = cu(i, r, a), l = od(i, s, r, a), u = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n const h = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;\n u[h] = x.on;\n });\n const c = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n c[g] = x.trigger;\n }), l.setState(i);\n const v = {\n ...u,\n ...s,\n ...l,\n ...Or(i),\n emits: c,\n id: t,\n vueFlowVersion: \"1.19.4\",\n $destroy: () => {\n this.remove(t);\n }\n };\n return this.set(t, v), v;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nconst fe = (e) => {\n const t = ot.getInstance(), n = hi(), o = e == null ? void 0 : e.id, i = (n == null ? void 0 : n.vueFlowId) || o;\n let r, a = !1;\n if (n) {\n const s = He(zo, null);\n typeof s < \"u\" && s !== null && (r = s);\n }\n if (r || i && (r = t.get(i)), !r || r && o && o !== r.id) {\n const s = o ?? t.getId();\n r = t.create(s, e), n && (a = !0);\n } else\n e && r.setState(e);\n return n && (ut(zo, r), n.vueFlowId = r.id, a && Mt(() => {\n if (r) {\n const s = t.get(r.id);\n s ? s.$destroy() : wt(`No store instance found for id ${r.id} in storage.`);\n }\n })), r;\n};\nfunction id(e, t, n) {\n const o = Tr();\n return o.run(() => {\n [\n () => {\n o.run(() => {\n let h, d, w = !!(n.nodes.value.length || n.edges.value.length);\n h = tt([e.modelValue, () => {\n var y, S;\n return (S = (y = e.modelValue) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setElements(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],\n ([y, S]) => {\n var V;\n (V = e.modelValue) != null && V.value && Array.isArray(e.modelValue.value) && (h == null || h.pause(), e.modelValue.value = [...y, ...S], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.nodes.value.length;\n h = tt([e.nodes, () => {\n var y, S;\n return (S = (y = e.nodes) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setNodes(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, () => n.nodes.value.length],\n ([y]) => {\n var S;\n (S = e.nodes) != null && S.value && Array.isArray(e.nodes.value) && (h == null || h.pause(), e.nodes.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.edges.value.length;\n h = tt([e.edges, () => {\n var y, S;\n return (S = (y = e.edges) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setEdges(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.edges, () => n.edges.value.length],\n ([y]) => {\n var S;\n (S = e.edges) != null && S.value && Array.isArray(e.edges.value) && (h == null || h.pause(), e.edges.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.minZoom,\n () => {\n t.minZoom && ce(t.minZoom) && n.setMinZoom(t.minZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.maxZoom,\n () => {\n t.maxZoom && ce(t.maxZoom) && n.setMaxZoom(t.maxZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.translateExtent,\n () => {\n t.translateExtent && ce(t.translateExtent) && n.setTranslateExtent(t.translateExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.nodeExtent,\n () => {\n t.nodeExtent && ce(t.nodeExtent) && n.setNodeExtent(t.nodeExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.applyDefault,\n () => {\n ce(t.applyDefault) && (n.applyDefault.value = t.applyDefault);\n }\n ), de(\n n.applyDefault,\n (h, d, w) => {\n n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), w(() => {\n n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n o.run(() => {\n const h = async (d) => {\n let w = d;\n Ae(t.autoConnect) && (w = await t.autoConnect(d)), w !== !1 && n.addEdges([w]);\n };\n de(\n () => t.autoConnect,\n () => {\n ce(t.autoConnect) && (n.autoConnect.value = t.autoConnect);\n }\n ), de(\n n.autoConnect,\n (d, w, y) => {\n d ? n.onConnect(h) : n.hooks.value.connect.off(h), y(() => {\n n.hooks.value.connect.off(h);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n const h = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n Object.keys(t).forEach((d) => {\n if (!h.includes(d)) {\n const w = M(t, d), y = n[d];\n o.run(() => {\n de(\n w,\n (S) => {\n ce(S) && (y.value = S);\n },\n { flush: \"pre\" }\n );\n });\n }\n });\n }\n ].forEach((h) => h());\n }), () => o.stop();\n}\nfunction fi(e, t) {\n return {\n x: e.clientX - t.left,\n y: e.clientY - t.top\n };\n}\nconst rd = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n}, ad = /* @__PURE__ */ ge({\n ...rd,\n props: {\n isSelecting: { type: Boolean }\n },\n setup(e) {\n const {\n id: t,\n vueFlowRef: n,\n getNodes: o,\n getEdges: i,\n viewport: r,\n emits: a,\n userSelectionActive: s,\n removeSelectedElements: l,\n panOnDrag: u,\n userSelectionRect: c,\n elementsSelectable: v,\n nodesSelectionActive: g,\n addSelectedElements: x,\n getSelectedEdges: h,\n getSelectedNodes: d,\n removeNodes: w,\n removeEdges: y,\n selectionMode: S,\n deleteKeyCode: V,\n multiSelectionKeyCode: p,\n multiSelectionActive: N\n } = fe(), T = ie(null), _ = ie(0), P = ie(0), R = ie(), $ = J(() => v.value && (e.isSelecting || s.value));\n _t(V, (z) => {\n if (!z)\n return;\n const W = o.value.reduce((B, q) => ((!q.selected && q.parentNode && B.find((te) => te.id === q.parentNode) || q.selected) && B.push(q), B), []);\n (W || h.value) && (h.value.length > 0 && y(h.value), W.length > 0 && w(W), g.value = !1, l());\n }), _t(p, (z) => {\n N.value = z;\n });\n function D() {\n s.value = !1, c.value = null, _.value = 0, P.value = 0;\n }\n function Q(z) {\n z.target !== T.value || $.value || (a.paneClick(z), l(), g.value = !1);\n }\n function ee(z) {\n var W;\n if (z.target === T.value) {\n if (Array.isArray(u.value) && ((W = u.value) != null && W.includes(2))) {\n z.preventDefault();\n return;\n }\n a.paneContextMenu(z);\n }\n }\n function m(z) {\n z.target === T.value && a.paneScroll(z);\n }\n function A(z) {\n if (R.value = n.value.getBoundingClientRect(), !$.value || !v || !e.isSelecting || z.button !== 0 || z.target !== T.value || !R.value)\n return;\n const { x: W, y: B } = fi(z, R.value);\n l(), c.value = {\n width: 0,\n height: 0,\n startX: W,\n startY: B,\n x: W,\n y: B\n }, s.value = !0, a.selectionStart(z);\n }\n function E(z) {\n if (!$.value)\n return a.paneMouseMove(z);\n if (!e.isSelecting || !R.value || !c.value)\n return;\n s.value || (s.value = !0), g.value && (g.value = !1);\n const W = fi(z, R.value), B = c.value.startX ?? 0, q = c.value.startY ?? 0, te = {\n ...c.value,\n x: W.x < B ? W.x : B,\n y: W.y < q ? W.y : q,\n width: Math.abs(W.x - B),\n height: Math.abs(W.y - q)\n }, re = Ci(\n o.value,\n c.value,\n r.value,\n S.value === fo.Partial\n ), k = sn(re, i.value);\n _.value = re.length, P.value = k.length, c.value = te, x([...re, ...k]);\n }\n function G(z) {\n $.value && z.button === 0 && (!s.value && c.value && z.target === T.value && Q(z), g.value = _.value > 0, D(), a.selectionEnd(z));\n }\n function Z(z) {\n var W;\n if (!$.value)\n return a.paneMouseLeave(z);\n s.value && (g.value = _.value > 0, (W = a.selectionEnd) == null || W.call(a, z)), D();\n }\n function K(z) {\n $.value || a.paneMouseEnter(z);\n }\n return (z, W) => (oe(), se(\"div\", {\n ref_key: \"container\",\n ref: T,\n key: `pane-${C(t)}`,\n class: Ke([\"vue-flow__pane vue-flow__container\", { selection: e.isSelecting }]),\n onClick: Q,\n onContextmenu: ee,\n onWheelPassive: m,\n onMouseenter: K,\n onMousedown: A,\n onMousemove: E,\n onMouseup: G,\n onMouseleave: Z\n }, [\n xe(z.$slots, \"default\"),\n C(s) && C(c) ? (oe(), ze(au, { key: 0 })) : Ee(\"\", !0),\n C(g) && C(d).length ? (oe(), ze(iu, { key: 1 })) : Ee(\"\", !0)\n ], 34));\n }\n}), sd = { class: \"vue-flow__nodes vue-flow__container\" }, ld = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n}, ud = /* @__PURE__ */ ge({\n ...ld,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"nodesDraggable\"), i = M(n, \"nodesFocusable\"), r = M(n, \"elementsSelectable\"), a = M(n, \"nodesConnectable\"), s = M(n, \"getNodes\"), l = M(n, \"getNodesInitialized\"), u = M(n, \"getNodeTypes\"), c = M(n, \"updateNodeDimensions\"), v = M(n, \"emits\");\n let g = ie();\n ye(() => s.value.length > 0 && l.value.length === s.value.length).toBe(!0).then(() => {\n Ue(() => {\n v.value.nodesInitialized(l.value);\n });\n }), Ve(() => {\n g.value = new ResizeObserver((S) => {\n const V = S.map((p) => ({\n id: p.target.getAttribute(\"data-id\"),\n nodeElement: p.target,\n forceUpdate: !0\n }));\n c.value(V);\n });\n }), gi(() => {\n var S;\n return (S = g.value) == null ? void 0 : S.disconnect();\n });\n function x(S) {\n return typeof S > \"u\" ? o.value : S;\n }\n function h(S) {\n return typeof S > \"u\" ? r.value : S;\n }\n function d(S) {\n return typeof S > \"u\" ? a.value : S;\n }\n function w(S) {\n return typeof S > \"u\" ? i.value : S;\n }\n function y(S, V) {\n const p = S || \"default\";\n let N = V ?? u.value[p];\n const T = on();\n if (typeof N == \"string\" && T) {\n const P = Object.keys(T.appContext.components);\n P && P.includes(p) && (N = pi(p, !1));\n }\n if (typeof N != \"string\")\n return N;\n const _ = t == null ? void 0 : t[`node-${p}`];\n return _ || (v.value.error(new ve(he.NODE_TYPE_MISSING, N)), !1);\n }\n return (S, V) => (oe(), se(\"div\", sd, [\n C(g) ? (oe(!0), se(Ce, { key: 0 }, dt(C(s), (p) => (oe(), ze(C(Tl), {\n id: p.id,\n key: p.id,\n \"resize-observer\": C(g),\n type: y(p.type, p.template),\n name: p.type || \"default\",\n draggable: x(p.draggable),\n selectable: h(p.selectable),\n connectable: d(p.connectable),\n focusable: w(p.focusable),\n node: p\n }, null, 8, [\"id\", \"resize-observer\", \"type\", \"name\", \"draggable\", \"selectable\", \"connectable\", \"focusable\", \"node\"]))), 128)) : Ee(\"\", !0)\n ]));\n }\n}), cd = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"], dd = [\"stroke\", \"stroke-width\", \"fill\"], fd = [\"stroke\", \"stroke-width\"], hd = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n}, gd = /* @__PURE__ */ ge({\n ...hd,\n props: {\n id: null,\n type: null,\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(e) {\n return (t, n) => (oe(), se(\"marker\", {\n id: e.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${e.width}`,\n markerHeight: `${e.height}`,\n markerUnits: e.markerUnits,\n orient: e.orient\n }, [\n e.type === C(Yn).ArrowClosed ? (oe(), se(\"polyline\", {\n key: 0,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: e.color,\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 8, dd)) : Ee(\"\", !0),\n e.type === C(Yn).Arrow ? (oe(), se(\"polyline\", {\n key: 1,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 8, fd)) : Ee(\"\", !0)\n ], 8, cd));\n }\n}), vd = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n}, md = /* @__PURE__ */ ge({\n ...vd,\n setup(e) {\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"connectionLineOptions\"), r = M(t, \"defaultMarkerColor\"), a = J(() => {\n const s = [], l = [], u = (c) => {\n if (c) {\n const v = Xe(c, n.value);\n s.includes(v) || (typeof c == \"object\" ? l.push({ ...c, id: v, color: c.color || r.value }) : l.push({ id: v, color: r.value, type: c }), s.push(v));\n }\n };\n return [i.value.markerEnd, i.value.markerStart].forEach(u), o.value.reduce((c, v) => ([v.markerStart, v.markerEnd].forEach(u), c.sort((g, x) => g.id.localeCompare(x.id))), l), l;\n });\n return (s, l) => (oe(), se(\"defs\", null, [\n (oe(!0), se(Ce, null, dt(C(a), (u) => (oe(), ze(gd, {\n id: u.id,\n key: u.id,\n type: u.type,\n color: u.color,\n width: u.width,\n height: u.height,\n markerUnits: u.markerUnits,\n \"stroke-width\": u.strokeWidth,\n orient: u.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]))), 128))\n ]));\n }\n}), pd = {\n key: 0,\n class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\"\n}, yd = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n}, xd = /* @__PURE__ */ ge({\n ...yd,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"connectionStartHandle\"), i = M(n, \"nodesConnectable\"), r = M(n, \"edgesUpdatable\"), a = M(n, \"edgesFocusable\"), s = M(n, \"elementsSelectable\"), l = M(n, \"getSelectedNodes\"), u = M(n, \"findNode\"), c = M(n, \"edges\"), v = M(n, \"getEdges\"), g = M(n, \"getNodesInitialized\"), x = M(n, \"getEdgeTypes\"), h = M(n, \"elevateEdgesOnSelect\"), d = M(n, \"dimensions\"), w = M(n, \"emits\"), y = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P;\n return (P = o.value) != null && P.nodeId ? u.value(o.value.nodeId) : !1;\n }\n ), S = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P, R;\n return !!(y.value && (typeof y.value.connectable > \"u\" ? i.value : y.value.connectable) && ((P = o.value) != null && P.nodeId) && ((R = o.value) != null && R.type));\n }\n ), V = Sn(\n [\n () => c.value.map((P) => P.zIndex),\n () => h.value ? [l.value.length] : [0],\n () => h.value ? g.value.map((P) => P.computedPosition.z) : []\n ],\n () => Ea(v.value, u.value, h.value)\n );\n function p(P) {\n return typeof P > \"u\" ? s.value : P;\n }\n function N(P) {\n return typeof P > \"u\" ? r.value : P;\n }\n function T(P) {\n return typeof P > \"u\" ? a.value : P;\n }\n function _(P, R) {\n const $ = P || \"default\";\n let D = R ?? x.value[$];\n const Q = on();\n if (typeof D == \"string\" && Q) {\n const m = Object.keys(Q.appContext.components);\n m && m.includes($) && (D = pi($, !1));\n }\n if (D && typeof D != \"string\")\n return D;\n const ee = t == null ? void 0 : t[`edge-${$}`];\n return ee || (w.value.error(new ve(he.EDGE_TYPE_MISSING, D)), !1);\n }\n return (P, R) => C(d).width && C(d).height ? (oe(), se(Ce, { key: 0 }, [\n (oe(!0), se(Ce, null, dt(C(V), ($) => (oe(), se(\"svg\", {\n key: $.level,\n class: \"vue-flow__edges vue-flow__container\",\n style: Le(`z-index: ${$.level}`)\n }, [\n $.isMaxLevel ? (oe(), ze(md, { key: 0 })) : Ee(\"\", !0),\n ct(\"g\", null, [\n (oe(!0), se(Ce, null, dt($.edges, (D) => (oe(), ze(C(Kl), {\n id: D.id,\n key: D.id,\n edge: D,\n type: _(D.type, D.template),\n name: D.type || \"default\",\n selectable: p(D.selectable),\n updatable: N(D.updatable),\n focusable: T(D.focusable)\n }, null, 8, [\"id\", \"edge\", \"type\", \"name\", \"selectable\", \"updatable\", \"focusable\"]))), 128))\n ])\n ], 4))), 128)),\n C(S) && C(y) ? (oe(), se(\"svg\", pd, [\n qe(tu, { \"source-node\": C(y) }, null, 8, [\"source-node\"])\n ])) : Ee(\"\", !0)\n ], 64)) : Ee(\"\", !0);\n }\n}), _d = /* @__PURE__ */ ct(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1), wd = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n}, bd = /* @__PURE__ */ ge({\n ...wd,\n setup(e) {\n const { id: t, viewport: n, emits: o, d3Zoom: i, d3Selection: r, dimensions: a, ...s } = fe(), l = ie(!oo);\n return ye(() => i.value && r.value && a.value.width > 0 && a.value.height > 0).toBeTruthy().then(() => {\n o.paneReady({\n id: t,\n viewport: n,\n emits: o,\n d3Zoom: i,\n d3Selection: r,\n dimensions: a,\n ...s\n }), setTimeout(() => {\n l.value = !0;\n }, 0);\n }), (u, c) => (oe(), se(\"div\", {\n key: `transform-${C(t)}`,\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: Le({\n transform: `translate(${C(n).x}px,${C(n).y}px) scale(${C(n).zoom})`,\n opacity: C(l) ? void 0 : 0\n })\n }, [\n qe(xd),\n _d,\n qe(ud),\n xe(u.$slots, \"default\")\n ], 4));\n }\n}), Ed = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n}, Sd = /* @__PURE__ */ ge({\n ...Ed,\n setup(e) {\n const {\n id: t,\n minZoom: n,\n maxZoom: o,\n defaultViewport: i,\n translateExtent: r,\n dimensions: a,\n zoomActivationKeyCode: s,\n selectionKeyCode: l,\n panActivationKeyCode: u,\n panOnScroll: c,\n panOnScrollMode: v,\n panOnScrollSpeed: g,\n panOnDrag: x,\n zoomOnDoubleClick: h,\n zoomOnPinch: d,\n zoomOnScroll: w,\n preventScrolling: y,\n noWheelClassName: S,\n noPanClassName: V,\n emits: p,\n connectionStartHandle: N,\n userSelectionActive: T,\n paneDragging: _,\n d3Zoom: P,\n d3Selection: R,\n d3ZoomHandler: $,\n viewport: D,\n viewportRef: Q\n } = fe(), ee = ie(), m = ie(!1), A = ie(!1);\n let E = !1, G = 0, Z = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const K = _t(u), z = J(() => !m.value && x.value && K.value), W = J(\n () => l.value !== !0 && m.value || l.value === !0 && !z.value\n );\n Ve(() => {\n oa(ee, re);\n const H = ao();\n ro(H, \"resize\", re);\n }), Ve(() => {\n const H = ee.value, f = H.getBoundingClientRect(), b = ed().scaleExtent([n.value, o.value]).translateExtent(r.value), L = we(H).call(b), I = L.on(\"wheel.zoom\"), F = et.translate(i.value.x ?? 0, i.value.y ?? 0).scale(je(i.value.zoom ?? 1, n.value, o.value)), U = [\n [0, 0],\n [f.width, f.height]\n ], Y = b.constrain()(F, U, r.value);\n b.transform(L, Y), P.value = b, R.value = L, $.value = I, D.value = { x: Y.x, y: Y.y, zoom: Y.k }, Q.value = H, _t(l, (O) => {\n m.value = O;\n });\n const ne = _t(s);\n bo(() => {\n m.value && T.value && !A.value ? b.on(\"zoom\", null) : !m.value && !T.value && b.on(\"zoom\", (O) => {\n D.value = { x: O.transform.x, y: O.transform.y, zoom: O.transform.k };\n const ae = te(O.transform);\n E = B(x.value, G ?? 0), p.viewportChange(ae), p.move({ event: O, flowTransform: ae });\n });\n }), b.on(\"start\", (O) => {\n var me;\n if (!O.sourceEvent)\n return null;\n G = O.sourceEvent.button, A.value = !0;\n const ae = te(O.transform);\n ((me = O.sourceEvent) == null ? void 0 : me.type) === \"mousedown\" && (_.value = !0), Z = ae, p.viewportChangeStart(ae), p.moveStart({ event: O, flowTransform: ae });\n }), b.on(\"end\", (O) => {\n if (!O.sourceEvent)\n return null;\n if (A.value = !1, _.value = !1, B(x.value, G ?? 0) && !E && p.paneContextMenu(O.sourceEvent), E = !1, q(Z, O.transform)) {\n const ae = te(O.transform);\n Z = ae, p.viewportChangeEnd(ae), p.moveEnd({ event: O, flowTransform: ae });\n }\n }), bo(() => {\n c.value && !ne.value && !T.value ? L.on(\n \"wheel.zoom\",\n (O) => {\n if (k(O, S.value))\n return !1;\n O.preventDefault(), O.stopImmediatePropagation();\n const ae = L.property(\"__zoom\").k || 1;\n if (O.ctrlKey && d.value) {\n const Tt = Ne(O), _r = -O.deltaY * (O.deltaMode === 1 ? 0.05 : O.deltaMode ? 1 : 2e-3) * 10, wr = ae * 2 ** _r;\n b.scaleTo(L, wr, Tt);\n return;\n }\n const me = O.deltaMode === 1 ? 20 : 1, En = v.value === Ut.Vertical ? 0 : O.deltaX * me, Ot = v.value === Ut.Horizontal ? 0 : O.deltaY * me;\n b.translateBy(\n L,\n -(En / ae) * g.value,\n -(Ot / ae) * g.value\n );\n },\n { passive: !1 }\n ) : typeof I < \"u\" && L.on(\n \"wheel.zoom\",\n function(O, ae) {\n if (!y.value || k(O, S.value))\n return null;\n O.preventDefault(), I.call(this, O, ae);\n },\n { passive: !1 }\n );\n }), b.filter((O) => {\n var Ot, Tt;\n const ae = ne.value || w.value, me = d.value && O.ctrlKey;\n if (O.button === 1 && O.type === \"mousedown\" && ((Ot = O.target) != null && Ot.closest(\".vue-flow__node\") || (Tt = O.target) != null && Tt.closest(\".vue-flow__edge\")))\n return !0;\n if (!x.value && !ae && !c.value && !h.value && !d.value || T.value || !h.value && O.type === \"dblclick\" || k(O, S.value) && O.type === \"wheel\" || k(O, V.value) && O.type !== \"wheel\" || !d.value && O.ctrlKey && O.type === \"wheel\" || !ae && !c.value && !me && O.type === \"wheel\" || !x.value && (O.type === \"mousedown\" || O.type === \"touchstart\") || Array.isArray(x.value) && !x.value.includes(O.button) && (O.type === \"mousedown\" || O.type === \"touchstart\"))\n return !1;\n const En = Array.isArray(x.value) && x.value.includes(O.button) || !O.button || O.button <= 1;\n return (!O.ctrlKey || O.type === \"wheel\") && En;\n });\n });\n function B(H, f) {\n return f === 2 && Array.isArray(H) && H.includes(2);\n }\n function q(H, f) {\n return H.x !== f.x && !isNaN(f.x) || H.y !== f.y && !isNaN(f.y) || H.zoom !== f.k && !isNaN(f.k);\n }\n function te(H) {\n return {\n x: H.x,\n y: H.y,\n zoom: H.k\n };\n }\n function re() {\n if (!ee.value)\n return;\n const { width: H, height: f } = rn(ee.value);\n (H === 0 || f === 0) && p.error(new ve(he.MISSING_VIEWPORT_DIMENSIONS)), a.value.width = H || 500, a.value.height = f || 500;\n }\n function k(H, f) {\n return H.target.closest(`.${f}`);\n }\n return (H, f) => (oe(), se(Ce, null, [\n (oe(), se(\"div\", {\n ref_key: \"viewportEl\",\n ref: ee,\n key: `viewport-${C(t)}`,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n qe(ad, {\n \"is-selecting\": C(W),\n class: Ke({ connecting: !!C(N), dragging: C(_), draggable: !!C(x) })\n }, {\n default: Fe(() => [\n qe(bd, null, {\n default: Fe(() => [\n xe(H.$slots, \"zoom-pane\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"class\"])\n ])),\n xe(H.$slots, \"default\")\n ], 64));\n }\n}), Nd = [\"id\"], Cd = [\"id\"], Md = [\"id\"], $d = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n}, kd = /* @__PURE__ */ ge({\n ...$d,\n setup(e) {\n const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = fe(), i = {\n position: \"absolute\",\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: \"hidden\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n clipPath: \"inset(100%)\"\n };\n return (r, a) => (oe(), se(Ce, null, [\n ct(\"div\", {\n id: `${C(Qi)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select a node. \" + Vn(C(n) ? \"\" : \"You can then use the arrow keys to move the node around.\") + \" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. \", 9, Nd),\n ct(\"div\", {\n id: `${C(Ji)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, Cd),\n C(n) ? Ee(\"\", !0) : (oe(), se(\"div\", {\n key: 0,\n id: `${C(Ml)}-${C(t)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n style: i\n }, Vn(C(o)), 9, Md))\n ], 64));\n }\n}), Od = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n}, Ld = /* @__PURE__ */ ge({\n ...Od,\n props: {\n id: null,\n modelValue: null,\n nodes: null,\n edges: null,\n edgeTypes: null,\n nodeTypes: null,\n connectionMode: null,\n connectionLineType: null,\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: null,\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: null,\n selectionKeyCode: null,\n multiSelectionKeyCode: null,\n zoomActivationKeyCode: null,\n panActivationKeyCode: null,\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: null,\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: null,\n maxZoom: null,\n defaultViewport: null,\n translateExtent: null,\n nodeExtent: null,\n defaultMarkerColor: null,\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: null,\n panOnScrollMode: null,\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: null,\n edgeUpdaterRadius: null,\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: null,\n noWheelClassName: null,\n noPanClassName: null,\n defaultEdgeOptions: null,\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n __experimentalFeatures: null\n },\n emits: [\"nodesChange\", \"edgesChange\", \"nodeDoubleClick\", \"nodeClick\", \"nodeMouseEnter\", \"nodeMouseMove\", \"nodeMouseLeave\", \"nodeContextMenu\", \"nodeDragStart\", \"nodeDrag\", \"nodeDragStop\", \"nodesInitialized\", \"miniMapNodeClick\", \"miniMapNodeDoubleClick\", \"miniMapNodeMouseEnter\", \"miniMapNodeMouseMove\", \"miniMapNodeMouseLeave\", \"connect\", \"connectStart\", \"connectEnd\", \"clickConnectStart\", \"clickConnectEnd\", \"moveStart\", \"move\", \"moveEnd\", \"selectionDragStart\", \"selectionDrag\", \"selectionDragStop\", \"selectionContextMenu\", \"selectionStart\", \"selectionEnd\", \"viewportChangeStart\", \"viewportChange\", \"viewportChangeEnd\", \"paneReady\", \"paneScroll\", \"paneClick\", \"paneContextMenu\", \"paneMouseEnter\", \"paneMouseMove\", \"paneMouseLeave\", \"edgeContextMenu\", \"edgeMouseEnter\", \"edgeMouseMove\", \"edgeMouseLeave\", \"edgeDoubleClick\", \"edgeClick\", \"edgeUpdateStart\", \"edgeUpdate\", \"edgeUpdateEnd\", \"updateNodeInternals\", \"error\", \"update:modelValue\", \"update:nodes\", \"update:edges\"],\n setup(e, { expose: t, emit: n }) {\n const o = e, i = yt(o, \"modelValue\", n), r = yt(o, \"nodes\", n), a = yt(o, \"edges\", n), { vueFlowRef: s, hooks: l, getNodeTypes: u, getEdgeTypes: c, ...v } = fe(o), g = id({ modelValue: i, nodes: r, edges: a }, o, {\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n });\n da(n, l);\n const x = ie();\n return ut(ln, Ir()), Pr(() => {\n g();\n }), Ve(() => {\n s.value = x.value;\n }), t({\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n }), (h, d) => (oe(), se(\"div\", {\n ref_key: \"el\",\n ref: x,\n class: \"vue-flow\"\n }, [\n qe(Sd, null, {\n nodes: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(u)), (w) => xe(h.$slots, `node-${w}`)), 256))\n ]),\n edges: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(c)), (w) => xe(h.$slots, `edge-${w}`)), 256))\n ]),\n \"connection-name\": Fe(() => [\n xe(h.$slots, \"connection-line\")\n ]),\n \"zoom-pane\": Fe(() => [\n xe(h.$slots, \"zoom-pane\")\n ]),\n default: Fe(() => [\n xe(h.$slots, \"default\")\n ]),\n _: 3\n }),\n qe(kd)\n ], 512));\n }\n}), Td = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n}, Gd = /* @__PURE__ */ ge({\n ...Td,\n props: {\n position: null\n },\n setup(e) {\n const t = e, { userSelectionActive: n } = fe(), o = J(() => `${t.position}`.split(\"-\"));\n return (i, r) => (oe(), se(\"div\", {\n class: Ke([\"vue-flow__panel\", C(o)]),\n style: Le({ pointerEvents: C(n) ? \"none\" : \"all\" })\n }, [\n xe(i.$slots, \"default\")\n ], 6));\n }\n}), Bn = 0.1, Fd = (e) => {\n const t = fe({ id: e }), n = M(t, \"nodes\"), o = M(t, \"d3Zoom\"), i = M(t, \"d3Selection\"), r = M(t, \"dimensions\"), a = M(t, \"translateExtent\"), s = M(t, \"minZoom\"), l = M(t, \"maxZoom\"), u = M(t, \"viewport\"), c = M(t, \"snapToGrid\"), v = M(t, \"snapGrid\"), g = M(t, \"getNodes\");\n return {\n zoomIn: (d) => {\n x(1.2, d == null ? void 0 : d.duration);\n },\n zoomOut: (d) => {\n x(1 / 1.2, d == null ? void 0 : d.duration);\n },\n zoomTo: (d, w) => {\n i.value && o.value && o.value.scaleTo(Rn(i.value, w == null ? void 0 : w.duration), d);\n },\n setTransform: (d, w) => {\n h(d.x, d.y, d.zoom, w == null ? void 0 : w.duration);\n },\n getTransform: () => ({\n x: u.value.x,\n y: u.value.y,\n zoom: u.value.zoom\n }),\n fitView: (d = {\n padding: Bn,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!n.value.length)\n return;\n const w = (d.includeHiddenNodes ? n.value : g.value).filter((N) => {\n var P;\n const T = N.initialized && N.dimensions.width && N.dimensions.height;\n let _ = !0;\n return (P = d.nodes) != null && P.length && (_ = d.nodes.includes(N.id)), T && _;\n }), y = co(w), { x: S, y: V, zoom: p } = Zt(\n y,\n r.value.width,\n r.value.height,\n d.minZoom ?? s.value,\n d.maxZoom ?? l.value,\n d.padding ?? Bn,\n d.offset\n );\n h(S, V, p, d == null ? void 0 : d.duration);\n },\n setCenter: (d, w, y) => {\n const S = typeof (y == null ? void 0 : y.zoom) < \"u\" ? y.zoom : l.value, V = r.value.width / 2 - d * S, p = r.value.height / 2 - w * S;\n h(V, p, S, y == null ? void 0 : y.duration);\n },\n fitBounds: (d, w = { padding: Bn }) => {\n const { x: y, y: S, zoom: V } = Zt(d, r.value.width, r.value.height, s.value, l.value, w.padding);\n h(y, S, V, w == null ? void 0 : w.duration);\n },\n project: (d) => uo(d, u.value, c.value, v.value)\n };\n function x(d, w) {\n i.value && o.value && o.value.scaleBy(Rn(i.value, w), d);\n }\n function h(d, w, y, S) {\n const { x: V, y: p } = so({ x: -d, y: -w }, a.value), N = et.translate(-V, -p).scale(y);\n i.value && o.value && o.value.transform(Rn(i.value, S), N);\n }\n};\nfunction Rn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Yd(e) {\n const t = e ?? He(Oi, \"\"), n = He(Ti, null), { findEdge: o, emits: i } = fe(), r = o(t);\n return r || i.error(new ve(he.EDGE_NOT_FOUND, t)), {\n id: t,\n edge: r,\n edgeEl: n\n };\n}\nexport {\n vn as BaseEdge,\n Bl as BezierEdge,\n Ye as ConnectionLineType,\n Qe as ConnectionMode,\n Rd as EdgeLabelRenderer,\n Al as EdgeText,\n he as ErrorCode,\n ot as GlobalVueFlowStorage,\n Kt as Handle,\n Yn as MarkerType,\n $i as NodeIdInjection,\n Ut as PanOnScrollMode,\n Gd as Panel,\n xa as PanelPosition,\n j as Position,\n fo as SelectionMode,\n Rl as SimpleBezierEdge,\n ir as SmoothStepEdge,\n Gl as StepEdge,\n Fl as StraightEdge,\n Ld as VueFlow,\n ve as VueFlowError,\n zo as VueFlowInjection,\n zd as addEdge,\n nn as applyChanges,\n Vd as applyEdgeChanges,\n Hd as applyNodeChanges,\n je as clamp,\n Ei as connectionExists,\n lu as defaultEdgeTypes,\n su as defaultNodeTypes,\n nr as getBezierEdgeCenter,\n Kn as getBezierPath,\n Bd as getBoundsofRects,\n sn as getConnectedEdges,\n Dd as getIncomers,\n Xe as getMarkerId,\n Ci as getNodesInside,\n Pd as getOutgoers,\n co as getRectOfNodes,\n or as getSimpleBezierPath,\n tr as getSimpleEdgeCenter,\n qn as getSmoothStepPath,\n rr as getStraightPath,\n Zt as getTransformForBounds,\n va as graphPosToZoomedPos,\n $e as isEdge,\n fa as isGraphEdge,\n nt as isGraphNode,\n xt as isNode,\n uo as pointToRendererPoint,\n va as rendererPointToPoint,\n Ad as updateEdge,\n Yd as useEdge,\n Ra as useGetPointerPosition,\n Di as useHandle,\n _a as useNode,\n fe as useVueFlow,\n Fd as useZoomPanHelper\n};\n","\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","import { App } from 'vue'\n\nimport NodeEditor from '@/components/NodeEditor.vue'\nimport StateEditor from '@/components/StateEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('NodeEditor', NodeEditor)\n\tapp.component('StateEditor', StateEditor)\n}\n\nexport { install, NodeEditor, StateEditor }\n"],"names":["Eo","oo","Dr","zr","Ae","Ie","Pe","Ar","C","Br","i","r","yi","Rr","ie","Er","So","Vr","Sn","a","de","s","l","u","br","v","g","Mt","hi","Vt","Hr","on","Ve","Ue","Hn","x","h","d","w","S","V","p","Sr","y","N","T","ye","No","Lr","Gr","Fr","Yr","Xr","Zr","Ur","Yt","xi","_i","Co","Wr","Kr","qr","tt","wi","io","ro","jr","Mo","Qr","Jr","Ln","Gn","$o","ea","ta","na","oa","ko","ia","Oo","ra","aa","To","sa","la","yt","J","X","ua","wt","ca","da","Nr","he","Nn","ve","ao","Io","Fn","rn","je","so","Po","$e","fa","xt","nt","ha","ga","it","ce","lo","an","Ei","va","uo","Si","Xt","Ni","co","Ci","sn","Zt","ma","Mi","Xe","o","pa","ya","Do","j","fo","Ye","Qe","Yn","zo","$i","ki","Oi","Ti","ln","_a","He","fe","ho","rt","n","Wt","Ao","wa","ba","Ea","Cn","Bo","Sa","Ro","Ii","Na","Ca","Vo","Pi","It","Di","_","P","R","$","D","Q","m","G","A","E","Z","Y","L","f","B","F","I","U","ne","W","b","K","q","z","te","k","H","ee","Ma","$a","ka","Kt","ge","M","oe","se","Ke","xe","un","ue","Oa","cn","Ta","dn","Ia","Ho","Pa","Mn","zi","Da","za","go","Ai","Aa","Ba","Ra","Lo","Xn","Va","fn","Ht","Ha","La","Go","Zn","Fo","hn","Ga","Fa","Bi","Ya","vo","Xa","_e","Za","Ua","Ri","Wa","Ka","Vi","Hi","qa","ja","Qa","Ja","es","ts","ns","os","is","Li","rs","qt","as","ss","ls","us","cs","ds","fs","hs","gs","vs","ms","ps","ys","xs","_s","ws","bs","Es","Ss","Ns","Cs","Ms","$s","ks","Os","Gi","Ts","Is","Ps","Ds","ft","zs","As","Bs","Rs","Fi","mo","Yi","Xi","Zi","Vs","Hs","Ls","Gs","Fs","Ys","Xs","Zs","Us","Ws","Ks","qs","js","Qs","Js","el","tl","nl","ol","il","rl","al","sl","ll","ul","cl","dl","fl","hl","gl","Ui","vl","ml","pl","yl","Wi","$t","xl","we","_l","Ne","wl","bt","$n","Ki","qi","Pt","Un","bl","El","Sl","Nl","Cl","ji","Qi","Ji","Ml","er","st","Wn","t","$l","kl","_t","Ol","ut","gi","Tl","Il","Pl","Dl","zl","Al","Le","Ee","ct","vi","Ce","Cr","Vn","ze","mi","gn","tr","nr","Dt","Yo","Kn","mn","Bl","Xo","or","pn","Rl","Zo","Vl","Uo","Hl","Ll","qn","yn","ir","xn","Gl","rr","_n","Fl","Yl","Xl","po","Wo","Zl","Ul","Wl","Kl","ql","jl","Rd","Mr","Ql","Jl","eu","tu","c","$r","nu","ou","iu","ru","au","su","lu","uu","ar","cu","yo","sr","kt","jt","lt","Me","du","fu","hu","gu","vu","mu","pu","Ko","qo","yu","xu","jo","lr","Qo","pe","zt","ti","_u","jn","We","Qt","Jo","wu","ei","Ze","be","bu","ni","At","ur","Eu","Su","Nu","cr","oi","Re","Qn","On","Cu","Mu","$u","ii","Jn","dr","Bt","ku","Ou","fr","Tu","Iu","Pu","ri","Du","zu","Au","ht","mt","gt","hr","Jt","pt","en","Je","wn","Ct","gr","xo","Bu","tn","vr","eo","Ru","ai","Hu","Vu","si","Lu","Gu","mr","li","to","Lt","ui","no","Gt","Fu","_o","Se","ke","Ft","Yu","Xu","Zu","Uu","wo","pr","Wu","Ku","qu","ju","Qu","Ju","ec","tc","nc","oc","ic","rc","ac","lc","uc","cc","dc","hc","gc","vc","mc","Be","pc","yc","wc","bc","Ec","Sc","Nc","Cc","Mc","yr","$c","kc","Oc","Tc","Ic","Pc","Dc","Ac","Bc","Rc","Vc","Hc","Lc","xr","Gc","Yc","Xc","Uc","Rt","De","et","Tn","vt","Kc","qc","ci","jc","Qc","Jc","ed","In","Ge","td","nd","Pn","Dn","nn","Te","di","zn","An","od","O","ae","me","ot","kr","Or","id","Tr","fi","rd","ad","ld","ud","pi","dt","cd","dd","hd","gd","vd","md","pd","yd","qe","wd","bd","Ed","Sd","bo","Tt","_r","wr","En","Ot","Fe","Nd","Cd","Md","$d","kd","Od","Ld","Ir","Pr","props","__props","emit","__emit","positionMap","Position","sourcePosition","computed","targetPosition","labelInput","ref","newLabel","showInput","lastClick","nodeOnClick","now","showLabelInput","nextTick","submitNewLabel","__default__","useVueFlow","labelOnClick","path","getBezierPath","containerClass","vueFlowInstance","hover","activeElementKey","vueFlowElements","activeElementIndex","elements","_elements","key","newValue","getNodes","onPaneReady","onMounted","handleKeypress","onBeforeUnmount","shiftTerminal","currentTerminal","shiftOutput","shiftInput","onWheel","$event","e","fitView","addNode","newNodePosition","makeEdge","activeNode","nodeId","edgeId","onConnect","onEdgeDoubleClick","labelChanged","states","stateHash","hasInputs","stateElements","edges","edgeKey","target","onElementsChange","idToLabel","label","install","app","NodeEditor","StateEditor"],"mappings":";AACA,IAAIA;AACJ,MAAMC,KAAK,OAAO,SAAS,KAAKC,KAAK,CAAC,MAAM,OAAO,IAAI,KAAKC,KAAK,CAAC,MAAM,OAAO,KAAK,WAAWC,KAAK,CAAC,MAAM,OAAO,KAAK,YAAYC,KAAK,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAK,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAK,MAAM;AAClN;A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AIgZ,EAAMhZ,EAAG,MAAM,KAAK,IACvCgZ,EAAMhZ,EAAG,MAAM,EAAEA,EAAG,KAAK,IAAI;AAAA,UAC5B,QAAQA,EAAG;AAAA,QAAA,KAIL4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,IAAI,CAAC;AAAA,QAAA,GAGGoZ,EAAApZ,EAAG,EAAE,IAAIA,EAAG;AAAA,MACvB;AAEA,eAASoX,KAAO4B,GAAO;AAElB,YAAAK,IAAQD,EAAUhC,CAAG;AAChB,iBAAA6B,KAAWD,EAAM5B,CAAG;AACrB,UAAAwB,EAAAS,CAAK,EAAE,GAAGJ,CAAO,IAAID,EAAM5B,CAAG,EAAE6B,CAAO;AAAA,MAEhD;AACA,MAAA3D,EAAK,qBAAqBsD,CAAM;AAAA,IAAA;;;;;;;;;;ACjHjC,SAASU,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,cAAcC,EAAU,GAClCD,EAAA,UAAU,eAAeE,EAAW;AACzC;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/node_editor/dist/node-editor.umd.cjs.map b/node_editor/dist/node-editor.umd.cjs.map index 40e6797f..84678247 100644 --- a/node_editor/dist/node-editor.umd.cjs.map +++ b/node_editor/dist/node-editor.umd.cjs.map @@ -1 +1 @@ -{"version":3,"file":"node-editor.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.21/node_modules/@vue-flow/core/dist/vue-flow-core.mjs","../src/components/EditableNode.vue","../src/components/EditableEdge.vue","../src/components/NodeEditor.vue","../src/components/StateEditor.vue","../src/index.ts"],"sourcesContent":["import { unref as C, ref as ie, watch as de, customRef as br, getCurrentScope as hi, onScopeDispose as Vt, getCurrentInstance as on, onMounted as Ve, nextTick as Ue, readonly as Er, isRef as Sr, computed as J, onBeforeMount as Nr, markRaw as it, inject as He, defineComponent as ge, toRef as M, openBlock as oe, createElementBlock as se, normalizeClass as Ke, renderSlot as xe, h as ue, provide as ut, onBeforeUnmount as gi, normalizeStyle as Le, createCommentVNode as Ee, createElementVNode as ct, mergeProps as vi, createBlock as ze, resolveDynamicComponent as mi, Fragment as Ce, createTextVNode as Cr, toDisplayString as Vn, Teleport as Mr, normalizeProps as $r, reactive as kr, toRefs as Or, effectScope as Tr, renderList as dt, resolveComponent as pi, createVNode as qe, watchEffect as bo, withCtx as Fe, useSlots as Ir, onUnmounted as Pr } from \"vue\";\nvar Eo;\nconst oo = typeof window < \"u\", Dr = (e) => typeof e < \"u\", zr = (e) => typeof e == \"boolean\", Ae = (e) => typeof e == \"function\", Ie = (e) => typeof e == \"number\", Pe = (e) => typeof e == \"string\", Ar = () => {\n};\noo && ((Eo = window == null ? void 0 : window.navigator) != null && Eo.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction le(e) {\n return typeof e == \"function\" ? e() : C(e);\n}\nfunction Br(e, t) {\n function n(...o) {\n return new Promise((i, r) => {\n Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(i).catch(r);\n });\n }\n return n;\n}\nconst yi = (e) => e();\nfunction Rr(e = yi) {\n const t = ie(!0);\n function n() {\n t.value = !1;\n }\n function o() {\n t.value = !0;\n }\n const i = (...r) => {\n t.value && e(...r);\n };\n return { isActive: Er(t), pause: n, resume: o, eventFilter: i };\n}\nfunction So(e, t = !1, n = \"Timeout\") {\n return new Promise((o, i) => {\n setTimeout(t ? () => i(n) : o, e);\n });\n}\nfunction Vr(e) {\n return e;\n}\nfunction Sn(e, t) {\n let n, o, i;\n const r = ie(!0), a = () => {\n r.value = !0, i();\n };\n de(e, a, { flush: \"sync\" });\n const s = Ae(t) ? t : t.get, l = Ae(t) ? void 0 : t.set, u = br((c, v) => (o = c, i = v, {\n get() {\n return r.value && (n = s(), r.value = !1), o(), n;\n },\n set(g) {\n l == null || l(g);\n }\n }));\n return Object.isExtensible(u) && (u.trigger = a), u;\n}\nfunction Mt(e) {\n return hi() ? (Vt(e), !0) : !1;\n}\nfunction Hr(e, t = !0) {\n on() ? Ve(e) : t ? e() : Ue(e);\n}\nfunction Hn(e, t = !1) {\n function n(v, { flush: g = \"sync\", deep: x = !1, timeout: h, throwOnTimeout: d } = {}) {\n let w = null;\n const S = [new Promise((V) => {\n w = de(e, (p) => {\n v(p) !== t && (w == null || w(), V(p));\n }, {\n flush: g,\n deep: x,\n immediate: !0\n });\n })];\n return h != null && S.push(So(h, d).then(() => le(e)).finally(() => w == null ? void 0 : w())), Promise.race(S);\n }\n function o(v, g) {\n if (!Sr(v))\n return n((p) => p === v, g);\n const { flush: x = \"sync\", deep: h = !1, timeout: d, throwOnTimeout: w } = g ?? {};\n let y = null;\n const V = [new Promise((p) => {\n y = de([e, v], ([N, T]) => {\n t !== (N === T) && (y == null || y(), p(N));\n }, {\n flush: x,\n deep: h,\n immediate: !0\n });\n })];\n return d != null && V.push(So(d, w).then(() => le(e)).finally(() => (y == null || y(), le(e)))), Promise.race(V);\n }\n function i(v) {\n return n((g) => Boolean(g), v);\n }\n function r(v) {\n return o(null, v);\n }\n function a(v) {\n return o(void 0, v);\n }\n function s(v) {\n return n(Number.isNaN, v);\n }\n function l(v, g) {\n return n((x) => {\n const h = Array.from(x);\n return h.includes(v) || h.includes(le(v));\n }, g);\n }\n function u(v) {\n return c(1, v);\n }\n function c(v = 1, g) {\n let x = -1;\n return n(() => (x += 1, x >= v), g);\n }\n return Array.isArray(le(e)) ? {\n toMatch: n,\n toContains: l,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n } : {\n toMatch: n,\n toBe: o,\n toBeTruthy: i,\n toBeNull: r,\n toBeNaN: s,\n toBeUndefined: a,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n };\n}\nfunction ye(e) {\n return Hn(e);\n}\nvar No = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Gr = Object.prototype.propertyIsEnumerable, Fr = (e, t) => {\n var n = {};\n for (var o in e)\n Lr.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && No)\n for (var o of No(e))\n t.indexOf(o) < 0 && Gr.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction Yr(e, t, n = {}) {\n const o = n, {\n eventFilter: i = yi\n } = o, r = Fr(o, [\n \"eventFilter\"\n ]);\n return de(e, Br(i, t), r);\n}\nvar Xr = Object.defineProperty, Zr = Object.defineProperties, Ur = Object.getOwnPropertyDescriptors, Yt = Object.getOwnPropertySymbols, xi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, Co = (e, t, n) => t in e ? Xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wr = (e, t) => {\n for (var n in t || (t = {}))\n xi.call(t, n) && Co(e, n, t[n]);\n if (Yt)\n for (var n of Yt(t))\n _i.call(t, n) && Co(e, n, t[n]);\n return e;\n}, Kr = (e, t) => Zr(e, Ur(t)), qr = (e, t) => {\n var n = {};\n for (var o in e)\n xi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && Yt)\n for (var o of Yt(e))\n t.indexOf(o) < 0 && _i.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction tt(e, t, n = {}) {\n const o = n, {\n eventFilter: i\n } = o, r = qr(o, [\n \"eventFilter\"\n ]), { eventFilter: a, pause: s, resume: l, isActive: u } = Rr(i);\n return { stop: Yr(e, t, Kr(Wr({}, r), {\n eventFilter: a\n })), pause: s, resume: l, isActive: u };\n}\nfunction wi(e) {\n var t;\n const n = le(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst io = oo ? window : void 0;\nfunction ro(...e) {\n let t, n, o, i;\n if (Pe(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = io) : [t, n, o, i] = e, !t)\n return Ar;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const r = [], a = () => {\n r.forEach((c) => c()), r.length = 0;\n }, s = (c, v, g, x) => (c.addEventListener(v, g, x), () => c.removeEventListener(v, g, x)), l = de(() => [wi(t), le(i)], ([c, v]) => {\n a(), c && r.push(...n.flatMap((g) => o.map((x) => s(c, g, x, v))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n l(), a();\n };\n return Mt(u), u;\n}\nconst jr = (e) => typeof e == \"function\" ? e : typeof e == \"string\" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;\nfunction Mo(...e) {\n let t, n, o = {};\n e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == \"object\" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);\n const { target: i = io, eventName: r = \"keydown\", passive: a = !1 } = o, s = jr(t);\n return ro(i, r, (u) => {\n s(u) && n(u);\n }, a);\n}\nfunction Qr(e, t = !1) {\n const n = ie(), o = () => n.value = Boolean(e());\n return o(), Hr(o, t), n;\n}\nfunction Jr(e) {\n return JSON.parse(JSON.stringify(e));\n}\nconst Ln = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Gn = \"__vueuse_ssr_handlers__\";\nLn[Gn] = Ln[Gn] || {};\nLn[Gn];\nvar $o = Object.getOwnPropertySymbols, ea = Object.prototype.hasOwnProperty, ta = Object.prototype.propertyIsEnumerable, na = (e, t) => {\n var n = {};\n for (var o in e)\n ea.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && $o)\n for (var o of $o(e))\n t.indexOf(o) < 0 && ta.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction oa(e, t, n = {}) {\n const o = n, { window: i = io } = o, r = na(o, [\"window\"]);\n let a;\n const s = Qr(() => i && \"ResizeObserver\" in i), l = () => {\n a && (a.disconnect(), a = void 0);\n }, u = de(() => wi(e), (v) => {\n l(), s.value && i && v && (a = new ResizeObserver(t), a.observe(v, r));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n l(), u();\n };\n return Mt(c), {\n isSupported: s,\n stop: c\n };\n}\nvar ko;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(ko || (ko = {}));\nvar ia = Object.defineProperty, Oo = Object.getOwnPropertySymbols, ra = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, To = (e, t, n) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t) => {\n for (var n in t || (t = {}))\n ra.call(t, n) && To(e, n, t[n]);\n if (Oo)\n for (var n of Oo(t))\n aa.call(t, n) && To(e, n, t[n]);\n return e;\n};\nconst la = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nsa({\n linear: Vr\n}, la);\nfunction yt(e, t, n, o = {}) {\n var i, r, a;\n const {\n clone: s = !1,\n passive: l = !1,\n eventName: u,\n deep: c = !1,\n defaultValue: v\n } = o, g = on(), x = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((a = (r = g == null ? void 0 : g.proxy) == null ? void 0 : r.$emit) == null ? void 0 : a.bind(g == null ? void 0 : g.proxy));\n let h = u;\n t || (t = \"modelValue\"), h = u || h || `update:${t.toString()}`;\n const d = (y) => s ? Ae(s) ? s(y) : Jr(y) : y, w = () => Dr(e[t]) ? d(e[t]) : v;\n if (l) {\n const y = w(), S = ie(y);\n return de(() => e[t], (V) => S.value = d(V)), de(S, (V) => {\n (V !== e[t] || c) && x(h, V);\n }, { deep: c }), S;\n } else\n return J({\n get() {\n return w();\n },\n set(y) {\n x(h, y);\n }\n });\n}\nfunction X(e = () => {\n}) {\n const t = ie(/* @__PURE__ */ new Set());\n e && t.value.add(e);\n const n = (r) => {\n t.value.delete(r);\n };\n return {\n on: (r) => {\n t.value.has(e) && t.value.delete(e), t.value.add(r);\n const a = () => n(r);\n return Mt(a), {\n off: a\n };\n },\n off: n,\n trigger: (r) => Promise.all(Array.from(t.value).map((a) => a(r))),\n fns: t\n };\n}\nconst ua = [\"production\", \"prod\"];\nfunction wt(e, ...t) {\n ua.includes(process.env.NODE_ENV || \"\") || console.warn(`[Vue Flow]: ${e}`, ...t);\n}\nfunction ca() {\n return {\n edgesChange: X(),\n nodesChange: X(),\n nodeDoubleClick: X(),\n nodeClick: X(),\n nodeMouseEnter: X(),\n nodeMouseMove: X(),\n nodeMouseLeave: X(),\n nodeContextMenu: X(),\n nodeDragStart: X(),\n nodeDrag: X(),\n nodeDragStop: X(),\n nodesInitialized: X(),\n miniMapNodeClick: X(),\n miniMapNodeDoubleClick: X(),\n miniMapNodeMouseEnter: X(),\n miniMapNodeMouseMove: X(),\n miniMapNodeMouseLeave: X(),\n connect: X(),\n connectStart: X(),\n connectEnd: X(),\n clickConnectStart: X(),\n clickConnectEnd: X(),\n paneReady: X(),\n move: X(),\n moveStart: X(),\n moveEnd: X(),\n selectionDragStart: X(),\n selectionDrag: X(),\n selectionDragStop: X(),\n selectionContextMenu: X(),\n selectionStart: X(),\n selectionEnd: X(),\n viewportChangeStart: X(),\n viewportChange: X(),\n viewportChangeEnd: X(),\n paneScroll: X(),\n paneClick: X(),\n paneContextMenu: X(),\n paneMouseEnter: X(),\n paneMouseMove: X(),\n paneMouseLeave: X(),\n edgeContextMenu: X(),\n edgeMouseEnter: X(),\n edgeMouseMove: X(),\n edgeMouseLeave: X(),\n edgeDoubleClick: X(),\n edgeClick: X(),\n edgeUpdateStart: X(),\n edgeUpdate: X(),\n edgeUpdateEnd: X(),\n updateNodeInternals: X(),\n error: X((e) => wt(e.message))\n };\n}\nfunction da(e, t) {\n Nr(() => {\n for (const [n, o] of Object.entries(t.value)) {\n const i = (r) => {\n e(n, r);\n };\n o.on(i), Mt(() => {\n o.off(i);\n });\n }\n });\n}\nvar he = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = \"MISSING_VIEWPORT_DIMENSIONS\", e.NODE_NOT_FOUND = \"NODE_NOT_FOUND\", e.NODE_MISSING_PARENT = \"NODE_MISSING_PARENT\", e.NODE_TYPE_MISSING = \"NODE_TYPE_MISSING\", e.NODE_EXTENT_INVALID = \"NODE_EXTENT_INVALID\", e.EDGE_INVALID = \"EDGE_INVALID\", e.EDGE_NOT_FOUND = \"EDGE_NOT_FOUND\", e.EDGE_SOURCE_MISSING = \"EDGE_SOURCE_MISSING\", e.EDGE_TARGET_MISSING = \"EDGE_TARGET_MISSING\", e.EDGE_TYPE_MISSING = \"EDGE_TYPE_MISSING\", e.EDGE_SOURCE_TARGET_SAME = \"EDGE_SOURCE_TARGET_SAME\", e.EDGE_SOURCE_TARGET_MISSING = \"EDGE_SOURCE_TARGET_MISSING\", e.EDGE_ORPHANED = \"EDGE_ORPHANED\", e))(he || {});\nconst Nn = {\n MISSING_VIEWPORT_DIMENSIONS: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n NODE_NOT_FOUND: (e) => `Node not found\nNode: ${e}`,\n NODE_MISSING_PARENT: (e, t) => `Node is missing a parent\nNode: ${e}\nParent: ${t}`,\n NODE_TYPE_MISSING: (e) => `Node type is missing\nType: ${e}`,\n NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent\nNode: ${e}`,\n EDGE_INVALID: (e) => `An edge needs a source and a target\nEdge: ${e}`,\n EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing\nEdge: ${e} \nSource: ${t}`,\n EDGE_TARGET_MISSING: (e, t) => `Edge target is missing\nEdge: ${e} \nTarget: ${t}`,\n EDGE_TYPE_MISSING: (e) => `Edge type is missing\nType: ${e}`,\n EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,\n EDGE_NOT_FOUND: (e) => `Edge not found\nEdge: ${e}`\n};\nclass ve extends Error {\n constructor(t, ...n) {\n var o;\n super((o = Nn[t]) == null ? void 0 : o.call(Nn, ...n)), this.code = t;\n }\n}\nconst ao = () => typeof window < \"u\" ? window : { chrome: !1 };\nfunction Io(e) {\n return {\n ...e.computedPosition || { x: 0, y: 0 },\n width: e.dimensions.width || 0,\n height: e.dimensions.height || 0\n };\n}\nfunction Fn(e, t) {\n const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));\n return Math.ceil(n * o);\n}\nfunction rn(e) {\n return {\n width: e.offsetWidth,\n height: e.offsetHeight\n };\n}\nfunction je(e, t = 0, n = 1) {\n return Math.min(Math.max(e, t), n);\n}\nfunction so(e, t) {\n return {\n x: je(e.x, t[0][0], t[1][0]),\n y: je(e.y, t[0][1], t[1][1])\n };\n}\nfunction Po(e) {\n const t = e.getRootNode(), n = ao();\n return \"elementFromPoint\" in t ? t : n.document;\n}\nfunction $e(e) {\n return e && \"id\" in e && \"source\" in e && \"target\" in e;\n}\nfunction fa(e) {\n return $e(e) && \"sourceNode\" in e && \"targetNode\" in e;\n}\nfunction xt(e) {\n return e && \"id\" in e && !$e(e);\n}\nfunction nt(e) {\n return xt(e) && \"computedPosition\" in e;\n}\nfunction ha(e) {\n return !!e.width && !!e.height && !!e.x && !!e.y;\n}\nfunction ga(e, t = {}) {\n let n = t;\n return nt(e) || (n = {\n type: e.type ?? t.type ?? \"default\",\n dimensions: it({\n width: 0,\n height: 0\n }),\n handleBounds: {\n source: [],\n target: []\n },\n computedPosition: it({\n z: 0,\n ...e.position\n }),\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: !1,\n dragging: !1,\n resizing: !1,\n initialized: !1,\n ...t,\n data: ce(e.data) ? e.data : {},\n events: it(ce(e.events) ? e.events : {})\n }), Object.assign({}, n, e, { id: e.id.toString() });\n}\nfunction lo(e, t = {}) {\n const n = ce(e.events) ? e.events : t.events && ce(t.events) ? t.events : {}, o = ce(e.data) ? e.data : t.data && ce(t.data) ? t.data : {};\n return t = fa(e) ? t : {\n ...t,\n sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle,\n targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle,\n type: e.type ?? t.type ?? \"default\",\n source: e.source.toString() || t.source,\n target: e.target.toString() || t.target,\n updatable: e.updatable ?? t.updatable,\n selectable: e.selectable ?? t.selectable,\n focusable: e.focusable ?? t.focusable,\n data: o,\n events: it(n),\n label: (e.label && !Pe(e.label) ? it(e.label) : e.label) || t.label,\n interactionWidth: e.interactionWidth || t.interactionWidth\n }, Object.assign({}, t, e, { id: e.id.toString() });\n}\nfunction bi(e, t, n) {\n if (!xt(e))\n return [];\n const o = n === \"source\" ? \"target\" : \"source\", i = t.filter((r) => $e(r) && r[o] === e.id).map((r) => $e(r) && r[n]);\n return t.filter((r) => i.includes(r.id));\n}\nfunction Pd(e, t) {\n return bi(e, t, \"target\");\n}\nfunction Dd(e, t) {\n return bi(e, t, \"source\");\n}\nfunction an({ source: e, sourceHandle: t, target: n, targetHandle: o }) {\n return `vueflow__edge-${e}${t ?? \"\"}-${n}${o ?? \"\"}`;\n}\nfunction Ei(e, t) {\n return t.some(\n (n) => $e(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle)\n );\n}\nfunction zd(e, t, n) {\n if (!e.source || !e.target)\n return wt(\"Can't create edge. An edge needs a source and a target.\"), t;\n let o;\n return $e(e) ? o = { ...e } : o = {\n ...e,\n id: an(e)\n }, o = lo(o, n), Ei(o, t) || t.push(o), t;\n}\nfunction Ad(e, t, n) {\n if (!t.source || !t.target)\n return wt(\"Can't create new edge. An edge needs a source and a target.\"), n;\n const o = n.find((r) => $e(r) && r.id === e.id);\n if (!o)\n return wt(`The old edge with id=${e.id} does not exist.`), n;\n const i = {\n ...e,\n id: an(t),\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(o), 1, i), n.filter((r) => r.id !== e.id);\n}\nfunction va({ x: e, y: t }, { x: n, y: o, zoom: i }) {\n return {\n x: e * i + n,\n y: t * i + o\n };\n}\nfunction uo({ x: e, y: t }, { x: n, y: o, zoom: i }, r, [a, s]) {\n const l = {\n x: (e - n) / i,\n y: (t - o) / i\n };\n return r ? {\n x: a * Math.round(l.x / a),\n y: s * Math.round(l.y / s)\n } : l;\n}\nfunction Si(e, t) {\n return {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x2, t.x2),\n y2: Math.max(e.y2, t.y2)\n };\n}\nfunction Xt({ x: e, y: t, width: n, height: o }) {\n return {\n x: e,\n y: t,\n x2: e + n,\n y2: t + o\n };\n}\nfunction Ni({ x: e, y: t, x2: n, y2: o }) {\n return {\n x: e,\n y: t,\n width: n - e,\n height: o - t\n };\n}\nfunction Bd(e, t) {\n return Ni(Si(Xt(e), Xt(t)));\n}\nfunction co(e) {\n const t = e.reduce(\n (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: i = { width: 0, height: 0 } } = {}) => Si(\n n,\n Xt({\n ...o,\n ...i\n })\n ),\n { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }\n );\n return Ni(t);\n}\nfunction Ci(e, t, { x: n, y: o, zoom: i } = { x: 0, y: 0, zoom: 1 }, r = !1, a = !1) {\n const s = {\n x: (t.x - n) / i,\n y: (t.y - o) / i,\n width: t.width / i,\n height: t.height / i\n };\n return e.filter((l) => {\n const { computedPosition: u = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: v } = l;\n if (a && !v)\n return !1;\n const g = { ...u, width: c.width || 0, height: c.height || 0 }, x = Fn(s, g), h = typeof c.width > \"u\" || typeof c.height > \"u\" || c.width === 0 || c.height === 0, d = r && x > 0, w = c.width * c.height;\n return h || d || x >= w;\n });\n}\nfunction sn(e, t) {\n const n = e.map((o) => Pe(o) ? o : o.id);\n return t.filter((o) => n.includes(o.source) || n.includes(o.target));\n}\nfunction Zt(e, t, n, o, i, r = 0.1, a = { x: 0, y: 0 }) {\n const s = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), u = Math.min(s, l), c = je(u, o, i), v = e.x + e.width / 2, g = e.y + e.height / 2, x = t / 2 - v * c + (a.x ?? 0), h = n / 2 - g * c + (a.y ?? 0);\n return { x, y: h, zoom: c };\n}\nfunction ma(e, t) {\n return {\n x: t.x + e.x,\n y: t.y + e.y,\n z: (e.z > t.z ? e.z : t.z) + 1\n };\n}\nfunction Mi(e, t) {\n if (!e.parentNode)\n return !1;\n const n = t(e.parentNode);\n return n ? n.selected ? !0 : Mi(n, t) : !1;\n}\nfunction Xe(e, t) {\n return typeof e > \"u\" ? \"\" : typeof e == \"string\" ? e : `${t ? `${t}__` : \"\"}${Object.keys(e).sort().map((o) => `${o}=${e[o]}`).join(\"&\")}`;\n}\nfunction ce(e) {\n return typeof C(e) < \"u\";\n}\nfunction pa(e, t, n) {\n if (!e.source || !e.target)\n return n(new ve(he.EDGE_INVALID, e.id)), !1;\n let o;\n return $e(e) ? o = e : o = {\n ...e,\n id: an(e)\n }, o = lo(o), Ei(o, t) ? !1 : o;\n}\nfunction ya(e, t, n, o, i, r) {\n if (!t.source || !t.target)\n return r(new ve(he.EDGE_INVALID, e.id)), !1;\n const a = o(e.id);\n if (!a)\n return r(new ve(he.EDGE_NOT_FOUND, e.id)), !1;\n const { id: s, ...l } = e, u = {\n ...l,\n id: i ? an(t) : s,\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(a), 1, u), u;\n}\nfunction Do(e, t, n, o) {\n const i = {}, r = e.map((s) => {\n const l = ga(s, {\n ...n(s.id),\n parentNode: s.parentNode\n });\n return s.parentNode && (i[s.parentNode] = !0), l;\n }), a = [...r, ...t];\n return r.forEach((s) => {\n const l = a.find((u) => u.id === s.parentNode);\n s.parentNode && !l && o(new ve(he.NODE_MISSING_PARENT, s.id, s.parentNode)), (s.parentNode || i[s.id]) && (i[s.id] && (s.isParent = !0), l && (l.isParent = !0));\n }), r;\n}\nvar j = /* @__PURE__ */ ((e) => (e.Left = \"left\", e.Top = \"top\", e.Right = \"right\", e.Bottom = \"bottom\", e))(j || {}), fo = /* @__PURE__ */ ((e) => (e.Partial = \"partial\", e.Full = \"full\", e))(fo || {}), Ye = /* @__PURE__ */ ((e) => (e.Bezier = \"default\", e.SimpleBezier = \"simple-bezier\", e.Straight = \"straight\", e.Step = \"step\", e.SmoothStep = \"smoothstep\", e))(Ye || {}), Qe = /* @__PURE__ */ ((e) => (e.Strict = \"strict\", e.Loose = \"loose\", e))(Qe || {}), Yn = /* @__PURE__ */ ((e) => (e.Arrow = \"arrow\", e.ArrowClosed = \"arrowclosed\", e))(Yn || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = \"free\", e.Vertical = \"vertical\", e.Horizontal = \"horizontal\", e))(Ut || {}), xa = /* @__PURE__ */ ((e) => (e.TopLeft = \"top-left\", e.TopCenter = \"top-center\", e.TopRight = \"top-right\", e.BottomLeft = \"bottom-left\", e.BottomCenter = \"bottom-center\", e.BottomRight = \"bottom-right\", e))(xa || {});\nconst zo = Symbol(\"vueFlow\"), $i = Symbol(\"nodeId\"), ki = Symbol(\"nodeRef\"), Oi = Symbol(\"edgeId\"), Ti = Symbol(\"edgeRef\"), ln = Symbol(\"slots\");\nfunction _a(e) {\n const t = e ?? He($i, \"\"), n = He(ki, null), { findNode: o, edges: i, emits: r } = fe(), a = o(t);\n return a || r.error(new ve(he.NODE_NOT_FOUND, t)), {\n id: t,\n nodeEl: n,\n node: a,\n parentNode: J(() => o(a.parentNode)),\n connectedEdges: J(() => sn([a], i.value))\n };\n}\nfunction ho(e) {\n return \"clientX\" in e;\n}\nfunction rt(e, t) {\n var r, a;\n const n = ho(e), o = n ? e.clientX : (r = e.touches) == null ? void 0 : r[0].clientX, i = n ? e.clientY : (a = e.touches) == null ? void 0 : a[0].clientY;\n return {\n x: o - ((t == null ? void 0 : t.left) ?? 0),\n y: i - ((t == null ? void 0 : t.top) ?? 0)\n };\n}\nfunction Wt(e, t, n) {\n const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, i = ((n == null ? void 0 : n.y) ?? 0) + t.y, r = (n == null ? void 0 : n.width) ?? t.width, a = (n == null ? void 0 : n.height) ?? t.height;\n switch (e) {\n case j.Top:\n return {\n x: o + r / 2,\n y: i\n };\n case j.Right:\n return {\n x: o + r,\n y: i + a / 2\n };\n case j.Bottom:\n return {\n x: o + r / 2,\n y: i + a\n };\n case j.Left:\n return {\n x: o,\n y: i + a / 2\n };\n }\n}\nfunction Ao(e = [], t) {\n return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null;\n}\nfunction wa(e, t, n, o, i, r) {\n const a = Wt(\n n,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n t\n ), s = Wt(\n r,\n {\n ...o.dimensions,\n ...o.computedPosition\n },\n i\n );\n return {\n sourceX: a.x,\n sourceY: a.y,\n targetX: s.x,\n targetY: s.y\n };\n}\nfunction ba({\n sourcePos: e,\n targetPos: t,\n sourceWidth: n,\n sourceHeight: o,\n targetWidth: i,\n targetHeight: r,\n width: a,\n height: s,\n viewport: l\n}) {\n const u = {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x + n, t.x + i),\n y2: Math.max(e.y + o, t.y + r)\n };\n u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);\n const c = Xt({\n x: (0 - l.x) / l.zoom,\n y: (0 - l.y) / l.zoom,\n width: a / l.zoom,\n height: s / l.zoom\n }), v = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), g = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));\n return Math.ceil(v * g) > 0;\n}\nfunction Ea(e, t, n = !1) {\n let o = -1;\n const i = e.reduce((r, a) => {\n const s = Ie(a.zIndex);\n let l = s ? a.zIndex : 0;\n const u = t(a.source), c = t(a.target);\n return !u || !c || (n && (l = s ? a.zIndex : Math.max(u.computedPosition.z || 0, c.computedPosition.z || 0)), r[l] ? r[l].push(a) : r[l] = [a], o = l > o ? l : o), r;\n }, {});\n return Object.entries(Object.keys(i).length ? i : { 0: [] }).map(([r, a]) => {\n const s = +r;\n return {\n edges: a,\n level: s,\n isMaxLevel: s === o\n };\n });\n}\nfunction Cn(e) {\n e == null || e.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction Bo(e, t, n, o) {\n return (t[n] || []).reduce((i, r) => (`${e.id}-${r.id}-${n}` !== o && i.push({\n id: r.id || null,\n type: n,\n nodeId: e.id,\n ...Wt(\n r.position,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n r\n )\n }), i), []);\n}\nfunction Sa(e, t, n) {\n let o = null, i = 1 / 0;\n return n.forEach((r) => {\n const a = Math.sqrt((r.x - e.x) ** 2 + (r.y - e.y) ** 2);\n a <= t && a < i && (i = a, o = r);\n }), o;\n}\nfunction Ro(e, t, n, o, i, r, a, s, l, u) {\n const c = r === \"target\", v = s.querySelector(`.vue-flow__handle[data-id=\"${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}\"]`), { x: g, y: x } = rt(e), h = s.elementFromPoint(g, x), d = h != null && h.classList.contains(\"vue-flow__handle\") ? h : v, w = {\n handleDomNode: d,\n isValid: !1,\n connection: { source: \"\", target: \"\", sourceHandle: null, targetHandle: null },\n endHandle: null\n };\n if (d) {\n const y = Ii(void 0, d), S = d.getAttribute(\"data-nodeid\"), V = d.getAttribute(\"data-handleid\"), p = d.classList.contains(\"connectable\"), N = d.classList.contains(\"connectableend\"), T = {\n source: c ? S : o,\n sourceHandle: c ? V : i,\n target: c ? o : S,\n targetHandle: c ? i : V\n };\n w.connection = T, p && N && (n === Qe.Strict ? c && y === \"source\" || !c && y === \"target\" : S !== o || V !== i) && (w.endHandle = {\n nodeId: S,\n handleId: V,\n type: y\n }, w.isValid = a(T, {\n edges: l,\n sourceNode: u(T.source),\n targetNode: u(T.target)\n }));\n }\n return w;\n}\nfunction Na({ nodes: e, nodeId: t, handleId: n, handleType: o }) {\n return e.reduce((i, r) => {\n const { handleBounds: a } = r;\n let s = [], l = [];\n return a && (s = Bo(r, a, \"source\", `${t}-${n}-${o}`), l = Bo(r, a, \"target\", `${t}-${n}-${o}`)), i.push(...s, ...l), i;\n }, []);\n}\nfunction Ii(e, t) {\n return e || (t != null && t.classList.contains(\"target\") ? \"target\" : t != null && t.classList.contains(\"source\") ? \"source\" : null);\n}\nfunction Ca(e, t) {\n let n = null;\n return t ? n = \"valid\" : e && !t && (n = \"invalid\"), n;\n}\nfunction Vo(e, t, n) {\n return e < t ? je(Math.abs(e - t), 1, 50) / 50 : e > n ? -je(Math.abs(e - n), 1, 50) / 50 : 0;\n}\nfunction Pi(e, t) {\n const n = Vo(e.x, 35, t.width - 35) * 20, o = Vo(e.y, 35, t.height - 35) * 20;\n return [n, o];\n}\nfunction It() {\n return !0;\n}\nfunction Di({\n handleId: e,\n nodeId: t,\n type: n,\n isValidConnection: o,\n edgeUpdaterType: i,\n onEdgeUpdate: r,\n onEdgeUpdateEnd: a\n}) {\n const s = J(() => le(n) === \"target\"), {\n vueFlowRef: l,\n connectionMode: u,\n connectionRadius: c,\n connectOnClick: v,\n connectionClickStartHandle: g,\n nodesConnectable: x,\n autoPanOnConnect: h,\n findNode: d,\n panBy: w,\n getNodes: y,\n startConnection: S,\n updateConnection: V,\n endConnection: p,\n emits: N,\n viewport: T,\n edges: _,\n isValidConnection: P\n } = fe();\n let R = null, $ = !1, D = null;\n function Q(m) {\n var G;\n const A = ho(m), E = Po(m.target);\n if (A && m.button === 0 || !A) {\n let Z = function(Y) {\n L = rt(Y, f), B = Sa(\n uo(L, T.value, !1, [1, 1]),\n c.value,\n F\n ), I || (U(), I = !0);\n const ne = Ro(\n Y,\n B,\n u.value,\n le(t),\n le(e),\n s.value ? \"target\" : \"source\",\n W,\n E,\n _.value,\n d\n );\n if (R = ne.connection, $ = ne.isValid, D = ne.handleDomNode, V(\n B && $ ? va(\n {\n x: B.x,\n y: B.y\n },\n T.value\n ) : L,\n ne.endHandle,\n Ca(!!B, $)\n ), !B && !$ && !D)\n return Cn(b);\n R && R.source !== R.target && D && (Cn(b), b = D, D.classList.add(\"connecting\", \"vue-flow__handle-connecting\"), D.classList.toggle(\"valid\", $), D.classList.toggle(\"vue-flow__handle-valid\", $));\n }, K = function(Y) {\n (B || D) && R && $ && (r ? r(Y, R) : N.connect(R)), N.connectEnd(Y), i && (a == null || a(Y)), Cn(b), cancelAnimationFrame(q), p(Y), I = !1, $ = !1, R = null, D = null, E.removeEventListener(\"mousemove\", Z), E.removeEventListener(\"mouseup\", K), E.removeEventListener(\"touchmove\", Z), E.removeEventListener(\"touchend\", K);\n };\n const z = d(le(t));\n let W = o || P.value || It;\n !W && z && (W = (s ? z.isValidSourcePos : z.isValidTargetPos) || It);\n let B, q = 0;\n const { x: te, y: re } = rt(m), k = E == null ? void 0 : E.elementFromPoint(te, re), H = Ii(le(i), k), f = (G = l.value) == null ? void 0 : G.getBoundingClientRect();\n if (!f || !H)\n return;\n let b, L = rt(m, f), I = !1;\n const F = Na({\n nodes: y.value,\n nodeId: le(t),\n handleId: le(e),\n handleType: H\n }), U = () => {\n if (!h)\n return;\n const [Y, ne] = Pi(L, f);\n w({ x: Y, y: ne }), q = requestAnimationFrame(U);\n };\n S(\n {\n nodeId: le(t),\n handleId: le(e),\n type: H\n },\n {\n x: te - f.left,\n y: re - f.top\n },\n m\n ), N.connectStart({ event: m, nodeId: le(t), handleId: le(e), handleType: H }), E.addEventListener(\"mousemove\", Z), E.addEventListener(\"mouseup\", K), E.addEventListener(\"touchmove\", Z), E.addEventListener(\"touchend\", K);\n }\n }\n function ee(m) {\n if (v.value)\n if (!g.value)\n N.clickConnectStart({ event: m, nodeId: le(t), handleId: le(e) }), S(\n { nodeId: le(t), type: le(n), handleId: le(e) },\n void 0,\n m,\n !0\n );\n else {\n let A = o || P.value || It;\n const E = d(le(t));\n if (!A && E && (A = (s ? E.isValidSourcePos : E.isValidTargetPos) || It), E && (typeof E.connectable > \"u\" ? x.value : E.connectable) === !1)\n return;\n const G = Po(m.target), { connection: Z, isValid: K } = Ro(\n m,\n {\n nodeId: le(t),\n id: le(e),\n type: le(n)\n },\n u.value,\n g.value.nodeId,\n g.value.handleId || null,\n g.value.type,\n A,\n G,\n _.value,\n d\n ), z = Z.source === Z.target;\n K && !z && N.connect(Z), N.clickConnectEnd(m), p(m, !0);\n }\n }\n return {\n handlePointerDown: Q,\n handleClick: ee\n };\n}\nfunction Ma(e, t) {\n const n = {};\n for (const o in e)\n t.includes(o) || Object.defineProperty(n, o, {\n enumerable: !0,\n get: () => e[o]\n });\n return n;\n}\nconst $a = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"], ka = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n}, Kt = /* @__PURE__ */ ge({\n ...ka,\n props: {\n id: null,\n type: null,\n position: { default: j.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: !0 },\n connectableEnd: { type: Boolean, default: !0 }\n },\n setup(e) {\n const t = Ma(e, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\", \"isValidConnection\"]), n = M(t, \"type\", \"source\"), {\n connectionStartHandle: o,\n connectionClickStartHandle: i,\n connectionEndHandle: r,\n vueFlowRef: a,\n nodesConnectable: s,\n noDragClassName: l,\n noPanClassName: u\n } = fe(), { id: c, node: v, nodeEl: g, connectedEdges: x } = _a(), h = ie(), d = J(() => e.id ?? `${c}__handle-${e.position}`), w = J(() => typeof e.connectableStart < \"u\" ? e.connectableStart : !0), y = J(() => typeof e.connectableEnd < \"u\" ? e.connectableEnd : !0), { handlePointerDown: S, handleClick: V } = Di({\n nodeId: c,\n handleId: d,\n isValidConnection: e.isValidConnection,\n type: n\n }), p = J(() => Pe(e.connectable) && e.connectable === \"single\" ? !x.value.some((R) => {\n const $ = R[`${n.value}Handle`];\n return R[n.value] !== c ? !1 : $ ? $ === d.value : !0;\n }) : Ae(e.connectable) ? e.connectable(v, x.value) : ce(e.connectable) ? e.connectable : s.value), N = J(\n () => {\n var R, $, D, Q, ee, m;\n return ((R = o.value) == null ? void 0 : R.nodeId) === c && (($ = o.value) == null ? void 0 : $.handleId) === d.value && ((D = o.value) == null ? void 0 : D.type) === n.value || ((Q = r.value) == null ? void 0 : Q.nodeId) === c && ((ee = r.value) == null ? void 0 : ee.handleId) === d.value && ((m = r.value) == null ? void 0 : m.type) === n.value;\n }\n ), T = J(\n () => {\n var R, $, D;\n return ((R = i.value) == null ? void 0 : R.nodeId) === c && (($ = i.value) == null ? void 0 : $.handleId) === d.value && ((D = i.value) == null ? void 0 : D.type) === n.value;\n }\n );\n ye(() => v.initialized).toBe(!0, { flush: \"post\" }).then(() => {\n var E;\n const R = (E = v.handleBounds[n.value]) == null ? void 0 : E.find((G) => G.id === d.value);\n if (!a.value || R)\n return;\n const $ = a.value.querySelector(\".vue-flow__transformationpane\");\n if (!g || !h.value || !$ || !d.value)\n return;\n const D = g.value.getBoundingClientRect(), Q = h.value.getBoundingClientRect(), ee = window.getComputedStyle($), { m22: m } = new window.DOMMatrixReadOnly(ee.transform), A = {\n id: d.value,\n position: e.position,\n x: (Q.left - D.left) / m,\n y: (Q.top - D.top) / m,\n ...rn(h.value)\n };\n v.handleBounds[n.value] = [...v.handleBounds[n.value] ?? [], A];\n });\n function _(R) {\n const $ = ho(R);\n p.value && w.value && ($ && R.button === 0 || !$) && S(R);\n }\n function P(R) {\n !c || !i.value && !w.value || p.value && V(R);\n }\n return (R, $) => (oe(), se(\"div\", {\n ref_key: \"handle\",\n ref: h,\n \"data-id\": `${C(c)}-${C(d)}-${C(n)}`,\n \"data-handleid\": C(d),\n \"data-nodeid\": C(c),\n \"data-handlepos\": e.position,\n class: Ke([\"vue-flow__handle\", [\n `vue-flow__handle-${e.position}`,\n `vue-flow__handle-${C(d)}`,\n C(l),\n C(u),\n C(n),\n {\n connectable: C(p),\n connecting: C(T),\n connectablestart: C(w),\n connectableend: C(y),\n connectionindicator: C(p) && (C(w) && !C(N) || C(y) && C(N))\n }\n ]]),\n onMousedown: _,\n onTouchstartPassive: _,\n onClick: P\n }, [\n xe(R.$slots, \"default\", { id: e.id })\n ], 42, $a));\n }\n}), un = function({\n sourcePosition: e = j.Bottom,\n targetPosition: t = j.Top,\n label: n,\n connectable: o = !0,\n isValidTargetPos: i,\n isValidSourcePos: r\n}) {\n return [\n ue(Kt, { type: \"target\", position: t, connectable: o, isValidConnection: i }),\n typeof n != \"string\" && n ? ue(n) : ue(\"div\", { innerHTML: n }),\n ue(Kt, { type: \"source\", position: e, connectable: o, isValidConnection: r })\n ];\n};\nun.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\"];\nun.inheritAttrs = !1;\nun.compatConfig = { MODE: 3 };\nconst Oa = un, cn = function({\n sourcePosition: e = j.Bottom,\n label: t,\n connectable: n = !0,\n isValidSourcePos: o\n}) {\n return [\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t }),\n ue(Kt, { type: \"source\", position: e, connectable: n, isValidConnection: o })\n ];\n};\ncn.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\"];\ncn.inheritAttrs = !1;\ncn.compatConfig = { MODE: 3 };\nconst Ta = cn, dn = function({\n targetPosition: e = j.Top,\n label: t,\n connectable: n = !0,\n isValidTargetPos: o\n}) {\n return [\n ue(Kt, { type: \"target\", position: e, connectable: n, isValidConnection: o }),\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t })\n ];\n};\ndn.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\"];\ndn.inheritAttrs = !1;\ndn.compatConfig = { MODE: 3 };\nconst Ia = dn;\nfunction Ho(e, t, n) {\n let o = e;\n do {\n if (o && o.matches(t))\n return !0;\n if (o === n)\n return !1;\n o = o.parentElement;\n } while (o);\n return !1;\n}\nfunction Pa(e, t, n, o, i) {\n return e.filter(\n (r) => (r.selected || r.id === i) && (!r.parentNode || !Mi(r, o)) && (r.draggable || t && typeof r.draggable > \"u\")\n ).map(\n (r) => {\n var a, s;\n return it({\n id: r.id,\n position: r.position || { x: 0, y: 0 },\n distance: {\n x: n.x - ((a = r.computedPosition) == null ? void 0 : a.x) || 0,\n y: n.y - ((s = r.computedPosition) == null ? void 0 : s.y) || 0\n },\n from: r.computedPosition,\n extent: r.extent,\n parentNode: r.parentNode,\n dimensions: r.dimensions\n });\n }\n );\n}\nfunction Mn({\n id: e,\n dragItems: t,\n findNode: n\n}) {\n const o = t.reduce((i, r) => {\n const a = n(r.id);\n return a && i.push(a), i;\n }, []);\n return [e ? o.find((i) => i.id === e) : o[0], o];\n}\nfunction zi(e) {\n if (Array.isArray(e))\n switch (e.length) {\n case 1:\n return [e[0], e[0], e[0], e[0]];\n case 2:\n return [e[0], e[1], e[0], e[1]];\n case 3:\n return [e[0], e[1], e[2], e[1]];\n case 4:\n return e;\n default:\n return [0, 0, 0, 0];\n }\n return [e, e, e, e];\n}\nfunction Da(e, t, n) {\n const [o, i, r, a] = typeof e != \"string\" ? zi(e.padding) : [0, 0, 0, 0];\n return n && Ie(n.computedPosition.x) && Ie(n.computedPosition.y) && Ie(n.dimensions.width) && Ie(n.dimensions.height) ? [\n [n.computedPosition.x + a, n.computedPosition.y + o],\n [\n n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - i,\n n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - r\n ]\n ] : !1;\n}\nfunction za(e, t, n, o) {\n let i = e.extent || n;\n if (i === \"parent\" || !Array.isArray(i) && (i == null ? void 0 : i.range) === \"parent\")\n if (e.parentNode && o && e.dimensions.width && e.dimensions.height) {\n const r = Da(i, e, o);\n r && (i = r);\n } else\n t(new ve(he.NODE_EXTENT_INVALID, e.id)), i = n;\n else if (Array.isArray(i)) {\n const r = (o == null ? void 0 : o.computedPosition.x) || 0, a = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i[0][0] + r, i[0][1] + a],\n [i[1][0] + r, i[1][1] + a]\n ];\n } else if (i != null && i.range && Array.isArray(i.range)) {\n const [r, a, s, l] = zi(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i.range[0][0] + u + l, i.range[0][1] + c + r],\n [i.range[1][0] + u - a, i.range[1][1] + c - s]\n ];\n }\n return i;\n}\nfunction go(e, t, n, o, i) {\n const r = za(e, n, o, i), a = so(t, r);\n return {\n position: {\n x: a.x - ((i == null ? void 0 : i.computedPosition.x) || 0),\n y: a.y - ((i == null ? void 0 : i.computedPosition.y) || 0)\n },\n computedPosition: a\n };\n}\nfunction Ai() {\n const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: a, emits: s } = fe();\n return (l, u = !1) => {\n const c = r.value ? i.value[0] : 5, v = r.value ? i.value[1] : 5, g = u ? 4 : 1, x = l.x * c * g, h = l.y * v * g, d = e.value.filter((w) => w.draggable || a && typeof w.draggable > \"u\").map((w) => {\n const y = { x: w.computedPosition.x + x, y: w.computedPosition.y + h }, { computedPosition: S } = go(\n w,\n y,\n s.error,\n t.value,\n w.parentNode ? o(w.parentNode) : void 0\n );\n return {\n id: w.id,\n position: S,\n from: w.position,\n distance: { x: l.x, y: l.y },\n dimensions: w.dimensions\n };\n });\n n(d, !0, !1);\n };\n}\nfunction Aa() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n dragStart: X(),\n drag: X(),\n dragStop: X()\n };\n}\nfunction Ba(e, t) {\n const n = Aa();\n return n.doubleClick.on((o) => {\n var i, r;\n t.nodeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.nodeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.nodeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.nodeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.nodeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.nodeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.dragStart.on((o) => {\n var i, r;\n t.nodeDragStart(o), (r = (i = e.events) == null ? void 0 : i.dragStart) == null || r.call(i, o);\n }), n.drag.on((o) => {\n var i, r;\n t.nodeDrag(o), (r = (i = e.events) == null ? void 0 : i.drag) == null || r.call(i, o);\n }), n.dragStop.on((o) => {\n var i, r;\n t.nodeDragStop(o), (r = (i = e.events) == null ? void 0 : i.dragStop) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nfunction Ra() {\n const { viewport: e, snapGrid: t, snapToGrid: n } = fe();\n return ({ sourceEvent: o }) => {\n const i = o.touches ? o.touches[0].clientX : o.clientX, r = o.touches ? o.touches[0].clientY : o.clientY, a = {\n x: (i - e.value.x) / e.value.zoom,\n y: (r - e.value.y) / e.value.zoom\n };\n return {\n xSnapped: n.value ? t.value[0] * Math.round(a.x / t.value[0]) : a.x,\n ySnapped: n.value ? t.value[1] * Math.round(a.y / t.value[1]) : a.y,\n ...a\n };\n };\n}\nfunction Lo(e, t, n) {\n const o = t.querySelectorAll(`.vue-flow__handle${e}`);\n if (!o || !o.length)\n return;\n const i = Array.from(o), r = t.getBoundingClientRect();\n return i.map((a) => {\n const s = a.getBoundingClientRect();\n return {\n id: a.getAttribute(\"data-handleid\"),\n position: a.getAttribute(\"data-handlepos\"),\n x: (s.left - r.left) / n,\n y: (s.top - r.top) / n,\n ...rn(a)\n };\n });\n}\nfunction Xn(e, t, n, o, i, r = !1, a) {\n i.value = !1, e.selected ? (r || e.selected && t) && (o([e]), Ue(a.blur)) : n([e]);\n}\nvar Va = { value: () => {\n} };\nfunction fn() {\n for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) {\n if (!(o = arguments[e] + \"\") || o in n || /[\\s.]/.test(o))\n throw new Error(\"illegal type: \" + o);\n n[o] = [];\n }\n return new Ht(n);\n}\nfunction Ht(e) {\n this._ = e;\n}\nfunction Ha(e, t) {\n return e.trim().split(/^|\\s+/).map(function(n) {\n var o = \"\", i = n.indexOf(\".\");\n if (i >= 0 && (o = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n))\n throw new Error(\"unknown type: \" + n);\n return { type: n, name: o };\n });\n}\nHt.prototype = fn.prototype = {\n constructor: Ht,\n on: function(e, t) {\n var n = this._, o = Ha(e + \"\", n), i, r = -1, a = o.length;\n if (arguments.length < 2) {\n for (; ++r < a; )\n if ((i = (e = o[r]).type) && (i = La(n[i], e.name)))\n return i;\n return;\n }\n if (t != null && typeof t != \"function\")\n throw new Error(\"invalid callback: \" + t);\n for (; ++r < a; )\n if (i = (e = o[r]).type)\n n[i] = Go(n[i], e.name, t);\n else if (t == null)\n for (i in n)\n n[i] = Go(n[i], e.name, null);\n return this;\n },\n copy: function() {\n var e = {}, t = this._;\n for (var n in t)\n e[n] = t[n].slice();\n return new Ht(e);\n },\n call: function(e, t) {\n if ((i = arguments.length - 2) > 0)\n for (var n = new Array(i), o = 0, i, r; o < i; ++o)\n n[o] = arguments[o + 2];\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (r = this._[e], o = 0, i = r.length; o < i; ++o)\n r[o].value.apply(t, n);\n },\n apply: function(e, t, n) {\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (var o = this._[e], i = 0, r = o.length; i < r; ++i)\n o[i].value.apply(t, n);\n }\n};\nfunction La(e, t) {\n for (var n = 0, o = e.length, i; n < o; ++n)\n if ((i = e[n]).name === t)\n return i.value;\n}\nfunction Go(e, t, n) {\n for (var o = 0, i = e.length; o < i; ++o)\n if (e[o].name === t) {\n e[o] = Va, e = e.slice(0, o).concat(e.slice(o + 1));\n break;\n }\n return n != null && e.push({ name: t, value: n }), e;\n}\nvar Zn = \"http://www.w3.org/1999/xhtml\";\nconst Fo = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: Zn,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction hn(e) {\n var t = e += \"\", n = t.indexOf(\":\");\n return n >= 0 && (t = e.slice(0, n)) !== \"xmlns\" && (e = e.slice(n + 1)), Fo.hasOwnProperty(t) ? { space: Fo[t], local: e } : e;\n}\nfunction Ga(e) {\n return function() {\n var t = this.ownerDocument, n = this.namespaceURI;\n return n === Zn && t.documentElement.namespaceURI === Zn ? t.createElement(e) : t.createElementNS(n, e);\n };\n}\nfunction Fa(e) {\n return function() {\n return this.ownerDocument.createElementNS(e.space, e.local);\n };\n}\nfunction Bi(e) {\n var t = hn(e);\n return (t.local ? Fa : Ga)(t);\n}\nfunction Ya() {\n}\nfunction vo(e) {\n return e == null ? Ya : function() {\n return this.querySelector(e);\n };\n}\nfunction Xa(e) {\n typeof e != \"function\" && (e = vo(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = new Array(a), l, u, c = 0; c < a; ++c)\n (l = r[c]) && (u = e.call(l, l.__data__, c, r)) && (\"__data__\" in l && (u.__data__ = l.__data__), s[c] = u);\n return new _e(o, this._parents);\n}\nfunction Za(e) {\n return e == null ? [] : Array.isArray(e) ? e : Array.from(e);\n}\nfunction Ua() {\n return [];\n}\nfunction Ri(e) {\n return e == null ? Ua : function() {\n return this.querySelectorAll(e);\n };\n}\nfunction Wa(e) {\n return function() {\n return Za(e.apply(this, arguments));\n };\n}\nfunction Ka(e) {\n typeof e == \"function\" ? e = Wa(e) : e = Ri(e);\n for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)\n for (var a = t[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && (o.push(e.call(l, l.__data__, u, a)), i.push(l));\n return new _e(o, i);\n}\nfunction Vi(e) {\n return function() {\n return this.matches(e);\n };\n}\nfunction Hi(e) {\n return function(t) {\n return t.matches(e);\n };\n}\nvar qa = Array.prototype.find;\nfunction ja(e) {\n return function() {\n return qa.call(this.children, e);\n };\n}\nfunction Qa() {\n return this.firstElementChild;\n}\nfunction Ja(e) {\n return this.select(e == null ? Qa : ja(typeof e == \"function\" ? e : Hi(e)));\n}\nvar es = Array.prototype.filter;\nfunction ts() {\n return Array.from(this.children);\n}\nfunction ns(e) {\n return function() {\n return es.call(this.children, e);\n };\n}\nfunction os(e) {\n return this.selectAll(e == null ? ts : ns(typeof e == \"function\" ? e : Hi(e)));\n}\nfunction is(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new _e(o, this._parents);\n}\nfunction Li(e) {\n return new Array(e.length);\n}\nfunction rs() {\n return new _e(this._enter || this._groups.map(Li), this._parents);\n}\nfunction qt(e, t) {\n this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;\n}\nqt.prototype = {\n constructor: qt,\n appendChild: function(e) {\n return this._parent.insertBefore(e, this._next);\n },\n insertBefore: function(e, t) {\n return this._parent.insertBefore(e, t);\n },\n querySelector: function(e) {\n return this._parent.querySelector(e);\n },\n querySelectorAll: function(e) {\n return this._parent.querySelectorAll(e);\n }\n};\nfunction as(e) {\n return function() {\n return e;\n };\n}\nfunction ss(e, t, n, o, i, r) {\n for (var a = 0, s, l = t.length, u = r.length; a < u; ++a)\n (s = t[a]) ? (s.__data__ = r[a], o[a] = s) : n[a] = new qt(e, r[a]);\n for (; a < l; ++a)\n (s = t[a]) && (i[a] = s);\n}\nfunction ls(e, t, n, o, i, r, a) {\n var s, l, u = /* @__PURE__ */ new Map(), c = t.length, v = r.length, g = new Array(c), x;\n for (s = 0; s < c; ++s)\n (l = t[s]) && (g[s] = x = a.call(l, l.__data__, s, t) + \"\", u.has(x) ? i[s] = l : u.set(x, l));\n for (s = 0; s < v; ++s)\n x = a.call(e, r[s], s, r) + \"\", (l = u.get(x)) ? (o[s] = l, l.__data__ = r[s], u.delete(x)) : n[s] = new qt(e, r[s]);\n for (s = 0; s < c; ++s)\n (l = t[s]) && u.get(g[s]) === l && (i[s] = l);\n}\nfunction us(e) {\n return e.__data__;\n}\nfunction cs(e, t) {\n if (!arguments.length)\n return Array.from(this, us);\n var n = t ? ls : ss, o = this._parents, i = this._groups;\n typeof e != \"function\" && (e = as(e));\n for (var r = i.length, a = new Array(r), s = new Array(r), l = new Array(r), u = 0; u < r; ++u) {\n var c = o[u], v = i[u], g = v.length, x = ds(e.call(c, c && c.__data__, u, o)), h = x.length, d = s[u] = new Array(h), w = a[u] = new Array(h), y = l[u] = new Array(g);\n n(c, v, d, w, y, x, t);\n for (var S = 0, V = 0, p, N; S < h; ++S)\n if (p = d[S]) {\n for (S >= V && (V = S + 1); !(N = w[V]) && ++V < h; )\n ;\n p._next = N || null;\n }\n }\n return a = new _e(a, o), a._enter = s, a._exit = l, a;\n}\nfunction ds(e) {\n return typeof e == \"object\" && \"length\" in e ? e : Array.from(e);\n}\nfunction fs() {\n return new _e(this._exit || this._groups.map(Li), this._parents);\n}\nfunction hs(e, t, n) {\n var o = this.enter(), i = this, r = this.exit();\n return typeof e == \"function\" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + \"\"), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;\n}\nfunction gs(e) {\n for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, a = Math.min(i, r), s = new Array(i), l = 0; l < a; ++l)\n for (var u = n[l], c = o[l], v = u.length, g = s[l] = new Array(v), x, h = 0; h < v; ++h)\n (x = u[h] || c[h]) && (g[h] = x);\n for (; l < i; ++l)\n s[l] = n[l];\n return new _e(s, this._parents);\n}\nfunction vs() {\n for (var e = this._groups, t = -1, n = e.length; ++t < n; )\n for (var o = e[t], i = o.length - 1, r = o[i], a; --i >= 0; )\n (a = o[i]) && (r && a.compareDocumentPosition(r) ^ 4 && r.parentNode.insertBefore(a, r), r = a);\n return this;\n}\nfunction ms(e) {\n e || (e = ps);\n function t(v, g) {\n return v && g ? e(v.__data__, g.__data__) : !v - !g;\n }\n for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {\n for (var a = n[r], s = a.length, l = i[r] = new Array(s), u, c = 0; c < s; ++c)\n (u = a[c]) && (l[c] = u);\n l.sort(t);\n }\n return new _e(i, this._parents).order();\n}\nfunction ps(e, t) {\n return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;\n}\nfunction ys() {\n var e = arguments[0];\n return arguments[0] = this, e.apply(null, arguments), this;\n}\nfunction xs() {\n return Array.from(this);\n}\nfunction _s() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length; i < r; ++i) {\n var a = o[i];\n if (a)\n return a;\n }\n return null;\n}\nfunction ws() {\n let e = 0;\n for (const t of this)\n ++e;\n return e;\n}\nfunction bs() {\n return !this.node();\n}\nfunction Es(e) {\n for (var t = this._groups, n = 0, o = t.length; n < o; ++n)\n for (var i = t[n], r = 0, a = i.length, s; r < a; ++r)\n (s = i[r]) && e.call(s, s.__data__, r, i);\n return this;\n}\nfunction Ss(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ns(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction Cs(e, t) {\n return function() {\n this.setAttribute(e, t);\n };\n}\nfunction Ms(e, t) {\n return function() {\n this.setAttributeNS(e.space, e.local, t);\n };\n}\nfunction $s(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttribute(e) : this.setAttribute(e, n);\n };\n}\nfunction ks(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);\n };\n}\nfunction Os(e, t) {\n var n = hn(e);\n if (arguments.length < 2) {\n var o = this.node();\n return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n);\n }\n return this.each((t == null ? n.local ? Ns : Ss : typeof t == \"function\" ? n.local ? ks : $s : n.local ? Ms : Cs)(n, t));\n}\nfunction Gi(e) {\n return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;\n}\nfunction Ts(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction Is(e, t, n) {\n return function() {\n this.style.setProperty(e, t, n);\n };\n}\nfunction Ps(e, t, n) {\n return function() {\n var o = t.apply(this, arguments);\n o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n);\n };\n}\nfunction Ds(e, t, n) {\n return arguments.length > 1 ? this.each((t == null ? Ts : typeof t == \"function\" ? Ps : Is)(e, t, n ?? \"\")) : ft(this.node(), e);\n}\nfunction ft(e, t) {\n return e.style.getPropertyValue(t) || Gi(e).getComputedStyle(e, null).getPropertyValue(t);\n}\nfunction zs(e) {\n return function() {\n delete this[e];\n };\n}\nfunction As(e, t) {\n return function() {\n this[e] = t;\n };\n}\nfunction Bs(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? delete this[e] : this[e] = n;\n };\n}\nfunction Rs(e, t) {\n return arguments.length > 1 ? this.each((t == null ? zs : typeof t == \"function\" ? Bs : As)(e, t)) : this.node()[e];\n}\nfunction Fi(e) {\n return e.trim().split(/^|\\s+/);\n}\nfunction mo(e) {\n return e.classList || new Yi(e);\n}\nfunction Yi(e) {\n this._node = e, this._names = Fi(e.getAttribute(\"class\") || \"\");\n}\nYi.prototype = {\n add: function(e) {\n var t = this._names.indexOf(e);\n t < 0 && (this._names.push(e), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n remove: function(e) {\n var t = this._names.indexOf(e);\n t >= 0 && (this._names.splice(t, 1), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n contains: function(e) {\n return this._names.indexOf(e) >= 0;\n }\n};\nfunction Xi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.add(t[o]);\n}\nfunction Zi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.remove(t[o]);\n}\nfunction Vs(e) {\n return function() {\n Xi(this, e);\n };\n}\nfunction Hs(e) {\n return function() {\n Zi(this, e);\n };\n}\nfunction Ls(e, t) {\n return function() {\n (t.apply(this, arguments) ? Xi : Zi)(this, e);\n };\n}\nfunction Gs(e, t) {\n var n = Fi(e + \"\");\n if (arguments.length < 2) {\n for (var o = mo(this.node()), i = -1, r = n.length; ++i < r; )\n if (!o.contains(n[i]))\n return !1;\n return !0;\n }\n return this.each((typeof t == \"function\" ? Ls : t ? Vs : Hs)(n, t));\n}\nfunction Fs() {\n this.textContent = \"\";\n}\nfunction Ys(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Xs(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.textContent = t ?? \"\";\n };\n}\nfunction Zs(e) {\n return arguments.length ? this.each(e == null ? Fs : (typeof e == \"function\" ? Xs : Ys)(e)) : this.node().textContent;\n}\nfunction Us() {\n this.innerHTML = \"\";\n}\nfunction Ws(e) {\n return function() {\n this.innerHTML = e;\n };\n}\nfunction Ks(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.innerHTML = t ?? \"\";\n };\n}\nfunction qs(e) {\n return arguments.length ? this.each(e == null ? Us : (typeof e == \"function\" ? Ks : Ws)(e)) : this.node().innerHTML;\n}\nfunction js() {\n this.nextSibling && this.parentNode.appendChild(this);\n}\nfunction Qs() {\n return this.each(js);\n}\nfunction Js() {\n this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction el() {\n return this.each(Js);\n}\nfunction tl(e) {\n var t = typeof e == \"function\" ? e : Bi(e);\n return this.select(function() {\n return this.appendChild(t.apply(this, arguments));\n });\n}\nfunction nl() {\n return null;\n}\nfunction ol(e, t) {\n var n = typeof e == \"function\" ? e : Bi(e), o = t == null ? nl : typeof t == \"function\" ? t : vo(t);\n return this.select(function() {\n return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);\n });\n}\nfunction il() {\n var e = this.parentNode;\n e && e.removeChild(this);\n}\nfunction rl() {\n return this.each(il);\n}\nfunction al() {\n var e = this.cloneNode(!1), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction sl() {\n var e = this.cloneNode(!0), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction ll(e) {\n return this.select(e ? sl : al);\n}\nfunction ul(e) {\n return arguments.length ? this.property(\"__data__\", e) : this.node().__data__;\n}\nfunction cl(e) {\n return function(t) {\n e.call(this, t, this.__data__);\n };\n}\nfunction dl(e) {\n return e.trim().split(/^|\\s+/).map(function(t) {\n var n = \"\", o = t.indexOf(\".\");\n return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };\n });\n}\nfunction fl(e) {\n return function() {\n var t = this.__on;\n if (t) {\n for (var n = 0, o = -1, i = t.length, r; n < i; ++n)\n r = t[n], (!e.type || r.type === e.type) && r.name === e.name ? this.removeEventListener(r.type, r.listener, r.options) : t[++o] = r;\n ++o ? t.length = o : delete this.__on;\n }\n };\n}\nfunction hl(e, t, n) {\n return function() {\n var o = this.__on, i, r = cl(t);\n if (o) {\n for (var a = 0, s = o.length; a < s; ++a)\n if ((i = o[a]).type === e.type && i.name === e.name) {\n this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;\n return;\n }\n }\n this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];\n };\n}\nfunction gl(e, t, n) {\n var o = dl(e + \"\"), i, r = o.length, a;\n if (arguments.length < 2) {\n var s = this.node().__on;\n if (s) {\n for (var l = 0, u = s.length, c; l < u; ++l)\n for (i = 0, c = s[l]; i < r; ++i)\n if ((a = o[i]).type === c.type && a.name === c.name)\n return c.value;\n }\n return;\n }\n for (s = t ? hl : fl, i = 0; i < r; ++i)\n this.each(s(o[i], t, n));\n return this;\n}\nfunction Ui(e, t, n) {\n var o = Gi(e), i = o.CustomEvent;\n typeof i == \"function\" ? i = new i(t, n) : (i = o.document.createEvent(\"Event\"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);\n}\nfunction vl(e, t) {\n return function() {\n return Ui(this, e, t);\n };\n}\nfunction ml(e, t) {\n return function() {\n return Ui(this, e, t.apply(this, arguments));\n };\n}\nfunction pl(e, t) {\n return this.each((typeof t == \"function\" ? ml : vl)(e, t));\n}\nfunction* yl() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length, a; i < r; ++i)\n (a = o[i]) && (yield a);\n}\nvar Wi = [null];\nfunction _e(e, t) {\n this._groups = e, this._parents = t;\n}\nfunction $t() {\n return new _e([[document.documentElement]], Wi);\n}\nfunction xl() {\n return this;\n}\n_e.prototype = $t.prototype = {\n constructor: _e,\n select: Xa,\n selectAll: Ka,\n selectChild: Ja,\n selectChildren: os,\n filter: is,\n data: cs,\n enter: rs,\n exit: fs,\n join: hs,\n merge: gs,\n selection: xl,\n order: vs,\n sort: ms,\n call: ys,\n nodes: xs,\n node: _s,\n size: ws,\n empty: bs,\n each: Es,\n attr: Os,\n style: Ds,\n property: Rs,\n classed: Gs,\n text: Zs,\n html: qs,\n raise: Qs,\n lower: el,\n append: tl,\n insert: ol,\n remove: rl,\n clone: ll,\n datum: ul,\n on: gl,\n dispatch: pl,\n [Symbol.iterator]: yl\n};\nfunction we(e) {\n return typeof e == \"string\" ? new _e([[document.querySelector(e)]], [document.documentElement]) : new _e([[e]], Wi);\n}\nfunction _l(e) {\n let t;\n for (; t = e.sourceEvent; )\n e = t;\n return e;\n}\nfunction Ne(e, t) {\n if (e = _l(e), t === void 0 && (t = e.currentTarget), t) {\n var n = t.ownerSVGElement || t;\n if (n.createSVGPoint) {\n var o = n.createSVGPoint();\n return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y];\n }\n if (t.getBoundingClientRect) {\n var i = t.getBoundingClientRect();\n return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];\n }\n }\n return [e.pageX, e.pageY];\n}\nconst wl = { passive: !1 }, bt = { capture: !0, passive: !1 };\nfunction $n(e) {\n e.stopImmediatePropagation();\n}\nfunction at(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Ki(e) {\n var t = e.document.documentElement, n = we(e).on(\"dragstart.drag\", at, bt);\n \"onselectstart\" in t ? n.on(\"selectstart.drag\", at, bt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = \"none\");\n}\nfunction qi(e, t) {\n var n = e.document.documentElement, o = we(e).on(\"dragstart.drag\", null);\n t && (o.on(\"click.drag\", at, bt), setTimeout(function() {\n o.on(\"click.drag\", null);\n }, 0)), \"onselectstart\" in n ? o.on(\"selectstart.drag\", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);\n}\nconst Pt = (e) => () => e;\nfunction Un(e, {\n sourceEvent: t,\n subject: n,\n target: o,\n identifier: i,\n active: r,\n x: a,\n y: s,\n dx: l,\n dy: u,\n dispatch: c\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n subject: { value: n, enumerable: !0, configurable: !0 },\n target: { value: o, enumerable: !0, configurable: !0 },\n identifier: { value: i, enumerable: !0, configurable: !0 },\n active: { value: r, enumerable: !0, configurable: !0 },\n x: { value: a, enumerable: !0, configurable: !0 },\n y: { value: s, enumerable: !0, configurable: !0 },\n dx: { value: l, enumerable: !0, configurable: !0 },\n dy: { value: u, enumerable: !0, configurable: !0 },\n _: { value: c }\n });\n}\nUn.prototype.on = function() {\n var e = this._.on.apply(this._, arguments);\n return e === this._ ? this : e;\n};\nfunction bl(e) {\n return !e.ctrlKey && !e.button;\n}\nfunction El() {\n return this.parentNode;\n}\nfunction Sl(e, t) {\n return t ?? { x: e.x, y: e.y };\n}\nfunction Nl() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Cl() {\n var e = bl, t = El, n = Sl, o = Nl, i = {}, r = fn(\"start\", \"drag\", \"end\"), a = 0, s, l, u, c, v = 0;\n function g(p) {\n p.on(\"mousedown.drag\", x).filter(o).on(\"touchstart.drag\", w).on(\"touchmove.drag\", y, wl).on(\"touchend.drag touchcancel.drag\", S).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function x(p, N) {\n if (!(c || !e.call(this, p, N))) {\n var T = V(this, t.call(this, p, N), p, N, \"mouse\");\n T && (we(p.view).on(\"mousemove.drag\", h, bt).on(\"mouseup.drag\", d, bt), Ki(p.view), $n(p), u = !1, s = p.clientX, l = p.clientY, T(\"start\", p));\n }\n }\n function h(p) {\n if (at(p), !u) {\n var N = p.clientX - s, T = p.clientY - l;\n u = N * N + T * T > v;\n }\n i.mouse(\"drag\", p);\n }\n function d(p) {\n we(p.view).on(\"mousemove.drag mouseup.drag\", null), qi(p.view, u), at(p), i.mouse(\"end\", p);\n }\n function w(p, N) {\n if (e.call(this, p, N)) {\n var T = p.changedTouches, _ = t.call(this, p, N), P = T.length, R, $;\n for (R = 0; R < P; ++R)\n ($ = V(this, _, p, N, T[R].identifier, T[R])) && ($n(p), $(\"start\", p, T[R]));\n }\n }\n function y(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (_ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && (at(p), P(\"drag\", p, N[_]));\n }\n function S(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (c && clearTimeout(c), c = setTimeout(function() {\n c = null;\n }, 500), _ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && ($n(p), P(\"end\", p, N[_]));\n }\n function V(p, N, T, _, P, R) {\n var $ = r.copy(), D = Ne(R || T, N), Q, ee, m;\n if ((m = n.call(p, new Un(\"beforestart\", {\n sourceEvent: T,\n target: g,\n identifier: P,\n active: a,\n x: D[0],\n y: D[1],\n dx: 0,\n dy: 0,\n dispatch: $\n }), _)) != null)\n return Q = m.x - D[0] || 0, ee = m.y - D[1] || 0, function A(E, G, Z) {\n var K = D, z;\n switch (E) {\n case \"start\":\n i[P] = A, z = a++;\n break;\n case \"end\":\n delete i[P], --a;\n case \"drag\":\n D = Ne(Z || G, N), z = a;\n break;\n }\n $.call(\n E,\n p,\n new Un(E, {\n sourceEvent: G,\n subject: m,\n target: g,\n identifier: P,\n active: z,\n x: D[0] + Q,\n y: D[1] + ee,\n dx: D[0] - K[0],\n dy: D[1] - K[1],\n dispatch: $\n }),\n _\n );\n };\n }\n return g.filter = function(p) {\n return arguments.length ? (e = typeof p == \"function\" ? p : Pt(!!p), g) : e;\n }, g.container = function(p) {\n return arguments.length ? (t = typeof p == \"function\" ? p : Pt(p), g) : t;\n }, g.subject = function(p) {\n return arguments.length ? (n = typeof p == \"function\" ? p : Pt(p), g) : n;\n }, g.touchable = function(p) {\n return arguments.length ? (o = typeof p == \"function\" ? p : Pt(!!p), g) : o;\n }, g.on = function() {\n var p = r.on.apply(r, arguments);\n return p === r ? g : p;\n }, g.clickDistance = function(p) {\n return arguments.length ? (v = (p = +p) * p, g) : Math.sqrt(v);\n }, g;\n}\nfunction ji(e) {\n const t = fe(), n = M(t, \"vueFlowRef\"), o = M(t, \"snapToGrid\"), i = M(t, \"snapGrid\"), r = M(t, \"noDragClassName\"), a = M(t, \"nodes\"), s = M(t, \"nodeExtent\"), l = M(t, \"viewport\"), u = M(t, \"autoPanOnNodeDrag\"), c = M(t, \"nodesDraggable\"), v = M(t, \"panBy\"), g = M(t, \"findNode\"), x = M(t, \"multiSelectionActive\"), h = M(t, \"nodesSelectionActive\"), d = M(t, \"selectNodesOnDrag\"), w = M(t, \"removeSelectedElements\"), y = M(t, \"addSelectedNodes\"), S = M(t, \"updateNodePositions\"), V = M(t, \"emits\"), { onStart: p, onDrag: N, onStop: T, el: _, disabled: P, id: R, selectable: $ } = e, D = ie(!1);\n let Q = ie([]), ee = ie(), m = ie(null), A = ie({ x: void 0, y: void 0 }), E = ie({ x: 0, y: 0 }), G = ie(null), Z = ie(0), K = ie(!1);\n const z = Ra(), W = ({ x: q, y: te }) => {\n A.value = { x: q, y: te };\n let re = !1;\n if (Q.value = Q.value.map((k) => {\n const H = { x: q - k.distance.x, y: te - k.distance.y };\n o.value && (H.x = i.value[0] * Math.round(H.x / i.value[0]), H.y = i.value[1] * Math.round(H.y / i.value[1]));\n const { computedPosition: f } = go(\n k,\n H,\n V.value.error,\n s.value,\n k.parentNode ? g.value(k.parentNode) : void 0\n );\n return re = re || k.position.x !== f.x || k.position.y !== f.y, k.position = f, k;\n }), !!re && (S.value(Q.value, !0, !0), D.value = !0, G.value)) {\n const [k, H] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n N({ event: G.value, node: k, nodes: H });\n }\n }, B = () => {\n if (!m.value)\n return;\n const [q, te] = Pi(E.value, m.value);\n if (q !== 0 || te !== 0) {\n const re = {\n x: (A.value.x ?? 0) - q / l.value.zoom,\n y: (A.value.y ?? 0) - te / l.value.zoom\n };\n v.value({ x: q, y: te }) && W(re);\n }\n Z.value = requestAnimationFrame(B);\n };\n return de([() => le(P), _], ([q, te]) => {\n if (te) {\n const re = we(te);\n if (q)\n re.on(\".drag\", null);\n else {\n const k = g.value(R);\n ee.value = Cl().on(\"start\", (H) => {\n var b;\n !d.value && !x.value && k && (k.selected || w.value()), k && le($) && d.value && Xn(\n k,\n x.value,\n y.value,\n w.value,\n h,\n !1,\n te\n );\n const f = z(H);\n if (A.value = f, Q.value = Pa(a.value, c.value, f, g.value, R), Q.value.length) {\n const [L, I] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n p({ event: H.sourceEvent, node: L, nodes: I });\n }\n m.value = ((b = n.value) == null ? void 0 : b.getBoundingClientRect()) || null, E.value = rt(H.sourceEvent, m.value);\n }).on(\"drag\", (H) => {\n const f = z(H);\n !K.value && u.value && (K.value = !0, B()), (A.value.x !== f.xSnapped || A.value.y !== f.ySnapped) && Q.value.length && (G.value = H.sourceEvent, E.value = rt(H.sourceEvent, m.value), W(f));\n }).on(\"end\", (H) => {\n if (D.value = !1, K.value = !1, cancelAnimationFrame(Z.value), Q.value.length) {\n S.value(Q.value, !1, !1);\n const [f, b] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n T({ event: H.sourceEvent, node: f, nodes: b });\n }\n }).filter((H) => {\n const f = H.target;\n return !H.button && (!r.value || !Ho(f, `.${r.value}`, te) && (!(k != null && k.dragHandle) || Ho(f, k.dragHandle, te)));\n }), re.call(ee.value);\n }\n }\n }), D;\n}\nconst Qi = \"vue-flow__node-desc\", Ji = \"vue-flow__edge-desc\", Ml = \"vue-flow__aria-live\", er = [\"Enter\", \" \", \"Escape\"], st = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction Wn(e) {\n var i, r;\n const t = ((r = (i = e.composedPath) == null ? void 0 : i.call(e)) == null ? void 0 : r[0]) || e.target, n = Ae(t.hasAttribute) ? t.hasAttribute(\"contenteditable\") : !1, o = Ae(t.closest) ? t.closest(\".nokey\") : null;\n return [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(t == null ? void 0 : t.nodeName) || n || !!o;\n}\nfunction $l(e) {\n return e.ctrlKey || e.metaKey || e.shiftKey;\n}\nfunction kl(e, t) {\n return (n) => e.some((o) => {\n const i = o.split(\"+\").map((r) => r.trim().toLowerCase());\n return i.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), i.every((r) => t.has(r)));\n });\n}\nconst _t = (e, t) => {\n const n = ao(), o = ie(le(e) === !0), i = ie(!1), r = ie(/* @__PURE__ */ new Set());\n return de(o, () => {\n t == null || t(o.value);\n }), de(\n () => le(e),\n (a) => {\n if (n && typeof n.addEventListener < \"u\" && ro(n, \"blur\", () => {\n o.value = !1;\n }), zr(a)) {\n o.value = a;\n return;\n }\n Array.isArray(a) && (a = kl(a, r.value)), a && (Mo(\n a,\n (s) => {\n i.value = $l(s), !(!i.value && Wn(s)) && (s.preventDefault(), o.value = !0);\n },\n { eventName: \"keydown\" }\n ), Mo(\n a,\n (s) => {\n if (o.value) {\n if (!i.value && Wn(s))\n return;\n i.value = !1, r.value.clear(), o.value = !1;\n }\n },\n { eventName: \"keyup\" }\n ));\n },\n {\n immediate: !0\n }\n ), o;\n}, Ol = ge({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"draggable\", \"selectable\", \"focusable\", \"connectable\", \"node\", \"resizeObserver\"],\n setup(e) {\n ut($i, e.id);\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"noPanClassName\"), r = M(t, \"selectNodesOnDrag\"), a = M(t, \"nodesSelectionActive\"), s = M(t, \"multiSelectionActive\"), l = M(t, \"emits\"), u = M(t, \"findNode\"), c = M(t, \"removeSelectedNodes\"), v = M(t, \"addSelectedNodes\"), g = M(t, \"updateNodeDimensions\"), x = M(t, \"onUpdateNodeInternals\"), h = M(t, \"getIntersectingNodes\"), d = M(t, \"getNodeTypes\"), w = M(t, \"nodeExtent\"), y = M(t, \"elevateNodesOnSelect\"), S = M(t, \"disableKeyboardA11y\"), V = M(t, \"ariaLiveMessage\"), p = M(t, \"snapToGrid\"), N = M(t, \"snapGrid\"), T = Ai(), _ = yt(e, \"node\"), P = J(() => u.value(_.value.parentNode)), R = J(() => sn([_.value], o.value)), $ = ie();\n ut(ki, $);\n const { emit: D, on: Q } = Ba(_.value, l.value), ee = ji({\n id: e.id,\n el: $,\n disabled: () => !e.draggable,\n selectable: () => e.selectable,\n onStart(k) {\n D.dragStart({ ...k, intersections: h.value(_.value) });\n },\n onDrag(k) {\n D.drag({ ...k, intersections: h.value(_.value) });\n },\n onStop(k) {\n D.dragStop({ ...k, intersections: h.value(_.value) });\n }\n }), m = J(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = J(() => {\n const k = (_.value.style instanceof Function ? _.value.style(_.value) : _.value.style) || {}, H = _.value.width instanceof Function ? _.value.width(_.value) : _.value.width, f = _.value.height instanceof Function ? _.value.height(_.value) : _.value.height;\n return H && (k.width = typeof H == \"string\" ? H : `${H}px`), f && (k.height = typeof f == \"string\" ? f : `${f}px`), k;\n }), E = () => Number(_.value.zIndex ?? A.value.zIndex ?? 0);\n return x.value((k) => {\n k.includes(e.id) && Z();\n }), Ve(() => {\n e.resizeObserver.observe($.value);\n }), gi(() => {\n e.resizeObserver.unobserve($.value);\n }), de(\n [() => _.value.type, () => _.value.sourcePosition, () => _.value.targetPosition],\n () => {\n g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n },\n { flush: \"pre\" }\n ), de(\n [\n () => _.value.position.x,\n () => _.value.position.y,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.x;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.y;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.z;\n },\n () => E(),\n () => _.value.selected,\n () => _.value.dimensions.height,\n () => _.value.dimensions.width,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.height;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.width;\n }\n ],\n ([k, H, f, b, L, I]) => {\n const F = {\n x: k,\n y: H,\n z: I + (y.value && _.value.selected ? 1e3 : 0)\n };\n Ie(f) && Ie(b) ? _.value.computedPosition = ma({ x: f, y: b, z: L }, F) : _.value.computedPosition = F;\n },\n { flush: \"pre\", immediate: !0 }\n ), de([() => _.value.extent, () => w.value], ([k, H], [f, b]) => {\n (k !== f || H !== b) && G();\n }), _.value.extent === \"parent\" || typeof _.value.extent == \"object\" && \"range\" in _.value.extent && _.value.extent.range === \"parent\" ? ye(() => _.value.initialized).toBe(!0).then(G) : G(), () => ue(\n \"div\",\n {\n ref: $,\n \"data-id\": _.value.id,\n class: [\n \"vue-flow__node\",\n `vue-flow__node-${e.type === !1 ? \"default\" : e.name}`,\n {\n [i.value]: e.draggable,\n dragging: ee == null ? void 0 : ee.value,\n selected: _.value.selected,\n selectable: e.selectable\n },\n m.value\n ],\n style: {\n zIndex: _.value.computedPosition.z ?? E(),\n transform: `translate(${_.value.computedPosition.x}px,${_.value.computedPosition.y}px)`,\n pointerEvents: e.selectable || e.draggable ? \"all\" : \"none\",\n visibility: _.value.initialized ? \"visible\" : \"hidden\",\n ...A.value\n },\n tabIndex: e.focusable ? 0 : void 0,\n role: e.focusable ? \"button\" : void 0,\n \"aria-describedby\": S.value ? void 0 : `${Qi}-${n.value}`,\n \"aria-label\": _.value.ariaLabel,\n onMouseenter: K,\n onMousemove: z,\n onMouseleave: W,\n onContextmenu: B,\n onClick: te,\n onDblclick: q,\n onKeydown: re\n },\n [\n ue(e.type === !1 ? d.value.default : e.type, {\n id: _.value.id,\n type: _.value.type,\n data: _.value.data,\n events: { ..._.value.events, ...Q },\n selected: !!_.value.selected,\n resizing: !!_.value.resizing,\n dragging: ee.value,\n connectable: e.connectable,\n position: _.value.position,\n dimensions: _.value.dimensions,\n isValidTargetPos: _.value.isValidTargetPos,\n isValidSourcePos: _.value.isValidSourcePos,\n parent: _.value.parentNode,\n zIndex: _.value.computedPosition.z,\n targetPosition: _.value.targetPosition,\n sourcePosition: _.value.sourcePosition,\n label: _.value.label,\n dragHandle: _.value.dragHandle,\n onUpdateNodeInternals: Z\n })\n ]\n );\n function G() {\n const k = _.value.computedPosition;\n p.value && (k.x = N.value[0] * Math.round(k.x / N.value[0]), k.y = N.value[1] * Math.round(k.y / N.value[1]));\n const { computedPosition: H, position: f } = go(_.value, k, l.value.error, w.value, P.value);\n (_.value.computedPosition.x !== H.x || _.value.computedPosition.y !== H.y) && (_.value.computedPosition = { ..._.value.computedPosition, ...H }), (_.value.position.x !== f.x || _.value.position.y !== f.y) && (_.value.position = f);\n }\n function Z() {\n $.value && g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n }\n function K(k) {\n ee != null && ee.value || D.mouseEnter({ event: k, node: _.value, connectedEdges: R.value });\n }\n function z(k) {\n ee != null && ee.value || D.mouseMove({ event: k, node: _.value, connectedEdges: R.value });\n }\n function W(k) {\n ee != null && ee.value || D.mouseLeave({ event: k, node: _.value, connectedEdges: R.value });\n }\n function B(k) {\n return D.contextMenu({ event: k, node: _.value, connectedEdges: R.value });\n }\n function q(k) {\n return D.doubleClick({ event: k, node: _.value, connectedEdges: R.value });\n }\n function te(k) {\n e.selectable && (!r.value || !e.draggable) && Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n !1,\n $.value\n ), D.click({ event: k, node: _.value, connectedEdges: R.value });\n }\n function re(k) {\n var H;\n if (!Wn(k))\n if (er.includes(k.key) && e.selectable) {\n const f = k.key === \"Escape\";\n f && ((H = $.value) == null || H.blur()), Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n f,\n $.value\n );\n } else\n !S.value && e.draggable && _.value.selected && st[k.key] && (V.value = `Moved selected node ${k.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~_.value.position.x}, y: ${~~_.value.position.y}`, T(\n {\n x: st[k.key].x,\n y: st[k.key].y\n },\n k.shiftKey\n ));\n }\n }\n}), Tl = Ol, Il = [\"transform\"], Pl = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"], Dl = [\"y\"], zl = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n}, Al = /* @__PURE__ */ ge({\n ...zl,\n props: {\n x: null,\n y: null,\n label: null,\n labelStyle: { default: {} },\n labelShowBg: { type: Boolean, default: !0 },\n labelBgStyle: { default: {} },\n labelBgPadding: { default: [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(e) {\n let t = ie({ x: 0, y: 0, width: 0, height: 0 });\n const n = ie(null), o = J(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`);\n Ve(i), de([() => e.x, () => e.y, n, () => e.label], i);\n function i() {\n if (!n.value)\n return;\n const r = n.value.getBBox();\n (r.width !== t.value.width || r.height !== t.value.height) && (t.value = r);\n }\n return (r, a) => (oe(), se(\"g\", {\n transform: C(o),\n class: \"vue-flow__edge-textwrapper\"\n }, [\n e.labelShowBg ? (oe(), se(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${C(t).width + 2 * e.labelBgPadding[0]}px`,\n height: `${C(t).height + 2 * e.labelBgPadding[1]}px`,\n x: -e.labelBgPadding[0],\n y: -e.labelBgPadding[1],\n style: Le(e.labelBgStyle),\n rx: e.labelBgBorderRadius,\n ry: e.labelBgBorderRadius\n }, null, 12, Pl)) : Ee(\"\", !0),\n ct(\"text\", vi(r.$attrs, {\n ref_key: \"el\",\n ref: n,\n class: \"vue-flow__edge-text\",\n y: C(t).height / 2,\n dy: \"0.3em\",\n style: e.labelStyle\n }), [\n xe(r.$slots, \"default\", {}, () => [\n C(Pe)(e.label) ? (oe(), se(Ce, { key: 1 }, [\n Cr(Vn(e.label), 1)\n ], 64)) : (oe(), ze(mi(e.label), { key: 0 }))\n ])\n ], 16, Dl)\n ], 8, Il));\n }\n}), gn = function({\n path: e,\n label: t,\n labelX: n,\n labelY: o,\n labelBgBorderRadius: i,\n labelBgPadding: r,\n labelBgStyle: a,\n labelShowBg: s = !0,\n labelStyle: l,\n markerStart: u,\n markerEnd: c,\n interactionWidth: v = 20\n}, { attrs: g }) {\n return [\n ue(\"path\", {\n style: g.style,\n class: [\"vue-flow__edge-path\", g.class].join(\" \"),\n d: e,\n \"marker-end\": c,\n \"marker-start\": u\n }),\n v ? ue(\"path\", {\n d: e,\n fill: \"none\",\n \"stroke-opacity\": 0,\n \"stroke-width\": v\n }) : null,\n t && Ie(n) && Ie(o) ? ue(Al, {\n x: n,\n y: o,\n label: t,\n labelStyle: l,\n labelShowBg: s,\n labelBgStyle: a,\n labelBgPadding: r,\n labelBgBorderRadius: i\n }) : null\n ];\n};\ngn.props = [\n \"path\",\n \"labelX\",\n \"labelY\",\n \"label\",\n \"labelBgBorderRadius\",\n \"labelBgPadding\",\n \"labelBgStyle\",\n \"labelShowBg\",\n \"labelStyle\",\n \"markerStart\",\n \"markerEnd\",\n \"interactionWidth\"\n];\ngn.inheritAttrs = !1;\ngn.compatConfig = { MODE: 3 };\nconst vn = gn;\nfunction tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, a = Math.abs(o - t) / 2, s = o < t ? o + a : o - a;\n return [r, s, i, a];\n}\nfunction nr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o,\n sourceControlX: i,\n sourceControlY: r,\n targetControlX: a,\n targetControlY: s\n}) {\n const l = e * 0.125 + i * 0.375 + a * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(l - e), v = Math.abs(u - t);\n return [l, u, c, v];\n}\nfunction Dt(e, t) {\n return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);\n}\nfunction Yo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {\n let a, s;\n switch (e) {\n case j.Left:\n a = t - Dt(t - o, r), s = n;\n break;\n case j.Right:\n a = t + Dt(o - t, r), s = n;\n break;\n case j.Top:\n a = t, s = n - Dt(n - i, r);\n break;\n case j.Bottom:\n a = t, s = n + Dt(i - n, r);\n break;\n }\n return [a, s];\n}\nfunction Kn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n curvature: a = 0.25\n}) {\n const [s, l] = Yo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i,\n c: a\n }), [u, c] = Yo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t,\n c: a\n }), [v, g, x, h] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: s,\n sourceControlY: l,\n targetControlX: u,\n targetControlY: c\n });\n return [\n `M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,\n v,\n g,\n x,\n h\n ];\n}\nconst mn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = Kn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nmn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nmn.inheritAttrs = !1;\nmn.compatConfig = { MODE: 3 };\nconst Bl = mn;\nfunction Xo({ pos: e, x1: t, y1: n, x2: o, y2: i }) {\n let r, a;\n switch (e) {\n case j.Left:\n case j.Right:\n r = 0.5 * (t + o), a = n;\n break;\n case j.Top:\n case j.Bottom:\n r = t, a = 0.5 * (n + i);\n break;\n }\n return [r, a];\n}\nfunction or({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top\n}) {\n const [a, s] = Xo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i\n }), [l, u] = Xo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t\n }), [c, v, g, x] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: a,\n sourceControlY: s,\n targetControlX: l,\n targetControlY: u\n });\n return [\n `M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,\n c,\n v,\n g,\n x\n ];\n}\nconst pn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = or({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\npn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\npn.inheritAttrs = !1;\npn.compatConfig = { MODE: 3 };\nconst Rl = pn, Zo = {\n [j.Left]: { x: -1, y: 0 },\n [j.Right]: { x: 1, y: 0 },\n [j.Top]: { x: 0, y: -1 },\n [j.Bottom]: { x: 0, y: 1 }\n};\nfunction Vl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n\n}) {\n return t === j.Left || t === j.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction Uo(e, t) {\n return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);\n}\nfunction Hl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n,\n targetPosition: o = j.Top,\n center: i,\n offset: r\n}) {\n const a = Zo[t], s = Zo[o], l = { x: e.x + a.x * r, y: e.y + a.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Vl({\n source: l,\n sourcePosition: t,\n target: u\n }), v = c.x !== 0 ? \"x\" : \"y\", g = c[v];\n let x, h, d;\n const [w, y, S, V] = tr({\n sourceX: e.x,\n sourceY: e.y,\n targetX: n.x,\n targetY: n.y\n });\n if (a[v] * s[v] === -1) {\n h = i.x || w, d = i.y || y;\n const N = [\n { x: h, y: l.y },\n { x: h, y: u.y }\n ], T = [\n { x: l.x, y: d },\n { x: u.x, y: d }\n ];\n a[v] === g ? x = v === \"x\" ? N : T : x = v === \"x\" ? T : N;\n } else {\n const N = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];\n if (v === \"x\" ? x = a.x === g ? T : N : x = a.y === g ? N : T, t !== o) {\n const _ = v === \"x\" ? \"y\" : \"x\", P = a[v] === s[_], R = l[_] > u[_], $ = l[_] < u[_];\n (a[v] === 1 && (!P && R || P && $) || a[v] !== 1 && (!P && $ || P && R)) && (x = v === \"x\" ? N : T);\n }\n h = x[0].x, d = x[0].y;\n }\n return [[e, l, ...x, u, n], h, d, S, V];\n}\nfunction Ll(e, t, n, o) {\n const i = Math.min(Uo(e, t) / 2, Uo(t, n) / 2, o), { x: r, y: a } = t;\n if (e.x === r && r === n.x || e.y === a && a === n.y)\n return `L${r} ${a}`;\n if (e.y === a) {\n const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;\n return `L ${r + i * u},${a}Q ${r},${a} ${r},${a + i * c}`;\n }\n const s = e.x < n.x ? 1 : -1, l = e.y < n.y ? -1 : 1;\n return `L ${r},${a + i * l}Q ${r},${a} ${r + i * s},${a}`;\n}\nfunction qn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n borderRadius: a = 5,\n centerX: s,\n centerY: l,\n offset: u = 20\n}) {\n const [c, v, g, x, h] = Hl({\n source: { x: e, y: t },\n sourcePosition: n,\n target: { x: o, y: i },\n targetPosition: r,\n center: { x: s, y: l },\n offset: u\n });\n return [c.reduce((w, y, S) => {\n let V;\n return S > 0 && S < c.length - 1 ? V = Ll(c[S - 1], y, c[S + 1], a) : V = `${S === 0 ? \"M\" : \"L\"}${y.x} ${y.y}`, w += V, w;\n }, \"\"), v, g, x, h];\n}\nconst yn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = qn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nyn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n];\nyn.inheritAttrs = !1;\nyn.compatConfig = { MODE: 3 };\nconst ir = yn, xn = function(e, { attrs: t }) {\n return ue(ir, { ...e, ...t, borderRadius: 0 });\n};\nxn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nxn.inheritAttrs = !1;\nxn.compatConfig = { MODE: 3 };\nconst Gl = xn;\nfunction rr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const [i, r, a, s] = tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n });\n return [`M ${e},${t}L ${n},${o}`, i, r, a, s];\n}\nconst _n = function(e, { attrs: t }) {\n const [n, o, i] = rr(e);\n return ue(vn, {\n path: n,\n labelX: o,\n labelY: i,\n ...e,\n ...t\n });\n};\n_n.props = [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\n_n.inheritAttrs = !1;\n_n.compatConfig = { MODE: 3 };\nconst Fl = _n;\nfunction Yl(e, t, n) {\n return n === j.Left ? e - t : n === j.Right ? e + t : e;\n}\nfunction Xl(e, t, n) {\n return n === j.Top ? e - t : n === j.Bottom ? e + t : e;\n}\nconst po = function({\n radius: e = 10,\n centerX: t = 0,\n centerY: n = 0,\n position: o = j.Top,\n type: i\n}) {\n return ue(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,\n cx: Yl(t, e, o),\n cy: Xl(n, e, o),\n r: e,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\npo.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\npo.compatConfig = { MODE: 3 };\nconst Wo = po;\nfunction Zl() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n updateStart: X(),\n update: X(),\n updateEnd: X()\n };\n}\nfunction Ul(e, t) {\n const n = Zl();\n return n.doubleClick.on((o) => {\n var i, r;\n t.edgeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.edgeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.edgeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.edgeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.edgeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.edgeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.updateStart.on((o) => {\n var i, r;\n t.edgeUpdateStart(o), (r = (i = e.events) == null ? void 0 : i.updateStart) == null || r.call(i, o);\n }), n.update.on((o) => {\n var i, r;\n t.edgeUpdate(o), (r = (i = e.events) == null ? void 0 : i.update) == null || r.call(i, o);\n }), n.updateEnd.on((o) => {\n var i, r;\n t.edgeUpdateEnd(o), (r = (i = e.events) == null ? void 0 : i.updateEnd) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nconst Wl = ge({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"updatable\", \"selectable\", \"focusable\", \"edge\"],\n setup(e) {\n const {\n id: t,\n addSelectedEdges: n,\n connectionMode: o,\n edgeUpdaterRadius: i,\n emits: r,\n nodesSelectionActive: a,\n noPanClassName: s,\n getEdgeTypes: l,\n removeSelectedEdges: u,\n findEdge: c,\n findNode: v,\n isValidConnection: g\n } = fe(), x = Ul(e.edge, r), h = yt(e, \"edge\");\n let d = ie(!1), w = ie(!1);\n const y = ie(\"\"), S = ie(null), V = ie(\"source\"), p = ie();\n ut(Oi, e.id), ut(Ti, p);\n const N = J(() => h.value.class instanceof Function ? h.value.class(h.value) : h.value.class), T = J(() => h.value.style instanceof Function ? h.value.style(h.value) : h.value.style), { handlePointerDown: _ } = Di({\n nodeId: y,\n handleId: S,\n type: V,\n isValidConnection: g.value,\n edgeUpdaterType: V,\n onEdgeUpdate: $,\n onEdgeUpdateEnd: D\n });\n return () => {\n const B = v(h.value.source), q = v(h.value.target);\n if (!B || !q || !h.value)\n return null;\n let te;\n o.value === Qe.Strict ? te = B.handleBounds.source : te = [...B.handleBounds.source || [], ...B.handleBounds.target || []];\n const re = Ao(te, h.value.sourceHandle);\n let k;\n o.value === Qe.Strict ? k = q.handleBounds.target : k = [...q.handleBounds.target || [], ...q.handleBounds.source || []];\n const H = Ao(k, h.value.targetHandle), f = re ? re.position : j.Bottom, b = H ? H.position : j.Top, { sourceX: L, sourceY: I, targetY: F, targetX: U } = wa(\n B,\n re,\n f,\n q,\n H,\n b\n );\n return h.value.sourceX = L, h.value.sourceY = I, h.value.targetX = U, h.value.targetY = F, ue(\n \"g\",\n {\n ref: p,\n key: e.id,\n \"data-id\": e.id,\n class: [\n \"vue-flow__edge\",\n `vue-flow__edge-${e.type === !1 ? \"default\" : e.name}`,\n s.value,\n N.value,\n {\n updating: d.value,\n selected: h.value.selected,\n animated: h.value.animated,\n inactive: !e.selectable\n }\n ],\n onClick: ee,\n onContextmenu: m,\n onDblclick: A,\n onMouseenter: E,\n onMousemove: G,\n onMouseleave: Z,\n onKeyDown: e.focusable ? W : void 0,\n tabIndex: e.focusable ? 0 : void 0,\n \"aria-label\": h.value.ariaLabel === null ? void 0 : h.value.ariaLabel || `Edge from ${h.value.source} to ${h.value.target}`,\n \"aria-describedby\": e.focusable ? `${Ji}-${t}` : void 0,\n role: e.focusable ? \"button\" : void 0\n },\n [\n w.value ? null : ue(e.type === !1 ? l.value.default : e.type, {\n id: e.id,\n sourceNode: B,\n targetNode: q,\n source: h.value.source,\n target: h.value.target,\n type: h.value.type,\n updatable: e.updatable,\n selected: h.value.selected,\n animated: h.value.animated,\n label: h.value.label,\n labelStyle: h.value.labelStyle,\n labelShowBg: h.value.labelShowBg,\n labelBgStyle: h.value.labelBgStyle,\n labelBgPadding: h.value.labelBgPadding,\n labelBgBorderRadius: h.value.labelBgBorderRadius,\n data: h.value.data,\n events: { ...h.value.events, ...x.on },\n style: T.value,\n markerStart: `url(#${Xe(h.value.markerStart, t)})`,\n markerEnd: `url(#${Xe(h.value.markerEnd, t)})`,\n sourcePosition: f,\n targetPosition: b,\n sourceX: L,\n sourceY: I,\n targetX: U,\n targetY: F,\n sourceHandleId: h.value.sourceHandle,\n targetHandleId: h.value.targetHandle,\n interactionWidth: h.value.interactionWidth\n }),\n [\n e.updatable === \"source\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: K,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: f,\n centerX: L,\n centerY: I,\n radius: i.value,\n type: \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n e.updatable === \"target\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: z,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: b,\n centerX: U,\n centerY: F,\n radius: i.value,\n type: \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function P() {\n d.value = !0;\n }\n function R() {\n d.value = !1;\n }\n function $(B, q) {\n x.emit.update({ event: B, edge: h.value, connection: q });\n }\n function D(B) {\n x.emit.updateEnd({ event: B, edge: h.value }), w.value = !1;\n }\n function Q(B, q) {\n B.button === 0 && (w.value = !0, y.value = q ? h.value.target : h.value.source, S.value = (q ? h.value.targetHandle : h.value.sourceHandle) ?? \"\", V.value = q ? \"target\" : \"source\", x.emit.updateStart({ event: B, edge: h.value }), _(B));\n }\n function ee(B) {\n const q = { event: B, edge: h.value };\n e.selectable && (a.value = !1, n([h.value])), x.emit.click(q);\n }\n function m(B) {\n x.emit.contextMenu({ event: B, edge: h.value });\n }\n function A(B) {\n x.emit.doubleClick({ event: B, edge: h.value });\n }\n function E(B) {\n x.emit.mouseEnter({ event: B, edge: h.value });\n }\n function G(B) {\n x.emit.mouseMove({ event: B, edge: h.value });\n }\n function Z(B) {\n x.emit.mouseLeave({ event: B, edge: h.value });\n }\n function K(B) {\n Q(B, !0);\n }\n function z(B) {\n Q(B, !1);\n }\n function W(B) {\n var q;\n er.includes(B.key) && e.selectable && (B.key === \"Escape\" ? ((q = p.value) == null || q.blur(), u([c(e.id)])) : n([c(e.id)]));\n }\n }\n}), Kl = Wl, ql = {\n height: \"0\",\n width: \"0\"\n}, jl = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n}, Rd = /* @__PURE__ */ ge({\n ...jl,\n setup(e) {\n const { viewportRef: t } = fe(), n = J(() => {\n var o;\n return (o = t.value) == null ? void 0 : o.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (o, i) => (oe(), se(\"svg\", null, [\n (oe(), se(\"foreignObject\", ql, [\n (oe(), ze(Mr, {\n to: C(n),\n disabled: !C(n)\n }, [\n xe(o.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]));\n }\n}), Ql = { class: \"vue-flow__connection\" }, Jl = [\"d\", \"marker-end\", \"marker-start\"], eu = {\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 }\n}, tu = /* @__PURE__ */ ge({\n ...eu,\n props: {\n sourceNode: null\n },\n setup(e) {\n var R;\n const t = fe(), n = M(t, \"connectionMode\"), o = M(t, \"connectionStartHandle\"), i = M(t, \"connectionEndHandle\"), r = M(t, \"connectionPosition\"), a = M(t, \"connectionLineType\"), s = M(t, \"connectionLineStyle\"), l = M(t, \"connectionLineOptions\"), u = M(t, \"connectionStatus\"), c = M(t, \"viewport\"), v = M(t, \"findNode\"), g = {\n [j.Left]: j.Right,\n [j.Right]: j.Left,\n [j.Top]: j.Bottom,\n [j.Bottom]: j.Top\n }, x = (R = He(ln)) == null ? void 0 : R[\"connection-line\"], h = J(() => o.value.handleId), d = J(() => o.value.type), w = J(() => {\n var $;\n return (($ = i.value) == null ? void 0 : $.handleId) && v.value(i.value.nodeId) || null;\n }), y = J(\n () => {\n var $, D;\n return (n.value === Qe.Strict ? ($ = e.sourceNode.handleBounds[d.value]) == null ? void 0 : $.find((Q) => Q.id === h.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((Q) => Q.id === h.value)) || ((D = e.sourceNode.handleBounds[d.value ?? \"source\"]) == null ? void 0 : D[0]);\n }\n ), S = J(() => {\n var $, D, Q;\n return w.value && (($ = i.value) == null ? void 0 : $.handleId) && ((n.value === Qe.Strict ? (D = w.value.handleBounds[d.value === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : D.find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n ) : [...w.value.handleBounds.source || [], ...w.value.handleBounds.target || []].find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n )) || ((Q = w.value.handleBounds[d.value ?? \"target\"]) == null ? void 0 : Q[0])) || null;\n }), V = J(() => {\n var $;\n return ($ = y.value) == null ? void 0 : $.position;\n }), p = J(() => y.value ? Wt(\n V.value || j.Top,\n { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition },\n y.value\n ) : {\n x: e.sourceNode.dimensions.width / 2,\n y: e.sourceNode.dimensions.height / 2\n }), N = J(() => V.value ? g[V.value] : void 0), T = J(() => (r.value.x - c.value.x) / c.value.zoom), _ = J(() => (r.value.y - c.value.y) / c.value.zoom), P = J(() => {\n let $;\n const D = {\n sourceX: p.value.x,\n sourceY: p.value.y,\n sourcePosition: V.value,\n targetX: T.value,\n targetY: _.value,\n targetPosition: N.value\n };\n switch (a.value ?? l.value.type) {\n case Ye.Bezier:\n [$] = Kn(D);\n break;\n case Ye.Step:\n [$] = qn({\n ...D,\n borderRadius: 0\n });\n break;\n case Ye.SmoothStep:\n [$] = qn(D);\n break;\n case Ye.SimpleBezier:\n [$] = or(D);\n break;\n case Ye.Straight:\n [$] = rr(D);\n break;\n default:\n [$] = Kn(D);\n break;\n }\n return $;\n });\n return ($, D) => {\n var Q;\n return oe(), se(\"g\", Ql, [\n C(x) ? (oe(), ze(mi(C(x)), $r(vi({ key: 0 }, {\n sourceX: C(p).x,\n sourceY: C(p).y,\n sourcePosition: (Q = C(y)) == null ? void 0 : Q.position,\n targetX: C(T),\n targetY: C(_),\n targetPosition: C(N),\n sourceNode: e.sourceNode,\n sourceHandle: C(y),\n targetNode: C(w),\n targetHandle: C(S),\n markerEnd: `url(#${C(Xe)(C(l).markerEnd)})`,\n markerStart: `url(#${C(Xe)(C(l).markerStart)})`,\n connectionStatus: C(u)\n })), null, 16)) : (oe(), se(\"path\", {\n key: 1,\n d: C(P),\n class: Ke([\"vue-flow__connection-path\", [C(l).class, C(u)]]),\n style: Le(C(s) || C(l).style || {}),\n \"marker-end\": `url(#${C(Xe)(C(l).markerEnd)})`,\n \"marker-start\": `url(#${C(Xe)(C(l).markerStart)})`\n }, null, 14, Jl))\n ]);\n };\n }\n}), nu = [\"tabIndex\"], ou = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n}, iu = /* @__PURE__ */ ge({\n ...ou,\n setup(e) {\n const t = fe(), n = M(t, \"emits\"), o = M(t, \"viewport\"), i = M(t, \"getSelectedNodes\"), r = M(t, \"noPanClassName\"), a = M(t, \"disableKeyboardA11y\"), s = M(t, \"userSelectionActive\"), l = Ai(), u = ie(), c = ji({\n el: u,\n onStart(d) {\n n.value.selectionDragStart(d);\n },\n onDrag(d) {\n n.value.selectionDrag(d);\n },\n onStop(d) {\n n.value.selectionDragStop(d);\n }\n });\n Ve(() => {\n var d;\n a.value || (d = u.value) == null || d.focus({ preventScroll: !0 });\n });\n const v = J(() => co(i.value)), g = J(() => ({\n width: `${v.value.width}px`,\n height: `${v.value.height}px`,\n top: `${v.value.y}px`,\n left: `${v.value.x}px`\n }));\n function x(d) {\n n.value.selectionContextMenu({ event: d, nodes: i.value });\n }\n function h(d) {\n a.value || st[d.key] && l(\n {\n x: st[d.key].x,\n y: st[d.key].y\n },\n d.shiftKey\n );\n }\n return (d, w) => !C(s) && C(v).width && C(v).height ? (oe(), se(\"div\", {\n key: 0,\n class: Ke([\"vue-flow__nodesselection vue-flow__container\", C(r)]),\n style: Le({ transform: `translate(${C(o).x}px,${C(o).y}px) scale(${C(o).zoom})` })\n }, [\n ct(\"div\", {\n ref_key: \"el\",\n ref: u,\n class: Ke([{ dragging: C(c) }, \"vue-flow__nodesselection-rect\"]),\n style: Le(C(g)),\n tabIndex: C(a) ? void 0 : -1,\n onContextmenu: x,\n onKeydown: h\n }, null, 46, nu)\n ], 6)) : Ee(\"\", !0);\n }\n}), ru = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n}, au = /* @__PURE__ */ ge({\n ...ru,\n setup(e) {\n const { userSelectionRect: t } = fe();\n return (n, o) => {\n var i, r, a, s;\n return oe(), se(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: Le({\n width: `${(i = C(t)) == null ? void 0 : i.width}px`,\n height: `${(r = C(t)) == null ? void 0 : r.height}px`,\n transform: `translate(${(a = C(t)) == null ? void 0 : a.x}px, ${(s = C(t)) == null ? void 0 : s.y}px)`\n })\n }, null, 4);\n };\n }\n}), su = {\n input: Ta,\n default: Oa,\n output: Ia\n}, lu = {\n default: Bl,\n straight: Fl,\n step: Gl,\n smoothstep: ir,\n simplebezier: Rl\n};\nfunction uu() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n nodeTypes: {},\n edgeTypes: {},\n initialized: !1,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: fo.Full,\n paneDragging: !1,\n preventScrolling: !0,\n zoomOnScroll: !0,\n zoomOnPinch: !0,\n zoomOnDoubleClick: !0,\n panOnScroll: !1,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: Ut.Free,\n panOnDrag: !0,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: !1,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: !1,\n userSelectionActive: !1,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: Ye.Bezier,\n style: {}\n },\n connectionMode: Qe.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: NaN, y: NaN },\n connectionRadius: 20,\n connectOnClick: !0,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: !1,\n edgesUpdatable: !1,\n edgesFocusable: !0,\n nodesFocusable: !0,\n nodesConnectable: !0,\n nodesDraggable: !0,\n elementsSelectable: !0,\n selectNodesOnDrag: !0,\n multiSelectionActive: !1,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: \"Meta\",\n zoomActivationKeyCode: \"Meta\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: ca(),\n applyDefault: !0,\n autoConnect: !1,\n fitViewOnInit: !1,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: !1,\n elevateNodesOnSelect: !0,\n autoPanOnNodeDrag: !0,\n autoPanOnConnect: !0,\n disableKeyboardA11y: !1,\n ariaLiveMessage: \"\",\n __experimentalFeatures: {\n nestedFlow: !1\n }\n };\n}\nfunction ar(e) {\n const t = uu();\n return e && Object.keys(e).forEach((n) => {\n const o = e[n];\n ce(o) && (t[n] = o);\n }), t;\n}\nfunction cu(e, t, n) {\n const o = J(() => (d) => e.nodes && !t.value.length ? e.nodes.find((w) => w.id === d) : e.nodes[t.value.indexOf(d)]), i = J(() => (d) => e.edges && !n.value.length ? e.edges.find((w) => w.id === d) : e.edges[n.value.indexOf(d)]), r = J(() => {\n var y;\n const d = {\n ...lu,\n ...e.edgeTypes\n }, w = Object.keys(d);\n return (y = e.edges) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), a = J(() => {\n var y;\n const d = {\n ...su,\n ...e.nodeTypes\n }, w = Object.keys(d);\n return (y = e.nodes) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), s = J(() => {\n const d = e.nodes.filter((w) => !w.hidden);\n return e.onlyRenderVisibleElements ? d && Ci(\n d,\n {\n x: 0,\n y: 0,\n width: e.dimensions.width,\n height: e.dimensions.height\n },\n e.viewport,\n !0\n ) : d ?? [];\n }), l = (d, w, y) => {\n if (w = w ?? o.value(d.source), y = y ?? o.value(d.target), !w || !y) {\n e.hooks.error.trigger(new ve(he.EDGE_ORPHANED, d.id));\n return;\n }\n return !d.hidden && !y.hidden && !w.hidden;\n }, u = J(() => e.onlyRenderVisibleElements ? e.edges.filter((d) => {\n const w = o.value(d.source), y = o.value(d.target);\n return l(d, w, y) && ba({\n sourcePos: w.computedPosition || { x: 0, y: 0 },\n targetPos: y.computedPosition || { x: 0, y: 0 },\n sourceWidth: w.dimensions.width,\n sourceHeight: w.dimensions.height,\n targetWidth: y.dimensions.width,\n targetHeight: y.dimensions.height,\n width: e.dimensions.width,\n height: e.dimensions.height,\n viewport: e.viewport\n });\n }) : e.edges.filter((d) => l(d))), c = J(() => [...s.value, ...u.value]), v = J(() => e.nodes.filter((d) => d.selected)), g = J(() => e.edges.filter((d) => d.selected)), x = J(() => [\n ...v.value ?? [],\n ...g.value ?? []\n ]), h = J(\n () => s.value.filter((d) => d.initialized && d.handleBounds !== void 0)\n );\n return {\n getNode: o,\n getEdge: i,\n getElements: c,\n getEdgeTypes: r,\n getNodeTypes: a,\n getEdges: u,\n getNodes: s,\n getSelectedElements: x,\n getSelectedNodes: v,\n getSelectedEdges: g,\n getNodesInitialized: h\n };\n}\nfunction yo(e, t, n) {\n e.prototype = t.prototype = n, n.constructor = e;\n}\nfunction sr(e, t) {\n var n = Object.create(e.prototype);\n for (var o in t)\n n[o] = t[o];\n return n;\n}\nfunction kt() {\n}\nvar Et = 0.7, jt = 1 / Et, lt = \"\\\\s*([+-]?\\\\d+)\\\\s*\", St = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", Me = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", du = /^#([0-9a-f]{3,8})$/, fu = new RegExp(`^rgb\\\\(${lt},${lt},${lt}\\\\)$`), hu = new RegExp(`^rgb\\\\(${Me},${Me},${Me}\\\\)$`), gu = new RegExp(`^rgba\\\\(${lt},${lt},${lt},${St}\\\\)$`), vu = new RegExp(`^rgba\\\\(${Me},${Me},${Me},${St}\\\\)$`), mu = new RegExp(`^hsl\\\\(${St},${Me},${Me}\\\\)$`), pu = new RegExp(`^hsla\\\\(${St},${Me},${Me},${St}\\\\)$`), Ko = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\nyo(kt, Nt, {\n copy(e) {\n return Object.assign(new this.constructor(), this, e);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: qo,\n // Deprecated! Use color.formatHex.\n formatHex: qo,\n formatHex8: yu,\n formatHsl: xu,\n formatRgb: jo,\n toString: jo\n});\nfunction qo() {\n return this.rgb().formatHex();\n}\nfunction yu() {\n return this.rgb().formatHex8();\n}\nfunction xu() {\n return lr(this).formatHsl();\n}\nfunction jo() {\n return this.rgb().formatRgb();\n}\nfunction Nt(e) {\n var t, n;\n return e = (e + \"\").trim().toLowerCase(), (t = du.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qo(t) : n === 3 ? new pe(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? zt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? zt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fu.exec(e)) ? new pe(t[1], t[2], t[3], 1) : (t = hu.exec(e)) ? new pe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = gu.exec(e)) ? zt(t[1], t[2], t[3], t[4]) : (t = vu.exec(e)) ? zt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = mu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, 1) : (t = pu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, t[4]) : Ko.hasOwnProperty(e) ? Qo(Ko[e]) : e === \"transparent\" ? new pe(NaN, NaN, NaN, 0) : null;\n}\nfunction Qo(e) {\n return new pe(e >> 16 & 255, e >> 8 & 255, e & 255, 1);\n}\nfunction zt(e, t, n, o) {\n return o <= 0 && (e = t = n = NaN), new pe(e, t, n, o);\n}\nfunction _u(e) {\n return e instanceof kt || (e = Nt(e)), e ? (e = e.rgb(), new pe(e.r, e.g, e.b, e.opacity)) : new pe();\n}\nfunction jn(e, t, n, o) {\n return arguments.length === 1 ? _u(e) : new pe(e, t, n, o ?? 1);\n}\nfunction pe(e, t, n, o) {\n this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;\n}\nyo(pe, jn, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new pe(We(this.r), We(this.g), We(this.b), Qt(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: Jo,\n // Deprecated! Use color.formatHex.\n formatHex: Jo,\n formatHex8: wu,\n formatRgb: ei,\n toString: ei\n}));\nfunction Jo() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`;\n}\nfunction wu() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction ei() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"rgb(\" : \"rgba(\"}${We(this.r)}, ${We(this.g)}, ${We(this.b)}${e === 1 ? \")\" : `, ${e})`}`;\n}\nfunction Qt(e) {\n return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));\n}\nfunction We(e) {\n return Math.max(0, Math.min(255, Math.round(e) || 0));\n}\nfunction Ze(e) {\n return e = We(e), (e < 16 ? \"0\" : \"\") + e.toString(16);\n}\nfunction ti(e, t, n, o) {\n return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, n, o);\n}\nfunction lr(e) {\n if (e instanceof be)\n return new be(e.h, e.s, e.l, e.opacity);\n if (e instanceof kt || (e = Nt(e)), !e)\n return new be();\n if (e instanceof be)\n return e;\n e = e.rgb();\n var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), a = NaN, s = r - i, l = (r + i) / 2;\n return s ? (t === r ? a = (n - o) / s + (n < o) * 6 : n === r ? a = (o - t) / s + 2 : a = (t - n) / s + 4, s /= l < 0.5 ? r + i : 2 - r - i, a *= 60) : s = l > 0 && l < 1 ? 0 : a, new be(a, s, l, e.opacity);\n}\nfunction bu(e, t, n, o) {\n return arguments.length === 1 ? lr(e) : new be(e, t, n, o ?? 1);\n}\nfunction be(e, t, n, o) {\n this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;\n}\nyo(be, bu, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n rgb() {\n var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - o;\n return new pe(\n kn(e >= 240 ? e - 240 : e + 120, i, o),\n kn(e, i, o),\n kn(e < 120 ? e + 240 : e - 120, i, o),\n this.opacity\n );\n },\n clamp() {\n return new be(ni(this.h), At(this.s), At(this.l), Qt(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"hsl(\" : \"hsla(\"}${ni(this.h)}, ${At(this.s) * 100}%, ${At(this.l) * 100}%${e === 1 ? \")\" : `, ${e})`}`;\n }\n}));\nfunction ni(e) {\n return e = (e || 0) % 360, e < 0 ? e + 360 : e;\n}\nfunction At(e) {\n return Math.max(0, Math.min(1, e || 0));\n}\nfunction kn(e, t, n) {\n return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;\n}\nconst ur = (e) => () => e;\nfunction Eu(e, t) {\n return function(n) {\n return e + n * t;\n };\n}\nfunction Su(e, t, n) {\n return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {\n return Math.pow(e + o * t, n);\n };\n}\nfunction Nu(e) {\n return (e = +e) == 1 ? cr : function(t, n) {\n return n - t ? Su(t, n, e) : ur(isNaN(t) ? n : t);\n };\n}\nfunction cr(e, t) {\n var n = t - e;\n return n ? Eu(e, n) : ur(isNaN(e) ? t : e);\n}\nconst oi = function e(t) {\n var n = Nu(t);\n function o(i, r) {\n var a = n((i = jn(i)).r, (r = jn(r)).r), s = n(i.g, r.g), l = n(i.b, r.b), u = cr(i.opacity, r.opacity);\n return function(c) {\n return i.r = a(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + \"\";\n };\n }\n return o.gamma = e, o;\n}(1);\nfunction Re(e, t) {\n return e = +e, t = +t, function(n) {\n return e * (1 - n) + t * n;\n };\n}\nvar Qn = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, On = new RegExp(Qn.source, \"g\");\nfunction Cu(e) {\n return function() {\n return e;\n };\n}\nfunction Mu(e) {\n return function(t) {\n return e(t) + \"\";\n };\n}\nfunction $u(e, t) {\n var n = Qn.lastIndex = On.lastIndex = 0, o, i, r, a = -1, s = [], l = [];\n for (e = e + \"\", t = t + \"\"; (o = Qn.exec(e)) && (i = On.exec(t)); )\n (r = i.index) > n && (r = t.slice(n, r), s[a] ? s[a] += r : s[++a] = r), (o = o[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, l.push({ i: a, x: Re(o, i) })), n = On.lastIndex;\n return n < t.length && (r = t.slice(n), s[a] ? s[a] += r : s[++a] = r), s.length < 2 ? l[0] ? Mu(l[0].x) : Cu(t) : (t = l.length, function(u) {\n for (var c = 0, v; c < t; ++c)\n s[(v = l[c]).i] = v.x(u);\n return s.join(\"\");\n });\n}\nvar ii = 180 / Math.PI, Jn = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction dr(e, t, n, o, i, r) {\n var a, s, l;\n return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * o) && (n -= e * l, o -= t * l), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, l /= s), e * o < t * n && (e = -e, t = -t, l = -l, a = -a), {\n translateX: i,\n translateY: r,\n rotate: Math.atan2(t, e) * ii,\n skewX: Math.atan(l) * ii,\n scaleX: a,\n scaleY: s\n };\n}\nvar Bt;\nfunction ku(e) {\n const t = new (typeof DOMMatrix == \"function\" ? DOMMatrix : WebKitCSSMatrix)(e + \"\");\n return t.isIdentity ? Jn : dr(t.a, t.b, t.c, t.d, t.e, t.f);\n}\nfunction Ou(e) {\n return e == null || (Bt || (Bt = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\")), Bt.setAttribute(\"transform\", e), !(e = Bt.transform.baseVal.consolidate())) ? Jn : (e = e.matrix, dr(e.a, e.b, e.c, e.d, e.e, e.f));\n}\nfunction fr(e, t, n, o) {\n function i(u) {\n return u.length ? u.pop() + \" \" : \"\";\n }\n function r(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(\"translate(\", null, t, null, n);\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v || g) && x.push(\"translate(\" + v + t + g + n);\n }\n function a(u, c, v, g) {\n u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), g.push({ i: v.push(i(v) + \"rotate(\", null, o) - 2, x: Re(u, c) })) : c && v.push(i(v) + \"rotate(\" + c + o);\n }\n function s(u, c, v, g) {\n u !== c ? g.push({ i: v.push(i(v) + \"skewX(\", null, o) - 2, x: Re(u, c) }) : c && v.push(i(v) + \"skewX(\" + c + o);\n }\n function l(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(i(x) + \"scale(\", null, \",\", null, \")\");\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v !== 1 || g !== 1) && x.push(i(x) + \"scale(\" + v + \",\" + g + \")\");\n }\n return function(u, c) {\n var v = [], g = [];\n return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, v, g), a(u.rotate, c.rotate, v, g), s(u.skewX, c.skewX, v, g), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, v, g), u = c = null, function(x) {\n for (var h = -1, d = g.length, w; ++h < d; )\n v[(w = g[h]).i] = w.x(x);\n return v.join(\"\");\n };\n };\n}\nvar Tu = fr(ku, \"px, \", \"px)\", \"deg)\"), Iu = fr(Ou, \", \", \")\", \")\"), Pu = 1e-12;\nfunction ri(e) {\n return ((e = Math.exp(e)) + 1 / e) / 2;\n}\nfunction Du(e) {\n return ((e = Math.exp(e)) - 1 / e) / 2;\n}\nfunction zu(e) {\n return ((e = Math.exp(2 * e)) - 1) / (e + 1);\n}\nconst Au = function e(t, n, o) {\n function i(r, a) {\n var s = r[0], l = r[1], u = r[2], c = a[0], v = a[1], g = a[2], x = c - s, h = v - l, d = x * x + h * h, w, y;\n if (d < Pu)\n y = Math.log(g / u) / t, w = function(_) {\n return [\n s + _ * x,\n l + _ * h,\n u * Math.exp(t * _ * y)\n ];\n };\n else {\n var S = Math.sqrt(d), V = (g * g - u * u + o * d) / (2 * u * n * S), p = (g * g - u * u - o * d) / (2 * g * n * S), N = Math.log(Math.sqrt(V * V + 1) - V), T = Math.log(Math.sqrt(p * p + 1) - p);\n y = (T - N) / t, w = function(_) {\n var P = _ * y, R = ri(N), $ = u / (n * S) * (R * zu(t * P + N) - Du(N));\n return [\n s + $ * x,\n l + $ * h,\n u * R / ri(t * P + N)\n ];\n };\n }\n return w.duration = y * 1e3 * t / Math.SQRT2, w;\n }\n return i.rho = function(r) {\n var a = Math.max(1e-3, +r), s = a * a, l = s * s;\n return e(a, s, l);\n }, i;\n}(Math.SQRT2, 2, 4);\nvar ht = 0, mt = 0, gt = 0, hr = 1e3, Jt, pt, en = 0, Je = 0, wn = 0, Ct = typeof performance == \"object\" && performance.now ? performance : Date, gr = typeof window == \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {\n setTimeout(e, 17);\n};\nfunction xo() {\n return Je || (gr(Bu), Je = Ct.now() + wn);\n}\nfunction Bu() {\n Je = 0;\n}\nfunction tn() {\n this._call = this._time = this._next = null;\n}\ntn.prototype = vr.prototype = {\n constructor: tn,\n restart: function(e, t, n) {\n if (typeof e != \"function\")\n throw new TypeError(\"callback is not a function\");\n n = (n == null ? xo() : +n) + (t == null ? 0 : +t), !this._next && pt !== this && (pt ? pt._next = this : Jt = this, pt = this), this._call = e, this._time = n, eo();\n },\n stop: function() {\n this._call && (this._call = null, this._time = 1 / 0, eo());\n }\n};\nfunction vr(e, t, n) {\n var o = new tn();\n return o.restart(e, t, n), o;\n}\nfunction Ru() {\n xo(), ++ht;\n for (var e = Jt, t; e; )\n (t = Je - e._time) >= 0 && e._call.call(void 0, t), e = e._next;\n --ht;\n}\nfunction ai() {\n Je = (en = Ct.now()) + wn, ht = mt = 0;\n try {\n Ru();\n } finally {\n ht = 0, Hu(), Je = 0;\n }\n}\nfunction Vu() {\n var e = Ct.now(), t = e - en;\n t > hr && (wn -= t, en = e);\n}\nfunction Hu() {\n for (var e, t = Jt, n, o = 1 / 0; t; )\n t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Jt = n);\n pt = e, eo(o);\n}\nfunction eo(e) {\n if (!ht) {\n mt && (mt = clearTimeout(mt));\n var t = e - Je;\n t > 24 ? (e < 1 / 0 && (mt = setTimeout(ai, e - Ct.now() - wn)), gt && (gt = clearInterval(gt))) : (gt || (en = Ct.now(), gt = setInterval(Vu, hr)), ht = 1, gr(ai));\n }\n}\nfunction si(e, t, n) {\n var o = new tn();\n return t = t == null ? 0 : +t, o.restart((i) => {\n o.stop(), e(i + t);\n }, t, n), o;\n}\nvar Lu = fn(\"start\", \"end\", \"cancel\", \"interrupt\"), Gu = [], mr = 0, li = 1, to = 2, Lt = 3, ui = 4, no = 5, Gt = 6;\nfunction bn(e, t, n, o, i, r) {\n var a = e.__transition;\n if (!a)\n e.__transition = {};\n else if (n in a)\n return;\n Fu(e, n, {\n name: t,\n index: o,\n // For context during callback.\n group: i,\n // For context during callback.\n on: Lu,\n tween: Gu,\n time: r.time,\n delay: r.delay,\n duration: r.duration,\n ease: r.ease,\n timer: null,\n state: mr\n });\n}\nfunction _o(e, t) {\n var n = Se(e, t);\n if (n.state > mr)\n throw new Error(\"too late; already scheduled\");\n return n;\n}\nfunction ke(e, t) {\n var n = Se(e, t);\n if (n.state > Lt)\n throw new Error(\"too late; already running\");\n return n;\n}\nfunction Se(e, t) {\n var n = e.__transition;\n if (!n || !(n = n[t]))\n throw new Error(\"transition not found\");\n return n;\n}\nfunction Fu(e, t, n) {\n var o = e.__transition, i;\n o[t] = n, n.timer = vr(r, 0, n.time);\n function r(u) {\n n.state = li, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);\n }\n function a(u) {\n var c, v, g, x;\n if (n.state !== li)\n return l();\n for (c in o)\n if (x = o[c], x.name === n.name) {\n if (x.state === Lt)\n return si(a);\n x.state === ui ? (x.state = Gt, x.timer.stop(), x.on.call(\"interrupt\", e, e.__data__, x.index, x.group), delete o[c]) : +c < t && (x.state = Gt, x.timer.stop(), x.on.call(\"cancel\", e, e.__data__, x.index, x.group), delete o[c]);\n }\n if (si(function() {\n n.state === Lt && (n.state = ui, n.timer.restart(s, n.delay, n.time), s(u));\n }), n.state = to, n.on.call(\"start\", e, e.__data__, n.index, n.group), n.state === to) {\n for (n.state = Lt, i = new Array(g = n.tween.length), c = 0, v = -1; c < g; ++c)\n (x = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++v] = x);\n i.length = v + 1;\n }\n }\n function s(u) {\n for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(l), n.state = no, 1), v = -1, g = i.length; ++v < g; )\n i[v].call(e, c);\n n.state === no && (n.on.call(\"end\", e, e.__data__, n.index, n.group), l());\n }\n function l() {\n n.state = Gt, n.timer.stop(), delete o[t];\n for (var u in o)\n return;\n delete e.__transition;\n }\n}\nfunction Ft(e, t) {\n var n = e.__transition, o, i, r = !0, a;\n if (n) {\n t = t == null ? null : t + \"\";\n for (a in n) {\n if ((o = n[a]).name !== t) {\n r = !1;\n continue;\n }\n i = o.state > to && o.state < no, o.state = Gt, o.timer.stop(), o.on.call(i ? \"interrupt\" : \"cancel\", e, e.__data__, o.index, o.group), delete n[a];\n }\n r && delete e.__transition;\n }\n}\nfunction Yu(e) {\n return this.each(function() {\n Ft(this, e);\n });\n}\nfunction Xu(e, t) {\n var n, o;\n return function() {\n var i = ke(this, e), r = i.tween;\n if (r !== n) {\n o = n = r;\n for (var a = 0, s = o.length; a < s; ++a)\n if (o[a].name === t) {\n o = o.slice(), o.splice(a, 1);\n break;\n }\n }\n i.tween = o;\n };\n}\nfunction Zu(e, t, n) {\n var o, i;\n if (typeof n != \"function\")\n throw new Error();\n return function() {\n var r = ke(this, e), a = r.tween;\n if (a !== o) {\n i = (o = a).slice();\n for (var s = { name: t, value: n }, l = 0, u = i.length; l < u; ++l)\n if (i[l].name === t) {\n i[l] = s;\n break;\n }\n l === u && i.push(s);\n }\n r.tween = i;\n };\n}\nfunction Uu(e, t) {\n var n = this._id;\n if (e += \"\", arguments.length < 2) {\n for (var o = Se(this.node(), n).tween, i = 0, r = o.length, a; i < r; ++i)\n if ((a = o[i]).name === e)\n return a.value;\n return null;\n }\n return this.each((t == null ? Xu : Zu)(n, e, t));\n}\nfunction wo(e, t, n) {\n var o = e._id;\n return e.each(function() {\n var i = ke(this, o);\n (i.value || (i.value = {}))[t] = n.apply(this, arguments);\n }), function(i) {\n return Se(i, o).value[t];\n };\n}\nfunction pr(e, t) {\n var n;\n return (typeof t == \"number\" ? Re : t instanceof Nt ? oi : (n = Nt(t)) ? (t = n, oi) : $u)(e, t);\n}\nfunction Wu(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ku(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction qu(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttribute(e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction ju(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttributeNS(e.space, e.local);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction Qu(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttribute(e) : (a = this.getAttribute(e), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction Ju(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttributeNS(e.space, e.local) : (a = this.getAttributeNS(e.space, e.local), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction ec(e, t) {\n var n = hn(e), o = n === \"transform\" ? Iu : pr;\n return this.attrTween(e, typeof t == \"function\" ? (n.local ? Ju : Qu)(n, o, wo(this, \"attr.\" + e, t)) : t == null ? (n.local ? Ku : Wu)(n) : (n.local ? ju : qu)(n, o, t));\n}\nfunction tc(e, t) {\n return function(n) {\n this.setAttribute(e, t.call(this, n));\n };\n}\nfunction nc(e, t) {\n return function(n) {\n this.setAttributeNS(e.space, e.local, t.call(this, n));\n };\n}\nfunction oc(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && nc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction ic(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && tc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction rc(e, t) {\n var n = \"attr.\" + e;\n if (arguments.length < 2)\n return (n = this.tween(n)) && n._value;\n if (t == null)\n return this.tween(n, null);\n if (typeof t != \"function\")\n throw new Error();\n var o = hn(e);\n return this.tween(n, (o.local ? oc : ic)(o, t));\n}\nfunction ac(e, t) {\n return function() {\n _o(this, e).delay = +t.apply(this, arguments);\n };\n}\nfunction sc(e, t) {\n return t = +t, function() {\n _o(this, e).delay = t;\n };\n}\nfunction lc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? ac : sc)(t, e)) : Se(this.node(), t).delay;\n}\nfunction uc(e, t) {\n return function() {\n ke(this, e).duration = +t.apply(this, arguments);\n };\n}\nfunction cc(e, t) {\n return t = +t, function() {\n ke(this, e).duration = t;\n };\n}\nfunction dc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? uc : cc)(t, e)) : Se(this.node(), t).duration;\n}\nfunction fc(e, t) {\n if (typeof t != \"function\")\n throw new Error();\n return function() {\n ke(this, e).ease = t;\n };\n}\nfunction hc(e) {\n var t = this._id;\n return arguments.length ? this.each(fc(t, e)) : Se(this.node(), t).ease;\n}\nfunction gc(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n if (typeof n != \"function\")\n throw new Error();\n ke(this, e).ease = n;\n };\n}\nfunction vc(e) {\n if (typeof e != \"function\")\n throw new Error();\n return this.each(gc(this._id, e));\n}\nfunction mc(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new Be(o, this._parents, this._name, this._id);\n}\nfunction pc(e) {\n if (e._id !== this._id)\n throw new Error();\n for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), a = new Array(o), s = 0; s < r; ++s)\n for (var l = t[s], u = n[s], c = l.length, v = a[s] = new Array(c), g, x = 0; x < c; ++x)\n (g = l[x] || u[x]) && (v[x] = g);\n for (; s < o; ++s)\n a[s] = t[s];\n return new Be(a, this._parents, this._name, this._id);\n}\nfunction yc(e) {\n return (e + \"\").trim().split(/^|\\s+/).every(function(t) {\n var n = t.indexOf(\".\");\n return n >= 0 && (t = t.slice(0, n)), !t || t === \"start\";\n });\n}\nfunction xc(e, t, n) {\n var o, i, r = yc(t) ? _o : ke;\n return function() {\n var a = r(this, e), s = a.on;\n s !== o && (i = (o = s).copy()).on(t, n), a.on = i;\n };\n}\nfunction _c(e, t) {\n var n = this._id;\n return arguments.length < 2 ? Se(this.node(), n).on.on(e) : this.each(xc(n, e, t));\n}\nfunction wc(e) {\n return function() {\n var t = this.parentNode;\n for (var n in this.__transition)\n if (+n !== e)\n return;\n t && t.removeChild(this);\n };\n}\nfunction bc() {\n return this.on(\"end.remove\", wc(this._id));\n}\nfunction Ec(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = vo(e));\n for (var o = this._groups, i = o.length, r = new Array(i), a = 0; a < i; ++a)\n for (var s = o[a], l = s.length, u = r[a] = new Array(l), c, v, g = 0; g < l; ++g)\n (c = s[g]) && (v = e.call(c, c.__data__, g, s)) && (\"__data__\" in c && (v.__data__ = c.__data__), u[g] = v, bn(u[g], t, n, g, u, Se(c, n)));\n return new Be(r, this._parents, t, n);\n}\nfunction Sc(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = Ri(e));\n for (var o = this._groups, i = o.length, r = [], a = [], s = 0; s < i; ++s)\n for (var l = o[s], u = l.length, c, v = 0; v < u; ++v)\n if (c = l[v]) {\n for (var g = e.call(c, c.__data__, v, l), x, h = Se(c, n), d = 0, w = g.length; d < w; ++d)\n (x = g[d]) && bn(x, t, n, d, g, h);\n r.push(g), a.push(c);\n }\n return new Be(r, a, t, n);\n}\nvar Nc = $t.prototype.constructor;\nfunction Cc() {\n return new Nc(this._groups, this._parents);\n}\nfunction Mc(e, t) {\n var n, o, i;\n return function() {\n var r = ft(this, e), a = (this.style.removeProperty(e), ft(this, e));\n return r === a ? null : r === n && a === o ? i : i = t(n = r, o = a);\n };\n}\nfunction yr(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction $c(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = ft(this, e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction kc(e, t, n) {\n var o, i, r;\n return function() {\n var a = ft(this, e), s = n(this), l = s + \"\";\n return s == null && (l = s = (this.style.removeProperty(e), ft(this, e))), a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s));\n };\n}\nfunction Oc(e, t) {\n var n, o, i, r = \"style.\" + t, a = \"end.\" + r, s;\n return function() {\n var l = ke(this, e), u = l.on, c = l.value[r] == null ? s || (s = yr(t)) : void 0;\n (u !== n || i !== c) && (o = (n = u).copy()).on(a, i = c), l.on = o;\n };\n}\nfunction Tc(e, t, n) {\n var o = (e += \"\") == \"transform\" ? Tu : pr;\n return t == null ? this.styleTween(e, Mc(e, o)).on(\"end.style.\" + e, yr(e)) : typeof t == \"function\" ? this.styleTween(e, kc(e, o, wo(this, \"style.\" + e, t))).each(Oc(this._id, e)) : this.styleTween(e, $c(e, o, t), n).on(\"end.style.\" + e, null);\n}\nfunction Ic(e, t, n) {\n return function(o) {\n this.style.setProperty(e, t.call(this, o), n);\n };\n}\nfunction Pc(e, t, n) {\n var o, i;\n function r() {\n var a = t.apply(this, arguments);\n return a !== i && (o = (i = a) && Ic(e, a, n)), o;\n }\n return r._value = t, r;\n}\nfunction Dc(e, t, n) {\n var o = \"style.\" + (e += \"\");\n if (arguments.length < 2)\n return (o = this.tween(o)) && o._value;\n if (t == null)\n return this.tween(o, null);\n if (typeof t != \"function\")\n throw new Error();\n return this.tween(o, Pc(e, t, n ?? \"\"));\n}\nfunction zc(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Ac(e) {\n return function() {\n var t = e(this);\n this.textContent = t ?? \"\";\n };\n}\nfunction Bc(e) {\n return this.tween(\"text\", typeof e == \"function\" ? Ac(wo(this, \"text\", e)) : zc(e == null ? \"\" : e + \"\"));\n}\nfunction Rc(e) {\n return function(t) {\n this.textContent = e.call(this, t);\n };\n}\nfunction Vc(e) {\n var t, n;\n function o() {\n var i = e.apply(this, arguments);\n return i !== n && (t = (n = i) && Rc(i)), t;\n }\n return o._value = e, o;\n}\nfunction Hc(e) {\n var t = \"text\";\n if (arguments.length < 1)\n return (t = this.tween(t)) && t._value;\n if (e == null)\n return this.tween(t, null);\n if (typeof e != \"function\")\n throw new Error();\n return this.tween(t, Vc(e));\n}\nfunction Lc() {\n for (var e = this._name, t = this._id, n = xr(), o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n if (l = a[u]) {\n var c = Se(l, t);\n bn(l, e, n, u, a, {\n time: c.time + c.delay + c.duration,\n delay: 0,\n duration: c.duration,\n ease: c.ease\n });\n }\n return new Be(o, this._parents, e, n);\n}\nfunction Gc() {\n var e, t, n = this, o = n._id, i = n.size();\n return new Promise(function(r, a) {\n var s = { value: a }, l = { value: function() {\n --i === 0 && r();\n } };\n n.each(function() {\n var u = ke(this, o), c = u.on;\n c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(l)), u.on = t;\n }), i === 0 && r();\n });\n}\nvar Fc = 0;\nfunction Be(e, t, n, o) {\n this._groups = e, this._parents = t, this._name = n, this._id = o;\n}\nfunction xr() {\n return ++Fc;\n}\nvar Oe = $t.prototype;\nBe.prototype = {\n constructor: Be,\n select: Ec,\n selectAll: Sc,\n selectChild: Oe.selectChild,\n selectChildren: Oe.selectChildren,\n filter: mc,\n merge: pc,\n selection: Cc,\n transition: Lc,\n call: Oe.call,\n nodes: Oe.nodes,\n node: Oe.node,\n size: Oe.size,\n empty: Oe.empty,\n each: Oe.each,\n on: _c,\n attr: ec,\n attrTween: rc,\n style: Tc,\n styleTween: Dc,\n text: Bc,\n textTween: Hc,\n remove: bc,\n tween: Uu,\n delay: lc,\n duration: dc,\n ease: hc,\n easeVarying: vc,\n end: Gc,\n [Symbol.iterator]: Oe[Symbol.iterator]\n};\nfunction Yc(e) {\n return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;\n}\nvar Xc = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: Yc\n};\nfunction Zc(e, t) {\n for (var n; !(n = e.__transition) || !(n = n[t]); )\n if (!(e = e.parentNode))\n throw new Error(`transition ${t} not found`);\n return n;\n}\nfunction Uc(e) {\n var t, n;\n e instanceof Be ? (t = e._id, e = e._name) : (t = xr(), (n = Xc).time = xo(), e = e == null ? null : e + \"\");\n for (var o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && bn(l, e, t, u, a, n || Zc(l, t));\n return new Be(o, this._parents, e, t);\n}\n$t.prototype.interrupt = Yu;\n$t.prototype.transition = Uc;\nconst Rt = (e) => () => e;\nfunction Wc(e, {\n sourceEvent: t,\n target: n,\n transform: o,\n dispatch: i\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n target: { value: n, enumerable: !0, configurable: !0 },\n transform: { value: o, enumerable: !0, configurable: !0 },\n _: { value: i }\n });\n}\nfunction De(e, t, n) {\n this.k = e, this.x = t, this.y = n;\n}\nDe.prototype = {\n constructor: De,\n scale: function(e) {\n return e === 1 ? this : new De(this.k * e, this.x, this.y);\n },\n translate: function(e, t) {\n return e === 0 & t === 0 ? this : new De(this.k, this.x + this.k * e, this.y + this.k * t);\n },\n apply: function(e) {\n return [e[0] * this.k + this.x, e[1] * this.k + this.y];\n },\n applyX: function(e) {\n return e * this.k + this.x;\n },\n applyY: function(e) {\n return e * this.k + this.y;\n },\n invert: function(e) {\n return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];\n },\n invertX: function(e) {\n return (e - this.x) / this.k;\n },\n invertY: function(e) {\n return (e - this.y) / this.k;\n },\n rescaleX: function(e) {\n return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));\n },\n rescaleY: function(e) {\n return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar et = new De(1, 0, 0);\nDe.prototype;\nfunction Tn(e) {\n e.stopImmediatePropagation();\n}\nfunction vt(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Kc(e) {\n return (!e.ctrlKey || e.type === \"wheel\") && !e.button;\n}\nfunction qc() {\n var e = this;\n return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute(\"viewBox\") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction ci() {\n return this.__zoom || et;\n}\nfunction jc(e) {\n return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);\n}\nfunction Qc() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Jc(e, t, n) {\n var o = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], r = e.invertY(t[0][1]) - n[0][1], a = e.invertY(t[1][1]) - n[1][1];\n return e.translate(\n i > o ? (o + i) / 2 : Math.min(0, o) || Math.max(0, i),\n a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a)\n );\n}\nfunction ed() {\n var e = Kc, t = qc, n = Jc, o = jc, i = Qc, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Au, u = fn(\"start\", \"zoom\", \"end\"), c, v, g, x = 500, h = 150, d = 0, w = 10;\n function y(m) {\n m.property(\"__zoom\", ci).on(\"wheel.zoom\", P, { passive: !1 }).on(\"mousedown.zoom\", R).on(\"dblclick.zoom\", $).filter(i).on(\"touchstart.zoom\", D).on(\"touchmove.zoom\", Q).on(\"touchend.zoom touchcancel.zoom\", ee).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n y.transform = function(m, A, E, G) {\n var Z = m.selection ? m.selection() : m;\n Z.property(\"__zoom\", ci), m !== Z ? N(m, A, E, G) : Z.interrupt().each(function() {\n T(this, arguments).event(G).start().zoom(null, typeof A == \"function\" ? A.apply(this, arguments) : A).end();\n });\n }, y.scaleBy = function(m, A, E, G) {\n y.scaleTo(m, function() {\n var Z = this.__zoom.k, K = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return Z * K;\n }, E, G);\n }, y.scaleTo = function(m, A, E, G) {\n y.transform(m, function() {\n var Z = t.apply(this, arguments), K = this.__zoom, z = E == null ? p(Z) : typeof E == \"function\" ? E.apply(this, arguments) : E, W = K.invert(z), B = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return n(V(S(K, B), z, W), Z, a);\n }, E, G);\n }, y.translateBy = function(m, A, E, G) {\n y.transform(m, function() {\n return n(this.__zoom.translate(\n typeof A == \"function\" ? A.apply(this, arguments) : A,\n typeof E == \"function\" ? E.apply(this, arguments) : E\n ), t.apply(this, arguments), a);\n }, null, G);\n }, y.translateTo = function(m, A, E, G, Z) {\n y.transform(m, function() {\n var K = t.apply(this, arguments), z = this.__zoom, W = G == null ? p(K) : typeof G == \"function\" ? G.apply(this, arguments) : G;\n return n(et.translate(W[0], W[1]).scale(z.k).translate(\n typeof A == \"function\" ? -A.apply(this, arguments) : -A,\n typeof E == \"function\" ? -E.apply(this, arguments) : -E\n ), K, a);\n }, G, Z);\n };\n function S(m, A) {\n return A = Math.max(r[0], Math.min(r[1], A)), A === m.k ? m : new De(A, m.x, m.y);\n }\n function V(m, A, E) {\n var G = A[0] - E[0] * m.k, Z = A[1] - E[1] * m.k;\n return G === m.x && Z === m.y ? m : new De(m.k, G, Z);\n }\n function p(m) {\n return [(+m[0][0] + +m[1][0]) / 2, (+m[0][1] + +m[1][1]) / 2];\n }\n function N(m, A, E, G) {\n m.on(\"start.zoom\", function() {\n T(this, arguments).event(G).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n T(this, arguments).event(G).end();\n }).tween(\"zoom\", function() {\n var Z = this, K = arguments, z = T(Z, K).event(G), W = t.apply(Z, K), B = E == null ? p(W) : typeof E == \"function\" ? E.apply(Z, K) : E, q = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), te = Z.__zoom, re = typeof A == \"function\" ? A.apply(Z, K) : A, k = l(te.invert(B).concat(q / te.k), re.invert(B).concat(q / re.k));\n return function(H) {\n if (H === 1)\n H = re;\n else {\n var f = k(H), b = q / f[2];\n H = new De(b, B[0] - f[0] * b, B[1] - f[1] * b);\n }\n z.zoom(null, H);\n };\n });\n }\n function T(m, A, E) {\n return !E && m.__zooming || new _(m, A);\n }\n function _(m, A) {\n this.that = m, this.args = A, this.active = 0, this.sourceEvent = null, this.extent = t.apply(m, A), this.taps = 0;\n }\n _.prototype = {\n event: function(m) {\n return m && (this.sourceEvent = m), this;\n },\n start: function() {\n return ++this.active === 1 && (this.that.__zooming = this, this.emit(\"start\")), this;\n },\n zoom: function(m, A) {\n return this.mouse && m !== \"mouse\" && (this.mouse[1] = A.invert(this.mouse[0])), this.touch0 && m !== \"touch\" && (this.touch0[1] = A.invert(this.touch0[0])), this.touch1 && m !== \"touch\" && (this.touch1[1] = A.invert(this.touch1[0])), this.that.__zoom = A, this.emit(\"zoom\"), this;\n },\n end: function() {\n return --this.active === 0 && (delete this.that.__zooming, this.emit(\"end\")), this;\n },\n emit: function(m) {\n var A = we(this.that).datum();\n u.call(\n m,\n this.that,\n new Wc(m, {\n sourceEvent: this.sourceEvent,\n target: y,\n type: m,\n transform: this.that.__zoom,\n dispatch: u\n }),\n A\n );\n }\n };\n function P(m, ...A) {\n if (!e.apply(this, arguments))\n return;\n var E = T(this, A).event(m), G = this.__zoom, Z = Math.max(r[0], Math.min(r[1], G.k * Math.pow(2, o.apply(this, arguments)))), K = Ne(m);\n if (E.wheel)\n (E.mouse[0][0] !== K[0] || E.mouse[0][1] !== K[1]) && (E.mouse[1] = G.invert(E.mouse[0] = K)), clearTimeout(E.wheel);\n else {\n if (G.k === Z)\n return;\n E.mouse = [K, G.invert(K)], Ft(this), E.start();\n }\n vt(m), E.wheel = setTimeout(z, h), E.zoom(\"mouse\", n(V(S(G, Z), E.mouse[0], E.mouse[1]), E.extent, a));\n function z() {\n E.wheel = null, E.end();\n }\n }\n function R(m, ...A) {\n if (g || !e.apply(this, arguments))\n return;\n var E = m.currentTarget, G = T(this, A, !0).event(m), Z = we(m.view).on(\"mousemove.zoom\", B, !0).on(\"mouseup.zoom\", q, !0), K = Ne(m, E), z = m.clientX, W = m.clientY;\n Ki(m.view), Tn(m), G.mouse = [K, this.__zoom.invert(K)], Ft(this), G.start();\n function B(te) {\n if (vt(te), !G.moved) {\n var re = te.clientX - z, k = te.clientY - W;\n G.moved = re * re + k * k > d;\n }\n G.event(te).zoom(\"mouse\", n(V(G.that.__zoom, G.mouse[0] = Ne(te, E), G.mouse[1]), G.extent, a));\n }\n function q(te) {\n Z.on(\"mousemove.zoom mouseup.zoom\", null), qi(te.view, G.moved), vt(te), G.event(te).end();\n }\n }\n function $(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = this.__zoom, G = Ne(m.changedTouches ? m.changedTouches[0] : m, this), Z = E.invert(G), K = E.k * (m.shiftKey ? 0.5 : 2), z = n(V(S(E, K), G, Z), t.apply(this, A), a);\n vt(m), s > 0 ? we(this).transition().duration(s).call(N, z, G, m) : we(this).call(y.transform, z, G, m);\n }\n }\n function D(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = m.touches, G = E.length, Z = T(this, A, m.changedTouches.length === G).event(m), K, z, W, B;\n for (Tn(m), z = 0; z < G; ++z)\n W = E[z], B = Ne(W, this), B = [B, this.__zoom.invert(B), W.identifier], Z.touch0 ? !Z.touch1 && Z.touch0[2] !== B[2] && (Z.touch1 = B, Z.taps = 0) : (Z.touch0 = B, K = !0, Z.taps = 1 + !!c);\n c && (c = clearTimeout(c)), K && (Z.taps < 2 && (v = B[0], c = setTimeout(function() {\n c = null;\n }, x)), Ft(this), Z.start());\n }\n }\n function Q(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z, W, B;\n for (vt(m), K = 0; K < Z; ++K)\n z = G[K], W = Ne(z, this), E.touch0 && E.touch0[2] === z.identifier ? E.touch0[0] = W : E.touch1 && E.touch1[2] === z.identifier && (E.touch1[0] = W);\n if (z = E.that.__zoom, E.touch1) {\n var q = E.touch0[0], te = E.touch0[1], re = E.touch1[0], k = E.touch1[1], H = (H = re[0] - q[0]) * H + (H = re[1] - q[1]) * H, f = (f = k[0] - te[0]) * f + (f = k[1] - te[1]) * f;\n z = S(z, Math.sqrt(H / f)), W = [(q[0] + re[0]) / 2, (q[1] + re[1]) / 2], B = [(te[0] + k[0]) / 2, (te[1] + k[1]) / 2];\n } else if (E.touch0)\n W = E.touch0[0], B = E.touch0[1];\n else\n return;\n E.zoom(\"touch\", n(V(z, W, B), E.extent, a));\n }\n }\n function ee(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z;\n for (Tn(m), g && clearTimeout(g), g = setTimeout(function() {\n g = null;\n }, x), K = 0; K < Z; ++K)\n z = G[K], E.touch0 && E.touch0[2] === z.identifier ? delete E.touch0 : E.touch1 && E.touch1[2] === z.identifier && delete E.touch1;\n if (E.touch1 && !E.touch0 && (E.touch0 = E.touch1, delete E.touch1), E.touch0)\n E.touch0[1] = this.__zoom.invert(E.touch0[0]);\n else if (E.end(), E.taps === 2 && (z = Ne(z, this), Math.hypot(v[0] - z[0], v[1] - z[1]) < w)) {\n var W = we(this).on(\"dblclick.zoom\");\n W && W.apply(this, arguments);\n }\n }\n }\n return y.wheelDelta = function(m) {\n return arguments.length ? (o = typeof m == \"function\" ? m : Rt(+m), y) : o;\n }, y.filter = function(m) {\n return arguments.length ? (e = typeof m == \"function\" ? m : Rt(!!m), y) : e;\n }, y.touchable = function(m) {\n return arguments.length ? (i = typeof m == \"function\" ? m : Rt(!!m), y) : i;\n }, y.extent = function(m) {\n return arguments.length ? (t = typeof m == \"function\" ? m : Rt([[+m[0][0], +m[0][1]], [+m[1][0], +m[1][1]]]), y) : t;\n }, y.scaleExtent = function(m) {\n return arguments.length ? (r[0] = +m[0], r[1] = +m[1], y) : [r[0], r[1]];\n }, y.translateExtent = function(m) {\n return arguments.length ? (a[0][0] = +m[0][0], a[1][0] = +m[1][0], a[0][1] = +m[0][1], a[1][1] = +m[1][1], y) : [[a[0][0], a[0][1]], [a[1][0], a[1][1]]];\n }, y.constrain = function(m) {\n return arguments.length ? (n = m, y) : n;\n }, y.duration = function(m) {\n return arguments.length ? (s = +m, y) : s;\n }, y.interpolate = function(m) {\n return arguments.length ? (l = m, y) : l;\n }, y.on = function() {\n var m = u.on.apply(u, arguments);\n return m === u ? y : m;\n }, y.clickDistance = function(m) {\n return arguments.length ? (d = (m = +m) * m, y) : Math.sqrt(d);\n }, y.tapDistance = function(m) {\n return arguments.length ? (w = +m, y) : w;\n }, y;\n}\nconst In = 0.1;\nfunction Ge() {\n}\nconst td = {\n zoomIn: Ge,\n zoomOut: Ge,\n zoomTo: Ge,\n fitView: Ge,\n setCenter: Ge,\n fitBounds: Ge,\n project: (e) => e,\n setTransform: Ge,\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n initialized: !1\n}, nd = (e, t) => {\n const n = e, o = M(n, \"nodes\"), i = M(n, \"d3Zoom\"), r = M(n, \"d3Selection\"), a = M(n, \"dimensions\"), s = M(n, \"translateExtent\"), l = M(n, \"minZoom\"), u = M(n, \"maxZoom\"), c = M(n, \"viewport\"), v = M(n, \"snapToGrid\"), g = M(n, \"snapGrid\"), x = M(n, \"hooks\"), h = t, d = M(h, \"getNodes\"), w = ie(!1);\n x.value.nodesInitialized.on(() => {\n w.value = !0;\n });\n const y = J(() => !!i.value && !!r.value && !!a.value.width && !!a.value.height && w.value);\n function S(p, N) {\n r.value && i.value && i.value.scaleBy(Pn(r.value, N), p);\n }\n function V(p, N, T, _) {\n const { x: P, y: R } = so({ x: -p, y: -N }, s.value), $ = et.translate(-P, -R).scale(T);\n r.value && i.value && i.value.transform(Pn(r.value, _), $);\n }\n return J(() => y.value ? {\n initialized: !0,\n zoomIn: (p) => {\n S(1.2, p == null ? void 0 : p.duration);\n },\n zoomOut: (p) => {\n S(1 / 1.2, p == null ? void 0 : p.duration);\n },\n zoomTo: (p, N) => {\n r.value && i.value && i.value.scaleTo(Pn(r.value, N == null ? void 0 : N.duration), p);\n },\n setTransform: (p, N) => {\n V(p.x, p.y, p.zoom, N == null ? void 0 : N.duration);\n },\n getTransform: () => ({\n x: c.value.x,\n y: c.value.y,\n zoom: c.value.zoom\n }),\n fitView: (p = {\n padding: In,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!o.value.length)\n return;\n const N = (p.includeHiddenNodes ? o.value : d.value).filter(($) => {\n var ee;\n const D = $.initialized && $.dimensions.width && $.dimensions.height;\n let Q = !0;\n return (ee = p.nodes) != null && ee.length && (Q = p.nodes.includes($.id)), D && Q;\n }), T = co(N), { x: _, y: P, zoom: R } = Zt(\n T,\n a.value.width,\n a.value.height,\n p.minZoom ?? l.value,\n p.maxZoom ?? u.value,\n p.padding ?? In,\n p.offset\n );\n V(_, P, R, p == null ? void 0 : p.duration);\n },\n setCenter: (p, N, T) => {\n const _ = typeof (T == null ? void 0 : T.zoom) < \"u\" ? T.zoom : u.value, P = a.value.width / 2 - p * _, R = a.value.height / 2 - N * _;\n V(P, R, _, T == null ? void 0 : T.duration);\n },\n fitBounds: (p, N = { padding: In }) => {\n const { x: T, y: _, zoom: P } = Zt(\n p,\n a.value.width,\n a.value.height,\n l.value,\n u.value,\n N.padding\n );\n V(T, _, P, N == null ? void 0 : N.duration);\n },\n project: (p) => uo(p, c.value, v.value, g.value)\n } : td);\n};\nfunction Pn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Dn(e, t) {\n if (t) {\n const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height;\n if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) {\n let i = {};\n if (Ae(t.style) ? i = { ...t.style(t) } : t.style && (i = { ...t.style }), i.width = i.width ?? `${t.dimensions.width}px`, i.height = i.height ?? `${t.dimensions.height}px`, n > 0)\n if (Pe(i.width)) {\n const r = Number(i.width.replace(\"px\", \"\"));\n i.width = `${r + n}px`;\n } else\n i.width += n;\n if (o > 0)\n if (Pe(i.height)) {\n const r = Number(i.height.replace(\"px\", \"\"));\n i.height = `${r + o}px`;\n } else\n i.height += o;\n if (e.position.x < 0) {\n const r = Math.abs(e.position.x);\n if (t.position.x = t.position.x - r, Pe(i.width)) {\n const a = Number(i.width.replace(\"px\", \"\"));\n i.width = `${a + r}px`;\n } else\n i.width += r;\n e.position.x = 0;\n }\n if (e.position.y < 0) {\n const r = Math.abs(e.position.y);\n if (t.position.y = t.position.y - r, Pe(i.height)) {\n const a = Number(i.height.replace(\"px\", \"\"));\n i.height = `${a + r}px`;\n } else\n i.height += r;\n e.position.y = 0;\n }\n t.dimensions.width = Number(i.width.toString().replace(\"px\", \"\")), t.dimensions.height = Number(i.height.toString().replace(\"px\", \"\")), Ae(t.style) ? t.style = (r) => {\n const a = t.style;\n return {\n ...a(r),\n ...i\n };\n } : t.style = {\n ...t.style,\n ...i\n };\n }\n }\n}\nfunction nn(e, t) {\n e.filter((i) => i.type === \"add\" || i.type === \"remove\").forEach((i) => {\n if (i.type === \"add\")\n t.findIndex((a) => a.id === i.item.id) === -1 && t.push(i.item);\n else if (i.type === \"remove\") {\n const r = t.findIndex((a) => a.id === i.id);\n r !== -1 && t.splice(r, 1);\n }\n });\n const o = t.map((i) => i.id);\n return t.forEach((i) => {\n var a, s;\n const r = e.filter((l) => l.id === i.id);\n for (const l of r)\n switch (l.type) {\n case \"select\":\n i.selected = l.selected;\n break;\n case \"position\":\n if (nt(i) && (typeof l.position < \"u\" && (i.position = l.position), typeof l.dragging < \"u\" && (i.dragging = l.dragging), i.expandParent && i.parentNode)) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && Dn(i, u);\n }\n break;\n case \"dimensions\":\n if (nt(i)) {\n if (typeof l.dimensions < \"u\" && (i.dimensions = l.dimensions), typeof l.updateStyle < \"u\" && (i.style = {\n ...i.style || {},\n width: `${(a = l.dimensions) == null ? void 0 : a.width}px`,\n height: `${(s = l.dimensions) == null ? void 0 : s.height}px`\n }), typeof l.resizing < \"u\" && (i.resizing = l.resizing), i.expandParent && i.parentNode) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && (u.initialized ? Dn(i, u) : Ue(() => {\n Dn(i, u);\n }));\n }\n i.initialized || (i.initialized = !0);\n }\n break;\n }\n }), t;\n}\nfunction Vd(e, t) {\n return nn(e, t);\n}\nfunction Hd(e, t) {\n return nn(e, t);\n}\nfunction Te(e, t) {\n return {\n id: e,\n type: \"select\",\n selected: t\n };\n}\nfunction di(e) {\n return {\n item: e,\n type: \"add\"\n };\n}\nfunction zn(e) {\n return {\n id: e,\n type: \"remove\"\n };\n}\nfunction An(e, t) {\n return e.reduce(\n (n, o) => {\n let i = t.includes(o.id);\n ce(o.selectable) && !o.selectable && (i = !1);\n const r = nt(o) ? \"changedNodes\" : \"changedEdges\";\n return !o.selected && i ? n[r].push(Te(o.id, !0)) : o.selected && !i && n[r].push(Te(o.id, !1)), n;\n },\n { changedNodes: [], changedEdges: [] }\n );\n}\nfunction od(e, t, n, o) {\n let i = !1;\n const r = nd(e, t), a = (f) => {\n const b = f ?? n.value ?? [];\n e.hooks.updateNodeInternals.trigger(b);\n }, s = (f) => {\n if (f)\n return e.nodes && !n.value.length ? e.nodes.find((b) => b.id === f) : e.nodes[n.value.indexOf(f)];\n }, l = (f) => {\n if (f)\n return e.edges && !o.value.length ? e.edges.find((b) => b.id === f) : e.edges[o.value.indexOf(f)];\n }, u = (f, b, L) => {\n const I = [];\n f.forEach((F) => {\n var Y, ne;\n const U = {\n id: F.id,\n type: \"position\",\n dragging: L,\n from: F.from\n };\n if (b && (U.position = F.position, F.parentNode)) {\n const O = s(F.parentNode);\n U.position = {\n x: U.position.x - (((Y = O == null ? void 0 : O.computedPosition) == null ? void 0 : Y.x) ?? 0),\n y: U.position.y - (((ne = O == null ? void 0 : O.computedPosition) == null ? void 0 : ne.y) ?? 0)\n };\n }\n I.push(U);\n }), I != null && I.length && e.hooks.nodesChange.trigger(I);\n }, c = (f) => {\n var F;\n if (!e.vueFlowRef)\n return;\n const b = e.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!b)\n return;\n let L;\n if ((F = e.__experimentalFeatures) != null && F.nestedFlow) {\n let U = [b], Y = b, ne;\n for (; !ne && Y; )\n Y = Y.parentElement, ne = Y == null ? void 0 : Y.classList.contains(\"vue-flow__transformationpane\"), ne && (U = [Y, ...U]);\n U.forEach((O) => {\n const ae = window.getComputedStyle(O), { m22: me } = new window.DOMMatrixReadOnly(ae.transform);\n L ? L *= me : L = me;\n });\n } else {\n const U = window.getComputedStyle(b), { m22: Y } = new window.DOMMatrixReadOnly(U.transform);\n L = Y;\n }\n const I = f.reduce((U, Y) => {\n const ne = s(Y.id);\n if (ne) {\n const O = rn(Y.nodeElement);\n !!(O.width && O.height && (ne.dimensions.width !== O.width || ne.dimensions.height !== O.height || Y.forceUpdate)) && (ne.handleBounds.source = Lo(\".source\", Y.nodeElement, L), ne.handleBounds.target = Lo(\".target\", Y.nodeElement, L), ne.dimensions = O, ne.initialized = !0, U.push({\n id: ne.id,\n type: \"dimensions\",\n dimensions: O\n }));\n }\n return U;\n }, []);\n e.fitViewOnInit && !i && (ye(() => r.value.initialized).toBe(!0).then(() => {\n r.value.fitView();\n }), i = !0), I.length && e.hooks.nodesChange.trigger(I);\n }, v = (f, b) => {\n const L = f.map((U) => U.id);\n let I, F = [];\n if (e.multiSelectionActive)\n I = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, g = (f, b) => {\n const L = f.map((U) => U.id);\n let I = [], F;\n if (e.multiSelectionActive)\n F = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, x = (f, b) => {\n const L = f.filter(xt).map((Y) => Y.id), I = f.filter($e).map((Y) => Y.id);\n let { changedNodes: F, changedEdges: U } = An([...e.nodes, ...e.edges], [...L, ...I]);\n e.multiSelectionActive && (F = L.map((Y) => Te(Y, b)), U = I.map((Y) => Te(Y, b))), F.length && e.hooks.nodesChange.trigger(F), U.length && e.hooks.edgesChange.trigger(U);\n }, h = (f) => {\n v(f, !0);\n }, d = (f) => {\n g(f, !0);\n }, w = (f) => {\n x(f, !0);\n }, y = (f) => {\n if (!f.length)\n return v(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.nodesChange.trigger(L);\n }, S = (f) => {\n if (!f.length)\n return g(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.edgesChange.trigger(L);\n }, V = (f) => {\n if (!f || !f.length)\n return x([], !1);\n const { changedNodes: b, changedEdges: L } = f.reduce(\n (I, F) => {\n const U = Te(F.id, !1);\n return xt(F) ? I.changedNodes.push(U) : I.changedEdges.push(U), I;\n },\n { changedNodes: [], changedEdges: [] }\n );\n b.length && e.hooks.nodesChange.trigger(b), L.length && e.hooks.edgesChange.trigger(L);\n }, p = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([f, e.maxZoom]), e.minZoom = f;\n }, N = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([e.minZoom, f]), e.maxZoom = f;\n }, T = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.translateExtent(f), e.translateExtent = f;\n }, _ = (f) => {\n e.nodeExtent = f, a(n.value);\n }, P = (f) => {\n e.nodesDraggable = f, e.nodesConnectable = f, e.elementsSelectable = f;\n }, R = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f;\n !e.initialized && !b.length || (e.nodes = Do(b, e.nodes, s, e.hooks.error.trigger));\n }, $ = (f) => {\n const b = f instanceof Function ? f(e.edges) : f;\n if (!e.initialized && !b.length)\n return;\n const L = e.isValidConnection ? b.filter(\n (I) => e.isValidConnection(I, {\n edges: e.edges,\n sourceNode: s(I.source),\n targetNode: s(I.target)\n })\n ) : b;\n e.edges = L.reduce((I, F) => {\n const U = s(F.source), Y = s(F.target), ne = !U || typeof U > \"u\", O = !Y || typeof Y > \"u\";\n if (ne && O ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, F.id, F.source, F.target)) : (ne && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, F.id, F.source)), O && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, F.id, F.target))), ne || O)\n return I;\n const ae = l(F.id);\n return I.push({\n ...lo(F, Object.assign({}, ae, e.defaultEdgeOptions)),\n sourceNode: U,\n targetNode: Y\n }), I;\n }, []);\n }, D = (f) => {\n const b = f instanceof Function ? f([...e.nodes, ...e.edges]) : f;\n !e.initialized && !b.length || (R(b.filter(xt)), $(b.filter($e)));\n }, Q = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f, I = Do(b, e.nodes, s, e.hooks.error.trigger).map(di);\n I.length && e.hooks.nodesChange.trigger(I);\n }, ee = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, I = (e.isValidConnection ? b.filter(\n (F) => e.isValidConnection(F, {\n edges: e.edges,\n sourceNode: s(F.source),\n targetNode: s(F.target)\n })\n ) : b).reduce((F, U) => {\n const Y = pa(\n {\n ...U,\n ...e.defaultEdgeOptions\n },\n e.edges,\n e.hooks.error.trigger\n );\n if (Y) {\n const ne = s(Y.source), O = s(Y.target), ae = !ne || typeof ne > \"u\", me = !O || typeof O > \"u\";\n if (ae && me ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (ae && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, Y.id, Y.source)), me && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, Y.id, Y.target))), ae || me)\n return F;\n F.push(\n di({\n ...Y,\n sourceNode: ne,\n targetNode: O\n })\n );\n }\n return F;\n }, []);\n I.length && e.hooks.edgesChange.trigger(I);\n }, m = (f, b = !0) => {\n const L = f instanceof Function ? f(e.nodes) : f, I = [], F = [];\n L.forEach((U) => {\n const Y = typeof U == \"string\" ? s(U) : U;\n if (!(ce(Y.deletable) && !Y.deletable) && (I.push(zn(Y.id)), b)) {\n const ne = sn([Y], e.edges).filter((O) => ce(O.deletable) ? O.deletable : !0);\n F.push(...ne.map((O) => zn(O.id)));\n }\n }), F.length && e.hooks.edgesChange.trigger(F), I.length && e.hooks.nodesChange.trigger(I);\n }, A = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, L = [];\n b.forEach((I) => {\n const F = typeof I == \"string\" ? l(I) : I;\n ce(F.deletable) && !F.deletable || L.push(zn(typeof I == \"string\" ? I : I.id));\n }), e.hooks.edgesChange.trigger(L);\n }, E = (f, b, L = !0) => ya(f, b, e.edges, l, L, e.hooks.error.trigger), G = (f) => nn(f, e.nodes), Z = (f) => nn(f, e.edges), K = (f, b, L, I = !1) => {\n I ? e.connectionClickStartHandle = f : e.connectionStartHandle = f, e.connectionEndHandle = null, e.connectionStatus = null, b && (e.connectionPosition = b);\n }, z = (f, b = null, L = null) => {\n e.connectionStartHandle && (e.connectionPosition = f, e.connectionEndHandle = b, e.connectionStatus = L);\n }, W = (f, b) => {\n e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, b ? e.connectionClickStartHandle = null : e.connectionStartHandle = null;\n }, B = (f) => {\n const b = ha(f), L = b ? null : s(f.id);\n return !b && !L ? [null, null, b] : [b ? f : Io(L), L, b];\n }, q = (f, b = !0, L) => {\n const [I, F, U] = B(f);\n return I ? (L || e.nodes).filter((Y) => {\n if (!U && (Y.id === F.id || !Y.computedPosition))\n return !1;\n const ne = Io(Y), O = Fn(ne, I);\n return b && O > 0 || O >= Number(f.width) * Number(f.height);\n }) : [];\n }, te = (f, b, L = !0) => {\n const [I] = B(f);\n if (!I)\n return !1;\n const F = Fn(I, b);\n return L && F > 0 || F >= Number(f.width) * Number(f.height);\n }, re = (f) => {\n const { viewport: b, dimensions: L, d3Zoom: I, d3Selection: F, translateExtent: U } = e;\n if (!I || !F || !f.x && !f.y)\n return !1;\n const Y = et.translate(b.x + f.x, b.y + f.y).scale(b.zoom), ne = [\n [0, 0],\n [L.width, L.height]\n ], O = I.constrain()(Y, ne, U), ae = e.viewport.x !== O.x || e.viewport.y !== O.y || e.viewport.zoom !== O.k;\n return I.transform(F, O), ae;\n }, k = (f) => {\n const b = f instanceof Function ? f(e) : f, L = [\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"nodeExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n ], I = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n ce(b.defaultEdgeOptions) && (e.defaultEdgeOptions = b.defaultEdgeOptions);\n const F = b.modelValue || b.nodes || b.edges ? [] : void 0;\n F && (b.modelValue && F.push(...b.modelValue), b.nodes && F.push(...b.nodes), b.edges && F.push(...b.edges), D(F));\n const U = () => {\n ce(b.maxZoom) && N(b.maxZoom), ce(b.minZoom) && p(b.minZoom), ce(b.translateExtent) && T(b.translateExtent), ce(b.nodeExtent) && _(b.nodeExtent);\n };\n Object.keys(b).forEach((Y) => {\n const ne = Y, O = b[ne];\n ![...L, ...I].includes(ne) && ce(O) && (e[ne] = O);\n }), e.d3Zoom ? U() : ye(() => e.d3Zoom).not.toBeUndefined().then(U), e.initialized || (e.initialized = !0);\n };\n return {\n updateNodePositions: u,\n updateNodeDimensions: c,\n setElements: D,\n setNodes: R,\n setEdges: $,\n addNodes: Q,\n addEdges: ee,\n removeNodes: m,\n removeEdges: A,\n findNode: s,\n findEdge: l,\n updateEdge: E,\n applyEdgeChanges: Z,\n applyNodeChanges: G,\n addSelectedElements: w,\n addSelectedNodes: h,\n addSelectedEdges: d,\n setMinZoom: p,\n setMaxZoom: N,\n setTranslateExtent: T,\n setNodeExtent: _,\n removeSelectedElements: V,\n removeSelectedNodes: y,\n removeSelectedEdges: S,\n startConnection: K,\n updateConnection: z,\n endConnection: W,\n setInteractive: P,\n setState: k,\n getIntersectingNodes: q,\n isNodeIntersecting: te,\n panBy: re,\n fitView: async (f = { padding: 0.1 }) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitView(f);\n },\n zoomIn: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomIn(f);\n },\n zoomOut: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomOut(f);\n },\n zoomTo: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomTo(f, b);\n },\n setTransform: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setTransform(f, b);\n },\n getTransform: () => r.value.getTransform(),\n setCenter: async (f, b, L) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setCenter(f, b, L);\n },\n fitBounds: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitBounds(f, b);\n },\n project: (f) => r.value.project(f),\n toObject: () => JSON.parse(\n JSON.stringify({\n nodes: e.nodes.map((f) => {\n const {\n computedPosition: b,\n handleBounds: L,\n selected: I,\n dimensions: F,\n isParent: U,\n resizing: Y,\n dragging: ne,\n initialized: O,\n ...ae\n } = f;\n return ae;\n }),\n edges: e.edges.map((f) => {\n const { selected: b, sourceNode: L, targetNode: I, ...F } = f;\n return F;\n }),\n position: [e.viewport.x, e.viewport.y],\n zoom: e.viewport.zoom\n })\n ),\n updateNodeInternals: a,\n $reset: () => {\n const f = ar();\n if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) {\n const b = et.translate(f.defaultViewport.x ?? 0, f.defaultViewport.y ?? 0).scale(je(f.defaultViewport.zoom ?? 1, f.minZoom, f.maxZoom)), L = e.viewportRef.getBoundingClientRect(), I = [\n [0, 0],\n [L.width, L.height]\n ], F = e.d3Zoom.constrain()(b, I, f.translateExtent);\n e.d3Zoom.transform(e.d3Selection, F);\n }\n k(f);\n },\n $destroy: () => {\n }\n };\n}\nclass ot {\n constructor() {\n this.currentId = 0, this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n return ot.instance || (ot.instance = new ot()), ot.instance;\n }\n set(t, n) {\n return this.flows.set(t, n);\n }\n get(t) {\n return this.flows.get(t);\n }\n remove(t) {\n return this.flows.delete(t);\n }\n create(t, n) {\n const o = ar(n), i = kr(o), r = J(() => i.nodes.map((g) => g.id)), a = J(() => i.edges.map((g) => g.id)), s = cu(i, r, a), l = od(i, s, r, a), u = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n const h = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;\n u[h] = x.on;\n });\n const c = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n c[g] = x.trigger;\n }), l.setState(i);\n const v = {\n ...u,\n ...s,\n ...l,\n ...Or(i),\n emits: c,\n id: t,\n vueFlowVersion: \"1.19.4\",\n $destroy: () => {\n this.remove(t);\n }\n };\n return this.set(t, v), v;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nconst fe = (e) => {\n const t = ot.getInstance(), n = hi(), o = e == null ? void 0 : e.id, i = (n == null ? void 0 : n.vueFlowId) || o;\n let r, a = !1;\n if (n) {\n const s = He(zo, null);\n typeof s < \"u\" && s !== null && (r = s);\n }\n if (r || i && (r = t.get(i)), !r || r && o && o !== r.id) {\n const s = o ?? t.getId();\n r = t.create(s, e), n && (a = !0);\n } else\n e && r.setState(e);\n return n && (ut(zo, r), n.vueFlowId = r.id, a && Mt(() => {\n if (r) {\n const s = t.get(r.id);\n s ? s.$destroy() : wt(`No store instance found for id ${r.id} in storage.`);\n }\n })), r;\n};\nfunction id(e, t, n) {\n const o = Tr();\n return o.run(() => {\n [\n () => {\n o.run(() => {\n let h, d, w = !!(n.nodes.value.length || n.edges.value.length);\n h = tt([e.modelValue, () => {\n var y, S;\n return (S = (y = e.modelValue) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setElements(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],\n ([y, S]) => {\n var V;\n (V = e.modelValue) != null && V.value && Array.isArray(e.modelValue.value) && (h == null || h.pause(), e.modelValue.value = [...y, ...S], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.nodes.value.length;\n h = tt([e.nodes, () => {\n var y, S;\n return (S = (y = e.nodes) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setNodes(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, () => n.nodes.value.length],\n ([y]) => {\n var S;\n (S = e.nodes) != null && S.value && Array.isArray(e.nodes.value) && (h == null || h.pause(), e.nodes.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.edges.value.length;\n h = tt([e.edges, () => {\n var y, S;\n return (S = (y = e.edges) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setEdges(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.edges, () => n.edges.value.length],\n ([y]) => {\n var S;\n (S = e.edges) != null && S.value && Array.isArray(e.edges.value) && (h == null || h.pause(), e.edges.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.minZoom,\n () => {\n t.minZoom && ce(t.minZoom) && n.setMinZoom(t.minZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.maxZoom,\n () => {\n t.maxZoom && ce(t.maxZoom) && n.setMaxZoom(t.maxZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.translateExtent,\n () => {\n t.translateExtent && ce(t.translateExtent) && n.setTranslateExtent(t.translateExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.nodeExtent,\n () => {\n t.nodeExtent && ce(t.nodeExtent) && n.setNodeExtent(t.nodeExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.applyDefault,\n () => {\n ce(t.applyDefault) && (n.applyDefault.value = t.applyDefault);\n }\n ), de(\n n.applyDefault,\n (h, d, w) => {\n n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), w(() => {\n n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n o.run(() => {\n const h = async (d) => {\n let w = d;\n Ae(t.autoConnect) && (w = await t.autoConnect(d)), w !== !1 && n.addEdges([w]);\n };\n de(\n () => t.autoConnect,\n () => {\n ce(t.autoConnect) && (n.autoConnect.value = t.autoConnect);\n }\n ), de(\n n.autoConnect,\n (d, w, y) => {\n d ? n.onConnect(h) : n.hooks.value.connect.off(h), y(() => {\n n.hooks.value.connect.off(h);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n const h = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n Object.keys(t).forEach((d) => {\n if (!h.includes(d)) {\n const w = M(t, d), y = n[d];\n o.run(() => {\n de(\n w,\n (S) => {\n ce(S) && (y.value = S);\n },\n { flush: \"pre\" }\n );\n });\n }\n });\n }\n ].forEach((h) => h());\n }), () => o.stop();\n}\nfunction fi(e, t) {\n return {\n x: e.clientX - t.left,\n y: e.clientY - t.top\n };\n}\nconst rd = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n}, ad = /* @__PURE__ */ ge({\n ...rd,\n props: {\n isSelecting: { type: Boolean }\n },\n setup(e) {\n const {\n id: t,\n vueFlowRef: n,\n getNodes: o,\n getEdges: i,\n viewport: r,\n emits: a,\n userSelectionActive: s,\n removeSelectedElements: l,\n panOnDrag: u,\n userSelectionRect: c,\n elementsSelectable: v,\n nodesSelectionActive: g,\n addSelectedElements: x,\n getSelectedEdges: h,\n getSelectedNodes: d,\n removeNodes: w,\n removeEdges: y,\n selectionMode: S,\n deleteKeyCode: V,\n multiSelectionKeyCode: p,\n multiSelectionActive: N\n } = fe(), T = ie(null), _ = ie(0), P = ie(0), R = ie(), $ = J(() => v.value && (e.isSelecting || s.value));\n _t(V, (z) => {\n if (!z)\n return;\n const W = o.value.reduce((B, q) => ((!q.selected && q.parentNode && B.find((te) => te.id === q.parentNode) || q.selected) && B.push(q), B), []);\n (W || h.value) && (h.value.length > 0 && y(h.value), W.length > 0 && w(W), g.value = !1, l());\n }), _t(p, (z) => {\n N.value = z;\n });\n function D() {\n s.value = !1, c.value = null, _.value = 0, P.value = 0;\n }\n function Q(z) {\n z.target !== T.value || $.value || (a.paneClick(z), l(), g.value = !1);\n }\n function ee(z) {\n var W;\n if (z.target === T.value) {\n if (Array.isArray(u.value) && ((W = u.value) != null && W.includes(2))) {\n z.preventDefault();\n return;\n }\n a.paneContextMenu(z);\n }\n }\n function m(z) {\n z.target === T.value && a.paneScroll(z);\n }\n function A(z) {\n if (R.value = n.value.getBoundingClientRect(), !$.value || !v || !e.isSelecting || z.button !== 0 || z.target !== T.value || !R.value)\n return;\n const { x: W, y: B } = fi(z, R.value);\n l(), c.value = {\n width: 0,\n height: 0,\n startX: W,\n startY: B,\n x: W,\n y: B\n }, s.value = !0, a.selectionStart(z);\n }\n function E(z) {\n if (!$.value)\n return a.paneMouseMove(z);\n if (!e.isSelecting || !R.value || !c.value)\n return;\n s.value || (s.value = !0), g.value && (g.value = !1);\n const W = fi(z, R.value), B = c.value.startX ?? 0, q = c.value.startY ?? 0, te = {\n ...c.value,\n x: W.x < B ? W.x : B,\n y: W.y < q ? W.y : q,\n width: Math.abs(W.x - B),\n height: Math.abs(W.y - q)\n }, re = Ci(\n o.value,\n c.value,\n r.value,\n S.value === fo.Partial\n ), k = sn(re, i.value);\n _.value = re.length, P.value = k.length, c.value = te, x([...re, ...k]);\n }\n function G(z) {\n $.value && z.button === 0 && (!s.value && c.value && z.target === T.value && Q(z), g.value = _.value > 0, D(), a.selectionEnd(z));\n }\n function Z(z) {\n var W;\n if (!$.value)\n return a.paneMouseLeave(z);\n s.value && (g.value = _.value > 0, (W = a.selectionEnd) == null || W.call(a, z)), D();\n }\n function K(z) {\n $.value || a.paneMouseEnter(z);\n }\n return (z, W) => (oe(), se(\"div\", {\n ref_key: \"container\",\n ref: T,\n key: `pane-${C(t)}`,\n class: Ke([\"vue-flow__pane vue-flow__container\", { selection: e.isSelecting }]),\n onClick: Q,\n onContextmenu: ee,\n onWheelPassive: m,\n onMouseenter: K,\n onMousedown: A,\n onMousemove: E,\n onMouseup: G,\n onMouseleave: Z\n }, [\n xe(z.$slots, \"default\"),\n C(s) && C(c) ? (oe(), ze(au, { key: 0 })) : Ee(\"\", !0),\n C(g) && C(d).length ? (oe(), ze(iu, { key: 1 })) : Ee(\"\", !0)\n ], 34));\n }\n}), sd = { class: \"vue-flow__nodes vue-flow__container\" }, ld = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n}, ud = /* @__PURE__ */ ge({\n ...ld,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"nodesDraggable\"), i = M(n, \"nodesFocusable\"), r = M(n, \"elementsSelectable\"), a = M(n, \"nodesConnectable\"), s = M(n, \"getNodes\"), l = M(n, \"getNodesInitialized\"), u = M(n, \"getNodeTypes\"), c = M(n, \"updateNodeDimensions\"), v = M(n, \"emits\");\n let g = ie();\n ye(() => s.value.length > 0 && l.value.length === s.value.length).toBe(!0).then(() => {\n Ue(() => {\n v.value.nodesInitialized(l.value);\n });\n }), Ve(() => {\n g.value = new ResizeObserver((S) => {\n const V = S.map((p) => ({\n id: p.target.getAttribute(\"data-id\"),\n nodeElement: p.target,\n forceUpdate: !0\n }));\n c.value(V);\n });\n }), gi(() => {\n var S;\n return (S = g.value) == null ? void 0 : S.disconnect();\n });\n function x(S) {\n return typeof S > \"u\" ? o.value : S;\n }\n function h(S) {\n return typeof S > \"u\" ? r.value : S;\n }\n function d(S) {\n return typeof S > \"u\" ? a.value : S;\n }\n function w(S) {\n return typeof S > \"u\" ? i.value : S;\n }\n function y(S, V) {\n const p = S || \"default\";\n let N = V ?? u.value[p];\n const T = on();\n if (typeof N == \"string\" && T) {\n const P = Object.keys(T.appContext.components);\n P && P.includes(p) && (N = pi(p, !1));\n }\n if (typeof N != \"string\")\n return N;\n const _ = t == null ? void 0 : t[`node-${p}`];\n return _ || (v.value.error(new ve(he.NODE_TYPE_MISSING, N)), !1);\n }\n return (S, V) => (oe(), se(\"div\", sd, [\n C(g) ? (oe(!0), se(Ce, { key: 0 }, dt(C(s), (p) => (oe(), ze(C(Tl), {\n id: p.id,\n key: p.id,\n \"resize-observer\": C(g),\n type: y(p.type, p.template),\n name: p.type || \"default\",\n draggable: x(p.draggable),\n selectable: h(p.selectable),\n connectable: d(p.connectable),\n focusable: w(p.focusable),\n node: p\n }, null, 8, [\"id\", \"resize-observer\", \"type\", \"name\", \"draggable\", \"selectable\", \"connectable\", \"focusable\", \"node\"]))), 128)) : Ee(\"\", !0)\n ]));\n }\n}), cd = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"], dd = [\"stroke\", \"stroke-width\", \"fill\"], fd = [\"stroke\", \"stroke-width\"], hd = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n}, gd = /* @__PURE__ */ ge({\n ...hd,\n props: {\n id: null,\n type: null,\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(e) {\n return (t, n) => (oe(), se(\"marker\", {\n id: e.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${e.width}`,\n markerHeight: `${e.height}`,\n markerUnits: e.markerUnits,\n orient: e.orient\n }, [\n e.type === C(Yn).ArrowClosed ? (oe(), se(\"polyline\", {\n key: 0,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: e.color,\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 8, dd)) : Ee(\"\", !0),\n e.type === C(Yn).Arrow ? (oe(), se(\"polyline\", {\n key: 1,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 8, fd)) : Ee(\"\", !0)\n ], 8, cd));\n }\n}), vd = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n}, md = /* @__PURE__ */ ge({\n ...vd,\n setup(e) {\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"connectionLineOptions\"), r = M(t, \"defaultMarkerColor\"), a = J(() => {\n const s = [], l = [], u = (c) => {\n if (c) {\n const v = Xe(c, n.value);\n s.includes(v) || (typeof c == \"object\" ? l.push({ ...c, id: v, color: c.color || r.value }) : l.push({ id: v, color: r.value, type: c }), s.push(v));\n }\n };\n return [i.value.markerEnd, i.value.markerStart].forEach(u), o.value.reduce((c, v) => ([v.markerStart, v.markerEnd].forEach(u), c.sort((g, x) => g.id.localeCompare(x.id))), l), l;\n });\n return (s, l) => (oe(), se(\"defs\", null, [\n (oe(!0), se(Ce, null, dt(C(a), (u) => (oe(), ze(gd, {\n id: u.id,\n key: u.id,\n type: u.type,\n color: u.color,\n width: u.width,\n height: u.height,\n markerUnits: u.markerUnits,\n \"stroke-width\": u.strokeWidth,\n orient: u.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]))), 128))\n ]));\n }\n}), pd = {\n key: 0,\n class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\"\n}, yd = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n}, xd = /* @__PURE__ */ ge({\n ...yd,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"connectionStartHandle\"), i = M(n, \"nodesConnectable\"), r = M(n, \"edgesUpdatable\"), a = M(n, \"edgesFocusable\"), s = M(n, \"elementsSelectable\"), l = M(n, \"getSelectedNodes\"), u = M(n, \"findNode\"), c = M(n, \"edges\"), v = M(n, \"getEdges\"), g = M(n, \"getNodesInitialized\"), x = M(n, \"getEdgeTypes\"), h = M(n, \"elevateEdgesOnSelect\"), d = M(n, \"dimensions\"), w = M(n, \"emits\"), y = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P;\n return (P = o.value) != null && P.nodeId ? u.value(o.value.nodeId) : !1;\n }\n ), S = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P, R;\n return !!(y.value && (typeof y.value.connectable > \"u\" ? i.value : y.value.connectable) && ((P = o.value) != null && P.nodeId) && ((R = o.value) != null && R.type));\n }\n ), V = Sn(\n [\n () => c.value.map((P) => P.zIndex),\n () => h.value ? [l.value.length] : [0],\n () => h.value ? g.value.map((P) => P.computedPosition.z) : []\n ],\n () => Ea(v.value, u.value, h.value)\n );\n function p(P) {\n return typeof P > \"u\" ? s.value : P;\n }\n function N(P) {\n return typeof P > \"u\" ? r.value : P;\n }\n function T(P) {\n return typeof P > \"u\" ? a.value : P;\n }\n function _(P, R) {\n const $ = P || \"default\";\n let D = R ?? x.value[$];\n const Q = on();\n if (typeof D == \"string\" && Q) {\n const m = Object.keys(Q.appContext.components);\n m && m.includes($) && (D = pi($, !1));\n }\n if (D && typeof D != \"string\")\n return D;\n const ee = t == null ? void 0 : t[`edge-${$}`];\n return ee || (w.value.error(new ve(he.EDGE_TYPE_MISSING, D)), !1);\n }\n return (P, R) => C(d).width && C(d).height ? (oe(), se(Ce, { key: 0 }, [\n (oe(!0), se(Ce, null, dt(C(V), ($) => (oe(), se(\"svg\", {\n key: $.level,\n class: \"vue-flow__edges vue-flow__container\",\n style: Le(`z-index: ${$.level}`)\n }, [\n $.isMaxLevel ? (oe(), ze(md, { key: 0 })) : Ee(\"\", !0),\n ct(\"g\", null, [\n (oe(!0), se(Ce, null, dt($.edges, (D) => (oe(), ze(C(Kl), {\n id: D.id,\n key: D.id,\n edge: D,\n type: _(D.type, D.template),\n name: D.type || \"default\",\n selectable: p(D.selectable),\n updatable: N(D.updatable),\n focusable: T(D.focusable)\n }, null, 8, [\"id\", \"edge\", \"type\", \"name\", \"selectable\", \"updatable\", \"focusable\"]))), 128))\n ])\n ], 4))), 128)),\n C(S) && C(y) ? (oe(), se(\"svg\", pd, [\n qe(tu, { \"source-node\": C(y) }, null, 8, [\"source-node\"])\n ])) : Ee(\"\", !0)\n ], 64)) : Ee(\"\", !0);\n }\n}), _d = /* @__PURE__ */ ct(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1), wd = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n}, bd = /* @__PURE__ */ ge({\n ...wd,\n setup(e) {\n const { id: t, viewport: n, emits: o, d3Zoom: i, d3Selection: r, dimensions: a, ...s } = fe(), l = ie(!oo);\n return ye(() => i.value && r.value && a.value.width > 0 && a.value.height > 0).toBeTruthy().then(() => {\n o.paneReady({\n id: t,\n viewport: n,\n emits: o,\n d3Zoom: i,\n d3Selection: r,\n dimensions: a,\n ...s\n }), setTimeout(() => {\n l.value = !0;\n }, 0);\n }), (u, c) => (oe(), se(\"div\", {\n key: `transform-${C(t)}`,\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: Le({\n transform: `translate(${C(n).x}px,${C(n).y}px) scale(${C(n).zoom})`,\n opacity: C(l) ? void 0 : 0\n })\n }, [\n qe(xd),\n _d,\n qe(ud),\n xe(u.$slots, \"default\")\n ], 4));\n }\n}), Ed = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n}, Sd = /* @__PURE__ */ ge({\n ...Ed,\n setup(e) {\n const {\n id: t,\n minZoom: n,\n maxZoom: o,\n defaultViewport: i,\n translateExtent: r,\n dimensions: a,\n zoomActivationKeyCode: s,\n selectionKeyCode: l,\n panActivationKeyCode: u,\n panOnScroll: c,\n panOnScrollMode: v,\n panOnScrollSpeed: g,\n panOnDrag: x,\n zoomOnDoubleClick: h,\n zoomOnPinch: d,\n zoomOnScroll: w,\n preventScrolling: y,\n noWheelClassName: S,\n noPanClassName: V,\n emits: p,\n connectionStartHandle: N,\n userSelectionActive: T,\n paneDragging: _,\n d3Zoom: P,\n d3Selection: R,\n d3ZoomHandler: $,\n viewport: D,\n viewportRef: Q\n } = fe(), ee = ie(), m = ie(!1), A = ie(!1);\n let E = !1, G = 0, Z = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const K = _t(u), z = J(() => !m.value && x.value && K.value), W = J(\n () => l.value !== !0 && m.value || l.value === !0 && !z.value\n );\n Ve(() => {\n oa(ee, re);\n const H = ao();\n ro(H, \"resize\", re);\n }), Ve(() => {\n const H = ee.value, f = H.getBoundingClientRect(), b = ed().scaleExtent([n.value, o.value]).translateExtent(r.value), L = we(H).call(b), I = L.on(\"wheel.zoom\"), F = et.translate(i.value.x ?? 0, i.value.y ?? 0).scale(je(i.value.zoom ?? 1, n.value, o.value)), U = [\n [0, 0],\n [f.width, f.height]\n ], Y = b.constrain()(F, U, r.value);\n b.transform(L, Y), P.value = b, R.value = L, $.value = I, D.value = { x: Y.x, y: Y.y, zoom: Y.k }, Q.value = H, _t(l, (O) => {\n m.value = O;\n });\n const ne = _t(s);\n bo(() => {\n m.value && T.value && !A.value ? b.on(\"zoom\", null) : !m.value && !T.value && b.on(\"zoom\", (O) => {\n D.value = { x: O.transform.x, y: O.transform.y, zoom: O.transform.k };\n const ae = te(O.transform);\n E = B(x.value, G ?? 0), p.viewportChange(ae), p.move({ event: O, flowTransform: ae });\n });\n }), b.on(\"start\", (O) => {\n var me;\n if (!O.sourceEvent)\n return null;\n G = O.sourceEvent.button, A.value = !0;\n const ae = te(O.transform);\n ((me = O.sourceEvent) == null ? void 0 : me.type) === \"mousedown\" && (_.value = !0), Z = ae, p.viewportChangeStart(ae), p.moveStart({ event: O, flowTransform: ae });\n }), b.on(\"end\", (O) => {\n if (!O.sourceEvent)\n return null;\n if (A.value = !1, _.value = !1, B(x.value, G ?? 0) && !E && p.paneContextMenu(O.sourceEvent), E = !1, q(Z, O.transform)) {\n const ae = te(O.transform);\n Z = ae, p.viewportChangeEnd(ae), p.moveEnd({ event: O, flowTransform: ae });\n }\n }), bo(() => {\n c.value && !ne.value && !T.value ? L.on(\n \"wheel.zoom\",\n (O) => {\n if (k(O, S.value))\n return !1;\n O.preventDefault(), O.stopImmediatePropagation();\n const ae = L.property(\"__zoom\").k || 1;\n if (O.ctrlKey && d.value) {\n const Tt = Ne(O), _r = -O.deltaY * (O.deltaMode === 1 ? 0.05 : O.deltaMode ? 1 : 2e-3) * 10, wr = ae * 2 ** _r;\n b.scaleTo(L, wr, Tt);\n return;\n }\n const me = O.deltaMode === 1 ? 20 : 1, En = v.value === Ut.Vertical ? 0 : O.deltaX * me, Ot = v.value === Ut.Horizontal ? 0 : O.deltaY * me;\n b.translateBy(\n L,\n -(En / ae) * g.value,\n -(Ot / ae) * g.value\n );\n },\n { passive: !1 }\n ) : typeof I < \"u\" && L.on(\n \"wheel.zoom\",\n function(O, ae) {\n if (!y.value || k(O, S.value))\n return null;\n O.preventDefault(), I.call(this, O, ae);\n },\n { passive: !1 }\n );\n }), b.filter((O) => {\n var Ot, Tt;\n const ae = ne.value || w.value, me = d.value && O.ctrlKey;\n if (O.button === 1 && O.type === \"mousedown\" && ((Ot = O.target) != null && Ot.closest(\".vue-flow__node\") || (Tt = O.target) != null && Tt.closest(\".vue-flow__edge\")))\n return !0;\n if (!x.value && !ae && !c.value && !h.value && !d.value || T.value || !h.value && O.type === \"dblclick\" || k(O, S.value) && O.type === \"wheel\" || k(O, V.value) && O.type !== \"wheel\" || !d.value && O.ctrlKey && O.type === \"wheel\" || !ae && !c.value && !me && O.type === \"wheel\" || !x.value && (O.type === \"mousedown\" || O.type === \"touchstart\") || Array.isArray(x.value) && !x.value.includes(O.button) && (O.type === \"mousedown\" || O.type === \"touchstart\"))\n return !1;\n const En = Array.isArray(x.value) && x.value.includes(O.button) || !O.button || O.button <= 1;\n return (!O.ctrlKey || O.type === \"wheel\") && En;\n });\n });\n function B(H, f) {\n return f === 2 && Array.isArray(H) && H.includes(2);\n }\n function q(H, f) {\n return H.x !== f.x && !isNaN(f.x) || H.y !== f.y && !isNaN(f.y) || H.zoom !== f.k && !isNaN(f.k);\n }\n function te(H) {\n return {\n x: H.x,\n y: H.y,\n zoom: H.k\n };\n }\n function re() {\n if (!ee.value)\n return;\n const { width: H, height: f } = rn(ee.value);\n (H === 0 || f === 0) && p.error(new ve(he.MISSING_VIEWPORT_DIMENSIONS)), a.value.width = H || 500, a.value.height = f || 500;\n }\n function k(H, f) {\n return H.target.closest(`.${f}`);\n }\n return (H, f) => (oe(), se(Ce, null, [\n (oe(), se(\"div\", {\n ref_key: \"viewportEl\",\n ref: ee,\n key: `viewport-${C(t)}`,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n qe(ad, {\n \"is-selecting\": C(W),\n class: Ke({ connecting: !!C(N), dragging: C(_), draggable: !!C(x) })\n }, {\n default: Fe(() => [\n qe(bd, null, {\n default: Fe(() => [\n xe(H.$slots, \"zoom-pane\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"class\"])\n ])),\n xe(H.$slots, \"default\")\n ], 64));\n }\n}), Nd = [\"id\"], Cd = [\"id\"], Md = [\"id\"], $d = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n}, kd = /* @__PURE__ */ ge({\n ...$d,\n setup(e) {\n const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = fe(), i = {\n position: \"absolute\",\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: \"hidden\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n clipPath: \"inset(100%)\"\n };\n return (r, a) => (oe(), se(Ce, null, [\n ct(\"div\", {\n id: `${C(Qi)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select a node. \" + Vn(C(n) ? \"\" : \"You can then use the arrow keys to move the node around.\") + \" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. \", 9, Nd),\n ct(\"div\", {\n id: `${C(Ji)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, Cd),\n C(n) ? Ee(\"\", !0) : (oe(), se(\"div\", {\n key: 0,\n id: `${C(Ml)}-${C(t)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n style: i\n }, Vn(C(o)), 9, Md))\n ], 64));\n }\n}), Od = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n}, Ld = /* @__PURE__ */ ge({\n ...Od,\n props: {\n id: null,\n modelValue: null,\n nodes: null,\n edges: null,\n edgeTypes: null,\n nodeTypes: null,\n connectionMode: null,\n connectionLineType: null,\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: null,\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: null,\n selectionKeyCode: null,\n multiSelectionKeyCode: null,\n zoomActivationKeyCode: null,\n panActivationKeyCode: null,\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: null,\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: null,\n maxZoom: null,\n defaultViewport: null,\n translateExtent: null,\n nodeExtent: null,\n defaultMarkerColor: null,\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: null,\n panOnScrollMode: null,\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: null,\n edgeUpdaterRadius: null,\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: null,\n noWheelClassName: null,\n noPanClassName: null,\n defaultEdgeOptions: null,\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n __experimentalFeatures: null\n },\n emits: [\"nodesChange\", \"edgesChange\", \"nodeDoubleClick\", \"nodeClick\", \"nodeMouseEnter\", \"nodeMouseMove\", \"nodeMouseLeave\", \"nodeContextMenu\", \"nodeDragStart\", \"nodeDrag\", \"nodeDragStop\", \"nodesInitialized\", \"miniMapNodeClick\", \"miniMapNodeDoubleClick\", \"miniMapNodeMouseEnter\", \"miniMapNodeMouseMove\", \"miniMapNodeMouseLeave\", \"connect\", \"connectStart\", \"connectEnd\", \"clickConnectStart\", \"clickConnectEnd\", \"moveStart\", \"move\", \"moveEnd\", \"selectionDragStart\", \"selectionDrag\", \"selectionDragStop\", \"selectionContextMenu\", \"selectionStart\", \"selectionEnd\", \"viewportChangeStart\", \"viewportChange\", \"viewportChangeEnd\", \"paneReady\", \"paneScroll\", \"paneClick\", \"paneContextMenu\", \"paneMouseEnter\", \"paneMouseMove\", \"paneMouseLeave\", \"edgeContextMenu\", \"edgeMouseEnter\", \"edgeMouseMove\", \"edgeMouseLeave\", \"edgeDoubleClick\", \"edgeClick\", \"edgeUpdateStart\", \"edgeUpdate\", \"edgeUpdateEnd\", \"updateNodeInternals\", \"error\", \"update:modelValue\", \"update:nodes\", \"update:edges\"],\n setup(e, { expose: t, emit: n }) {\n const o = e, i = yt(o, \"modelValue\", n), r = yt(o, \"nodes\", n), a = yt(o, \"edges\", n), { vueFlowRef: s, hooks: l, getNodeTypes: u, getEdgeTypes: c, ...v } = fe(o), g = id({ modelValue: i, nodes: r, edges: a }, o, {\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n });\n da(n, l);\n const x = ie();\n return ut(ln, Ir()), Pr(() => {\n g();\n }), Ve(() => {\n s.value = x.value;\n }), t({\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n }), (h, d) => (oe(), se(\"div\", {\n ref_key: \"el\",\n ref: x,\n class: \"vue-flow\"\n }, [\n qe(Sd, null, {\n nodes: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(u)), (w) => xe(h.$slots, `node-${w}`)), 256))\n ]),\n edges: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(c)), (w) => xe(h.$slots, `edge-${w}`)), 256))\n ]),\n \"connection-name\": Fe(() => [\n xe(h.$slots, \"connection-line\")\n ]),\n \"zoom-pane\": Fe(() => [\n xe(h.$slots, \"zoom-pane\")\n ]),\n default: Fe(() => [\n xe(h.$slots, \"default\")\n ]),\n _: 3\n }),\n qe(kd)\n ], 512));\n }\n}), Td = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n}, Gd = /* @__PURE__ */ ge({\n ...Td,\n props: {\n position: null\n },\n setup(e) {\n const t = e, { userSelectionActive: n } = fe(), o = J(() => `${t.position}`.split(\"-\"));\n return (i, r) => (oe(), se(\"div\", {\n class: Ke([\"vue-flow__panel\", C(o)]),\n style: Le({ pointerEvents: C(n) ? \"none\" : \"all\" })\n }, [\n xe(i.$slots, \"default\")\n ], 6));\n }\n}), Bn = 0.1, Fd = (e) => {\n const t = fe({ id: e }), n = M(t, \"nodes\"), o = M(t, \"d3Zoom\"), i = M(t, \"d3Selection\"), r = M(t, \"dimensions\"), a = M(t, \"translateExtent\"), s = M(t, \"minZoom\"), l = M(t, \"maxZoom\"), u = M(t, \"viewport\"), c = M(t, \"snapToGrid\"), v = M(t, \"snapGrid\"), g = M(t, \"getNodes\");\n return {\n zoomIn: (d) => {\n x(1.2, d == null ? void 0 : d.duration);\n },\n zoomOut: (d) => {\n x(1 / 1.2, d == null ? void 0 : d.duration);\n },\n zoomTo: (d, w) => {\n i.value && o.value && o.value.scaleTo(Rn(i.value, w == null ? void 0 : w.duration), d);\n },\n setTransform: (d, w) => {\n h(d.x, d.y, d.zoom, w == null ? void 0 : w.duration);\n },\n getTransform: () => ({\n x: u.value.x,\n y: u.value.y,\n zoom: u.value.zoom\n }),\n fitView: (d = {\n padding: Bn,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!n.value.length)\n return;\n const w = (d.includeHiddenNodes ? n.value : g.value).filter((N) => {\n var P;\n const T = N.initialized && N.dimensions.width && N.dimensions.height;\n let _ = !0;\n return (P = d.nodes) != null && P.length && (_ = d.nodes.includes(N.id)), T && _;\n }), y = co(w), { x: S, y: V, zoom: p } = Zt(\n y,\n r.value.width,\n r.value.height,\n d.minZoom ?? s.value,\n d.maxZoom ?? l.value,\n d.padding ?? Bn,\n d.offset\n );\n h(S, V, p, d == null ? void 0 : d.duration);\n },\n setCenter: (d, w, y) => {\n const S = typeof (y == null ? void 0 : y.zoom) < \"u\" ? y.zoom : l.value, V = r.value.width / 2 - d * S, p = r.value.height / 2 - w * S;\n h(V, p, S, y == null ? void 0 : y.duration);\n },\n fitBounds: (d, w = { padding: Bn }) => {\n const { x: y, y: S, zoom: V } = Zt(d, r.value.width, r.value.height, s.value, l.value, w.padding);\n h(y, S, V, w == null ? void 0 : w.duration);\n },\n project: (d) => uo(d, u.value, c.value, v.value)\n };\n function x(d, w) {\n i.value && o.value && o.value.scaleBy(Rn(i.value, w), d);\n }\n function h(d, w, y, S) {\n const { x: V, y: p } = so({ x: -d, y: -w }, a.value), N = et.translate(-V, -p).scale(y);\n i.value && o.value && o.value.transform(Rn(i.value, S), N);\n }\n};\nfunction Rn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Yd(e) {\n const t = e ?? He(Oi, \"\"), n = He(Ti, null), { findEdge: o, emits: i } = fe(), r = o(t);\n return r || i.error(new ve(he.EDGE_NOT_FOUND, t)), {\n id: t,\n edge: r,\n edgeEl: n\n };\n}\nexport {\n vn as BaseEdge,\n Bl as BezierEdge,\n Ye as ConnectionLineType,\n Qe as ConnectionMode,\n Rd as EdgeLabelRenderer,\n Al as EdgeText,\n he as ErrorCode,\n ot as GlobalVueFlowStorage,\n Kt as Handle,\n Yn as MarkerType,\n $i as NodeIdInjection,\n Ut as PanOnScrollMode,\n Gd as Panel,\n xa as PanelPosition,\n j as Position,\n fo as SelectionMode,\n Rl as SimpleBezierEdge,\n ir as SmoothStepEdge,\n Gl as StepEdge,\n Fl as StraightEdge,\n Ld as VueFlow,\n ve as VueFlowError,\n zo as VueFlowInjection,\n zd as addEdge,\n nn as applyChanges,\n Vd as applyEdgeChanges,\n Hd as applyNodeChanges,\n je as clamp,\n Ei as connectionExists,\n lu as defaultEdgeTypes,\n su as defaultNodeTypes,\n nr as getBezierEdgeCenter,\n Kn as getBezierPath,\n Bd as getBoundsofRects,\n sn as getConnectedEdges,\n Dd as getIncomers,\n Xe as getMarkerId,\n Ci as getNodesInside,\n Pd as getOutgoers,\n co as getRectOfNodes,\n or as getSimpleBezierPath,\n tr as getSimpleEdgeCenter,\n qn as getSmoothStepPath,\n rr as getStraightPath,\n Zt as getTransformForBounds,\n va as graphPosToZoomedPos,\n $e as isEdge,\n fa as isGraphEdge,\n nt as isGraphNode,\n xt as isNode,\n uo as pointToRendererPoint,\n va as rendererPointToPoint,\n Ad as updateEdge,\n Yd as useEdge,\n Ra as useGetPointerPosition,\n Di as useHandle,\n _a as useNode,\n fe as useVueFlow,\n Fd as useZoomPanHelper\n};\n","\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","import { App } from 'vue'\n\nimport NodeEditor from '@/components/NodeEditor.vue'\nimport StateEditor from '@/components/StateEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('NodeEditor', NodeEditor)\n\tapp.component('StateEditor', StateEditor)\n}\n\nexport { install, NodeEditor, StateEditor }\n"],"names":["Eo","oo","Dr","zr","Ae","Ie","Pe","Ar","le","C","Br","i","r","yi","Rr","ie","Er","So","Vr","Sn","a","de","l","u","br","c","v","g","Mt","hi","Vt","Hr","on","Ve","Ue","Hn","x","h","d","w","S","V","p","Sr","y","N","T","ye","No","Lr","Gr","Fr","Yr","Xr","Zr","Ur","Yt","xi","_i","Co","Wr","Kr","qr","tt","wi","io","ro","jr","Mo","Qr","Jr","Ln","Gn","$o","ea","ta","na","oa","ko","ia","Oo","ra","aa","To","sa","yt","J","ua","wt","ca","da","Nr","he","Nn","ve","ao","Io","Fn","rn","je","so","Po","$e","fa","xt","nt","ha","ga","it","ce","lo","an","Ei","uo","Si","Xt","Ni","co","Ci","sn","Zt","ma","Mi","Xe","o","pa","ya","Do","fo","Ye","Qe","Yn","Ut","zo","$i","ki","Oi","Ti","ln","_a","He","fe","ho","rt","n","Wt","Ao","wa","ba","Ea","Cn","Bo","Sa","Ro","Ii","Na","Ca","Vo","Pi","It","Di","_","P","R","$","D","Q","m","G","A","E","Z","Y","L","f","B","F","I","U","ne","W","b","K","q","z","te","re","k","H","Ma","$a","ka","Kt","ge","M","ee","oe","se","Ke","xe","un","ue","Oa","cn","Ta","dn","Ia","Ho","Pa","Mn","zi","Da","za","go","Ai","Aa","Ba","Ra","Lo","Xn","Va","fn","Ht","Ha","La","Go","Zn","Fo","hn","Ga","Fa","Bi","Ya","vo","Xa","_e","Za","Ua","Ri","Wa","Ka","Vi","Hi","qa","ja","Qa","Ja","es","ts","ns","os","is","Li","rs","qt","as","ss","ls","us","cs","ds","fs","hs","gs","vs","ms","ps","ys","xs","_s","ws","bs","Es","Ss","Ns","Cs","Ms","$s","ks","Os","Gi","Ts","Is","Ps","Ds","ft","zs","As","Bs","Rs","Fi","mo","Yi","Xi","Zi","Vs","Hs","Ls","Gs","Fs","Ys","Xs","Zs","Us","Ws","Ks","qs","js","Qs","Js","el","tl","nl","ol","il","rl","al","sl","ll","ul","cl","dl","fl","hl","gl","Ui","vl","ml","pl","yl","Wi","$t","xl","we","_l","Ne","wl","bt","$n","at","Ki","qi","Pt","Un","bl","El","Sl","Nl","Cl","ji","Qi","Ji","Ml","er","st","Wn","t","$l","kl","_t","Ol","ut","gi","Tl","Il","Pl","Dl","zl","Al","Le","Ee","ct","vi","Ce","Cr","Vn","ze","mi","gn","vn","tr","nr","Dt","Yo","Kn","mn","Bl","Xo","or","pn","Rl","Zo","Vl","Uo","Hl","Ll","qn","yn","ir","xn","Gl","rr","_n","Fl","Yl","Xl","po","Wo","Zl","Ul","Wl","Kl","ql","jl","Rd","Mr","Ql","Jl","eu","tu","s","$r","nu","ou","iu","ru","au","su","lu","uu","ar","cu","yo","sr","kt","Et","jt","lt","St","Me","du","fu","hu","gu","vu","mu","pu","Ko","Nt","qo","yu","xu","jo","lr","Qo","pe","zt","ti","_u","jn","We","Qt","Jo","wu","ei","Ze","be","bu","kn","ni","At","ur","Eu","Su","Nu","cr","oi","Re","Qn","On","Cu","Mu","$u","ii","Jn","dr","Bt","ku","Ou","fr","Tu","Iu","Pu","ri","Du","zu","Au","ht","mt","gt","hr","Jt","pt","en","Je","wn","Ct","gr","xo","Bu","tn","vr","eo","Ru","ai","Hu","Vu","si","Lu","Gu","mr","li","to","Lt","ui","no","Gt","bn","Fu","_o","Se","ke","Yu","Xu","Zu","Uu","wo","pr","Wu","Ku","qu","ju","Qu","Ju","ec","tc","nc","oc","ic","rc","ac","sc","lc","uc","cc","dc","fc","hc","gc","vc","mc","Be","pc","yc","xc","_c","wc","bc","Ec","Sc","Nc","Cc","Mc","yr","$c","kc","Oc","Tc","Ic","Pc","Dc","zc","Ac","Bc","Rc","Vc","Hc","Lc","xr","Gc","Fc","Oe","Yc","Xc","Zc","Uc","Rt","Wc","De","et","Tn","vt","Kc","qc","ci","jc","Qc","Jc","ed","In","Ge","td","nd","Pn","Dn","nn","Te","di","zn","An","od","O","ae","me","ot","kr","Or","id","Tr","fi","rd","ad","sd","ld","ud","pi","dt","cd","dd","fd","hd","gd","vd","md","pd","yd","xd","qe","_d","wd","bd","Ed","Sd","bo","Tt","_r","wr","En","Ot","Fe","Nd","Cd","Md","$d","kd","Od","Ld","Ir","Pr","props","__props","emit","__emit","positionMap","Position","sourcePosition","computed","targetPosition","labelInput","ref","newLabel","showInput","lastClick","nodeOnClick","now","showLabelInput","nextTick","submitNewLabel","__default__","useVueFlow","labelOnClick","path","getBezierPath","containerClass","vueFlowInstance","hover","activeElementKey","vueFlowElements","activeElementIndex","j","elements","_elements","key","newValue","getNodes","onPaneReady","onMounted","handleKeypress","onBeforeUnmount","shiftTerminal","currentTerminal","shiftOutput","shiftInput","onWheel","$event","e","fitView","addNode","newNodePosition","makeEdge","activeNode","nodeId","edgeId","onConnect","onEdgeDoubleClick","labelChanged","states","stateHash","hasInputs","stateElements","edges","edgeKey","target","onElementsChange","idToLabel","label","install","app","NodeEditor","StateEditor"],"mappings":"oRACA,IAAIA,GACJ,MAAMC,GAAK,OAAO,OAAS,IAAKC,GAAM,GAAM,OAAO,EAAI,IAAKC,GAAM,GAAM,OAAO,GAAK,UAAWC,GAAM,GAAM,OAAO,GAAK,WAAYC,GAAM,GAAM,OAAO,GAAK,SAAUC,GAAM,GAAM,OAAO,GAAK,SAAUC,GAAK,IAAM,CAClN,EACAN,KAAQD,GAAK,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,GAAG,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EACrI,SAASQ,GAAG,EAAG,CACb,OAAO,OAAO,GAAK,WAAa,EAAC,EAAKC,EAAAA,MAAE,CAAC,CAC3C,CACA,SAASC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QjrB,IAAK,CACrC,IAAA2S,EAAKsY,EAASjrB,CAAC,EACf2S,EAAG,MAAQ,QAEPga,EAAAha,EAAG,KAAK,EAAI,CAClB,GAAI,CAAC,CAAA,EAEIA,EAAG,MAAQ,SAEdga,EAAAha,EAAG,KAAK,EAAI,CAClB,KAAM,OAAA,EAEGA,EAAG,QAAUA,EAAG,QAE1Boa,EAAMpa,EAAG,MAAM,EAAIoa,EAAMpa,EAAG,MAAM,GAAK,GACvCoa,EAAMpa,EAAG,MAAM,EAAEA,EAAG,KAAK,EAAI,CAC5B,OAAQA,EAAG,MAAA,GAILga,EAAAha,EAAG,KAAK,EAAI,CAClB,GAAI,CAAC,CAAA,EAGGwa,EAAAxa,EAAG,EAAE,EAAIA,EAAG,KACvB,CAEA,QAASwY,KAAO4B,EAAO,CAElB,IAAAK,EAAQD,EAAUhC,CAAG,EAChB,QAAA6B,KAAWD,EAAM5B,CAAG,EACrBwB,EAAAS,CAAK,EAAE,GAAGJ,CAAO,EAAID,EAAM5B,CAAG,EAAE6B,CAAO,CAEhD,CACA5D,EAAK,oBAAqBuD,CAAM,CAAA,qPCjHjC,SAASU,GAAQC,EAAwB,CACpCA,EAAA,UAAU,aAAcC,EAAU,EAClCD,EAAA,UAAU,cAAeE,EAAW,CACzC","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"node-editor.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.23/node_modules/@vue-flow/core/dist/vue-flow-core.mjs","../src/components/EditableNode.vue","../src/components/EditableEdge.vue","../src/components/NodeEditor.vue","../src/components/StateEditor.vue","../src/index.ts"],"sourcesContent":["import { unref as C, ref as ie, watch as de, customRef as br, getCurrentScope as hi, onScopeDispose as Vt, getCurrentInstance as on, onMounted as Ve, nextTick as Ue, readonly as Er, isRef as Sr, computed as J, onBeforeMount as Nr, markRaw as it, inject as He, defineComponent as ge, toRef as M, openBlock as oe, createElementBlock as se, normalizeClass as Ke, renderSlot as xe, h as ue, provide as ut, onBeforeUnmount as gi, normalizeStyle as Le, createCommentVNode as Ee, createElementVNode as ct, mergeProps as vi, createBlock as ze, resolveDynamicComponent as mi, Fragment as Ce, createTextVNode as Cr, toDisplayString as Vn, Teleport as Mr, normalizeProps as $r, reactive as kr, toRefs as Or, effectScope as Tr, renderList as dt, resolveComponent as pi, createVNode as qe, watchEffect as bo, withCtx as Fe, useSlots as Ir, onUnmounted as Pr } from \"vue\";\nvar Eo;\nconst oo = typeof window < \"u\", Dr = (e) => typeof e < \"u\", zr = (e) => typeof e == \"boolean\", Ae = (e) => typeof e == \"function\", Ie = (e) => typeof e == \"number\", Pe = (e) => typeof e == \"string\", Ar = () => {\n};\noo && ((Eo = window == null ? void 0 : window.navigator) != null && Eo.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction le(e) {\n return typeof e == \"function\" ? e() : C(e);\n}\nfunction Br(e, t) {\n function n(...o) {\n return new Promise((i, r) => {\n Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(i).catch(r);\n });\n }\n return n;\n}\nconst yi = (e) => e();\nfunction Rr(e = yi) {\n const t = ie(!0);\n function n() {\n t.value = !1;\n }\n function o() {\n t.value = !0;\n }\n const i = (...r) => {\n t.value && e(...r);\n };\n return { isActive: Er(t), pause: n, resume: o, eventFilter: i };\n}\nfunction So(e, t = !1, n = \"Timeout\") {\n return new Promise((o, i) => {\n setTimeout(t ? () => i(n) : o, e);\n });\n}\nfunction Vr(e) {\n return e;\n}\nfunction Sn(e, t) {\n let n, o, i;\n const r = ie(!0), a = () => {\n r.value = !0, i();\n };\n de(e, a, { flush: \"sync\" });\n const s = Ae(t) ? t : t.get, l = Ae(t) ? void 0 : t.set, u = br((c, v) => (o = c, i = v, {\n get() {\n return r.value && (n = s(), r.value = !1), o(), n;\n },\n set(g) {\n l == null || l(g);\n }\n }));\n return Object.isExtensible(u) && (u.trigger = a), u;\n}\nfunction Mt(e) {\n return hi() ? (Vt(e), !0) : !1;\n}\nfunction Hr(e, t = !0) {\n on() ? Ve(e) : t ? e() : Ue(e);\n}\nfunction Hn(e, t = !1) {\n function n(v, { flush: g = \"sync\", deep: x = !1, timeout: h, throwOnTimeout: d } = {}) {\n let w = null;\n const S = [new Promise((V) => {\n w = de(e, (p) => {\n v(p) !== t && (w == null || w(), V(p));\n }, {\n flush: g,\n deep: x,\n immediate: !0\n });\n })];\n return h != null && S.push(So(h, d).then(() => le(e)).finally(() => w == null ? void 0 : w())), Promise.race(S);\n }\n function o(v, g) {\n if (!Sr(v))\n return n((p) => p === v, g);\n const { flush: x = \"sync\", deep: h = !1, timeout: d, throwOnTimeout: w } = g ?? {};\n let y = null;\n const V = [new Promise((p) => {\n y = de([e, v], ([N, T]) => {\n t !== (N === T) && (y == null || y(), p(N));\n }, {\n flush: x,\n deep: h,\n immediate: !0\n });\n })];\n return d != null && V.push(So(d, w).then(() => le(e)).finally(() => (y == null || y(), le(e)))), Promise.race(V);\n }\n function i(v) {\n return n((g) => Boolean(g), v);\n }\n function r(v) {\n return o(null, v);\n }\n function a(v) {\n return o(void 0, v);\n }\n function s(v) {\n return n(Number.isNaN, v);\n }\n function l(v, g) {\n return n((x) => {\n const h = Array.from(x);\n return h.includes(v) || h.includes(le(v));\n }, g);\n }\n function u(v) {\n return c(1, v);\n }\n function c(v = 1, g) {\n let x = -1;\n return n(() => (x += 1, x >= v), g);\n }\n return Array.isArray(le(e)) ? {\n toMatch: n,\n toContains: l,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n } : {\n toMatch: n,\n toBe: o,\n toBeTruthy: i,\n toBeNull: r,\n toBeNaN: s,\n toBeUndefined: a,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n };\n}\nfunction ye(e) {\n return Hn(e);\n}\nvar No = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Gr = Object.prototype.propertyIsEnumerable, Fr = (e, t) => {\n var n = {};\n for (var o in e)\n Lr.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && No)\n for (var o of No(e))\n t.indexOf(o) < 0 && Gr.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction Yr(e, t, n = {}) {\n const o = n, {\n eventFilter: i = yi\n } = o, r = Fr(o, [\n \"eventFilter\"\n ]);\n return de(e, Br(i, t), r);\n}\nvar Xr = Object.defineProperty, Zr = Object.defineProperties, Ur = Object.getOwnPropertyDescriptors, Yt = Object.getOwnPropertySymbols, xi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, Co = (e, t, n) => t in e ? Xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wr = (e, t) => {\n for (var n in t || (t = {}))\n xi.call(t, n) && Co(e, n, t[n]);\n if (Yt)\n for (var n of Yt(t))\n _i.call(t, n) && Co(e, n, t[n]);\n return e;\n}, Kr = (e, t) => Zr(e, Ur(t)), qr = (e, t) => {\n var n = {};\n for (var o in e)\n xi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && Yt)\n for (var o of Yt(e))\n t.indexOf(o) < 0 && _i.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction tt(e, t, n = {}) {\n const o = n, {\n eventFilter: i\n } = o, r = qr(o, [\n \"eventFilter\"\n ]), { eventFilter: a, pause: s, resume: l, isActive: u } = Rr(i);\n return { stop: Yr(e, t, Kr(Wr({}, r), {\n eventFilter: a\n })), pause: s, resume: l, isActive: u };\n}\nfunction wi(e) {\n var t;\n const n = le(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst io = oo ? window : void 0;\nfunction ro(...e) {\n let t, n, o, i;\n if (Pe(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = io) : [t, n, o, i] = e, !t)\n return Ar;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const r = [], a = () => {\n r.forEach((c) => c()), r.length = 0;\n }, s = (c, v, g, x) => (c.addEventListener(v, g, x), () => c.removeEventListener(v, g, x)), l = de(() => [wi(t), le(i)], ([c, v]) => {\n a(), c && r.push(...n.flatMap((g) => o.map((x) => s(c, g, x, v))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n l(), a();\n };\n return Mt(u), u;\n}\nconst jr = (e) => typeof e == \"function\" ? e : typeof e == \"string\" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;\nfunction Mo(...e) {\n let t, n, o = {};\n e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == \"object\" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);\n const { target: i = io, eventName: r = \"keydown\", passive: a = !1 } = o, s = jr(t);\n return ro(i, r, (u) => {\n s(u) && n(u);\n }, a);\n}\nfunction Qr(e, t = !1) {\n const n = ie(), o = () => n.value = Boolean(e());\n return o(), Hr(o, t), n;\n}\nfunction Jr(e) {\n return JSON.parse(JSON.stringify(e));\n}\nconst Ln = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Gn = \"__vueuse_ssr_handlers__\";\nLn[Gn] = Ln[Gn] || {};\nLn[Gn];\nvar $o = Object.getOwnPropertySymbols, ea = Object.prototype.hasOwnProperty, ta = Object.prototype.propertyIsEnumerable, na = (e, t) => {\n var n = {};\n for (var o in e)\n ea.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && $o)\n for (var o of $o(e))\n t.indexOf(o) < 0 && ta.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction oa(e, t, n = {}) {\n const o = n, { window: i = io } = o, r = na(o, [\"window\"]);\n let a;\n const s = Qr(() => i && \"ResizeObserver\" in i), l = () => {\n a && (a.disconnect(), a = void 0);\n }, u = de(() => wi(e), (v) => {\n l(), s.value && i && v && (a = new ResizeObserver(t), a.observe(v, r));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n l(), u();\n };\n return Mt(c), {\n isSupported: s,\n stop: c\n };\n}\nvar ko;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(ko || (ko = {}));\nvar ia = Object.defineProperty, Oo = Object.getOwnPropertySymbols, ra = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, To = (e, t, n) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t) => {\n for (var n in t || (t = {}))\n ra.call(t, n) && To(e, n, t[n]);\n if (Oo)\n for (var n of Oo(t))\n aa.call(t, n) && To(e, n, t[n]);\n return e;\n};\nconst la = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nsa({\n linear: Vr\n}, la);\nfunction yt(e, t, n, o = {}) {\n var i, r, a;\n const {\n clone: s = !1,\n passive: l = !1,\n eventName: u,\n deep: c = !1,\n defaultValue: v\n } = o, g = on(), x = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((a = (r = g == null ? void 0 : g.proxy) == null ? void 0 : r.$emit) == null ? void 0 : a.bind(g == null ? void 0 : g.proxy));\n let h = u;\n t || (t = \"modelValue\"), h = u || h || `update:${t.toString()}`;\n const d = (y) => s ? Ae(s) ? s(y) : Jr(y) : y, w = () => Dr(e[t]) ? d(e[t]) : v;\n if (l) {\n const y = w(), S = ie(y);\n return de(() => e[t], (V) => S.value = d(V)), de(S, (V) => {\n (V !== e[t] || c) && x(h, V);\n }, { deep: c }), S;\n } else\n return J({\n get() {\n return w();\n },\n set(y) {\n x(h, y);\n }\n });\n}\nfunction X(e = () => {\n}) {\n const t = ie(/* @__PURE__ */ new Set());\n e && t.value.add(e);\n const n = (r) => {\n t.value.delete(r);\n };\n return {\n on: (r) => {\n t.value.has(e) && t.value.delete(e), t.value.add(r);\n const a = () => n(r);\n return Mt(a), {\n off: a\n };\n },\n off: n,\n trigger: (r) => Promise.all(Array.from(t.value).map((a) => a(r))),\n fns: t\n };\n}\nconst ua = [\"production\", \"prod\"];\nfunction wt(e, ...t) {\n ua.includes(process.env.NODE_ENV || \"\") || console.warn(`[Vue Flow]: ${e}`, ...t);\n}\nfunction ca() {\n return {\n edgesChange: X(),\n nodesChange: X(),\n nodeDoubleClick: X(),\n nodeClick: X(),\n nodeMouseEnter: X(),\n nodeMouseMove: X(),\n nodeMouseLeave: X(),\n nodeContextMenu: X(),\n nodeDragStart: X(),\n nodeDrag: X(),\n nodeDragStop: X(),\n nodesInitialized: X(),\n miniMapNodeClick: X(),\n miniMapNodeDoubleClick: X(),\n miniMapNodeMouseEnter: X(),\n miniMapNodeMouseMove: X(),\n miniMapNodeMouseLeave: X(),\n connect: X(),\n connectStart: X(),\n connectEnd: X(),\n clickConnectStart: X(),\n clickConnectEnd: X(),\n paneReady: X(),\n move: X(),\n moveStart: X(),\n moveEnd: X(),\n selectionDragStart: X(),\n selectionDrag: X(),\n selectionDragStop: X(),\n selectionContextMenu: X(),\n selectionStart: X(),\n selectionEnd: X(),\n viewportChangeStart: X(),\n viewportChange: X(),\n viewportChangeEnd: X(),\n paneScroll: X(),\n paneClick: X(),\n paneContextMenu: X(),\n paneMouseEnter: X(),\n paneMouseMove: X(),\n paneMouseLeave: X(),\n edgeContextMenu: X(),\n edgeMouseEnter: X(),\n edgeMouseMove: X(),\n edgeMouseLeave: X(),\n edgeDoubleClick: X(),\n edgeClick: X(),\n edgeUpdateStart: X(),\n edgeUpdate: X(),\n edgeUpdateEnd: X(),\n updateNodeInternals: X(),\n error: X((e) => wt(e.message))\n };\n}\nfunction da(e, t) {\n Nr(() => {\n for (const [n, o] of Object.entries(t.value)) {\n const i = (r) => {\n e(n, r);\n };\n o.on(i), Mt(() => {\n o.off(i);\n });\n }\n });\n}\nvar he = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = \"MISSING_VIEWPORT_DIMENSIONS\", e.NODE_NOT_FOUND = \"NODE_NOT_FOUND\", e.NODE_MISSING_PARENT = \"NODE_MISSING_PARENT\", e.NODE_TYPE_MISSING = \"NODE_TYPE_MISSING\", e.NODE_EXTENT_INVALID = \"NODE_EXTENT_INVALID\", e.EDGE_INVALID = \"EDGE_INVALID\", e.EDGE_NOT_FOUND = \"EDGE_NOT_FOUND\", e.EDGE_SOURCE_MISSING = \"EDGE_SOURCE_MISSING\", e.EDGE_TARGET_MISSING = \"EDGE_TARGET_MISSING\", e.EDGE_TYPE_MISSING = \"EDGE_TYPE_MISSING\", e.EDGE_SOURCE_TARGET_SAME = \"EDGE_SOURCE_TARGET_SAME\", e.EDGE_SOURCE_TARGET_MISSING = \"EDGE_SOURCE_TARGET_MISSING\", e.EDGE_ORPHANED = \"EDGE_ORPHANED\", e))(he || {});\nconst Nn = {\n MISSING_VIEWPORT_DIMENSIONS: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n NODE_NOT_FOUND: (e) => `Node not found\nNode: ${e}`,\n NODE_MISSING_PARENT: (e, t) => `Node is missing a parent\nNode: ${e}\nParent: ${t}`,\n NODE_TYPE_MISSING: (e) => `Node type is missing\nType: ${e}`,\n NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent\nNode: ${e}`,\n EDGE_INVALID: (e) => `An edge needs a source and a target\nEdge: ${e}`,\n EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing\nEdge: ${e} \nSource: ${t}`,\n EDGE_TARGET_MISSING: (e, t) => `Edge target is missing\nEdge: ${e} \nTarget: ${t}`,\n EDGE_TYPE_MISSING: (e) => `Edge type is missing\nType: ${e}`,\n EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,\n EDGE_NOT_FOUND: (e) => `Edge not found\nEdge: ${e}`\n};\nclass ve extends Error {\n constructor(t, ...n) {\n var o;\n super((o = Nn[t]) == null ? void 0 : o.call(Nn, ...n)), this.code = t;\n }\n}\nconst ao = () => typeof window < \"u\" ? window : { chrome: !1 };\nfunction Io(e) {\n return {\n ...e.computedPosition || { x: 0, y: 0 },\n width: e.dimensions.width || 0,\n height: e.dimensions.height || 0\n };\n}\nfunction Fn(e, t) {\n const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));\n return Math.ceil(n * o);\n}\nfunction rn(e) {\n return {\n width: e.offsetWidth,\n height: e.offsetHeight\n };\n}\nfunction je(e, t = 0, n = 1) {\n return Math.min(Math.max(e, t), n);\n}\nfunction so(e, t) {\n return {\n x: je(e.x, t[0][0], t[1][0]),\n y: je(e.y, t[0][1], t[1][1])\n };\n}\nfunction Po(e) {\n const t = e.getRootNode(), n = ao();\n return \"elementFromPoint\" in t ? t : n.document;\n}\nfunction $e(e) {\n return e && \"id\" in e && \"source\" in e && \"target\" in e;\n}\nfunction fa(e) {\n return $e(e) && \"sourceNode\" in e && \"targetNode\" in e;\n}\nfunction xt(e) {\n return e && \"id\" in e && !$e(e);\n}\nfunction nt(e) {\n return xt(e) && \"computedPosition\" in e;\n}\nfunction ha(e) {\n return !!e.width && !!e.height && !!e.x && !!e.y;\n}\nfunction ga(e, t = {}) {\n let n = t;\n return nt(e) || (n = {\n type: e.type ?? t.type ?? \"default\",\n dimensions: it({\n width: 0,\n height: 0\n }),\n handleBounds: {\n source: [],\n target: []\n },\n computedPosition: it({\n z: 0,\n ...e.position\n }),\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: !1,\n dragging: !1,\n resizing: !1,\n initialized: !1,\n ...t,\n data: ce(e.data) ? e.data : {},\n events: it(ce(e.events) ? e.events : {})\n }), Object.assign({}, n, e, { id: e.id.toString() });\n}\nfunction lo(e, t = {}) {\n const n = ce(e.events) ? e.events : t.events && ce(t.events) ? t.events : {}, o = ce(e.data) ? e.data : t.data && ce(t.data) ? t.data : {};\n return t = fa(e) ? t : {\n ...t,\n sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle,\n targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle,\n type: e.type ?? t.type ?? \"default\",\n source: e.source.toString() || t.source,\n target: e.target.toString() || t.target,\n updatable: e.updatable ?? t.updatable,\n selectable: e.selectable ?? t.selectable,\n focusable: e.focusable ?? t.focusable,\n data: o,\n events: it(n),\n label: (e.label && !Pe(e.label) ? it(e.label) : e.label) || t.label,\n interactionWidth: e.interactionWidth || t.interactionWidth\n }, Object.assign({}, t, e, { id: e.id.toString() });\n}\nfunction bi(e, t, n) {\n if (!xt(e))\n return [];\n const o = n === \"source\" ? \"target\" : \"source\", i = t.filter((r) => $e(r) && r[o] === e.id).map((r) => $e(r) && r[n]);\n return t.filter((r) => i.includes(r.id));\n}\nfunction Pd(e, t) {\n return bi(e, t, \"target\");\n}\nfunction Dd(e, t) {\n return bi(e, t, \"source\");\n}\nfunction an({ source: e, sourceHandle: t, target: n, targetHandle: o }) {\n return `vueflow__edge-${e}${t ?? \"\"}-${n}${o ?? \"\"}`;\n}\nfunction Ei(e, t) {\n return t.some(\n (n) => $e(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle)\n );\n}\nfunction zd(e, t, n) {\n if (!e.source || !e.target)\n return wt(\"Can't create edge. An edge needs a source and a target.\"), t;\n let o;\n return $e(e) ? o = { ...e } : o = {\n ...e,\n id: an(e)\n }, o = lo(o, n), Ei(o, t) || t.push(o), t;\n}\nfunction Ad(e, t, n) {\n if (!t.source || !t.target)\n return wt(\"Can't create new edge. An edge needs a source and a target.\"), n;\n const o = n.find((r) => $e(r) && r.id === e.id);\n if (!o)\n return wt(`The old edge with id=${e.id} does not exist.`), n;\n const i = {\n ...e,\n id: an(t),\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(o), 1, i), n.filter((r) => r.id !== e.id);\n}\nfunction va({ x: e, y: t }, { x: n, y: o, zoom: i }) {\n return {\n x: e * i + n,\n y: t * i + o\n };\n}\nfunction uo({ x: e, y: t }, { x: n, y: o, zoom: i }, r, [a, s]) {\n const l = {\n x: (e - n) / i,\n y: (t - o) / i\n };\n return r ? {\n x: a * Math.round(l.x / a),\n y: s * Math.round(l.y / s)\n } : l;\n}\nfunction Si(e, t) {\n return {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x2, t.x2),\n y2: Math.max(e.y2, t.y2)\n };\n}\nfunction Xt({ x: e, y: t, width: n, height: o }) {\n return {\n x: e,\n y: t,\n x2: e + n,\n y2: t + o\n };\n}\nfunction Ni({ x: e, y: t, x2: n, y2: o }) {\n return {\n x: e,\n y: t,\n width: n - e,\n height: o - t\n };\n}\nfunction Bd(e, t) {\n return Ni(Si(Xt(e), Xt(t)));\n}\nfunction co(e) {\n const t = e.reduce(\n (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: i = { width: 0, height: 0 } } = {}) => Si(\n n,\n Xt({\n ...o,\n ...i\n })\n ),\n { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }\n );\n return Ni(t);\n}\nfunction Ci(e, t, { x: n, y: o, zoom: i } = { x: 0, y: 0, zoom: 1 }, r = !1, a = !1) {\n const s = {\n x: (t.x - n) / i,\n y: (t.y - o) / i,\n width: t.width / i,\n height: t.height / i\n };\n return e.filter((l) => {\n const { computedPosition: u = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: v } = l;\n if (a && !v)\n return !1;\n const g = { ...u, width: c.width || 0, height: c.height || 0 }, x = Fn(s, g), h = typeof c.width > \"u\" || typeof c.height > \"u\" || c.width === 0 || c.height === 0, d = r && x > 0, w = c.width * c.height;\n return h || d || x >= w;\n });\n}\nfunction sn(e, t) {\n const n = e.map((o) => Pe(o) ? o : o.id);\n return t.filter((o) => n.includes(o.source) || n.includes(o.target));\n}\nfunction Zt(e, t, n, o, i, r = 0.1, a = { x: 0, y: 0 }) {\n const s = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), u = Math.min(s, l), c = je(u, o, i), v = e.x + e.width / 2, g = e.y + e.height / 2, x = t / 2 - v * c + (a.x ?? 0), h = n / 2 - g * c + (a.y ?? 0);\n return { x, y: h, zoom: c };\n}\nfunction ma(e, t) {\n return {\n x: t.x + e.x,\n y: t.y + e.y,\n z: (e.z > t.z ? e.z : t.z) + 1\n };\n}\nfunction Mi(e, t) {\n if (!e.parentNode)\n return !1;\n const n = t(e.parentNode);\n return n ? n.selected ? !0 : Mi(n, t) : !1;\n}\nfunction Xe(e, t) {\n return typeof e > \"u\" ? \"\" : typeof e == \"string\" ? e : `${t ? `${t}__` : \"\"}${Object.keys(e).sort().map((o) => `${o}=${e[o]}`).join(\"&\")}`;\n}\nfunction ce(e) {\n return typeof C(e) < \"u\";\n}\nfunction pa(e, t, n) {\n if (!e.source || !e.target)\n return n(new ve(he.EDGE_INVALID, e.id)), !1;\n let o;\n return $e(e) ? o = e : o = {\n ...e,\n id: an(e)\n }, o = lo(o), Ei(o, t) ? !1 : o;\n}\nfunction ya(e, t, n, o, i, r) {\n if (!t.source || !t.target)\n return r(new ve(he.EDGE_INVALID, e.id)), !1;\n const a = o(e.id);\n if (!a)\n return r(new ve(he.EDGE_NOT_FOUND, e.id)), !1;\n const { id: s, ...l } = e, u = {\n ...l,\n id: i ? an(t) : s,\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(a), 1, u), u;\n}\nfunction Do(e, t, n, o) {\n const i = {}, r = e.map((s) => {\n const l = ga(s, {\n ...n(s.id),\n parentNode: s.parentNode\n });\n return s.parentNode && (i[s.parentNode] = !0), l;\n }), a = [...r, ...t];\n return r.forEach((s) => {\n const l = a.find((u) => u.id === s.parentNode);\n s.parentNode && !l && o(new ve(he.NODE_MISSING_PARENT, s.id, s.parentNode)), (s.parentNode || i[s.id]) && (i[s.id] && (s.isParent = !0), l && (l.isParent = !0));\n }), r;\n}\nvar j = /* @__PURE__ */ ((e) => (e.Left = \"left\", e.Top = \"top\", e.Right = \"right\", e.Bottom = \"bottom\", e))(j || {}), fo = /* @__PURE__ */ ((e) => (e.Partial = \"partial\", e.Full = \"full\", e))(fo || {}), Ye = /* @__PURE__ */ ((e) => (e.Bezier = \"default\", e.SimpleBezier = \"simple-bezier\", e.Straight = \"straight\", e.Step = \"step\", e.SmoothStep = \"smoothstep\", e))(Ye || {}), Qe = /* @__PURE__ */ ((e) => (e.Strict = \"strict\", e.Loose = \"loose\", e))(Qe || {}), Yn = /* @__PURE__ */ ((e) => (e.Arrow = \"arrow\", e.ArrowClosed = \"arrowclosed\", e))(Yn || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = \"free\", e.Vertical = \"vertical\", e.Horizontal = \"horizontal\", e))(Ut || {}), xa = /* @__PURE__ */ ((e) => (e.TopLeft = \"top-left\", e.TopCenter = \"top-center\", e.TopRight = \"top-right\", e.BottomLeft = \"bottom-left\", e.BottomCenter = \"bottom-center\", e.BottomRight = \"bottom-right\", e))(xa || {});\nconst zo = Symbol(\"vueFlow\"), $i = Symbol(\"nodeId\"), ki = Symbol(\"nodeRef\"), Oi = Symbol(\"edgeId\"), Ti = Symbol(\"edgeRef\"), ln = Symbol(\"slots\");\nfunction _a(e) {\n const t = e ?? He($i, \"\"), n = He(ki, null), { findNode: o, edges: i, emits: r } = fe(), a = o(t);\n return a || r.error(new ve(he.NODE_NOT_FOUND, t)), {\n id: t,\n nodeEl: n,\n node: a,\n parentNode: J(() => o(a.parentNode)),\n connectedEdges: J(() => sn([a], i.value))\n };\n}\nfunction ho(e) {\n return \"clientX\" in e;\n}\nfunction rt(e, t) {\n var r, a;\n const n = ho(e), o = n ? e.clientX : (r = e.touches) == null ? void 0 : r[0].clientX, i = n ? e.clientY : (a = e.touches) == null ? void 0 : a[0].clientY;\n return {\n x: o - ((t == null ? void 0 : t.left) ?? 0),\n y: i - ((t == null ? void 0 : t.top) ?? 0)\n };\n}\nfunction Wt(e, t, n) {\n const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, i = ((n == null ? void 0 : n.y) ?? 0) + t.y, r = (n == null ? void 0 : n.width) ?? t.width, a = (n == null ? void 0 : n.height) ?? t.height;\n switch (e) {\n case j.Top:\n return {\n x: o + r / 2,\n y: i\n };\n case j.Right:\n return {\n x: o + r,\n y: i + a / 2\n };\n case j.Bottom:\n return {\n x: o + r / 2,\n y: i + a\n };\n case j.Left:\n return {\n x: o,\n y: i + a / 2\n };\n }\n}\nfunction Ao(e = [], t) {\n return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null;\n}\nfunction wa(e, t, n, o, i, r) {\n const a = Wt(\n n,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n t\n ), s = Wt(\n r,\n {\n ...o.dimensions,\n ...o.computedPosition\n },\n i\n );\n return {\n sourceX: a.x,\n sourceY: a.y,\n targetX: s.x,\n targetY: s.y\n };\n}\nfunction ba({\n sourcePos: e,\n targetPos: t,\n sourceWidth: n,\n sourceHeight: o,\n targetWidth: i,\n targetHeight: r,\n width: a,\n height: s,\n viewport: l\n}) {\n const u = {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x + n, t.x + i),\n y2: Math.max(e.y + o, t.y + r)\n };\n u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);\n const c = Xt({\n x: (0 - l.x) / l.zoom,\n y: (0 - l.y) / l.zoom,\n width: a / l.zoom,\n height: s / l.zoom\n }), v = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), g = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));\n return Math.ceil(v * g) > 0;\n}\nfunction Ea(e, t, n = !1) {\n let o = -1;\n const i = e.reduce((r, a) => {\n const s = Ie(a.zIndex);\n let l = s ? a.zIndex : 0;\n const u = t(a.source), c = t(a.target);\n return !u || !c || (n && (l = s ? a.zIndex : Math.max(u.computedPosition.z || 0, c.computedPosition.z || 0)), r[l] ? r[l].push(a) : r[l] = [a], o = l > o ? l : o), r;\n }, {});\n return Object.entries(Object.keys(i).length ? i : { 0: [] }).map(([r, a]) => {\n const s = +r;\n return {\n edges: a,\n level: s,\n isMaxLevel: s === o\n };\n });\n}\nfunction Cn(e) {\n e == null || e.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction Bo(e, t, n, o) {\n return (t[n] || []).reduce((i, r) => (`${e.id}-${r.id}-${n}` !== o && i.push({\n id: r.id || null,\n type: n,\n nodeId: e.id,\n ...Wt(\n r.position,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n r\n )\n }), i), []);\n}\nfunction Sa(e, t, n) {\n let o = null, i = 1 / 0;\n return n.forEach((r) => {\n const a = Math.sqrt((r.x - e.x) ** 2 + (r.y - e.y) ** 2);\n a <= t && a < i && (i = a, o = r);\n }), o;\n}\nfunction Ro(e, t, n, o, i, r, a, s, l, u) {\n const c = r === \"target\", v = s.querySelector(`.vue-flow__handle[data-id=\"${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}\"]`), { x: g, y: x } = rt(e), h = s.elementFromPoint(g, x), d = h != null && h.classList.contains(\"vue-flow__handle\") ? h : v, w = {\n handleDomNode: d,\n isValid: !1,\n connection: { source: \"\", target: \"\", sourceHandle: null, targetHandle: null },\n endHandle: null\n };\n if (d) {\n const y = Ii(void 0, d), S = d.getAttribute(\"data-nodeid\"), V = d.getAttribute(\"data-handleid\"), p = d.classList.contains(\"connectable\"), N = d.classList.contains(\"connectableend\"), T = {\n source: c ? S : o,\n sourceHandle: c ? V : i,\n target: c ? o : S,\n targetHandle: c ? i : V\n };\n w.connection = T, p && N && (n === Qe.Strict ? c && y === \"source\" || !c && y === \"target\" : S !== o || V !== i) && (w.endHandle = {\n nodeId: S,\n handleId: V,\n type: y\n }, w.isValid = a(T, {\n edges: l,\n sourceNode: u(T.source),\n targetNode: u(T.target)\n }));\n }\n return w;\n}\nfunction Na({ nodes: e, nodeId: t, handleId: n, handleType: o }) {\n return e.reduce((i, r) => {\n const { handleBounds: a } = r;\n let s = [], l = [];\n return a && (s = Bo(r, a, \"source\", `${t}-${n}-${o}`), l = Bo(r, a, \"target\", `${t}-${n}-${o}`)), i.push(...s, ...l), i;\n }, []);\n}\nfunction Ii(e, t) {\n return e || (t != null && t.classList.contains(\"target\") ? \"target\" : t != null && t.classList.contains(\"source\") ? \"source\" : null);\n}\nfunction Ca(e, t) {\n let n = null;\n return t ? n = \"valid\" : e && !t && (n = \"invalid\"), n;\n}\nfunction Vo(e, t, n) {\n return e < t ? je(Math.abs(e - t), 1, 50) / 50 : e > n ? -je(Math.abs(e - n), 1, 50) / 50 : 0;\n}\nfunction Pi(e, t) {\n const n = Vo(e.x, 35, t.width - 35) * 20, o = Vo(e.y, 35, t.height - 35) * 20;\n return [n, o];\n}\nfunction It() {\n return !0;\n}\nfunction Di({\n handleId: e,\n nodeId: t,\n type: n,\n isValidConnection: o,\n edgeUpdaterType: i,\n onEdgeUpdate: r,\n onEdgeUpdateEnd: a\n}) {\n const s = J(() => le(n) === \"target\"), {\n vueFlowRef: l,\n connectionMode: u,\n connectionRadius: c,\n connectOnClick: v,\n connectionClickStartHandle: g,\n nodesConnectable: x,\n autoPanOnConnect: h,\n findNode: d,\n panBy: w,\n getNodes: y,\n startConnection: S,\n updateConnection: V,\n endConnection: p,\n emits: N,\n viewport: T,\n edges: _,\n isValidConnection: P\n } = fe();\n let R = null, $ = !1, D = null;\n function Q(m) {\n var G;\n const A = ho(m), E = Po(m.target);\n if (A && m.button === 0 || !A) {\n let Z = function(Y) {\n L = rt(Y, f), B = Sa(\n uo(L, T.value, !1, [1, 1]),\n c.value,\n F\n ), I || (U(), I = !0);\n const ne = Ro(\n Y,\n B,\n u.value,\n le(t),\n le(e),\n s.value ? \"target\" : \"source\",\n W,\n E,\n _.value,\n d\n );\n if (R = ne.connection, $ = ne.isValid, D = ne.handleDomNode, V(\n B && $ ? va(\n {\n x: B.x,\n y: B.y\n },\n T.value\n ) : L,\n ne.endHandle,\n Ca(!!B, $)\n ), !B && !$ && !D)\n return Cn(b);\n R && R.source !== R.target && D && (Cn(b), b = D, D.classList.add(\"connecting\", \"vue-flow__handle-connecting\"), D.classList.toggle(\"valid\", $), D.classList.toggle(\"vue-flow__handle-valid\", $));\n }, K = function(Y) {\n (B || D) && R && $ && (r ? r(Y, R) : N.connect(R)), N.connectEnd(Y), i && (a == null || a(Y)), Cn(b), cancelAnimationFrame(q), p(Y), I = !1, $ = !1, R = null, D = null, E.removeEventListener(\"mousemove\", Z), E.removeEventListener(\"mouseup\", K), E.removeEventListener(\"touchmove\", Z), E.removeEventListener(\"touchend\", K);\n };\n const z = d(le(t));\n let W = o || P.value || It;\n !W && z && (W = (s ? z.isValidSourcePos : z.isValidTargetPos) || It);\n let B, q = 0;\n const { x: te, y: re } = rt(m), k = E == null ? void 0 : E.elementFromPoint(te, re), H = Ii(le(i), k), f = (G = l.value) == null ? void 0 : G.getBoundingClientRect();\n if (!f || !H)\n return;\n let b, L = rt(m, f), I = !1;\n const F = Na({\n nodes: y.value,\n nodeId: le(t),\n handleId: le(e),\n handleType: H\n }), U = () => {\n if (!h)\n return;\n const [Y, ne] = Pi(L, f);\n w({ x: Y, y: ne }), q = requestAnimationFrame(U);\n };\n S(\n {\n nodeId: le(t),\n handleId: le(e),\n type: H\n },\n {\n x: te - f.left,\n y: re - f.top\n },\n m\n ), N.connectStart({ event: m, nodeId: le(t), handleId: le(e), handleType: H }), E.addEventListener(\"mousemove\", Z), E.addEventListener(\"mouseup\", K), E.addEventListener(\"touchmove\", Z), E.addEventListener(\"touchend\", K);\n }\n }\n function ee(m) {\n if (v.value)\n if (!g.value)\n N.clickConnectStart({ event: m, nodeId: le(t), handleId: le(e) }), S(\n { nodeId: le(t), type: le(n), handleId: le(e) },\n void 0,\n m,\n !0\n );\n else {\n let A = o || P.value || It;\n const E = d(le(t));\n if (!A && E && (A = (s ? E.isValidSourcePos : E.isValidTargetPos) || It), E && (typeof E.connectable > \"u\" ? x.value : E.connectable) === !1)\n return;\n const G = Po(m.target), { connection: Z, isValid: K } = Ro(\n m,\n {\n nodeId: le(t),\n id: le(e),\n type: le(n)\n },\n u.value,\n g.value.nodeId,\n g.value.handleId || null,\n g.value.type,\n A,\n G,\n _.value,\n d\n ), z = Z.source === Z.target;\n K && !z && N.connect(Z), N.clickConnectEnd(m), p(m, !0);\n }\n }\n return {\n handlePointerDown: Q,\n handleClick: ee\n };\n}\nfunction Ma(e, t) {\n const n = {};\n for (const o in e)\n t.includes(o) || Object.defineProperty(n, o, {\n enumerable: !0,\n get: () => e[o]\n });\n return n;\n}\nconst $a = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"], ka = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n}, Kt = /* @__PURE__ */ ge({\n ...ka,\n props: {\n id: null,\n type: null,\n position: { default: j.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: !0 },\n connectableEnd: { type: Boolean, default: !0 }\n },\n setup(e) {\n const t = Ma(e, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\", \"isValidConnection\"]), n = M(t, \"type\", \"source\"), {\n connectionStartHandle: o,\n connectionClickStartHandle: i,\n connectionEndHandle: r,\n vueFlowRef: a,\n nodesConnectable: s,\n noDragClassName: l,\n noPanClassName: u\n } = fe(), { id: c, node: v, nodeEl: g, connectedEdges: x } = _a(), h = ie(), d = J(() => e.id ?? `${c}__handle-${e.position}`), w = J(() => typeof e.connectableStart < \"u\" ? e.connectableStart : !0), y = J(() => typeof e.connectableEnd < \"u\" ? e.connectableEnd : !0), { handlePointerDown: S, handleClick: V } = Di({\n nodeId: c,\n handleId: d,\n isValidConnection: e.isValidConnection,\n type: n\n }), p = J(() => Pe(e.connectable) && e.connectable === \"single\" ? !x.value.some((R) => {\n const $ = R[`${n.value}Handle`];\n return R[n.value] !== c ? !1 : $ ? $ === d.value : !0;\n }) : Ae(e.connectable) ? e.connectable(v, x.value) : ce(e.connectable) ? e.connectable : s.value), N = J(\n () => {\n var R, $, D, Q, ee, m;\n return ((R = o.value) == null ? void 0 : R.nodeId) === c && (($ = o.value) == null ? void 0 : $.handleId) === d.value && ((D = o.value) == null ? void 0 : D.type) === n.value || ((Q = r.value) == null ? void 0 : Q.nodeId) === c && ((ee = r.value) == null ? void 0 : ee.handleId) === d.value && ((m = r.value) == null ? void 0 : m.type) === n.value;\n }\n ), T = J(\n () => {\n var R, $, D;\n return ((R = i.value) == null ? void 0 : R.nodeId) === c && (($ = i.value) == null ? void 0 : $.handleId) === d.value && ((D = i.value) == null ? void 0 : D.type) === n.value;\n }\n );\n ye(() => v.initialized).toBe(!0, { flush: \"post\" }).then(() => {\n var E;\n const R = (E = v.handleBounds[n.value]) == null ? void 0 : E.find((G) => G.id === d.value);\n if (!a.value || R)\n return;\n const $ = a.value.querySelector(\".vue-flow__transformationpane\");\n if (!g || !h.value || !$ || !d.value)\n return;\n const D = g.value.getBoundingClientRect(), Q = h.value.getBoundingClientRect(), ee = window.getComputedStyle($), { m22: m } = new window.DOMMatrixReadOnly(ee.transform), A = {\n id: d.value,\n position: e.position,\n x: (Q.left - D.left) / m,\n y: (Q.top - D.top) / m,\n ...rn(h.value)\n };\n v.handleBounds[n.value] = [...v.handleBounds[n.value] ?? [], A];\n });\n function _(R) {\n const $ = ho(R);\n p.value && w.value && ($ && R.button === 0 || !$) && S(R);\n }\n function P(R) {\n !c || !i.value && !w.value || p.value && V(R);\n }\n return (R, $) => (oe(), se(\"div\", {\n ref_key: \"handle\",\n ref: h,\n \"data-id\": `${C(c)}-${C(d)}-${C(n)}`,\n \"data-handleid\": C(d),\n \"data-nodeid\": C(c),\n \"data-handlepos\": e.position,\n class: Ke([\"vue-flow__handle\", [\n `vue-flow__handle-${e.position}`,\n `vue-flow__handle-${C(d)}`,\n C(l),\n C(u),\n C(n),\n {\n connectable: C(p),\n connecting: C(T),\n connectablestart: C(w),\n connectableend: C(y),\n connectionindicator: C(p) && (C(w) && !C(N) || C(y) && C(N))\n }\n ]]),\n onMousedown: _,\n onTouchstartPassive: _,\n onClick: P\n }, [\n xe(R.$slots, \"default\", { id: e.id })\n ], 42, $a));\n }\n}), un = function({\n sourcePosition: e = j.Bottom,\n targetPosition: t = j.Top,\n label: n,\n connectable: o = !0,\n isValidTargetPos: i,\n isValidSourcePos: r\n}) {\n return [\n ue(Kt, { type: \"target\", position: t, connectable: o, isValidConnection: i }),\n typeof n != \"string\" && n ? ue(n) : ue(\"div\", { innerHTML: n }),\n ue(Kt, { type: \"source\", position: e, connectable: o, isValidConnection: r })\n ];\n};\nun.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\"];\nun.inheritAttrs = !1;\nun.compatConfig = { MODE: 3 };\nconst Oa = un, cn = function({\n sourcePosition: e = j.Bottom,\n label: t,\n connectable: n = !0,\n isValidSourcePos: o\n}) {\n return [\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t }),\n ue(Kt, { type: \"source\", position: e, connectable: n, isValidConnection: o })\n ];\n};\ncn.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\"];\ncn.inheritAttrs = !1;\ncn.compatConfig = { MODE: 3 };\nconst Ta = cn, dn = function({\n targetPosition: e = j.Top,\n label: t,\n connectable: n = !0,\n isValidTargetPos: o\n}) {\n return [\n ue(Kt, { type: \"target\", position: e, connectable: n, isValidConnection: o }),\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t })\n ];\n};\ndn.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\"];\ndn.inheritAttrs = !1;\ndn.compatConfig = { MODE: 3 };\nconst Ia = dn;\nfunction Ho(e, t, n) {\n let o = e;\n do {\n if (o && o.matches(t))\n return !0;\n if (o === n)\n return !1;\n o = o.parentElement;\n } while (o);\n return !1;\n}\nfunction Pa(e, t, n, o, i) {\n return e.filter(\n (r) => (r.selected || r.id === i) && (!r.parentNode || !Mi(r, o)) && (r.draggable || t && typeof r.draggable > \"u\")\n ).map(\n (r) => {\n var a, s;\n return it({\n id: r.id,\n position: r.position || { x: 0, y: 0 },\n distance: {\n x: n.x - ((a = r.computedPosition) == null ? void 0 : a.x) || 0,\n y: n.y - ((s = r.computedPosition) == null ? void 0 : s.y) || 0\n },\n from: r.computedPosition,\n extent: r.extent,\n parentNode: r.parentNode,\n dimensions: r.dimensions\n });\n }\n );\n}\nfunction Mn({\n id: e,\n dragItems: t,\n findNode: n\n}) {\n const o = t.reduce((i, r) => {\n const a = n(r.id);\n return a && i.push(a), i;\n }, []);\n return [e ? o.find((i) => i.id === e) : o[0], o];\n}\nfunction zi(e) {\n if (Array.isArray(e))\n switch (e.length) {\n case 1:\n return [e[0], e[0], e[0], e[0]];\n case 2:\n return [e[0], e[1], e[0], e[1]];\n case 3:\n return [e[0], e[1], e[2], e[1]];\n case 4:\n return e;\n default:\n return [0, 0, 0, 0];\n }\n return [e, e, e, e];\n}\nfunction Da(e, t, n) {\n const [o, i, r, a] = typeof e != \"string\" ? zi(e.padding) : [0, 0, 0, 0];\n return n && Ie(n.computedPosition.x) && Ie(n.computedPosition.y) && Ie(n.dimensions.width) && Ie(n.dimensions.height) ? [\n [n.computedPosition.x + a, n.computedPosition.y + o],\n [\n n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - i,\n n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - r\n ]\n ] : !1;\n}\nfunction za(e, t, n, o) {\n let i = e.extent || n;\n if (i === \"parent\" || !Array.isArray(i) && (i == null ? void 0 : i.range) === \"parent\")\n if (e.parentNode && o && e.dimensions.width && e.dimensions.height) {\n const r = Da(i, e, o);\n r && (i = r);\n } else\n t(new ve(he.NODE_EXTENT_INVALID, e.id)), i = n;\n else if (Array.isArray(i)) {\n const r = (o == null ? void 0 : o.computedPosition.x) || 0, a = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i[0][0] + r, i[0][1] + a],\n [i[1][0] + r, i[1][1] + a]\n ];\n } else if (i != null && i.range && Array.isArray(i.range)) {\n const [r, a, s, l] = zi(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i.range[0][0] + u + l, i.range[0][1] + c + r],\n [i.range[1][0] + u - a, i.range[1][1] + c - s]\n ];\n }\n return i;\n}\nfunction go(e, t, n, o, i) {\n const r = za(e, n, o, i), a = so(t, r);\n return {\n position: {\n x: a.x - ((i == null ? void 0 : i.computedPosition.x) || 0),\n y: a.y - ((i == null ? void 0 : i.computedPosition.y) || 0)\n },\n computedPosition: a\n };\n}\nfunction Ai() {\n const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: a, emits: s } = fe();\n return (l, u = !1) => {\n const c = r.value ? i.value[0] : 5, v = r.value ? i.value[1] : 5, g = u ? 4 : 1, x = l.x * c * g, h = l.y * v * g, d = e.value.filter((w) => w.draggable || a && typeof w.draggable > \"u\").map((w) => {\n const y = { x: w.computedPosition.x + x, y: w.computedPosition.y + h }, { computedPosition: S } = go(\n w,\n y,\n s.error,\n t.value,\n w.parentNode ? o(w.parentNode) : void 0\n );\n return {\n id: w.id,\n position: S,\n from: w.position,\n distance: { x: l.x, y: l.y },\n dimensions: w.dimensions\n };\n });\n n(d, !0, !1);\n };\n}\nfunction Aa() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n dragStart: X(),\n drag: X(),\n dragStop: X()\n };\n}\nfunction Ba(e, t) {\n const n = Aa();\n return n.doubleClick.on((o) => {\n var i, r;\n t.nodeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.nodeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.nodeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.nodeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.nodeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.nodeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.dragStart.on((o) => {\n var i, r;\n t.nodeDragStart(o), (r = (i = e.events) == null ? void 0 : i.dragStart) == null || r.call(i, o);\n }), n.drag.on((o) => {\n var i, r;\n t.nodeDrag(o), (r = (i = e.events) == null ? void 0 : i.drag) == null || r.call(i, o);\n }), n.dragStop.on((o) => {\n var i, r;\n t.nodeDragStop(o), (r = (i = e.events) == null ? void 0 : i.dragStop) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nfunction Ra() {\n const { viewport: e, snapGrid: t, snapToGrid: n } = fe();\n return ({ sourceEvent: o }) => {\n const i = o.touches ? o.touches[0].clientX : o.clientX, r = o.touches ? o.touches[0].clientY : o.clientY, a = {\n x: (i - e.value.x) / e.value.zoom,\n y: (r - e.value.y) / e.value.zoom\n };\n return {\n xSnapped: n.value ? t.value[0] * Math.round(a.x / t.value[0]) : a.x,\n ySnapped: n.value ? t.value[1] * Math.round(a.y / t.value[1]) : a.y,\n ...a\n };\n };\n}\nfunction Lo(e, t, n) {\n const o = t.querySelectorAll(`.vue-flow__handle${e}`);\n if (!o || !o.length)\n return;\n const i = Array.from(o), r = t.getBoundingClientRect();\n return i.map((a) => {\n const s = a.getBoundingClientRect();\n return {\n id: a.getAttribute(\"data-handleid\"),\n position: a.getAttribute(\"data-handlepos\"),\n x: (s.left - r.left) / n,\n y: (s.top - r.top) / n,\n ...rn(a)\n };\n });\n}\nfunction Xn(e, t, n, o, i, r = !1, a) {\n i.value = !1, e.selected ? (r || e.selected && t) && (o([e]), Ue(a.blur)) : n([e]);\n}\nvar Va = { value: () => {\n} };\nfunction fn() {\n for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) {\n if (!(o = arguments[e] + \"\") || o in n || /[\\s.]/.test(o))\n throw new Error(\"illegal type: \" + o);\n n[o] = [];\n }\n return new Ht(n);\n}\nfunction Ht(e) {\n this._ = e;\n}\nfunction Ha(e, t) {\n return e.trim().split(/^|\\s+/).map(function(n) {\n var o = \"\", i = n.indexOf(\".\");\n if (i >= 0 && (o = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n))\n throw new Error(\"unknown type: \" + n);\n return { type: n, name: o };\n });\n}\nHt.prototype = fn.prototype = {\n constructor: Ht,\n on: function(e, t) {\n var n = this._, o = Ha(e + \"\", n), i, r = -1, a = o.length;\n if (arguments.length < 2) {\n for (; ++r < a; )\n if ((i = (e = o[r]).type) && (i = La(n[i], e.name)))\n return i;\n return;\n }\n if (t != null && typeof t != \"function\")\n throw new Error(\"invalid callback: \" + t);\n for (; ++r < a; )\n if (i = (e = o[r]).type)\n n[i] = Go(n[i], e.name, t);\n else if (t == null)\n for (i in n)\n n[i] = Go(n[i], e.name, null);\n return this;\n },\n copy: function() {\n var e = {}, t = this._;\n for (var n in t)\n e[n] = t[n].slice();\n return new Ht(e);\n },\n call: function(e, t) {\n if ((i = arguments.length - 2) > 0)\n for (var n = new Array(i), o = 0, i, r; o < i; ++o)\n n[o] = arguments[o + 2];\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (r = this._[e], o = 0, i = r.length; o < i; ++o)\n r[o].value.apply(t, n);\n },\n apply: function(e, t, n) {\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (var o = this._[e], i = 0, r = o.length; i < r; ++i)\n o[i].value.apply(t, n);\n }\n};\nfunction La(e, t) {\n for (var n = 0, o = e.length, i; n < o; ++n)\n if ((i = e[n]).name === t)\n return i.value;\n}\nfunction Go(e, t, n) {\n for (var o = 0, i = e.length; o < i; ++o)\n if (e[o].name === t) {\n e[o] = Va, e = e.slice(0, o).concat(e.slice(o + 1));\n break;\n }\n return n != null && e.push({ name: t, value: n }), e;\n}\nvar Zn = \"http://www.w3.org/1999/xhtml\";\nconst Fo = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: Zn,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction hn(e) {\n var t = e += \"\", n = t.indexOf(\":\");\n return n >= 0 && (t = e.slice(0, n)) !== \"xmlns\" && (e = e.slice(n + 1)), Fo.hasOwnProperty(t) ? { space: Fo[t], local: e } : e;\n}\nfunction Ga(e) {\n return function() {\n var t = this.ownerDocument, n = this.namespaceURI;\n return n === Zn && t.documentElement.namespaceURI === Zn ? t.createElement(e) : t.createElementNS(n, e);\n };\n}\nfunction Fa(e) {\n return function() {\n return this.ownerDocument.createElementNS(e.space, e.local);\n };\n}\nfunction Bi(e) {\n var t = hn(e);\n return (t.local ? Fa : Ga)(t);\n}\nfunction Ya() {\n}\nfunction vo(e) {\n return e == null ? Ya : function() {\n return this.querySelector(e);\n };\n}\nfunction Xa(e) {\n typeof e != \"function\" && (e = vo(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = new Array(a), l, u, c = 0; c < a; ++c)\n (l = r[c]) && (u = e.call(l, l.__data__, c, r)) && (\"__data__\" in l && (u.__data__ = l.__data__), s[c] = u);\n return new _e(o, this._parents);\n}\nfunction Za(e) {\n return e == null ? [] : Array.isArray(e) ? e : Array.from(e);\n}\nfunction Ua() {\n return [];\n}\nfunction Ri(e) {\n return e == null ? Ua : function() {\n return this.querySelectorAll(e);\n };\n}\nfunction Wa(e) {\n return function() {\n return Za(e.apply(this, arguments));\n };\n}\nfunction Ka(e) {\n typeof e == \"function\" ? e = Wa(e) : e = Ri(e);\n for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)\n for (var a = t[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && (o.push(e.call(l, l.__data__, u, a)), i.push(l));\n return new _e(o, i);\n}\nfunction Vi(e) {\n return function() {\n return this.matches(e);\n };\n}\nfunction Hi(e) {\n return function(t) {\n return t.matches(e);\n };\n}\nvar qa = Array.prototype.find;\nfunction ja(e) {\n return function() {\n return qa.call(this.children, e);\n };\n}\nfunction Qa() {\n return this.firstElementChild;\n}\nfunction Ja(e) {\n return this.select(e == null ? Qa : ja(typeof e == \"function\" ? e : Hi(e)));\n}\nvar es = Array.prototype.filter;\nfunction ts() {\n return Array.from(this.children);\n}\nfunction ns(e) {\n return function() {\n return es.call(this.children, e);\n };\n}\nfunction os(e) {\n return this.selectAll(e == null ? ts : ns(typeof e == \"function\" ? e : Hi(e)));\n}\nfunction is(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new _e(o, this._parents);\n}\nfunction Li(e) {\n return new Array(e.length);\n}\nfunction rs() {\n return new _e(this._enter || this._groups.map(Li), this._parents);\n}\nfunction qt(e, t) {\n this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;\n}\nqt.prototype = {\n constructor: qt,\n appendChild: function(e) {\n return this._parent.insertBefore(e, this._next);\n },\n insertBefore: function(e, t) {\n return this._parent.insertBefore(e, t);\n },\n querySelector: function(e) {\n return this._parent.querySelector(e);\n },\n querySelectorAll: function(e) {\n return this._parent.querySelectorAll(e);\n }\n};\nfunction as(e) {\n return function() {\n return e;\n };\n}\nfunction ss(e, t, n, o, i, r) {\n for (var a = 0, s, l = t.length, u = r.length; a < u; ++a)\n (s = t[a]) ? (s.__data__ = r[a], o[a] = s) : n[a] = new qt(e, r[a]);\n for (; a < l; ++a)\n (s = t[a]) && (i[a] = s);\n}\nfunction ls(e, t, n, o, i, r, a) {\n var s, l, u = /* @__PURE__ */ new Map(), c = t.length, v = r.length, g = new Array(c), x;\n for (s = 0; s < c; ++s)\n (l = t[s]) && (g[s] = x = a.call(l, l.__data__, s, t) + \"\", u.has(x) ? i[s] = l : u.set(x, l));\n for (s = 0; s < v; ++s)\n x = a.call(e, r[s], s, r) + \"\", (l = u.get(x)) ? (o[s] = l, l.__data__ = r[s], u.delete(x)) : n[s] = new qt(e, r[s]);\n for (s = 0; s < c; ++s)\n (l = t[s]) && u.get(g[s]) === l && (i[s] = l);\n}\nfunction us(e) {\n return e.__data__;\n}\nfunction cs(e, t) {\n if (!arguments.length)\n return Array.from(this, us);\n var n = t ? ls : ss, o = this._parents, i = this._groups;\n typeof e != \"function\" && (e = as(e));\n for (var r = i.length, a = new Array(r), s = new Array(r), l = new Array(r), u = 0; u < r; ++u) {\n var c = o[u], v = i[u], g = v.length, x = ds(e.call(c, c && c.__data__, u, o)), h = x.length, d = s[u] = new Array(h), w = a[u] = new Array(h), y = l[u] = new Array(g);\n n(c, v, d, w, y, x, t);\n for (var S = 0, V = 0, p, N; S < h; ++S)\n if (p = d[S]) {\n for (S >= V && (V = S + 1); !(N = w[V]) && ++V < h; )\n ;\n p._next = N || null;\n }\n }\n return a = new _e(a, o), a._enter = s, a._exit = l, a;\n}\nfunction ds(e) {\n return typeof e == \"object\" && \"length\" in e ? e : Array.from(e);\n}\nfunction fs() {\n return new _e(this._exit || this._groups.map(Li), this._parents);\n}\nfunction hs(e, t, n) {\n var o = this.enter(), i = this, r = this.exit();\n return typeof e == \"function\" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + \"\"), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;\n}\nfunction gs(e) {\n for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, a = Math.min(i, r), s = new Array(i), l = 0; l < a; ++l)\n for (var u = n[l], c = o[l], v = u.length, g = s[l] = new Array(v), x, h = 0; h < v; ++h)\n (x = u[h] || c[h]) && (g[h] = x);\n for (; l < i; ++l)\n s[l] = n[l];\n return new _e(s, this._parents);\n}\nfunction vs() {\n for (var e = this._groups, t = -1, n = e.length; ++t < n; )\n for (var o = e[t], i = o.length - 1, r = o[i], a; --i >= 0; )\n (a = o[i]) && (r && a.compareDocumentPosition(r) ^ 4 && r.parentNode.insertBefore(a, r), r = a);\n return this;\n}\nfunction ms(e) {\n e || (e = ps);\n function t(v, g) {\n return v && g ? e(v.__data__, g.__data__) : !v - !g;\n }\n for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {\n for (var a = n[r], s = a.length, l = i[r] = new Array(s), u, c = 0; c < s; ++c)\n (u = a[c]) && (l[c] = u);\n l.sort(t);\n }\n return new _e(i, this._parents).order();\n}\nfunction ps(e, t) {\n return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;\n}\nfunction ys() {\n var e = arguments[0];\n return arguments[0] = this, e.apply(null, arguments), this;\n}\nfunction xs() {\n return Array.from(this);\n}\nfunction _s() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length; i < r; ++i) {\n var a = o[i];\n if (a)\n return a;\n }\n return null;\n}\nfunction ws() {\n let e = 0;\n for (const t of this)\n ++e;\n return e;\n}\nfunction bs() {\n return !this.node();\n}\nfunction Es(e) {\n for (var t = this._groups, n = 0, o = t.length; n < o; ++n)\n for (var i = t[n], r = 0, a = i.length, s; r < a; ++r)\n (s = i[r]) && e.call(s, s.__data__, r, i);\n return this;\n}\nfunction Ss(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ns(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction Cs(e, t) {\n return function() {\n this.setAttribute(e, t);\n };\n}\nfunction Ms(e, t) {\n return function() {\n this.setAttributeNS(e.space, e.local, t);\n };\n}\nfunction $s(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttribute(e) : this.setAttribute(e, n);\n };\n}\nfunction ks(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);\n };\n}\nfunction Os(e, t) {\n var n = hn(e);\n if (arguments.length < 2) {\n var o = this.node();\n return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n);\n }\n return this.each((t == null ? n.local ? Ns : Ss : typeof t == \"function\" ? n.local ? ks : $s : n.local ? Ms : Cs)(n, t));\n}\nfunction Gi(e) {\n return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;\n}\nfunction Ts(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction Is(e, t, n) {\n return function() {\n this.style.setProperty(e, t, n);\n };\n}\nfunction Ps(e, t, n) {\n return function() {\n var o = t.apply(this, arguments);\n o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n);\n };\n}\nfunction Ds(e, t, n) {\n return arguments.length > 1 ? this.each((t == null ? Ts : typeof t == \"function\" ? Ps : Is)(e, t, n ?? \"\")) : ft(this.node(), e);\n}\nfunction ft(e, t) {\n return e.style.getPropertyValue(t) || Gi(e).getComputedStyle(e, null).getPropertyValue(t);\n}\nfunction zs(e) {\n return function() {\n delete this[e];\n };\n}\nfunction As(e, t) {\n return function() {\n this[e] = t;\n };\n}\nfunction Bs(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? delete this[e] : this[e] = n;\n };\n}\nfunction Rs(e, t) {\n return arguments.length > 1 ? this.each((t == null ? zs : typeof t == \"function\" ? Bs : As)(e, t)) : this.node()[e];\n}\nfunction Fi(e) {\n return e.trim().split(/^|\\s+/);\n}\nfunction mo(e) {\n return e.classList || new Yi(e);\n}\nfunction Yi(e) {\n this._node = e, this._names = Fi(e.getAttribute(\"class\") || \"\");\n}\nYi.prototype = {\n add: function(e) {\n var t = this._names.indexOf(e);\n t < 0 && (this._names.push(e), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n remove: function(e) {\n var t = this._names.indexOf(e);\n t >= 0 && (this._names.splice(t, 1), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n contains: function(e) {\n return this._names.indexOf(e) >= 0;\n }\n};\nfunction Xi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.add(t[o]);\n}\nfunction Zi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.remove(t[o]);\n}\nfunction Vs(e) {\n return function() {\n Xi(this, e);\n };\n}\nfunction Hs(e) {\n return function() {\n Zi(this, e);\n };\n}\nfunction Ls(e, t) {\n return function() {\n (t.apply(this, arguments) ? Xi : Zi)(this, e);\n };\n}\nfunction Gs(e, t) {\n var n = Fi(e + \"\");\n if (arguments.length < 2) {\n for (var o = mo(this.node()), i = -1, r = n.length; ++i < r; )\n if (!o.contains(n[i]))\n return !1;\n return !0;\n }\n return this.each((typeof t == \"function\" ? Ls : t ? Vs : Hs)(n, t));\n}\nfunction Fs() {\n this.textContent = \"\";\n}\nfunction Ys(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Xs(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.textContent = t ?? \"\";\n };\n}\nfunction Zs(e) {\n return arguments.length ? this.each(e == null ? Fs : (typeof e == \"function\" ? Xs : Ys)(e)) : this.node().textContent;\n}\nfunction Us() {\n this.innerHTML = \"\";\n}\nfunction Ws(e) {\n return function() {\n this.innerHTML = e;\n };\n}\nfunction Ks(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.innerHTML = t ?? \"\";\n };\n}\nfunction qs(e) {\n return arguments.length ? this.each(e == null ? Us : (typeof e == \"function\" ? Ks : Ws)(e)) : this.node().innerHTML;\n}\nfunction js() {\n this.nextSibling && this.parentNode.appendChild(this);\n}\nfunction Qs() {\n return this.each(js);\n}\nfunction Js() {\n this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction el() {\n return this.each(Js);\n}\nfunction tl(e) {\n var t = typeof e == \"function\" ? e : Bi(e);\n return this.select(function() {\n return this.appendChild(t.apply(this, arguments));\n });\n}\nfunction nl() {\n return null;\n}\nfunction ol(e, t) {\n var n = typeof e == \"function\" ? e : Bi(e), o = t == null ? nl : typeof t == \"function\" ? t : vo(t);\n return this.select(function() {\n return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);\n });\n}\nfunction il() {\n var e = this.parentNode;\n e && e.removeChild(this);\n}\nfunction rl() {\n return this.each(il);\n}\nfunction al() {\n var e = this.cloneNode(!1), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction sl() {\n var e = this.cloneNode(!0), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction ll(e) {\n return this.select(e ? sl : al);\n}\nfunction ul(e) {\n return arguments.length ? this.property(\"__data__\", e) : this.node().__data__;\n}\nfunction cl(e) {\n return function(t) {\n e.call(this, t, this.__data__);\n };\n}\nfunction dl(e) {\n return e.trim().split(/^|\\s+/).map(function(t) {\n var n = \"\", o = t.indexOf(\".\");\n return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };\n });\n}\nfunction fl(e) {\n return function() {\n var t = this.__on;\n if (t) {\n for (var n = 0, o = -1, i = t.length, r; n < i; ++n)\n r = t[n], (!e.type || r.type === e.type) && r.name === e.name ? this.removeEventListener(r.type, r.listener, r.options) : t[++o] = r;\n ++o ? t.length = o : delete this.__on;\n }\n };\n}\nfunction hl(e, t, n) {\n return function() {\n var o = this.__on, i, r = cl(t);\n if (o) {\n for (var a = 0, s = o.length; a < s; ++a)\n if ((i = o[a]).type === e.type && i.name === e.name) {\n this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;\n return;\n }\n }\n this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];\n };\n}\nfunction gl(e, t, n) {\n var o = dl(e + \"\"), i, r = o.length, a;\n if (arguments.length < 2) {\n var s = this.node().__on;\n if (s) {\n for (var l = 0, u = s.length, c; l < u; ++l)\n for (i = 0, c = s[l]; i < r; ++i)\n if ((a = o[i]).type === c.type && a.name === c.name)\n return c.value;\n }\n return;\n }\n for (s = t ? hl : fl, i = 0; i < r; ++i)\n this.each(s(o[i], t, n));\n return this;\n}\nfunction Ui(e, t, n) {\n var o = Gi(e), i = o.CustomEvent;\n typeof i == \"function\" ? i = new i(t, n) : (i = o.document.createEvent(\"Event\"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);\n}\nfunction vl(e, t) {\n return function() {\n return Ui(this, e, t);\n };\n}\nfunction ml(e, t) {\n return function() {\n return Ui(this, e, t.apply(this, arguments));\n };\n}\nfunction pl(e, t) {\n return this.each((typeof t == \"function\" ? ml : vl)(e, t));\n}\nfunction* yl() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length, a; i < r; ++i)\n (a = o[i]) && (yield a);\n}\nvar Wi = [null];\nfunction _e(e, t) {\n this._groups = e, this._parents = t;\n}\nfunction $t() {\n return new _e([[document.documentElement]], Wi);\n}\nfunction xl() {\n return this;\n}\n_e.prototype = $t.prototype = {\n constructor: _e,\n select: Xa,\n selectAll: Ka,\n selectChild: Ja,\n selectChildren: os,\n filter: is,\n data: cs,\n enter: rs,\n exit: fs,\n join: hs,\n merge: gs,\n selection: xl,\n order: vs,\n sort: ms,\n call: ys,\n nodes: xs,\n node: _s,\n size: ws,\n empty: bs,\n each: Es,\n attr: Os,\n style: Ds,\n property: Rs,\n classed: Gs,\n text: Zs,\n html: qs,\n raise: Qs,\n lower: el,\n append: tl,\n insert: ol,\n remove: rl,\n clone: ll,\n datum: ul,\n on: gl,\n dispatch: pl,\n [Symbol.iterator]: yl\n};\nfunction we(e) {\n return typeof e == \"string\" ? new _e([[document.querySelector(e)]], [document.documentElement]) : new _e([[e]], Wi);\n}\nfunction _l(e) {\n let t;\n for (; t = e.sourceEvent; )\n e = t;\n return e;\n}\nfunction Ne(e, t) {\n if (e = _l(e), t === void 0 && (t = e.currentTarget), t) {\n var n = t.ownerSVGElement || t;\n if (n.createSVGPoint) {\n var o = n.createSVGPoint();\n return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y];\n }\n if (t.getBoundingClientRect) {\n var i = t.getBoundingClientRect();\n return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];\n }\n }\n return [e.pageX, e.pageY];\n}\nconst wl = { passive: !1 }, bt = { capture: !0, passive: !1 };\nfunction $n(e) {\n e.stopImmediatePropagation();\n}\nfunction at(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Ki(e) {\n var t = e.document.documentElement, n = we(e).on(\"dragstart.drag\", at, bt);\n \"onselectstart\" in t ? n.on(\"selectstart.drag\", at, bt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = \"none\");\n}\nfunction qi(e, t) {\n var n = e.document.documentElement, o = we(e).on(\"dragstart.drag\", null);\n t && (o.on(\"click.drag\", at, bt), setTimeout(function() {\n o.on(\"click.drag\", null);\n }, 0)), \"onselectstart\" in n ? o.on(\"selectstart.drag\", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);\n}\nconst Pt = (e) => () => e;\nfunction Un(e, {\n sourceEvent: t,\n subject: n,\n target: o,\n identifier: i,\n active: r,\n x: a,\n y: s,\n dx: l,\n dy: u,\n dispatch: c\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n subject: { value: n, enumerable: !0, configurable: !0 },\n target: { value: o, enumerable: !0, configurable: !0 },\n identifier: { value: i, enumerable: !0, configurable: !0 },\n active: { value: r, enumerable: !0, configurable: !0 },\n x: { value: a, enumerable: !0, configurable: !0 },\n y: { value: s, enumerable: !0, configurable: !0 },\n dx: { value: l, enumerable: !0, configurable: !0 },\n dy: { value: u, enumerable: !0, configurable: !0 },\n _: { value: c }\n });\n}\nUn.prototype.on = function() {\n var e = this._.on.apply(this._, arguments);\n return e === this._ ? this : e;\n};\nfunction bl(e) {\n return !e.ctrlKey && !e.button;\n}\nfunction El() {\n return this.parentNode;\n}\nfunction Sl(e, t) {\n return t ?? { x: e.x, y: e.y };\n}\nfunction Nl() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Cl() {\n var e = bl, t = El, n = Sl, o = Nl, i = {}, r = fn(\"start\", \"drag\", \"end\"), a = 0, s, l, u, c, v = 0;\n function g(p) {\n p.on(\"mousedown.drag\", x).filter(o).on(\"touchstart.drag\", w).on(\"touchmove.drag\", y, wl).on(\"touchend.drag touchcancel.drag\", S).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function x(p, N) {\n if (!(c || !e.call(this, p, N))) {\n var T = V(this, t.call(this, p, N), p, N, \"mouse\");\n T && (we(p.view).on(\"mousemove.drag\", h, bt).on(\"mouseup.drag\", d, bt), Ki(p.view), $n(p), u = !1, s = p.clientX, l = p.clientY, T(\"start\", p));\n }\n }\n function h(p) {\n if (at(p), !u) {\n var N = p.clientX - s, T = p.clientY - l;\n u = N * N + T * T > v;\n }\n i.mouse(\"drag\", p);\n }\n function d(p) {\n we(p.view).on(\"mousemove.drag mouseup.drag\", null), qi(p.view, u), at(p), i.mouse(\"end\", p);\n }\n function w(p, N) {\n if (e.call(this, p, N)) {\n var T = p.changedTouches, _ = t.call(this, p, N), P = T.length, R, $;\n for (R = 0; R < P; ++R)\n ($ = V(this, _, p, N, T[R].identifier, T[R])) && ($n(p), $(\"start\", p, T[R]));\n }\n }\n function y(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (_ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && (at(p), P(\"drag\", p, N[_]));\n }\n function S(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (c && clearTimeout(c), c = setTimeout(function() {\n c = null;\n }, 500), _ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && ($n(p), P(\"end\", p, N[_]));\n }\n function V(p, N, T, _, P, R) {\n var $ = r.copy(), D = Ne(R || T, N), Q, ee, m;\n if ((m = n.call(p, new Un(\"beforestart\", {\n sourceEvent: T,\n target: g,\n identifier: P,\n active: a,\n x: D[0],\n y: D[1],\n dx: 0,\n dy: 0,\n dispatch: $\n }), _)) != null)\n return Q = m.x - D[0] || 0, ee = m.y - D[1] || 0, function A(E, G, Z) {\n var K = D, z;\n switch (E) {\n case \"start\":\n i[P] = A, z = a++;\n break;\n case \"end\":\n delete i[P], --a;\n case \"drag\":\n D = Ne(Z || G, N), z = a;\n break;\n }\n $.call(\n E,\n p,\n new Un(E, {\n sourceEvent: G,\n subject: m,\n target: g,\n identifier: P,\n active: z,\n x: D[0] + Q,\n y: D[1] + ee,\n dx: D[0] - K[0],\n dy: D[1] - K[1],\n dispatch: $\n }),\n _\n );\n };\n }\n return g.filter = function(p) {\n return arguments.length ? (e = typeof p == \"function\" ? p : Pt(!!p), g) : e;\n }, g.container = function(p) {\n return arguments.length ? (t = typeof p == \"function\" ? p : Pt(p), g) : t;\n }, g.subject = function(p) {\n return arguments.length ? (n = typeof p == \"function\" ? p : Pt(p), g) : n;\n }, g.touchable = function(p) {\n return arguments.length ? (o = typeof p == \"function\" ? p : Pt(!!p), g) : o;\n }, g.on = function() {\n var p = r.on.apply(r, arguments);\n return p === r ? g : p;\n }, g.clickDistance = function(p) {\n return arguments.length ? (v = (p = +p) * p, g) : Math.sqrt(v);\n }, g;\n}\nfunction ji(e) {\n const t = fe(), n = M(t, \"vueFlowRef\"), o = M(t, \"snapToGrid\"), i = M(t, \"snapGrid\"), r = M(t, \"noDragClassName\"), a = M(t, \"nodes\"), s = M(t, \"nodeExtent\"), l = M(t, \"viewport\"), u = M(t, \"autoPanOnNodeDrag\"), c = M(t, \"nodesDraggable\"), v = M(t, \"panBy\"), g = M(t, \"findNode\"), x = M(t, \"multiSelectionActive\"), h = M(t, \"nodesSelectionActive\"), d = M(t, \"selectNodesOnDrag\"), w = M(t, \"removeSelectedElements\"), y = M(t, \"addSelectedNodes\"), S = M(t, \"updateNodePositions\"), V = M(t, \"emits\"), { onStart: p, onDrag: N, onStop: T, el: _, disabled: P, id: R, selectable: $ } = e, D = ie(!1);\n let Q = ie([]), ee = ie(), m = ie(null), A = ie({ x: void 0, y: void 0 }), E = ie({ x: 0, y: 0 }), G = ie(null), Z = ie(0), K = ie(!1);\n const z = Ra(), W = ({ x: q, y: te }) => {\n A.value = { x: q, y: te };\n let re = !1;\n if (Q.value = Q.value.map((k) => {\n const H = { x: q - k.distance.x, y: te - k.distance.y };\n o.value && (H.x = i.value[0] * Math.round(H.x / i.value[0]), H.y = i.value[1] * Math.round(H.y / i.value[1]));\n const { computedPosition: f } = go(\n k,\n H,\n V.value.error,\n s.value,\n k.parentNode ? g.value(k.parentNode) : void 0\n );\n return re = re || k.position.x !== f.x || k.position.y !== f.y, k.position = f, k;\n }), !!re && (S.value(Q.value, !0, !0), D.value = !0, G.value)) {\n const [k, H] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n N({ event: G.value, node: k, nodes: H });\n }\n }, B = () => {\n if (!m.value)\n return;\n const [q, te] = Pi(E.value, m.value);\n if (q !== 0 || te !== 0) {\n const re = {\n x: (A.value.x ?? 0) - q / l.value.zoom,\n y: (A.value.y ?? 0) - te / l.value.zoom\n };\n v.value({ x: q, y: te }) && W(re);\n }\n Z.value = requestAnimationFrame(B);\n };\n return de([() => le(P), _], ([q, te]) => {\n if (te) {\n const re = we(te);\n if (q)\n re.on(\".drag\", null);\n else {\n const k = g.value(R);\n ee.value = Cl().on(\"start\", (H) => {\n var b;\n !d.value && !x.value && k && (k.selected || w.value()), k && le($) && d.value && Xn(\n k,\n x.value,\n y.value,\n w.value,\n h,\n !1,\n te\n );\n const f = z(H);\n if (A.value = f, Q.value = Pa(a.value, c.value, f, g.value, R), Q.value.length) {\n const [L, I] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n p({ event: H.sourceEvent, node: L, nodes: I });\n }\n m.value = ((b = n.value) == null ? void 0 : b.getBoundingClientRect()) || null, E.value = rt(H.sourceEvent, m.value);\n }).on(\"drag\", (H) => {\n const f = z(H);\n !K.value && u.value && (K.value = !0, B()), (A.value.x !== f.xSnapped || A.value.y !== f.ySnapped) && Q.value.length && (G.value = H.sourceEvent, E.value = rt(H.sourceEvent, m.value), W(f));\n }).on(\"end\", (H) => {\n if (D.value = !1, K.value = !1, cancelAnimationFrame(Z.value), Q.value.length) {\n S.value(Q.value, !1, !1);\n const [f, b] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n T({ event: H.sourceEvent, node: f, nodes: b });\n }\n }).filter((H) => {\n const f = H.target;\n return !H.button && (!r.value || !Ho(f, `.${r.value}`, te) && (!(k != null && k.dragHandle) || Ho(f, k.dragHandle, te)));\n }), re.call(ee.value);\n }\n }\n }), D;\n}\nconst Qi = \"vue-flow__node-desc\", Ji = \"vue-flow__edge-desc\", Ml = \"vue-flow__aria-live\", er = [\"Enter\", \" \", \"Escape\"], st = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction Wn(e) {\n var i, r;\n const t = ((r = (i = e.composedPath) == null ? void 0 : i.call(e)) == null ? void 0 : r[0]) || e.target, n = Ae(t.hasAttribute) ? t.hasAttribute(\"contenteditable\") : !1, o = Ae(t.closest) ? t.closest(\".nokey\") : null;\n return [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(t == null ? void 0 : t.nodeName) || n || !!o;\n}\nfunction $l(e) {\n return e.ctrlKey || e.metaKey || e.shiftKey;\n}\nfunction kl(e, t) {\n return (n) => e.some((o) => {\n const i = o.split(\"+\").map((r) => r.trim().toLowerCase());\n return i.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), i.every((r) => t.has(r)));\n });\n}\nconst _t = (e, t) => {\n const n = ao(), o = ie(le(e) === !0), i = ie(!1), r = ie(/* @__PURE__ */ new Set());\n return de(o, () => {\n t == null || t(o.value);\n }), de(\n () => le(e),\n (a) => {\n if (n && typeof n.addEventListener < \"u\" && ro(n, \"blur\", () => {\n o.value = !1;\n }), zr(a)) {\n o.value = a;\n return;\n }\n Array.isArray(a) && (a = kl(a, r.value)), a && (Mo(\n a,\n (s) => {\n i.value = $l(s), !(!i.value && Wn(s)) && (s.preventDefault(), o.value = !0);\n },\n { eventName: \"keydown\" }\n ), Mo(\n a,\n (s) => {\n if (o.value) {\n if (!i.value && Wn(s))\n return;\n i.value = !1, r.value.clear(), o.value = !1;\n }\n },\n { eventName: \"keyup\" }\n ));\n },\n {\n immediate: !0\n }\n ), o;\n}, Ol = ge({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"draggable\", \"selectable\", \"focusable\", \"connectable\", \"node\", \"resizeObserver\"],\n setup(e) {\n ut($i, e.id);\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"noPanClassName\"), r = M(t, \"selectNodesOnDrag\"), a = M(t, \"nodesSelectionActive\"), s = M(t, \"multiSelectionActive\"), l = M(t, \"emits\"), u = M(t, \"findNode\"), c = M(t, \"removeSelectedNodes\"), v = M(t, \"addSelectedNodes\"), g = M(t, \"updateNodeDimensions\"), x = M(t, \"onUpdateNodeInternals\"), h = M(t, \"getIntersectingNodes\"), d = M(t, \"getNodeTypes\"), w = M(t, \"nodeExtent\"), y = M(t, \"elevateNodesOnSelect\"), S = M(t, \"disableKeyboardA11y\"), V = M(t, \"ariaLiveMessage\"), p = M(t, \"snapToGrid\"), N = M(t, \"snapGrid\"), T = Ai(), _ = yt(e, \"node\"), P = J(() => u.value(_.value.parentNode)), R = J(() => sn([_.value], o.value)), $ = ie();\n ut(ki, $);\n const { emit: D, on: Q } = Ba(_.value, l.value), ee = ji({\n id: e.id,\n el: $,\n disabled: () => !e.draggable,\n selectable: () => e.selectable,\n onStart(k) {\n D.dragStart({ ...k, intersections: h.value(_.value) });\n },\n onDrag(k) {\n D.drag({ ...k, intersections: h.value(_.value) });\n },\n onStop(k) {\n D.dragStop({ ...k, intersections: h.value(_.value) });\n }\n }), m = J(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = J(() => {\n const k = (_.value.style instanceof Function ? _.value.style(_.value) : _.value.style) || {}, H = _.value.width instanceof Function ? _.value.width(_.value) : _.value.width, f = _.value.height instanceof Function ? _.value.height(_.value) : _.value.height;\n return H && (k.width = typeof H == \"string\" ? H : `${H}px`), f && (k.height = typeof f == \"string\" ? f : `${f}px`), k;\n }), E = () => Number(_.value.zIndex ?? A.value.zIndex ?? 0);\n return x.value((k) => {\n k.includes(e.id) && Z();\n }), Ve(() => {\n e.resizeObserver.observe($.value);\n }), gi(() => {\n e.resizeObserver.unobserve($.value);\n }), de(\n [() => _.value.type, () => _.value.sourcePosition, () => _.value.targetPosition],\n () => {\n g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n },\n { flush: \"pre\" }\n ), de(\n [\n () => _.value.position.x,\n () => _.value.position.y,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.x;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.y;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.z;\n },\n () => E(),\n () => _.value.selected,\n () => _.value.dimensions.height,\n () => _.value.dimensions.width,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.height;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.width;\n }\n ],\n ([k, H, f, b, L, I]) => {\n const F = {\n x: k,\n y: H,\n z: I + (y.value && _.value.selected ? 1e3 : 0)\n };\n Ie(f) && Ie(b) ? _.value.computedPosition = ma({ x: f, y: b, z: L }, F) : _.value.computedPosition = F;\n },\n { flush: \"pre\", immediate: !0 }\n ), de([() => _.value.extent, () => w.value], ([k, H], [f, b]) => {\n (k !== f || H !== b) && G();\n }), _.value.extent === \"parent\" || typeof _.value.extent == \"object\" && \"range\" in _.value.extent && _.value.extent.range === \"parent\" ? ye(() => _.value.initialized).toBe(!0).then(G) : G(), () => ue(\n \"div\",\n {\n ref: $,\n \"data-id\": _.value.id,\n class: [\n \"vue-flow__node\",\n `vue-flow__node-${e.type === !1 ? \"default\" : e.name}`,\n {\n [i.value]: e.draggable,\n dragging: ee == null ? void 0 : ee.value,\n selected: _.value.selected,\n selectable: e.selectable\n },\n m.value\n ],\n style: {\n zIndex: _.value.computedPosition.z ?? E(),\n transform: `translate(${_.value.computedPosition.x}px,${_.value.computedPosition.y}px)`,\n pointerEvents: e.selectable || e.draggable ? \"all\" : \"none\",\n visibility: _.value.initialized ? \"visible\" : \"hidden\",\n ...A.value\n },\n tabIndex: e.focusable ? 0 : void 0,\n role: e.focusable ? \"button\" : void 0,\n \"aria-describedby\": S.value ? void 0 : `${Qi}-${n.value}`,\n \"aria-label\": _.value.ariaLabel,\n onMouseenter: K,\n onMousemove: z,\n onMouseleave: W,\n onContextmenu: B,\n onClick: te,\n onDblclick: q,\n onKeydown: re\n },\n [\n ue(e.type === !1 ? d.value.default : e.type, {\n id: _.value.id,\n type: _.value.type,\n data: _.value.data,\n events: { ..._.value.events, ...Q },\n selected: !!_.value.selected,\n resizing: !!_.value.resizing,\n dragging: ee.value,\n connectable: e.connectable,\n position: _.value.position,\n dimensions: _.value.dimensions,\n isValidTargetPos: _.value.isValidTargetPos,\n isValidSourcePos: _.value.isValidSourcePos,\n parent: _.value.parentNode,\n zIndex: _.value.computedPosition.z,\n targetPosition: _.value.targetPosition,\n sourcePosition: _.value.sourcePosition,\n label: _.value.label,\n dragHandle: _.value.dragHandle,\n onUpdateNodeInternals: Z\n })\n ]\n );\n function G() {\n const k = _.value.computedPosition;\n p.value && (k.x = N.value[0] * Math.round(k.x / N.value[0]), k.y = N.value[1] * Math.round(k.y / N.value[1]));\n const { computedPosition: H, position: f } = go(_.value, k, l.value.error, w.value, P.value);\n (_.value.computedPosition.x !== H.x || _.value.computedPosition.y !== H.y) && (_.value.computedPosition = { ..._.value.computedPosition, ...H }), (_.value.position.x !== f.x || _.value.position.y !== f.y) && (_.value.position = f);\n }\n function Z() {\n $.value && g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n }\n function K(k) {\n ee != null && ee.value || D.mouseEnter({ event: k, node: _.value, connectedEdges: R.value });\n }\n function z(k) {\n ee != null && ee.value || D.mouseMove({ event: k, node: _.value, connectedEdges: R.value });\n }\n function W(k) {\n ee != null && ee.value || D.mouseLeave({ event: k, node: _.value, connectedEdges: R.value });\n }\n function B(k) {\n return D.contextMenu({ event: k, node: _.value, connectedEdges: R.value });\n }\n function q(k) {\n return D.doubleClick({ event: k, node: _.value, connectedEdges: R.value });\n }\n function te(k) {\n e.selectable && (!r.value || !e.draggable) && Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n !1,\n $.value\n ), D.click({ event: k, node: _.value, connectedEdges: R.value });\n }\n function re(k) {\n var H;\n if (!Wn(k))\n if (er.includes(k.key) && e.selectable) {\n const f = k.key === \"Escape\";\n f && ((H = $.value) == null || H.blur()), Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n f,\n $.value\n );\n } else\n !S.value && e.draggable && _.value.selected && st[k.key] && (V.value = `Moved selected node ${k.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~_.value.position.x}, y: ${~~_.value.position.y}`, T(\n {\n x: st[k.key].x,\n y: st[k.key].y\n },\n k.shiftKey\n ));\n }\n }\n}), Tl = Ol, Il = [\"transform\"], Pl = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"], Dl = [\"y\"], zl = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n}, Al = /* @__PURE__ */ ge({\n ...zl,\n props: {\n x: null,\n y: null,\n label: null,\n labelStyle: { default: {} },\n labelShowBg: { type: Boolean, default: !0 },\n labelBgStyle: { default: {} },\n labelBgPadding: { default: [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(e) {\n let t = ie({ x: 0, y: 0, width: 0, height: 0 });\n const n = ie(null), o = J(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`);\n Ve(i), de([() => e.x, () => e.y, n, () => e.label], i);\n function i() {\n if (!n.value)\n return;\n const r = n.value.getBBox();\n (r.width !== t.value.width || r.height !== t.value.height) && (t.value = r);\n }\n return (r, a) => (oe(), se(\"g\", {\n transform: C(o),\n class: \"vue-flow__edge-textwrapper\"\n }, [\n e.labelShowBg ? (oe(), se(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${C(t).width + 2 * e.labelBgPadding[0]}px`,\n height: `${C(t).height + 2 * e.labelBgPadding[1]}px`,\n x: -e.labelBgPadding[0],\n y: -e.labelBgPadding[1],\n style: Le(e.labelBgStyle),\n rx: e.labelBgBorderRadius,\n ry: e.labelBgBorderRadius\n }, null, 12, Pl)) : Ee(\"\", !0),\n ct(\"text\", vi(r.$attrs, {\n ref_key: \"el\",\n ref: n,\n class: \"vue-flow__edge-text\",\n y: C(t).height / 2,\n dy: \"0.3em\",\n style: e.labelStyle\n }), [\n xe(r.$slots, \"default\", {}, () => [\n C(Pe)(e.label) ? (oe(), se(Ce, { key: 1 }, [\n Cr(Vn(e.label), 1)\n ], 64)) : (oe(), ze(mi(e.label), { key: 0 }))\n ])\n ], 16, Dl)\n ], 8, Il));\n }\n}), gn = function({\n path: e,\n label: t,\n labelX: n,\n labelY: o,\n labelBgBorderRadius: i,\n labelBgPadding: r,\n labelBgStyle: a,\n labelShowBg: s = !0,\n labelStyle: l,\n markerStart: u,\n markerEnd: c,\n interactionWidth: v = 20\n}, { attrs: g }) {\n return [\n ue(\"path\", {\n style: g.style,\n class: [\"vue-flow__edge-path\", g.class].join(\" \"),\n d: e,\n \"marker-end\": c,\n \"marker-start\": u\n }),\n v ? ue(\"path\", {\n d: e,\n fill: \"none\",\n \"stroke-opacity\": 0,\n \"stroke-width\": v\n }) : null,\n t && Ie(n) && Ie(o) ? ue(Al, {\n x: n,\n y: o,\n label: t,\n labelStyle: l,\n labelShowBg: s,\n labelBgStyle: a,\n labelBgPadding: r,\n labelBgBorderRadius: i\n }) : null\n ];\n};\ngn.props = [\n \"path\",\n \"labelX\",\n \"labelY\",\n \"label\",\n \"labelBgBorderRadius\",\n \"labelBgPadding\",\n \"labelBgStyle\",\n \"labelShowBg\",\n \"labelStyle\",\n \"markerStart\",\n \"markerEnd\",\n \"interactionWidth\"\n];\ngn.inheritAttrs = !1;\ngn.compatConfig = { MODE: 3 };\nconst vn = gn;\nfunction tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, a = Math.abs(o - t) / 2, s = o < t ? o + a : o - a;\n return [r, s, i, a];\n}\nfunction nr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o,\n sourceControlX: i,\n sourceControlY: r,\n targetControlX: a,\n targetControlY: s\n}) {\n const l = e * 0.125 + i * 0.375 + a * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(l - e), v = Math.abs(u - t);\n return [l, u, c, v];\n}\nfunction Dt(e, t) {\n return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);\n}\nfunction Yo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {\n let a, s;\n switch (e) {\n case j.Left:\n a = t - Dt(t - o, r), s = n;\n break;\n case j.Right:\n a = t + Dt(o - t, r), s = n;\n break;\n case j.Top:\n a = t, s = n - Dt(n - i, r);\n break;\n case j.Bottom:\n a = t, s = n + Dt(i - n, r);\n break;\n }\n return [a, s];\n}\nfunction Kn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n curvature: a = 0.25\n}) {\n const [s, l] = Yo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i,\n c: a\n }), [u, c] = Yo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t,\n c: a\n }), [v, g, x, h] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: s,\n sourceControlY: l,\n targetControlX: u,\n targetControlY: c\n });\n return [\n `M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,\n v,\n g,\n x,\n h\n ];\n}\nconst mn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = Kn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nmn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nmn.inheritAttrs = !1;\nmn.compatConfig = { MODE: 3 };\nconst Bl = mn;\nfunction Xo({ pos: e, x1: t, y1: n, x2: o, y2: i }) {\n let r, a;\n switch (e) {\n case j.Left:\n case j.Right:\n r = 0.5 * (t + o), a = n;\n break;\n case j.Top:\n case j.Bottom:\n r = t, a = 0.5 * (n + i);\n break;\n }\n return [r, a];\n}\nfunction or({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top\n}) {\n const [a, s] = Xo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i\n }), [l, u] = Xo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t\n }), [c, v, g, x] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: a,\n sourceControlY: s,\n targetControlX: l,\n targetControlY: u\n });\n return [\n `M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,\n c,\n v,\n g,\n x\n ];\n}\nconst pn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = or({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\npn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\npn.inheritAttrs = !1;\npn.compatConfig = { MODE: 3 };\nconst Rl = pn, Zo = {\n [j.Left]: { x: -1, y: 0 },\n [j.Right]: { x: 1, y: 0 },\n [j.Top]: { x: 0, y: -1 },\n [j.Bottom]: { x: 0, y: 1 }\n};\nfunction Vl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n\n}) {\n return t === j.Left || t === j.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction Uo(e, t) {\n return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);\n}\nfunction Hl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n,\n targetPosition: o = j.Top,\n center: i,\n offset: r\n}) {\n const a = Zo[t], s = Zo[o], l = { x: e.x + a.x * r, y: e.y + a.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Vl({\n source: l,\n sourcePosition: t,\n target: u\n }), v = c.x !== 0 ? \"x\" : \"y\", g = c[v];\n let x, h, d;\n const [w, y, S, V] = tr({\n sourceX: e.x,\n sourceY: e.y,\n targetX: n.x,\n targetY: n.y\n });\n if (a[v] * s[v] === -1) {\n h = i.x || w, d = i.y || y;\n const N = [\n { x: h, y: l.y },\n { x: h, y: u.y }\n ], T = [\n { x: l.x, y: d },\n { x: u.x, y: d }\n ];\n a[v] === g ? x = v === \"x\" ? N : T : x = v === \"x\" ? T : N;\n } else {\n const N = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];\n if (v === \"x\" ? x = a.x === g ? T : N : x = a.y === g ? N : T, t !== o) {\n const _ = v === \"x\" ? \"y\" : \"x\", P = a[v] === s[_], R = l[_] > u[_], $ = l[_] < u[_];\n (a[v] === 1 && (!P && R || P && $) || a[v] !== 1 && (!P && $ || P && R)) && (x = v === \"x\" ? N : T);\n }\n h = x[0].x, d = x[0].y;\n }\n return [[e, l, ...x, u, n], h, d, S, V];\n}\nfunction Ll(e, t, n, o) {\n const i = Math.min(Uo(e, t) / 2, Uo(t, n) / 2, o), { x: r, y: a } = t;\n if (e.x === r && r === n.x || e.y === a && a === n.y)\n return `L${r} ${a}`;\n if (e.y === a) {\n const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;\n return `L ${r + i * u},${a}Q ${r},${a} ${r},${a + i * c}`;\n }\n const s = e.x < n.x ? 1 : -1, l = e.y < n.y ? -1 : 1;\n return `L ${r},${a + i * l}Q ${r},${a} ${r + i * s},${a}`;\n}\nfunction qn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n borderRadius: a = 5,\n centerX: s,\n centerY: l,\n offset: u = 20\n}) {\n const [c, v, g, x, h] = Hl({\n source: { x: e, y: t },\n sourcePosition: n,\n target: { x: o, y: i },\n targetPosition: r,\n center: { x: s, y: l },\n offset: u\n });\n return [c.reduce((w, y, S) => {\n let V;\n return S > 0 && S < c.length - 1 ? V = Ll(c[S - 1], y, c[S + 1], a) : V = `${S === 0 ? \"M\" : \"L\"}${y.x} ${y.y}`, w += V, w;\n }, \"\"), v, g, x, h];\n}\nconst yn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = qn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nyn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n];\nyn.inheritAttrs = !1;\nyn.compatConfig = { MODE: 3 };\nconst ir = yn, xn = function(e, { attrs: t }) {\n return ue(ir, { ...e, ...t, borderRadius: 0 });\n};\nxn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nxn.inheritAttrs = !1;\nxn.compatConfig = { MODE: 3 };\nconst Gl = xn;\nfunction rr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const [i, r, a, s] = tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n });\n return [`M ${e},${t}L ${n},${o}`, i, r, a, s];\n}\nconst _n = function(e, { attrs: t }) {\n const [n, o, i] = rr(e);\n return ue(vn, {\n path: n,\n labelX: o,\n labelY: i,\n ...e,\n ...t\n });\n};\n_n.props = [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\n_n.inheritAttrs = !1;\n_n.compatConfig = { MODE: 3 };\nconst Fl = _n;\nfunction Yl(e, t, n) {\n return n === j.Left ? e - t : n === j.Right ? e + t : e;\n}\nfunction Xl(e, t, n) {\n return n === j.Top ? e - t : n === j.Bottom ? e + t : e;\n}\nconst po = function({\n radius: e = 10,\n centerX: t = 0,\n centerY: n = 0,\n position: o = j.Top,\n type: i\n}) {\n return ue(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,\n cx: Yl(t, e, o),\n cy: Xl(n, e, o),\n r: e,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\npo.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\npo.compatConfig = { MODE: 3 };\nconst Wo = po;\nfunction Zl() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n updateStart: X(),\n update: X(),\n updateEnd: X()\n };\n}\nfunction Ul(e, t) {\n const n = Zl();\n return n.doubleClick.on((o) => {\n var i, r;\n t.edgeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.edgeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.edgeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.edgeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.edgeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.edgeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.updateStart.on((o) => {\n var i, r;\n t.edgeUpdateStart(o), (r = (i = e.events) == null ? void 0 : i.updateStart) == null || r.call(i, o);\n }), n.update.on((o) => {\n var i, r;\n t.edgeUpdate(o), (r = (i = e.events) == null ? void 0 : i.update) == null || r.call(i, o);\n }), n.updateEnd.on((o) => {\n var i, r;\n t.edgeUpdateEnd(o), (r = (i = e.events) == null ? void 0 : i.updateEnd) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nconst Wl = ge({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"updatable\", \"selectable\", \"focusable\", \"edge\"],\n setup(e) {\n const {\n id: t,\n addSelectedEdges: n,\n connectionMode: o,\n edgeUpdaterRadius: i,\n emits: r,\n nodesSelectionActive: a,\n noPanClassName: s,\n getEdgeTypes: l,\n removeSelectedEdges: u,\n findEdge: c,\n findNode: v,\n isValidConnection: g\n } = fe(), x = Ul(e.edge, r), h = yt(e, \"edge\");\n let d = ie(!1), w = ie(!1);\n const y = ie(\"\"), S = ie(null), V = ie(\"source\"), p = ie();\n ut(Oi, e.id), ut(Ti, p);\n const N = J(() => h.value.class instanceof Function ? h.value.class(h.value) : h.value.class), T = J(() => h.value.style instanceof Function ? h.value.style(h.value) : h.value.style), { handlePointerDown: _ } = Di({\n nodeId: y,\n handleId: S,\n type: V,\n isValidConnection: g.value,\n edgeUpdaterType: V,\n onEdgeUpdate: $,\n onEdgeUpdateEnd: D\n });\n return () => {\n const B = v(h.value.source), q = v(h.value.target);\n if (!B || !q || !h.value)\n return null;\n let te;\n o.value === Qe.Strict ? te = B.handleBounds.source : te = [...B.handleBounds.source || [], ...B.handleBounds.target || []];\n const re = Ao(te, h.value.sourceHandle);\n let k;\n o.value === Qe.Strict ? k = q.handleBounds.target : k = [...q.handleBounds.target || [], ...q.handleBounds.source || []];\n const H = Ao(k, h.value.targetHandle), f = re ? re.position : j.Bottom, b = H ? H.position : j.Top, { sourceX: L, sourceY: I, targetY: F, targetX: U } = wa(\n B,\n re,\n f,\n q,\n H,\n b\n );\n return h.value.sourceX = L, h.value.sourceY = I, h.value.targetX = U, h.value.targetY = F, ue(\n \"g\",\n {\n ref: p,\n key: e.id,\n \"data-id\": e.id,\n class: [\n \"vue-flow__edge\",\n `vue-flow__edge-${e.type === !1 ? \"default\" : e.name}`,\n s.value,\n N.value,\n {\n updating: d.value,\n selected: h.value.selected,\n animated: h.value.animated,\n inactive: !e.selectable\n }\n ],\n onClick: ee,\n onContextmenu: m,\n onDblclick: A,\n onMouseenter: E,\n onMousemove: G,\n onMouseleave: Z,\n onKeyDown: e.focusable ? W : void 0,\n tabIndex: e.focusable ? 0 : void 0,\n \"aria-label\": h.value.ariaLabel === null ? void 0 : h.value.ariaLabel || `Edge from ${h.value.source} to ${h.value.target}`,\n \"aria-describedby\": e.focusable ? `${Ji}-${t}` : void 0,\n role: e.focusable ? \"button\" : void 0\n },\n [\n w.value ? null : ue(e.type === !1 ? l.value.default : e.type, {\n id: e.id,\n sourceNode: B,\n targetNode: q,\n source: h.value.source,\n target: h.value.target,\n type: h.value.type,\n updatable: e.updatable,\n selected: h.value.selected,\n animated: h.value.animated,\n label: h.value.label,\n labelStyle: h.value.labelStyle,\n labelShowBg: h.value.labelShowBg,\n labelBgStyle: h.value.labelBgStyle,\n labelBgPadding: h.value.labelBgPadding,\n labelBgBorderRadius: h.value.labelBgBorderRadius,\n data: h.value.data,\n events: { ...h.value.events, ...x.on },\n style: T.value,\n markerStart: `url(#${Xe(h.value.markerStart, t)})`,\n markerEnd: `url(#${Xe(h.value.markerEnd, t)})`,\n sourcePosition: f,\n targetPosition: b,\n sourceX: L,\n sourceY: I,\n targetX: U,\n targetY: F,\n sourceHandleId: h.value.sourceHandle,\n targetHandleId: h.value.targetHandle,\n interactionWidth: h.value.interactionWidth\n }),\n [\n e.updatable === \"source\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: K,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: f,\n centerX: L,\n centerY: I,\n radius: i.value,\n type: \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n e.updatable === \"target\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: z,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: b,\n centerX: U,\n centerY: F,\n radius: i.value,\n type: \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function P() {\n d.value = !0;\n }\n function R() {\n d.value = !1;\n }\n function $(B, q) {\n x.emit.update({ event: B, edge: h.value, connection: q });\n }\n function D(B) {\n x.emit.updateEnd({ event: B, edge: h.value }), w.value = !1;\n }\n function Q(B, q) {\n B.button === 0 && (w.value = !0, y.value = q ? h.value.target : h.value.source, S.value = (q ? h.value.targetHandle : h.value.sourceHandle) ?? \"\", V.value = q ? \"target\" : \"source\", x.emit.updateStart({ event: B, edge: h.value }), _(B));\n }\n function ee(B) {\n const q = { event: B, edge: h.value };\n e.selectable && (a.value = !1, n([h.value])), x.emit.click(q);\n }\n function m(B) {\n x.emit.contextMenu({ event: B, edge: h.value });\n }\n function A(B) {\n x.emit.doubleClick({ event: B, edge: h.value });\n }\n function E(B) {\n x.emit.mouseEnter({ event: B, edge: h.value });\n }\n function G(B) {\n x.emit.mouseMove({ event: B, edge: h.value });\n }\n function Z(B) {\n x.emit.mouseLeave({ event: B, edge: h.value });\n }\n function K(B) {\n Q(B, !0);\n }\n function z(B) {\n Q(B, !1);\n }\n function W(B) {\n var q;\n er.includes(B.key) && e.selectable && (B.key === \"Escape\" ? ((q = p.value) == null || q.blur(), u([c(e.id)])) : n([c(e.id)]));\n }\n }\n}), Kl = Wl, ql = {\n height: \"0\",\n width: \"0\"\n}, jl = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n}, Rd = /* @__PURE__ */ ge({\n ...jl,\n setup(e) {\n const { viewportRef: t } = fe(), n = J(() => {\n var o;\n return (o = t.value) == null ? void 0 : o.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (o, i) => (oe(), se(\"svg\", null, [\n (oe(), se(\"foreignObject\", ql, [\n (oe(), ze(Mr, {\n to: C(n),\n disabled: !C(n)\n }, [\n xe(o.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]));\n }\n}), Ql = { class: \"vue-flow__connection\" }, Jl = [\"d\", \"marker-end\", \"marker-start\"], eu = {\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 }\n}, tu = /* @__PURE__ */ ge({\n ...eu,\n props: {\n sourceNode: null\n },\n setup(e) {\n var R;\n const t = fe(), n = M(t, \"connectionMode\"), o = M(t, \"connectionStartHandle\"), i = M(t, \"connectionEndHandle\"), r = M(t, \"connectionPosition\"), a = M(t, \"connectionLineType\"), s = M(t, \"connectionLineStyle\"), l = M(t, \"connectionLineOptions\"), u = M(t, \"connectionStatus\"), c = M(t, \"viewport\"), v = M(t, \"findNode\"), g = {\n [j.Left]: j.Right,\n [j.Right]: j.Left,\n [j.Top]: j.Bottom,\n [j.Bottom]: j.Top\n }, x = (R = He(ln)) == null ? void 0 : R[\"connection-line\"], h = J(() => o.value.handleId), d = J(() => o.value.type), w = J(() => {\n var $;\n return (($ = i.value) == null ? void 0 : $.handleId) && v.value(i.value.nodeId) || null;\n }), y = J(\n () => {\n var $, D;\n return (n.value === Qe.Strict ? ($ = e.sourceNode.handleBounds[d.value]) == null ? void 0 : $.find((Q) => Q.id === h.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((Q) => Q.id === h.value)) || ((D = e.sourceNode.handleBounds[d.value ?? \"source\"]) == null ? void 0 : D[0]);\n }\n ), S = J(() => {\n var $, D, Q;\n return w.value && (($ = i.value) == null ? void 0 : $.handleId) && ((n.value === Qe.Strict ? (D = w.value.handleBounds[d.value === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : D.find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n ) : [...w.value.handleBounds.source || [], ...w.value.handleBounds.target || []].find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n )) || ((Q = w.value.handleBounds[d.value ?? \"target\"]) == null ? void 0 : Q[0])) || null;\n }), V = J(() => {\n var $;\n return ($ = y.value) == null ? void 0 : $.position;\n }), p = J(() => y.value ? Wt(\n V.value || j.Top,\n { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition },\n y.value\n ) : {\n x: e.sourceNode.dimensions.width / 2,\n y: e.sourceNode.dimensions.height / 2\n }), N = J(() => V.value ? g[V.value] : void 0), T = J(() => (r.value.x - c.value.x) / c.value.zoom), _ = J(() => (r.value.y - c.value.y) / c.value.zoom), P = J(() => {\n let $;\n const D = {\n sourceX: p.value.x,\n sourceY: p.value.y,\n sourcePosition: V.value,\n targetX: T.value,\n targetY: _.value,\n targetPosition: N.value\n };\n switch (a.value ?? l.value.type) {\n case Ye.Bezier:\n [$] = Kn(D);\n break;\n case Ye.Step:\n [$] = qn({\n ...D,\n borderRadius: 0\n });\n break;\n case Ye.SmoothStep:\n [$] = qn(D);\n break;\n case Ye.SimpleBezier:\n [$] = or(D);\n break;\n case Ye.Straight:\n [$] = rr(D);\n break;\n default:\n [$] = Kn(D);\n break;\n }\n return $;\n });\n return ($, D) => {\n var Q;\n return oe(), se(\"g\", Ql, [\n C(x) ? (oe(), ze(mi(C(x)), $r(vi({ key: 0 }, {\n sourceX: C(p).x,\n sourceY: C(p).y,\n sourcePosition: (Q = C(y)) == null ? void 0 : Q.position,\n targetX: C(T),\n targetY: C(_),\n targetPosition: C(N),\n sourceNode: e.sourceNode,\n sourceHandle: C(y),\n targetNode: C(w),\n targetHandle: C(S),\n markerEnd: `url(#${C(Xe)(C(l).markerEnd)})`,\n markerStart: `url(#${C(Xe)(C(l).markerStart)})`,\n connectionStatus: C(u)\n })), null, 16)) : (oe(), se(\"path\", {\n key: 1,\n d: C(P),\n class: Ke([\"vue-flow__connection-path\", [C(l).class, C(u)]]),\n style: Le(C(s) || C(l).style || {}),\n \"marker-end\": `url(#${C(Xe)(C(l).markerEnd)})`,\n \"marker-start\": `url(#${C(Xe)(C(l).markerStart)})`\n }, null, 14, Jl))\n ]);\n };\n }\n}), nu = [\"tabIndex\"], ou = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n}, iu = /* @__PURE__ */ ge({\n ...ou,\n setup(e) {\n const t = fe(), n = M(t, \"emits\"), o = M(t, \"viewport\"), i = M(t, \"getSelectedNodes\"), r = M(t, \"noPanClassName\"), a = M(t, \"disableKeyboardA11y\"), s = M(t, \"userSelectionActive\"), l = Ai(), u = ie(), c = ji({\n el: u,\n onStart(d) {\n n.value.selectionDragStart(d);\n },\n onDrag(d) {\n n.value.selectionDrag(d);\n },\n onStop(d) {\n n.value.selectionDragStop(d);\n }\n });\n Ve(() => {\n var d;\n a.value || (d = u.value) == null || d.focus({ preventScroll: !0 });\n });\n const v = J(() => co(i.value)), g = J(() => ({\n width: `${v.value.width}px`,\n height: `${v.value.height}px`,\n top: `${v.value.y}px`,\n left: `${v.value.x}px`\n }));\n function x(d) {\n n.value.selectionContextMenu({ event: d, nodes: i.value });\n }\n function h(d) {\n a.value || st[d.key] && l(\n {\n x: st[d.key].x,\n y: st[d.key].y\n },\n d.shiftKey\n );\n }\n return (d, w) => !C(s) && C(v).width && C(v).height ? (oe(), se(\"div\", {\n key: 0,\n class: Ke([\"vue-flow__nodesselection vue-flow__container\", C(r)]),\n style: Le({ transform: `translate(${C(o).x}px,${C(o).y}px) scale(${C(o).zoom})` })\n }, [\n ct(\"div\", {\n ref_key: \"el\",\n ref: u,\n class: Ke([{ dragging: C(c) }, \"vue-flow__nodesselection-rect\"]),\n style: Le(C(g)),\n tabIndex: C(a) ? void 0 : -1,\n onContextmenu: x,\n onKeydown: h\n }, null, 46, nu)\n ], 6)) : Ee(\"\", !0);\n }\n}), ru = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n}, au = /* @__PURE__ */ ge({\n ...ru,\n setup(e) {\n const { userSelectionRect: t } = fe();\n return (n, o) => {\n var i, r, a, s;\n return oe(), se(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: Le({\n width: `${(i = C(t)) == null ? void 0 : i.width}px`,\n height: `${(r = C(t)) == null ? void 0 : r.height}px`,\n transform: `translate(${(a = C(t)) == null ? void 0 : a.x}px, ${(s = C(t)) == null ? void 0 : s.y}px)`\n })\n }, null, 4);\n };\n }\n}), su = {\n input: Ta,\n default: Oa,\n output: Ia\n}, lu = {\n default: Bl,\n straight: Fl,\n step: Gl,\n smoothstep: ir,\n simplebezier: Rl\n};\nfunction uu() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n nodeTypes: {},\n edgeTypes: {},\n initialized: !1,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: fo.Full,\n paneDragging: !1,\n preventScrolling: !0,\n zoomOnScroll: !0,\n zoomOnPinch: !0,\n zoomOnDoubleClick: !0,\n panOnScroll: !1,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: Ut.Free,\n panOnDrag: !0,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: !1,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: !1,\n userSelectionActive: !1,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: Ye.Bezier,\n style: {}\n },\n connectionMode: Qe.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: NaN, y: NaN },\n connectionRadius: 20,\n connectOnClick: !0,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: !1,\n edgesUpdatable: !1,\n edgesFocusable: !0,\n nodesFocusable: !0,\n nodesConnectable: !0,\n nodesDraggable: !0,\n elementsSelectable: !0,\n selectNodesOnDrag: !0,\n multiSelectionActive: !1,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: \"Meta\",\n zoomActivationKeyCode: \"Meta\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: ca(),\n applyDefault: !0,\n autoConnect: !1,\n fitViewOnInit: !1,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: !1,\n elevateNodesOnSelect: !0,\n autoPanOnNodeDrag: !0,\n autoPanOnConnect: !0,\n disableKeyboardA11y: !1,\n ariaLiveMessage: \"\",\n __experimentalFeatures: {\n nestedFlow: !1\n }\n };\n}\nfunction ar(e) {\n const t = uu();\n return e && Object.keys(e).forEach((n) => {\n const o = e[n];\n ce(o) && (t[n] = o);\n }), t;\n}\nfunction cu(e, t, n) {\n const o = J(() => (d) => e.nodes && !t.value.length ? e.nodes.find((w) => w.id === d) : e.nodes[t.value.indexOf(d)]), i = J(() => (d) => e.edges && !n.value.length ? e.edges.find((w) => w.id === d) : e.edges[n.value.indexOf(d)]), r = J(() => {\n var y;\n const d = {\n ...lu,\n ...e.edgeTypes\n }, w = Object.keys(d);\n return (y = e.edges) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), a = J(() => {\n var y;\n const d = {\n ...su,\n ...e.nodeTypes\n }, w = Object.keys(d);\n return (y = e.nodes) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), s = J(() => {\n const d = e.nodes.filter((w) => !w.hidden);\n return e.onlyRenderVisibleElements ? d && Ci(\n d,\n {\n x: 0,\n y: 0,\n width: e.dimensions.width,\n height: e.dimensions.height\n },\n e.viewport,\n !0\n ) : d ?? [];\n }), l = (d, w, y) => {\n if (w = w ?? o.value(d.source), y = y ?? o.value(d.target), !w || !y) {\n e.hooks.error.trigger(new ve(he.EDGE_ORPHANED, d.id));\n return;\n }\n return !d.hidden && !y.hidden && !w.hidden;\n }, u = J(() => e.onlyRenderVisibleElements ? e.edges.filter((d) => {\n const w = o.value(d.source), y = o.value(d.target);\n return l(d, w, y) && ba({\n sourcePos: w.computedPosition || { x: 0, y: 0 },\n targetPos: y.computedPosition || { x: 0, y: 0 },\n sourceWidth: w.dimensions.width,\n sourceHeight: w.dimensions.height,\n targetWidth: y.dimensions.width,\n targetHeight: y.dimensions.height,\n width: e.dimensions.width,\n height: e.dimensions.height,\n viewport: e.viewport\n });\n }) : e.edges.filter((d) => l(d))), c = J(() => [...s.value, ...u.value]), v = J(() => e.nodes.filter((d) => d.selected)), g = J(() => e.edges.filter((d) => d.selected)), x = J(() => [\n ...v.value ?? [],\n ...g.value ?? []\n ]), h = J(\n () => s.value.filter((d) => d.initialized && d.handleBounds !== void 0)\n );\n return {\n getNode: o,\n getEdge: i,\n getElements: c,\n getEdgeTypes: r,\n getNodeTypes: a,\n getEdges: u,\n getNodes: s,\n getSelectedElements: x,\n getSelectedNodes: v,\n getSelectedEdges: g,\n getNodesInitialized: h\n };\n}\nfunction yo(e, t, n) {\n e.prototype = t.prototype = n, n.constructor = e;\n}\nfunction sr(e, t) {\n var n = Object.create(e.prototype);\n for (var o in t)\n n[o] = t[o];\n return n;\n}\nfunction kt() {\n}\nvar Et = 0.7, jt = 1 / Et, lt = \"\\\\s*([+-]?\\\\d+)\\\\s*\", St = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", Me = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", du = /^#([0-9a-f]{3,8})$/, fu = new RegExp(`^rgb\\\\(${lt},${lt},${lt}\\\\)$`), hu = new RegExp(`^rgb\\\\(${Me},${Me},${Me}\\\\)$`), gu = new RegExp(`^rgba\\\\(${lt},${lt},${lt},${St}\\\\)$`), vu = new RegExp(`^rgba\\\\(${Me},${Me},${Me},${St}\\\\)$`), mu = new RegExp(`^hsl\\\\(${St},${Me},${Me}\\\\)$`), pu = new RegExp(`^hsla\\\\(${St},${Me},${Me},${St}\\\\)$`), Ko = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\nyo(kt, Nt, {\n copy(e) {\n return Object.assign(new this.constructor(), this, e);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: qo,\n // Deprecated! Use color.formatHex.\n formatHex: qo,\n formatHex8: yu,\n formatHsl: xu,\n formatRgb: jo,\n toString: jo\n});\nfunction qo() {\n return this.rgb().formatHex();\n}\nfunction yu() {\n return this.rgb().formatHex8();\n}\nfunction xu() {\n return lr(this).formatHsl();\n}\nfunction jo() {\n return this.rgb().formatRgb();\n}\nfunction Nt(e) {\n var t, n;\n return e = (e + \"\").trim().toLowerCase(), (t = du.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qo(t) : n === 3 ? new pe(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? zt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? zt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fu.exec(e)) ? new pe(t[1], t[2], t[3], 1) : (t = hu.exec(e)) ? new pe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = gu.exec(e)) ? zt(t[1], t[2], t[3], t[4]) : (t = vu.exec(e)) ? zt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = mu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, 1) : (t = pu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, t[4]) : Ko.hasOwnProperty(e) ? Qo(Ko[e]) : e === \"transparent\" ? new pe(NaN, NaN, NaN, 0) : null;\n}\nfunction Qo(e) {\n return new pe(e >> 16 & 255, e >> 8 & 255, e & 255, 1);\n}\nfunction zt(e, t, n, o) {\n return o <= 0 && (e = t = n = NaN), new pe(e, t, n, o);\n}\nfunction _u(e) {\n return e instanceof kt || (e = Nt(e)), e ? (e = e.rgb(), new pe(e.r, e.g, e.b, e.opacity)) : new pe();\n}\nfunction jn(e, t, n, o) {\n return arguments.length === 1 ? _u(e) : new pe(e, t, n, o ?? 1);\n}\nfunction pe(e, t, n, o) {\n this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;\n}\nyo(pe, jn, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new pe(We(this.r), We(this.g), We(this.b), Qt(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: Jo,\n // Deprecated! Use color.formatHex.\n formatHex: Jo,\n formatHex8: wu,\n formatRgb: ei,\n toString: ei\n}));\nfunction Jo() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`;\n}\nfunction wu() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction ei() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"rgb(\" : \"rgba(\"}${We(this.r)}, ${We(this.g)}, ${We(this.b)}${e === 1 ? \")\" : `, ${e})`}`;\n}\nfunction Qt(e) {\n return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));\n}\nfunction We(e) {\n return Math.max(0, Math.min(255, Math.round(e) || 0));\n}\nfunction Ze(e) {\n return e = We(e), (e < 16 ? \"0\" : \"\") + e.toString(16);\n}\nfunction ti(e, t, n, o) {\n return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, n, o);\n}\nfunction lr(e) {\n if (e instanceof be)\n return new be(e.h, e.s, e.l, e.opacity);\n if (e instanceof kt || (e = Nt(e)), !e)\n return new be();\n if (e instanceof be)\n return e;\n e = e.rgb();\n var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), a = NaN, s = r - i, l = (r + i) / 2;\n return s ? (t === r ? a = (n - o) / s + (n < o) * 6 : n === r ? a = (o - t) / s + 2 : a = (t - n) / s + 4, s /= l < 0.5 ? r + i : 2 - r - i, a *= 60) : s = l > 0 && l < 1 ? 0 : a, new be(a, s, l, e.opacity);\n}\nfunction bu(e, t, n, o) {\n return arguments.length === 1 ? lr(e) : new be(e, t, n, o ?? 1);\n}\nfunction be(e, t, n, o) {\n this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;\n}\nyo(be, bu, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n rgb() {\n var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - o;\n return new pe(\n kn(e >= 240 ? e - 240 : e + 120, i, o),\n kn(e, i, o),\n kn(e < 120 ? e + 240 : e - 120, i, o),\n this.opacity\n );\n },\n clamp() {\n return new be(ni(this.h), At(this.s), At(this.l), Qt(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"hsl(\" : \"hsla(\"}${ni(this.h)}, ${At(this.s) * 100}%, ${At(this.l) * 100}%${e === 1 ? \")\" : `, ${e})`}`;\n }\n}));\nfunction ni(e) {\n return e = (e || 0) % 360, e < 0 ? e + 360 : e;\n}\nfunction At(e) {\n return Math.max(0, Math.min(1, e || 0));\n}\nfunction kn(e, t, n) {\n return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;\n}\nconst ur = (e) => () => e;\nfunction Eu(e, t) {\n return function(n) {\n return e + n * t;\n };\n}\nfunction Su(e, t, n) {\n return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {\n return Math.pow(e + o * t, n);\n };\n}\nfunction Nu(e) {\n return (e = +e) == 1 ? cr : function(t, n) {\n return n - t ? Su(t, n, e) : ur(isNaN(t) ? n : t);\n };\n}\nfunction cr(e, t) {\n var n = t - e;\n return n ? Eu(e, n) : ur(isNaN(e) ? t : e);\n}\nconst oi = function e(t) {\n var n = Nu(t);\n function o(i, r) {\n var a = n((i = jn(i)).r, (r = jn(r)).r), s = n(i.g, r.g), l = n(i.b, r.b), u = cr(i.opacity, r.opacity);\n return function(c) {\n return i.r = a(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + \"\";\n };\n }\n return o.gamma = e, o;\n}(1);\nfunction Re(e, t) {\n return e = +e, t = +t, function(n) {\n return e * (1 - n) + t * n;\n };\n}\nvar Qn = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, On = new RegExp(Qn.source, \"g\");\nfunction Cu(e) {\n return function() {\n return e;\n };\n}\nfunction Mu(e) {\n return function(t) {\n return e(t) + \"\";\n };\n}\nfunction $u(e, t) {\n var n = Qn.lastIndex = On.lastIndex = 0, o, i, r, a = -1, s = [], l = [];\n for (e = e + \"\", t = t + \"\"; (o = Qn.exec(e)) && (i = On.exec(t)); )\n (r = i.index) > n && (r = t.slice(n, r), s[a] ? s[a] += r : s[++a] = r), (o = o[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, l.push({ i: a, x: Re(o, i) })), n = On.lastIndex;\n return n < t.length && (r = t.slice(n), s[a] ? s[a] += r : s[++a] = r), s.length < 2 ? l[0] ? Mu(l[0].x) : Cu(t) : (t = l.length, function(u) {\n for (var c = 0, v; c < t; ++c)\n s[(v = l[c]).i] = v.x(u);\n return s.join(\"\");\n });\n}\nvar ii = 180 / Math.PI, Jn = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction dr(e, t, n, o, i, r) {\n var a, s, l;\n return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * o) && (n -= e * l, o -= t * l), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, l /= s), e * o < t * n && (e = -e, t = -t, l = -l, a = -a), {\n translateX: i,\n translateY: r,\n rotate: Math.atan2(t, e) * ii,\n skewX: Math.atan(l) * ii,\n scaleX: a,\n scaleY: s\n };\n}\nvar Bt;\nfunction ku(e) {\n const t = new (typeof DOMMatrix == \"function\" ? DOMMatrix : WebKitCSSMatrix)(e + \"\");\n return t.isIdentity ? Jn : dr(t.a, t.b, t.c, t.d, t.e, t.f);\n}\nfunction Ou(e) {\n return e == null || (Bt || (Bt = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\")), Bt.setAttribute(\"transform\", e), !(e = Bt.transform.baseVal.consolidate())) ? Jn : (e = e.matrix, dr(e.a, e.b, e.c, e.d, e.e, e.f));\n}\nfunction fr(e, t, n, o) {\n function i(u) {\n return u.length ? u.pop() + \" \" : \"\";\n }\n function r(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(\"translate(\", null, t, null, n);\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v || g) && x.push(\"translate(\" + v + t + g + n);\n }\n function a(u, c, v, g) {\n u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), g.push({ i: v.push(i(v) + \"rotate(\", null, o) - 2, x: Re(u, c) })) : c && v.push(i(v) + \"rotate(\" + c + o);\n }\n function s(u, c, v, g) {\n u !== c ? g.push({ i: v.push(i(v) + \"skewX(\", null, o) - 2, x: Re(u, c) }) : c && v.push(i(v) + \"skewX(\" + c + o);\n }\n function l(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(i(x) + \"scale(\", null, \",\", null, \")\");\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v !== 1 || g !== 1) && x.push(i(x) + \"scale(\" + v + \",\" + g + \")\");\n }\n return function(u, c) {\n var v = [], g = [];\n return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, v, g), a(u.rotate, c.rotate, v, g), s(u.skewX, c.skewX, v, g), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, v, g), u = c = null, function(x) {\n for (var h = -1, d = g.length, w; ++h < d; )\n v[(w = g[h]).i] = w.x(x);\n return v.join(\"\");\n };\n };\n}\nvar Tu = fr(ku, \"px, \", \"px)\", \"deg)\"), Iu = fr(Ou, \", \", \")\", \")\"), Pu = 1e-12;\nfunction ri(e) {\n return ((e = Math.exp(e)) + 1 / e) / 2;\n}\nfunction Du(e) {\n return ((e = Math.exp(e)) - 1 / e) / 2;\n}\nfunction zu(e) {\n return ((e = Math.exp(2 * e)) - 1) / (e + 1);\n}\nconst Au = function e(t, n, o) {\n function i(r, a) {\n var s = r[0], l = r[1], u = r[2], c = a[0], v = a[1], g = a[2], x = c - s, h = v - l, d = x * x + h * h, w, y;\n if (d < Pu)\n y = Math.log(g / u) / t, w = function(_) {\n return [\n s + _ * x,\n l + _ * h,\n u * Math.exp(t * _ * y)\n ];\n };\n else {\n var S = Math.sqrt(d), V = (g * g - u * u + o * d) / (2 * u * n * S), p = (g * g - u * u - o * d) / (2 * g * n * S), N = Math.log(Math.sqrt(V * V + 1) - V), T = Math.log(Math.sqrt(p * p + 1) - p);\n y = (T - N) / t, w = function(_) {\n var P = _ * y, R = ri(N), $ = u / (n * S) * (R * zu(t * P + N) - Du(N));\n return [\n s + $ * x,\n l + $ * h,\n u * R / ri(t * P + N)\n ];\n };\n }\n return w.duration = y * 1e3 * t / Math.SQRT2, w;\n }\n return i.rho = function(r) {\n var a = Math.max(1e-3, +r), s = a * a, l = s * s;\n return e(a, s, l);\n }, i;\n}(Math.SQRT2, 2, 4);\nvar ht = 0, mt = 0, gt = 0, hr = 1e3, Jt, pt, en = 0, Je = 0, wn = 0, Ct = typeof performance == \"object\" && performance.now ? performance : Date, gr = typeof window == \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {\n setTimeout(e, 17);\n};\nfunction xo() {\n return Je || (gr(Bu), Je = Ct.now() + wn);\n}\nfunction Bu() {\n Je = 0;\n}\nfunction tn() {\n this._call = this._time = this._next = null;\n}\ntn.prototype = vr.prototype = {\n constructor: tn,\n restart: function(e, t, n) {\n if (typeof e != \"function\")\n throw new TypeError(\"callback is not a function\");\n n = (n == null ? xo() : +n) + (t == null ? 0 : +t), !this._next && pt !== this && (pt ? pt._next = this : Jt = this, pt = this), this._call = e, this._time = n, eo();\n },\n stop: function() {\n this._call && (this._call = null, this._time = 1 / 0, eo());\n }\n};\nfunction vr(e, t, n) {\n var o = new tn();\n return o.restart(e, t, n), o;\n}\nfunction Ru() {\n xo(), ++ht;\n for (var e = Jt, t; e; )\n (t = Je - e._time) >= 0 && e._call.call(void 0, t), e = e._next;\n --ht;\n}\nfunction ai() {\n Je = (en = Ct.now()) + wn, ht = mt = 0;\n try {\n Ru();\n } finally {\n ht = 0, Hu(), Je = 0;\n }\n}\nfunction Vu() {\n var e = Ct.now(), t = e - en;\n t > hr && (wn -= t, en = e);\n}\nfunction Hu() {\n for (var e, t = Jt, n, o = 1 / 0; t; )\n t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Jt = n);\n pt = e, eo(o);\n}\nfunction eo(e) {\n if (!ht) {\n mt && (mt = clearTimeout(mt));\n var t = e - Je;\n t > 24 ? (e < 1 / 0 && (mt = setTimeout(ai, e - Ct.now() - wn)), gt && (gt = clearInterval(gt))) : (gt || (en = Ct.now(), gt = setInterval(Vu, hr)), ht = 1, gr(ai));\n }\n}\nfunction si(e, t, n) {\n var o = new tn();\n return t = t == null ? 0 : +t, o.restart((i) => {\n o.stop(), e(i + t);\n }, t, n), o;\n}\nvar Lu = fn(\"start\", \"end\", \"cancel\", \"interrupt\"), Gu = [], mr = 0, li = 1, to = 2, Lt = 3, ui = 4, no = 5, Gt = 6;\nfunction bn(e, t, n, o, i, r) {\n var a = e.__transition;\n if (!a)\n e.__transition = {};\n else if (n in a)\n return;\n Fu(e, n, {\n name: t,\n index: o,\n // For context during callback.\n group: i,\n // For context during callback.\n on: Lu,\n tween: Gu,\n time: r.time,\n delay: r.delay,\n duration: r.duration,\n ease: r.ease,\n timer: null,\n state: mr\n });\n}\nfunction _o(e, t) {\n var n = Se(e, t);\n if (n.state > mr)\n throw new Error(\"too late; already scheduled\");\n return n;\n}\nfunction ke(e, t) {\n var n = Se(e, t);\n if (n.state > Lt)\n throw new Error(\"too late; already running\");\n return n;\n}\nfunction Se(e, t) {\n var n = e.__transition;\n if (!n || !(n = n[t]))\n throw new Error(\"transition not found\");\n return n;\n}\nfunction Fu(e, t, n) {\n var o = e.__transition, i;\n o[t] = n, n.timer = vr(r, 0, n.time);\n function r(u) {\n n.state = li, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);\n }\n function a(u) {\n var c, v, g, x;\n if (n.state !== li)\n return l();\n for (c in o)\n if (x = o[c], x.name === n.name) {\n if (x.state === Lt)\n return si(a);\n x.state === ui ? (x.state = Gt, x.timer.stop(), x.on.call(\"interrupt\", e, e.__data__, x.index, x.group), delete o[c]) : +c < t && (x.state = Gt, x.timer.stop(), x.on.call(\"cancel\", e, e.__data__, x.index, x.group), delete o[c]);\n }\n if (si(function() {\n n.state === Lt && (n.state = ui, n.timer.restart(s, n.delay, n.time), s(u));\n }), n.state = to, n.on.call(\"start\", e, e.__data__, n.index, n.group), n.state === to) {\n for (n.state = Lt, i = new Array(g = n.tween.length), c = 0, v = -1; c < g; ++c)\n (x = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++v] = x);\n i.length = v + 1;\n }\n }\n function s(u) {\n for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(l), n.state = no, 1), v = -1, g = i.length; ++v < g; )\n i[v].call(e, c);\n n.state === no && (n.on.call(\"end\", e, e.__data__, n.index, n.group), l());\n }\n function l() {\n n.state = Gt, n.timer.stop(), delete o[t];\n for (var u in o)\n return;\n delete e.__transition;\n }\n}\nfunction Ft(e, t) {\n var n = e.__transition, o, i, r = !0, a;\n if (n) {\n t = t == null ? null : t + \"\";\n for (a in n) {\n if ((o = n[a]).name !== t) {\n r = !1;\n continue;\n }\n i = o.state > to && o.state < no, o.state = Gt, o.timer.stop(), o.on.call(i ? \"interrupt\" : \"cancel\", e, e.__data__, o.index, o.group), delete n[a];\n }\n r && delete e.__transition;\n }\n}\nfunction Yu(e) {\n return this.each(function() {\n Ft(this, e);\n });\n}\nfunction Xu(e, t) {\n var n, o;\n return function() {\n var i = ke(this, e), r = i.tween;\n if (r !== n) {\n o = n = r;\n for (var a = 0, s = o.length; a < s; ++a)\n if (o[a].name === t) {\n o = o.slice(), o.splice(a, 1);\n break;\n }\n }\n i.tween = o;\n };\n}\nfunction Zu(e, t, n) {\n var o, i;\n if (typeof n != \"function\")\n throw new Error();\n return function() {\n var r = ke(this, e), a = r.tween;\n if (a !== o) {\n i = (o = a).slice();\n for (var s = { name: t, value: n }, l = 0, u = i.length; l < u; ++l)\n if (i[l].name === t) {\n i[l] = s;\n break;\n }\n l === u && i.push(s);\n }\n r.tween = i;\n };\n}\nfunction Uu(e, t) {\n var n = this._id;\n if (e += \"\", arguments.length < 2) {\n for (var o = Se(this.node(), n).tween, i = 0, r = o.length, a; i < r; ++i)\n if ((a = o[i]).name === e)\n return a.value;\n return null;\n }\n return this.each((t == null ? Xu : Zu)(n, e, t));\n}\nfunction wo(e, t, n) {\n var o = e._id;\n return e.each(function() {\n var i = ke(this, o);\n (i.value || (i.value = {}))[t] = n.apply(this, arguments);\n }), function(i) {\n return Se(i, o).value[t];\n };\n}\nfunction pr(e, t) {\n var n;\n return (typeof t == \"number\" ? Re : t instanceof Nt ? oi : (n = Nt(t)) ? (t = n, oi) : $u)(e, t);\n}\nfunction Wu(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ku(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction qu(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttribute(e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction ju(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttributeNS(e.space, e.local);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction Qu(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttribute(e) : (a = this.getAttribute(e), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction Ju(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttributeNS(e.space, e.local) : (a = this.getAttributeNS(e.space, e.local), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction ec(e, t) {\n var n = hn(e), o = n === \"transform\" ? Iu : pr;\n return this.attrTween(e, typeof t == \"function\" ? (n.local ? Ju : Qu)(n, o, wo(this, \"attr.\" + e, t)) : t == null ? (n.local ? Ku : Wu)(n) : (n.local ? ju : qu)(n, o, t));\n}\nfunction tc(e, t) {\n return function(n) {\n this.setAttribute(e, t.call(this, n));\n };\n}\nfunction nc(e, t) {\n return function(n) {\n this.setAttributeNS(e.space, e.local, t.call(this, n));\n };\n}\nfunction oc(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && nc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction ic(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && tc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction rc(e, t) {\n var n = \"attr.\" + e;\n if (arguments.length < 2)\n return (n = this.tween(n)) && n._value;\n if (t == null)\n return this.tween(n, null);\n if (typeof t != \"function\")\n throw new Error();\n var o = hn(e);\n return this.tween(n, (o.local ? oc : ic)(o, t));\n}\nfunction ac(e, t) {\n return function() {\n _o(this, e).delay = +t.apply(this, arguments);\n };\n}\nfunction sc(e, t) {\n return t = +t, function() {\n _o(this, e).delay = t;\n };\n}\nfunction lc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? ac : sc)(t, e)) : Se(this.node(), t).delay;\n}\nfunction uc(e, t) {\n return function() {\n ke(this, e).duration = +t.apply(this, arguments);\n };\n}\nfunction cc(e, t) {\n return t = +t, function() {\n ke(this, e).duration = t;\n };\n}\nfunction dc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? uc : cc)(t, e)) : Se(this.node(), t).duration;\n}\nfunction fc(e, t) {\n if (typeof t != \"function\")\n throw new Error();\n return function() {\n ke(this, e).ease = t;\n };\n}\nfunction hc(e) {\n var t = this._id;\n return arguments.length ? this.each(fc(t, e)) : Se(this.node(), t).ease;\n}\nfunction gc(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n if (typeof n != \"function\")\n throw new Error();\n ke(this, e).ease = n;\n };\n}\nfunction vc(e) {\n if (typeof e != \"function\")\n throw new Error();\n return this.each(gc(this._id, e));\n}\nfunction mc(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new Be(o, this._parents, this._name, this._id);\n}\nfunction pc(e) {\n if (e._id !== this._id)\n throw new Error();\n for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), a = new Array(o), s = 0; s < r; ++s)\n for (var l = t[s], u = n[s], c = l.length, v = a[s] = new Array(c), g, x = 0; x < c; ++x)\n (g = l[x] || u[x]) && (v[x] = g);\n for (; s < o; ++s)\n a[s] = t[s];\n return new Be(a, this._parents, this._name, this._id);\n}\nfunction yc(e) {\n return (e + \"\").trim().split(/^|\\s+/).every(function(t) {\n var n = t.indexOf(\".\");\n return n >= 0 && (t = t.slice(0, n)), !t || t === \"start\";\n });\n}\nfunction xc(e, t, n) {\n var o, i, r = yc(t) ? _o : ke;\n return function() {\n var a = r(this, e), s = a.on;\n s !== o && (i = (o = s).copy()).on(t, n), a.on = i;\n };\n}\nfunction _c(e, t) {\n var n = this._id;\n return arguments.length < 2 ? Se(this.node(), n).on.on(e) : this.each(xc(n, e, t));\n}\nfunction wc(e) {\n return function() {\n var t = this.parentNode;\n for (var n in this.__transition)\n if (+n !== e)\n return;\n t && t.removeChild(this);\n };\n}\nfunction bc() {\n return this.on(\"end.remove\", wc(this._id));\n}\nfunction Ec(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = vo(e));\n for (var o = this._groups, i = o.length, r = new Array(i), a = 0; a < i; ++a)\n for (var s = o[a], l = s.length, u = r[a] = new Array(l), c, v, g = 0; g < l; ++g)\n (c = s[g]) && (v = e.call(c, c.__data__, g, s)) && (\"__data__\" in c && (v.__data__ = c.__data__), u[g] = v, bn(u[g], t, n, g, u, Se(c, n)));\n return new Be(r, this._parents, t, n);\n}\nfunction Sc(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = Ri(e));\n for (var o = this._groups, i = o.length, r = [], a = [], s = 0; s < i; ++s)\n for (var l = o[s], u = l.length, c, v = 0; v < u; ++v)\n if (c = l[v]) {\n for (var g = e.call(c, c.__data__, v, l), x, h = Se(c, n), d = 0, w = g.length; d < w; ++d)\n (x = g[d]) && bn(x, t, n, d, g, h);\n r.push(g), a.push(c);\n }\n return new Be(r, a, t, n);\n}\nvar Nc = $t.prototype.constructor;\nfunction Cc() {\n return new Nc(this._groups, this._parents);\n}\nfunction Mc(e, t) {\n var n, o, i;\n return function() {\n var r = ft(this, e), a = (this.style.removeProperty(e), ft(this, e));\n return r === a ? null : r === n && a === o ? i : i = t(n = r, o = a);\n };\n}\nfunction yr(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction $c(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = ft(this, e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction kc(e, t, n) {\n var o, i, r;\n return function() {\n var a = ft(this, e), s = n(this), l = s + \"\";\n return s == null && (l = s = (this.style.removeProperty(e), ft(this, e))), a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s));\n };\n}\nfunction Oc(e, t) {\n var n, o, i, r = \"style.\" + t, a = \"end.\" + r, s;\n return function() {\n var l = ke(this, e), u = l.on, c = l.value[r] == null ? s || (s = yr(t)) : void 0;\n (u !== n || i !== c) && (o = (n = u).copy()).on(a, i = c), l.on = o;\n };\n}\nfunction Tc(e, t, n) {\n var o = (e += \"\") == \"transform\" ? Tu : pr;\n return t == null ? this.styleTween(e, Mc(e, o)).on(\"end.style.\" + e, yr(e)) : typeof t == \"function\" ? this.styleTween(e, kc(e, o, wo(this, \"style.\" + e, t))).each(Oc(this._id, e)) : this.styleTween(e, $c(e, o, t), n).on(\"end.style.\" + e, null);\n}\nfunction Ic(e, t, n) {\n return function(o) {\n this.style.setProperty(e, t.call(this, o), n);\n };\n}\nfunction Pc(e, t, n) {\n var o, i;\n function r() {\n var a = t.apply(this, arguments);\n return a !== i && (o = (i = a) && Ic(e, a, n)), o;\n }\n return r._value = t, r;\n}\nfunction Dc(e, t, n) {\n var o = \"style.\" + (e += \"\");\n if (arguments.length < 2)\n return (o = this.tween(o)) && o._value;\n if (t == null)\n return this.tween(o, null);\n if (typeof t != \"function\")\n throw new Error();\n return this.tween(o, Pc(e, t, n ?? \"\"));\n}\nfunction zc(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Ac(e) {\n return function() {\n var t = e(this);\n this.textContent = t ?? \"\";\n };\n}\nfunction Bc(e) {\n return this.tween(\"text\", typeof e == \"function\" ? Ac(wo(this, \"text\", e)) : zc(e == null ? \"\" : e + \"\"));\n}\nfunction Rc(e) {\n return function(t) {\n this.textContent = e.call(this, t);\n };\n}\nfunction Vc(e) {\n var t, n;\n function o() {\n var i = e.apply(this, arguments);\n return i !== n && (t = (n = i) && Rc(i)), t;\n }\n return o._value = e, o;\n}\nfunction Hc(e) {\n var t = \"text\";\n if (arguments.length < 1)\n return (t = this.tween(t)) && t._value;\n if (e == null)\n return this.tween(t, null);\n if (typeof e != \"function\")\n throw new Error();\n return this.tween(t, Vc(e));\n}\nfunction Lc() {\n for (var e = this._name, t = this._id, n = xr(), o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n if (l = a[u]) {\n var c = Se(l, t);\n bn(l, e, n, u, a, {\n time: c.time + c.delay + c.duration,\n delay: 0,\n duration: c.duration,\n ease: c.ease\n });\n }\n return new Be(o, this._parents, e, n);\n}\nfunction Gc() {\n var e, t, n = this, o = n._id, i = n.size();\n return new Promise(function(r, a) {\n var s = { value: a }, l = { value: function() {\n --i === 0 && r();\n } };\n n.each(function() {\n var u = ke(this, o), c = u.on;\n c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(l)), u.on = t;\n }), i === 0 && r();\n });\n}\nvar Fc = 0;\nfunction Be(e, t, n, o) {\n this._groups = e, this._parents = t, this._name = n, this._id = o;\n}\nfunction xr() {\n return ++Fc;\n}\nvar Oe = $t.prototype;\nBe.prototype = {\n constructor: Be,\n select: Ec,\n selectAll: Sc,\n selectChild: Oe.selectChild,\n selectChildren: Oe.selectChildren,\n filter: mc,\n merge: pc,\n selection: Cc,\n transition: Lc,\n call: Oe.call,\n nodes: Oe.nodes,\n node: Oe.node,\n size: Oe.size,\n empty: Oe.empty,\n each: Oe.each,\n on: _c,\n attr: ec,\n attrTween: rc,\n style: Tc,\n styleTween: Dc,\n text: Bc,\n textTween: Hc,\n remove: bc,\n tween: Uu,\n delay: lc,\n duration: dc,\n ease: hc,\n easeVarying: vc,\n end: Gc,\n [Symbol.iterator]: Oe[Symbol.iterator]\n};\nfunction Yc(e) {\n return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;\n}\nvar Xc = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: Yc\n};\nfunction Zc(e, t) {\n for (var n; !(n = e.__transition) || !(n = n[t]); )\n if (!(e = e.parentNode))\n throw new Error(`transition ${t} not found`);\n return n;\n}\nfunction Uc(e) {\n var t, n;\n e instanceof Be ? (t = e._id, e = e._name) : (t = xr(), (n = Xc).time = xo(), e = e == null ? null : e + \"\");\n for (var o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && bn(l, e, t, u, a, n || Zc(l, t));\n return new Be(o, this._parents, e, t);\n}\n$t.prototype.interrupt = Yu;\n$t.prototype.transition = Uc;\nconst Rt = (e) => () => e;\nfunction Wc(e, {\n sourceEvent: t,\n target: n,\n transform: o,\n dispatch: i\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n target: { value: n, enumerable: !0, configurable: !0 },\n transform: { value: o, enumerable: !0, configurable: !0 },\n _: { value: i }\n });\n}\nfunction De(e, t, n) {\n this.k = e, this.x = t, this.y = n;\n}\nDe.prototype = {\n constructor: De,\n scale: function(e) {\n return e === 1 ? this : new De(this.k * e, this.x, this.y);\n },\n translate: function(e, t) {\n return e === 0 & t === 0 ? this : new De(this.k, this.x + this.k * e, this.y + this.k * t);\n },\n apply: function(e) {\n return [e[0] * this.k + this.x, e[1] * this.k + this.y];\n },\n applyX: function(e) {\n return e * this.k + this.x;\n },\n applyY: function(e) {\n return e * this.k + this.y;\n },\n invert: function(e) {\n return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];\n },\n invertX: function(e) {\n return (e - this.x) / this.k;\n },\n invertY: function(e) {\n return (e - this.y) / this.k;\n },\n rescaleX: function(e) {\n return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));\n },\n rescaleY: function(e) {\n return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar et = new De(1, 0, 0);\nDe.prototype;\nfunction Tn(e) {\n e.stopImmediatePropagation();\n}\nfunction vt(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Kc(e) {\n return (!e.ctrlKey || e.type === \"wheel\") && !e.button;\n}\nfunction qc() {\n var e = this;\n return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute(\"viewBox\") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction ci() {\n return this.__zoom || et;\n}\nfunction jc(e) {\n return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);\n}\nfunction Qc() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Jc(e, t, n) {\n var o = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], r = e.invertY(t[0][1]) - n[0][1], a = e.invertY(t[1][1]) - n[1][1];\n return e.translate(\n i > o ? (o + i) / 2 : Math.min(0, o) || Math.max(0, i),\n a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a)\n );\n}\nfunction ed() {\n var e = Kc, t = qc, n = Jc, o = jc, i = Qc, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Au, u = fn(\"start\", \"zoom\", \"end\"), c, v, g, x = 500, h = 150, d = 0, w = 10;\n function y(m) {\n m.property(\"__zoom\", ci).on(\"wheel.zoom\", P, { passive: !1 }).on(\"mousedown.zoom\", R).on(\"dblclick.zoom\", $).filter(i).on(\"touchstart.zoom\", D).on(\"touchmove.zoom\", Q).on(\"touchend.zoom touchcancel.zoom\", ee).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n y.transform = function(m, A, E, G) {\n var Z = m.selection ? m.selection() : m;\n Z.property(\"__zoom\", ci), m !== Z ? N(m, A, E, G) : Z.interrupt().each(function() {\n T(this, arguments).event(G).start().zoom(null, typeof A == \"function\" ? A.apply(this, arguments) : A).end();\n });\n }, y.scaleBy = function(m, A, E, G) {\n y.scaleTo(m, function() {\n var Z = this.__zoom.k, K = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return Z * K;\n }, E, G);\n }, y.scaleTo = function(m, A, E, G) {\n y.transform(m, function() {\n var Z = t.apply(this, arguments), K = this.__zoom, z = E == null ? p(Z) : typeof E == \"function\" ? E.apply(this, arguments) : E, W = K.invert(z), B = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return n(V(S(K, B), z, W), Z, a);\n }, E, G);\n }, y.translateBy = function(m, A, E, G) {\n y.transform(m, function() {\n return n(this.__zoom.translate(\n typeof A == \"function\" ? A.apply(this, arguments) : A,\n typeof E == \"function\" ? E.apply(this, arguments) : E\n ), t.apply(this, arguments), a);\n }, null, G);\n }, y.translateTo = function(m, A, E, G, Z) {\n y.transform(m, function() {\n var K = t.apply(this, arguments), z = this.__zoom, W = G == null ? p(K) : typeof G == \"function\" ? G.apply(this, arguments) : G;\n return n(et.translate(W[0], W[1]).scale(z.k).translate(\n typeof A == \"function\" ? -A.apply(this, arguments) : -A,\n typeof E == \"function\" ? -E.apply(this, arguments) : -E\n ), K, a);\n }, G, Z);\n };\n function S(m, A) {\n return A = Math.max(r[0], Math.min(r[1], A)), A === m.k ? m : new De(A, m.x, m.y);\n }\n function V(m, A, E) {\n var G = A[0] - E[0] * m.k, Z = A[1] - E[1] * m.k;\n return G === m.x && Z === m.y ? m : new De(m.k, G, Z);\n }\n function p(m) {\n return [(+m[0][0] + +m[1][0]) / 2, (+m[0][1] + +m[1][1]) / 2];\n }\n function N(m, A, E, G) {\n m.on(\"start.zoom\", function() {\n T(this, arguments).event(G).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n T(this, arguments).event(G).end();\n }).tween(\"zoom\", function() {\n var Z = this, K = arguments, z = T(Z, K).event(G), W = t.apply(Z, K), B = E == null ? p(W) : typeof E == \"function\" ? E.apply(Z, K) : E, q = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), te = Z.__zoom, re = typeof A == \"function\" ? A.apply(Z, K) : A, k = l(te.invert(B).concat(q / te.k), re.invert(B).concat(q / re.k));\n return function(H) {\n if (H === 1)\n H = re;\n else {\n var f = k(H), b = q / f[2];\n H = new De(b, B[0] - f[0] * b, B[1] - f[1] * b);\n }\n z.zoom(null, H);\n };\n });\n }\n function T(m, A, E) {\n return !E && m.__zooming || new _(m, A);\n }\n function _(m, A) {\n this.that = m, this.args = A, this.active = 0, this.sourceEvent = null, this.extent = t.apply(m, A), this.taps = 0;\n }\n _.prototype = {\n event: function(m) {\n return m && (this.sourceEvent = m), this;\n },\n start: function() {\n return ++this.active === 1 && (this.that.__zooming = this, this.emit(\"start\")), this;\n },\n zoom: function(m, A) {\n return this.mouse && m !== \"mouse\" && (this.mouse[1] = A.invert(this.mouse[0])), this.touch0 && m !== \"touch\" && (this.touch0[1] = A.invert(this.touch0[0])), this.touch1 && m !== \"touch\" && (this.touch1[1] = A.invert(this.touch1[0])), this.that.__zoom = A, this.emit(\"zoom\"), this;\n },\n end: function() {\n return --this.active === 0 && (delete this.that.__zooming, this.emit(\"end\")), this;\n },\n emit: function(m) {\n var A = we(this.that).datum();\n u.call(\n m,\n this.that,\n new Wc(m, {\n sourceEvent: this.sourceEvent,\n target: y,\n type: m,\n transform: this.that.__zoom,\n dispatch: u\n }),\n A\n );\n }\n };\n function P(m, ...A) {\n if (!e.apply(this, arguments))\n return;\n var E = T(this, A).event(m), G = this.__zoom, Z = Math.max(r[0], Math.min(r[1], G.k * Math.pow(2, o.apply(this, arguments)))), K = Ne(m);\n if (E.wheel)\n (E.mouse[0][0] !== K[0] || E.mouse[0][1] !== K[1]) && (E.mouse[1] = G.invert(E.mouse[0] = K)), clearTimeout(E.wheel);\n else {\n if (G.k === Z)\n return;\n E.mouse = [K, G.invert(K)], Ft(this), E.start();\n }\n vt(m), E.wheel = setTimeout(z, h), E.zoom(\"mouse\", n(V(S(G, Z), E.mouse[0], E.mouse[1]), E.extent, a));\n function z() {\n E.wheel = null, E.end();\n }\n }\n function R(m, ...A) {\n if (g || !e.apply(this, arguments))\n return;\n var E = m.currentTarget, G = T(this, A, !0).event(m), Z = we(m.view).on(\"mousemove.zoom\", B, !0).on(\"mouseup.zoom\", q, !0), K = Ne(m, E), z = m.clientX, W = m.clientY;\n Ki(m.view), Tn(m), G.mouse = [K, this.__zoom.invert(K)], Ft(this), G.start();\n function B(te) {\n if (vt(te), !G.moved) {\n var re = te.clientX - z, k = te.clientY - W;\n G.moved = re * re + k * k > d;\n }\n G.event(te).zoom(\"mouse\", n(V(G.that.__zoom, G.mouse[0] = Ne(te, E), G.mouse[1]), G.extent, a));\n }\n function q(te) {\n Z.on(\"mousemove.zoom mouseup.zoom\", null), qi(te.view, G.moved), vt(te), G.event(te).end();\n }\n }\n function $(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = this.__zoom, G = Ne(m.changedTouches ? m.changedTouches[0] : m, this), Z = E.invert(G), K = E.k * (m.shiftKey ? 0.5 : 2), z = n(V(S(E, K), G, Z), t.apply(this, A), a);\n vt(m), s > 0 ? we(this).transition().duration(s).call(N, z, G, m) : we(this).call(y.transform, z, G, m);\n }\n }\n function D(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = m.touches, G = E.length, Z = T(this, A, m.changedTouches.length === G).event(m), K, z, W, B;\n for (Tn(m), z = 0; z < G; ++z)\n W = E[z], B = Ne(W, this), B = [B, this.__zoom.invert(B), W.identifier], Z.touch0 ? !Z.touch1 && Z.touch0[2] !== B[2] && (Z.touch1 = B, Z.taps = 0) : (Z.touch0 = B, K = !0, Z.taps = 1 + !!c);\n c && (c = clearTimeout(c)), K && (Z.taps < 2 && (v = B[0], c = setTimeout(function() {\n c = null;\n }, x)), Ft(this), Z.start());\n }\n }\n function Q(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z, W, B;\n for (vt(m), K = 0; K < Z; ++K)\n z = G[K], W = Ne(z, this), E.touch0 && E.touch0[2] === z.identifier ? E.touch0[0] = W : E.touch1 && E.touch1[2] === z.identifier && (E.touch1[0] = W);\n if (z = E.that.__zoom, E.touch1) {\n var q = E.touch0[0], te = E.touch0[1], re = E.touch1[0], k = E.touch1[1], H = (H = re[0] - q[0]) * H + (H = re[1] - q[1]) * H, f = (f = k[0] - te[0]) * f + (f = k[1] - te[1]) * f;\n z = S(z, Math.sqrt(H / f)), W = [(q[0] + re[0]) / 2, (q[1] + re[1]) / 2], B = [(te[0] + k[0]) / 2, (te[1] + k[1]) / 2];\n } else if (E.touch0)\n W = E.touch0[0], B = E.touch0[1];\n else\n return;\n E.zoom(\"touch\", n(V(z, W, B), E.extent, a));\n }\n }\n function ee(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z;\n for (Tn(m), g && clearTimeout(g), g = setTimeout(function() {\n g = null;\n }, x), K = 0; K < Z; ++K)\n z = G[K], E.touch0 && E.touch0[2] === z.identifier ? delete E.touch0 : E.touch1 && E.touch1[2] === z.identifier && delete E.touch1;\n if (E.touch1 && !E.touch0 && (E.touch0 = E.touch1, delete E.touch1), E.touch0)\n E.touch0[1] = this.__zoom.invert(E.touch0[0]);\n else if (E.end(), E.taps === 2 && (z = Ne(z, this), Math.hypot(v[0] - z[0], v[1] - z[1]) < w)) {\n var W = we(this).on(\"dblclick.zoom\");\n W && W.apply(this, arguments);\n }\n }\n }\n return y.wheelDelta = function(m) {\n return arguments.length ? (o = typeof m == \"function\" ? m : Rt(+m), y) : o;\n }, y.filter = function(m) {\n return arguments.length ? (e = typeof m == \"function\" ? m : Rt(!!m), y) : e;\n }, y.touchable = function(m) {\n return arguments.length ? (i = typeof m == \"function\" ? m : Rt(!!m), y) : i;\n }, y.extent = function(m) {\n return arguments.length ? (t = typeof m == \"function\" ? m : Rt([[+m[0][0], +m[0][1]], [+m[1][0], +m[1][1]]]), y) : t;\n }, y.scaleExtent = function(m) {\n return arguments.length ? (r[0] = +m[0], r[1] = +m[1], y) : [r[0], r[1]];\n }, y.translateExtent = function(m) {\n return arguments.length ? (a[0][0] = +m[0][0], a[1][0] = +m[1][0], a[0][1] = +m[0][1], a[1][1] = +m[1][1], y) : [[a[0][0], a[0][1]], [a[1][0], a[1][1]]];\n }, y.constrain = function(m) {\n return arguments.length ? (n = m, y) : n;\n }, y.duration = function(m) {\n return arguments.length ? (s = +m, y) : s;\n }, y.interpolate = function(m) {\n return arguments.length ? (l = m, y) : l;\n }, y.on = function() {\n var m = u.on.apply(u, arguments);\n return m === u ? y : m;\n }, y.clickDistance = function(m) {\n return arguments.length ? (d = (m = +m) * m, y) : Math.sqrt(d);\n }, y.tapDistance = function(m) {\n return arguments.length ? (w = +m, y) : w;\n }, y;\n}\nconst In = 0.1;\nfunction Ge() {\n}\nconst td = {\n zoomIn: Ge,\n zoomOut: Ge,\n zoomTo: Ge,\n fitView: Ge,\n setCenter: Ge,\n fitBounds: Ge,\n project: (e) => e,\n setTransform: Ge,\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n initialized: !1\n}, nd = (e, t) => {\n const n = e, o = M(n, \"nodes\"), i = M(n, \"d3Zoom\"), r = M(n, \"d3Selection\"), a = M(n, \"dimensions\"), s = M(n, \"translateExtent\"), l = M(n, \"minZoom\"), u = M(n, \"maxZoom\"), c = M(n, \"viewport\"), v = M(n, \"snapToGrid\"), g = M(n, \"snapGrid\"), x = M(n, \"hooks\"), h = t, d = M(h, \"getNodes\"), w = ie(!1);\n x.value.nodesInitialized.on(() => {\n w.value = !0;\n });\n const y = J(() => !!i.value && !!r.value && !!a.value.width && !!a.value.height && w.value);\n function S(p, N) {\n r.value && i.value && i.value.scaleBy(Pn(r.value, N), p);\n }\n function V(p, N, T, _) {\n const { x: P, y: R } = so({ x: -p, y: -N }, s.value), $ = et.translate(-P, -R).scale(T);\n r.value && i.value && i.value.transform(Pn(r.value, _), $);\n }\n return J(() => y.value ? {\n initialized: !0,\n zoomIn: (p) => {\n S(1.2, p == null ? void 0 : p.duration);\n },\n zoomOut: (p) => {\n S(1 / 1.2, p == null ? void 0 : p.duration);\n },\n zoomTo: (p, N) => {\n r.value && i.value && i.value.scaleTo(Pn(r.value, N == null ? void 0 : N.duration), p);\n },\n setTransform: (p, N) => {\n V(p.x, p.y, p.zoom, N == null ? void 0 : N.duration);\n },\n getTransform: () => ({\n x: c.value.x,\n y: c.value.y,\n zoom: c.value.zoom\n }),\n fitView: (p = {\n padding: In,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!o.value.length)\n return;\n const N = (p.includeHiddenNodes ? o.value : d.value).filter(($) => {\n var ee;\n const D = $.initialized && $.dimensions.width && $.dimensions.height;\n let Q = !0;\n return (ee = p.nodes) != null && ee.length && (Q = p.nodes.includes($.id)), D && Q;\n }), T = co(N), { x: _, y: P, zoom: R } = Zt(\n T,\n a.value.width,\n a.value.height,\n p.minZoom ?? l.value,\n p.maxZoom ?? u.value,\n p.padding ?? In,\n p.offset\n );\n V(_, P, R, p == null ? void 0 : p.duration);\n },\n setCenter: (p, N, T) => {\n const _ = typeof (T == null ? void 0 : T.zoom) < \"u\" ? T.zoom : u.value, P = a.value.width / 2 - p * _, R = a.value.height / 2 - N * _;\n V(P, R, _, T == null ? void 0 : T.duration);\n },\n fitBounds: (p, N = { padding: In }) => {\n const { x: T, y: _, zoom: P } = Zt(\n p,\n a.value.width,\n a.value.height,\n l.value,\n u.value,\n N.padding\n );\n V(T, _, P, N == null ? void 0 : N.duration);\n },\n project: (p) => uo(p, c.value, v.value, g.value)\n } : td);\n};\nfunction Pn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Dn(e, t) {\n if (t) {\n const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height;\n if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) {\n let i = {};\n if (Ae(t.style) ? i = { ...t.style(t) } : t.style && (i = { ...t.style }), i.width = i.width ?? `${t.dimensions.width}px`, i.height = i.height ?? `${t.dimensions.height}px`, n > 0)\n if (Pe(i.width)) {\n const r = Number(i.width.replace(\"px\", \"\"));\n i.width = `${r + n}px`;\n } else\n i.width += n;\n if (o > 0)\n if (Pe(i.height)) {\n const r = Number(i.height.replace(\"px\", \"\"));\n i.height = `${r + o}px`;\n } else\n i.height += o;\n if (e.position.x < 0) {\n const r = Math.abs(e.position.x);\n if (t.position.x = t.position.x - r, Pe(i.width)) {\n const a = Number(i.width.replace(\"px\", \"\"));\n i.width = `${a + r}px`;\n } else\n i.width += r;\n e.position.x = 0;\n }\n if (e.position.y < 0) {\n const r = Math.abs(e.position.y);\n if (t.position.y = t.position.y - r, Pe(i.height)) {\n const a = Number(i.height.replace(\"px\", \"\"));\n i.height = `${a + r}px`;\n } else\n i.height += r;\n e.position.y = 0;\n }\n t.dimensions.width = Number(i.width.toString().replace(\"px\", \"\")), t.dimensions.height = Number(i.height.toString().replace(\"px\", \"\")), Ae(t.style) ? t.style = (r) => {\n const a = t.style;\n return {\n ...a(r),\n ...i\n };\n } : t.style = {\n ...t.style,\n ...i\n };\n }\n }\n}\nfunction nn(e, t) {\n e.filter((i) => i.type === \"add\" || i.type === \"remove\").forEach((i) => {\n if (i.type === \"add\")\n t.findIndex((a) => a.id === i.item.id) === -1 && t.push(i.item);\n else if (i.type === \"remove\") {\n const r = t.findIndex((a) => a.id === i.id);\n r !== -1 && t.splice(r, 1);\n }\n });\n const o = t.map((i) => i.id);\n return t.forEach((i) => {\n var a, s;\n const r = e.filter((l) => l.id === i.id);\n for (const l of r)\n switch (l.type) {\n case \"select\":\n i.selected = l.selected;\n break;\n case \"position\":\n if (nt(i) && (typeof l.position < \"u\" && (i.position = l.position), typeof l.dragging < \"u\" && (i.dragging = l.dragging), i.expandParent && i.parentNode)) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && Dn(i, u);\n }\n break;\n case \"dimensions\":\n if (nt(i)) {\n if (typeof l.dimensions < \"u\" && (i.dimensions = l.dimensions), typeof l.updateStyle < \"u\" && (i.style = {\n ...i.style || {},\n width: `${(a = l.dimensions) == null ? void 0 : a.width}px`,\n height: `${(s = l.dimensions) == null ? void 0 : s.height}px`\n }), typeof l.resizing < \"u\" && (i.resizing = l.resizing), i.expandParent && i.parentNode) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && (u.initialized ? Dn(i, u) : Ue(() => {\n Dn(i, u);\n }));\n }\n i.initialized || (i.initialized = !0);\n }\n break;\n }\n }), t;\n}\nfunction Vd(e, t) {\n return nn(e, t);\n}\nfunction Hd(e, t) {\n return nn(e, t);\n}\nfunction Te(e, t) {\n return {\n id: e,\n type: \"select\",\n selected: t\n };\n}\nfunction di(e) {\n return {\n item: e,\n type: \"add\"\n };\n}\nfunction zn(e) {\n return {\n id: e,\n type: \"remove\"\n };\n}\nfunction An(e, t) {\n return e.reduce(\n (n, o) => {\n let i = t.includes(o.id);\n ce(o.selectable) && !o.selectable && (i = !1);\n const r = nt(o) ? \"changedNodes\" : \"changedEdges\";\n return !o.selected && i ? n[r].push(Te(o.id, !0)) : o.selected && !i && n[r].push(Te(o.id, !1)), n;\n },\n { changedNodes: [], changedEdges: [] }\n );\n}\nfunction od(e, t, n, o) {\n let i = !1;\n const r = nd(e, t), a = (f) => {\n const b = f ?? n.value ?? [];\n e.hooks.updateNodeInternals.trigger(b);\n }, s = (f) => {\n if (f)\n return e.nodes && !n.value.length ? e.nodes.find((b) => b.id === f) : e.nodes[n.value.indexOf(f)];\n }, l = (f) => {\n if (f)\n return e.edges && !o.value.length ? e.edges.find((b) => b.id === f) : e.edges[o.value.indexOf(f)];\n }, u = (f, b, L) => {\n const I = [];\n f.forEach((F) => {\n var Y, ne;\n const U = {\n id: F.id,\n type: \"position\",\n dragging: L,\n from: F.from\n };\n if (b && (U.position = F.position, F.parentNode)) {\n const O = s(F.parentNode);\n U.position = {\n x: U.position.x - (((Y = O == null ? void 0 : O.computedPosition) == null ? void 0 : Y.x) ?? 0),\n y: U.position.y - (((ne = O == null ? void 0 : O.computedPosition) == null ? void 0 : ne.y) ?? 0)\n };\n }\n I.push(U);\n }), I != null && I.length && e.hooks.nodesChange.trigger(I);\n }, c = (f) => {\n var F;\n if (!e.vueFlowRef)\n return;\n const b = e.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!b)\n return;\n let L;\n if ((F = e.__experimentalFeatures) != null && F.nestedFlow) {\n let U = [b], Y = b, ne;\n for (; !ne && Y; )\n Y = Y.parentElement, ne = Y == null ? void 0 : Y.classList.contains(\"vue-flow__transformationpane\"), ne && (U = [Y, ...U]);\n U.forEach((O) => {\n const ae = window.getComputedStyle(O), { m22: me } = new window.DOMMatrixReadOnly(ae.transform);\n L ? L *= me : L = me;\n });\n } else {\n const U = window.getComputedStyle(b), { m22: Y } = new window.DOMMatrixReadOnly(U.transform);\n L = Y;\n }\n const I = f.reduce((U, Y) => {\n const ne = s(Y.id);\n if (ne) {\n const O = rn(Y.nodeElement);\n !!(O.width && O.height && (ne.dimensions.width !== O.width || ne.dimensions.height !== O.height || Y.forceUpdate)) && (ne.handleBounds.source = Lo(\".source\", Y.nodeElement, L), ne.handleBounds.target = Lo(\".target\", Y.nodeElement, L), ne.dimensions = O, ne.initialized = !0, U.push({\n id: ne.id,\n type: \"dimensions\",\n dimensions: O\n }));\n }\n return U;\n }, []);\n e.fitViewOnInit && !i && (ye(() => r.value.initialized).toBe(!0).then(() => {\n r.value.fitView();\n }), i = !0), I.length && e.hooks.nodesChange.trigger(I);\n }, v = (f, b) => {\n const L = f.map((U) => U.id);\n let I, F = [];\n if (e.multiSelectionActive)\n I = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, g = (f, b) => {\n const L = f.map((U) => U.id);\n let I = [], F;\n if (e.multiSelectionActive)\n F = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, x = (f, b) => {\n const L = f.filter(xt).map((Y) => Y.id), I = f.filter($e).map((Y) => Y.id);\n let { changedNodes: F, changedEdges: U } = An([...e.nodes, ...e.edges], [...L, ...I]);\n e.multiSelectionActive && (F = L.map((Y) => Te(Y, b)), U = I.map((Y) => Te(Y, b))), F.length && e.hooks.nodesChange.trigger(F), U.length && e.hooks.edgesChange.trigger(U);\n }, h = (f) => {\n v(f, !0);\n }, d = (f) => {\n g(f, !0);\n }, w = (f) => {\n x(f, !0);\n }, y = (f) => {\n if (!f.length)\n return v(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.nodesChange.trigger(L);\n }, S = (f) => {\n if (!f.length)\n return g(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.edgesChange.trigger(L);\n }, V = (f) => {\n if (!f || !f.length)\n return x([], !1);\n const { changedNodes: b, changedEdges: L } = f.reduce(\n (I, F) => {\n const U = Te(F.id, !1);\n return xt(F) ? I.changedNodes.push(U) : I.changedEdges.push(U), I;\n },\n { changedNodes: [], changedEdges: [] }\n );\n b.length && e.hooks.nodesChange.trigger(b), L.length && e.hooks.edgesChange.trigger(L);\n }, p = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([f, e.maxZoom]), e.minZoom = f;\n }, N = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([e.minZoom, f]), e.maxZoom = f;\n }, T = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.translateExtent(f), e.translateExtent = f;\n }, _ = (f) => {\n e.nodeExtent = f, a(n.value);\n }, P = (f) => {\n e.nodesDraggable = f, e.nodesConnectable = f, e.elementsSelectable = f;\n }, R = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f;\n !e.initialized && !b.length || (e.nodes = Do(b, e.nodes, s, e.hooks.error.trigger));\n }, $ = (f) => {\n const b = f instanceof Function ? f(e.edges) : f;\n if (!e.initialized && !b.length)\n return;\n const L = e.isValidConnection ? b.filter(\n (I) => e.isValidConnection(I, {\n edges: e.edges,\n sourceNode: s(I.source),\n targetNode: s(I.target)\n })\n ) : b;\n e.edges = L.reduce((I, F) => {\n const U = s(F.source), Y = s(F.target), ne = !U || typeof U > \"u\", O = !Y || typeof Y > \"u\";\n if (ne && O ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, F.id, F.source, F.target)) : (ne && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, F.id, F.source)), O && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, F.id, F.target))), ne || O)\n return I;\n const ae = l(F.id);\n return I.push({\n ...lo(F, Object.assign({}, ae, e.defaultEdgeOptions)),\n sourceNode: U,\n targetNode: Y\n }), I;\n }, []);\n }, D = (f) => {\n const b = f instanceof Function ? f([...e.nodes, ...e.edges]) : f;\n !e.initialized && !b.length || (R(b.filter(xt)), $(b.filter($e)));\n }, Q = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f, I = Do(b, e.nodes, s, e.hooks.error.trigger).map(di);\n I.length && e.hooks.nodesChange.trigger(I);\n }, ee = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, I = (e.isValidConnection ? b.filter(\n (F) => e.isValidConnection(F, {\n edges: e.edges,\n sourceNode: s(F.source),\n targetNode: s(F.target)\n })\n ) : b).reduce((F, U) => {\n const Y = pa(\n {\n ...U,\n ...e.defaultEdgeOptions\n },\n e.edges,\n e.hooks.error.trigger\n );\n if (Y) {\n const ne = s(Y.source), O = s(Y.target), ae = !ne || typeof ne > \"u\", me = !O || typeof O > \"u\";\n if (ae && me ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (ae && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, Y.id, Y.source)), me && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, Y.id, Y.target))), ae || me)\n return F;\n F.push(\n di({\n ...Y,\n sourceNode: ne,\n targetNode: O\n })\n );\n }\n return F;\n }, []);\n I.length && e.hooks.edgesChange.trigger(I);\n }, m = (f, b = !0) => {\n const L = f instanceof Function ? f(e.nodes) : f, I = [], F = [];\n L.forEach((U) => {\n const Y = typeof U == \"string\" ? s(U) : U;\n if (!(ce(Y.deletable) && !Y.deletable) && (I.push(zn(Y.id)), b)) {\n const ne = sn([Y], e.edges).filter((O) => ce(O.deletable) ? O.deletable : !0);\n F.push(...ne.map((O) => zn(O.id)));\n }\n }), F.length && e.hooks.edgesChange.trigger(F), I.length && e.hooks.nodesChange.trigger(I);\n }, A = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, L = [];\n b.forEach((I) => {\n const F = typeof I == \"string\" ? l(I) : I;\n ce(F.deletable) && !F.deletable || L.push(zn(typeof I == \"string\" ? I : I.id));\n }), e.hooks.edgesChange.trigger(L);\n }, E = (f, b, L = !0) => ya(f, b, e.edges, l, L, e.hooks.error.trigger), G = (f) => nn(f, e.nodes), Z = (f) => nn(f, e.edges), K = (f, b, L, I = !1) => {\n I ? e.connectionClickStartHandle = f : e.connectionStartHandle = f, e.connectionEndHandle = null, e.connectionStatus = null, b && (e.connectionPosition = b);\n }, z = (f, b = null, L = null) => {\n e.connectionStartHandle && (e.connectionPosition = f, e.connectionEndHandle = b, e.connectionStatus = L);\n }, W = (f, b) => {\n e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, b ? e.connectionClickStartHandle = null : e.connectionStartHandle = null;\n }, B = (f) => {\n const b = ha(f), L = b ? null : s(f.id);\n return !b && !L ? [null, null, b] : [b ? f : Io(L), L, b];\n }, q = (f, b = !0, L) => {\n const [I, F, U] = B(f);\n return I ? (L || e.nodes).filter((Y) => {\n if (!U && (Y.id === F.id || !Y.computedPosition))\n return !1;\n const ne = Io(Y), O = Fn(ne, I);\n return b && O > 0 || O >= Number(f.width) * Number(f.height);\n }) : [];\n }, te = (f, b, L = !0) => {\n const [I] = B(f);\n if (!I)\n return !1;\n const F = Fn(I, b);\n return L && F > 0 || F >= Number(f.width) * Number(f.height);\n }, re = (f) => {\n const { viewport: b, dimensions: L, d3Zoom: I, d3Selection: F, translateExtent: U } = e;\n if (!I || !F || !f.x && !f.y)\n return !1;\n const Y = et.translate(b.x + f.x, b.y + f.y).scale(b.zoom), ne = [\n [0, 0],\n [L.width, L.height]\n ], O = I.constrain()(Y, ne, U), ae = e.viewport.x !== O.x || e.viewport.y !== O.y || e.viewport.zoom !== O.k;\n return I.transform(F, O), ae;\n }, k = (f) => {\n const b = f instanceof Function ? f(e) : f, L = [\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"nodeExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n ], I = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n ce(b.defaultEdgeOptions) && (e.defaultEdgeOptions = b.defaultEdgeOptions);\n const F = b.modelValue || b.nodes || b.edges ? [] : void 0;\n F && (b.modelValue && F.push(...b.modelValue), b.nodes && F.push(...b.nodes), b.edges && F.push(...b.edges), D(F));\n const U = () => {\n ce(b.maxZoom) && N(b.maxZoom), ce(b.minZoom) && p(b.minZoom), ce(b.translateExtent) && T(b.translateExtent), ce(b.nodeExtent) && _(b.nodeExtent);\n };\n Object.keys(b).forEach((Y) => {\n const ne = Y, O = b[ne];\n ![...L, ...I].includes(ne) && ce(O) && (e[ne] = O);\n }), e.d3Zoom ? U() : ye(() => e.d3Zoom).not.toBeUndefined().then(U), e.initialized || (e.initialized = !0);\n };\n return {\n updateNodePositions: u,\n updateNodeDimensions: c,\n setElements: D,\n setNodes: R,\n setEdges: $,\n addNodes: Q,\n addEdges: ee,\n removeNodes: m,\n removeEdges: A,\n findNode: s,\n findEdge: l,\n updateEdge: E,\n applyEdgeChanges: Z,\n applyNodeChanges: G,\n addSelectedElements: w,\n addSelectedNodes: h,\n addSelectedEdges: d,\n setMinZoom: p,\n setMaxZoom: N,\n setTranslateExtent: T,\n setNodeExtent: _,\n removeSelectedElements: V,\n removeSelectedNodes: y,\n removeSelectedEdges: S,\n startConnection: K,\n updateConnection: z,\n endConnection: W,\n setInteractive: P,\n setState: k,\n getIntersectingNodes: q,\n isNodeIntersecting: te,\n panBy: re,\n fitView: async (f = { padding: 0.1 }) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitView(f);\n },\n zoomIn: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomIn(f);\n },\n zoomOut: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomOut(f);\n },\n zoomTo: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomTo(f, b);\n },\n setTransform: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setTransform(f, b);\n },\n getTransform: () => r.value.getTransform(),\n setCenter: async (f, b, L) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setCenter(f, b, L);\n },\n fitBounds: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitBounds(f, b);\n },\n project: (f) => r.value.project(f),\n toObject: () => JSON.parse(\n JSON.stringify({\n nodes: e.nodes.map((f) => {\n const {\n computedPosition: b,\n handleBounds: L,\n selected: I,\n dimensions: F,\n isParent: U,\n resizing: Y,\n dragging: ne,\n initialized: O,\n ...ae\n } = f;\n return ae;\n }),\n edges: e.edges.map((f) => {\n const { selected: b, sourceNode: L, targetNode: I, ...F } = f;\n return F;\n }),\n position: [e.viewport.x, e.viewport.y],\n zoom: e.viewport.zoom\n })\n ),\n updateNodeInternals: a,\n $reset: () => {\n const f = ar();\n if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) {\n const b = et.translate(f.defaultViewport.x ?? 0, f.defaultViewport.y ?? 0).scale(je(f.defaultViewport.zoom ?? 1, f.minZoom, f.maxZoom)), L = e.viewportRef.getBoundingClientRect(), I = [\n [0, 0],\n [L.width, L.height]\n ], F = e.d3Zoom.constrain()(b, I, f.translateExtent);\n e.d3Zoom.transform(e.d3Selection, F);\n }\n k(f);\n },\n $destroy: () => {\n }\n };\n}\nclass ot {\n constructor() {\n this.currentId = 0, this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n return ot.instance || (ot.instance = new ot()), ot.instance;\n }\n set(t, n) {\n return this.flows.set(t, n);\n }\n get(t) {\n return this.flows.get(t);\n }\n remove(t) {\n return this.flows.delete(t);\n }\n create(t, n) {\n const o = ar(n), i = kr(o), r = J(() => i.nodes.map((g) => g.id)), a = J(() => i.edges.map((g) => g.id)), s = cu(i, r, a), l = od(i, s, r, a), u = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n const h = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;\n u[h] = x.on;\n });\n const c = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n c[g] = x.trigger;\n }), l.setState(i);\n const v = {\n ...u,\n ...s,\n ...l,\n ...Or(i),\n emits: c,\n id: t,\n vueFlowVersion: \"1.19.4\",\n $destroy: () => {\n this.remove(t);\n }\n };\n return this.set(t, v), v;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nconst fe = (e) => {\n const t = ot.getInstance(), n = hi(), o = e == null ? void 0 : e.id, i = (n == null ? void 0 : n.vueFlowId) || o;\n let r, a = !1;\n if (n) {\n const s = He(zo, null);\n typeof s < \"u\" && s !== null && (r = s);\n }\n if (r || i && (r = t.get(i)), !r || r && o && o !== r.id) {\n const s = o ?? t.getId();\n r = t.create(s, e), n && (a = !0);\n } else\n e && r.setState(e);\n return n && (ut(zo, r), n.vueFlowId = r.id, a && Mt(() => {\n if (r) {\n const s = t.get(r.id);\n s ? s.$destroy() : wt(`No store instance found for id ${r.id} in storage.`);\n }\n })), r;\n};\nfunction id(e, t, n) {\n const o = Tr();\n return o.run(() => {\n [\n () => {\n o.run(() => {\n let h, d, w = !!(n.nodes.value.length || n.edges.value.length);\n h = tt([e.modelValue, () => {\n var y, S;\n return (S = (y = e.modelValue) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setElements(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],\n ([y, S]) => {\n var V;\n (V = e.modelValue) != null && V.value && Array.isArray(e.modelValue.value) && (h == null || h.pause(), e.modelValue.value = [...y, ...S], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.nodes.value.length;\n h = tt([e.nodes, () => {\n var y, S;\n return (S = (y = e.nodes) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setNodes(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, () => n.nodes.value.length],\n ([y]) => {\n var S;\n (S = e.nodes) != null && S.value && Array.isArray(e.nodes.value) && (h == null || h.pause(), e.nodes.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.edges.value.length;\n h = tt([e.edges, () => {\n var y, S;\n return (S = (y = e.edges) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setEdges(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.edges, () => n.edges.value.length],\n ([y]) => {\n var S;\n (S = e.edges) != null && S.value && Array.isArray(e.edges.value) && (h == null || h.pause(), e.edges.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.minZoom,\n () => {\n t.minZoom && ce(t.minZoom) && n.setMinZoom(t.minZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.maxZoom,\n () => {\n t.maxZoom && ce(t.maxZoom) && n.setMaxZoom(t.maxZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.translateExtent,\n () => {\n t.translateExtent && ce(t.translateExtent) && n.setTranslateExtent(t.translateExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.nodeExtent,\n () => {\n t.nodeExtent && ce(t.nodeExtent) && n.setNodeExtent(t.nodeExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.applyDefault,\n () => {\n ce(t.applyDefault) && (n.applyDefault.value = t.applyDefault);\n }\n ), de(\n n.applyDefault,\n (h, d, w) => {\n n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), w(() => {\n n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n o.run(() => {\n const h = async (d) => {\n let w = d;\n Ae(t.autoConnect) && (w = await t.autoConnect(d)), w !== !1 && n.addEdges([w]);\n };\n de(\n () => t.autoConnect,\n () => {\n ce(t.autoConnect) && (n.autoConnect.value = t.autoConnect);\n }\n ), de(\n n.autoConnect,\n (d, w, y) => {\n d ? n.onConnect(h) : n.hooks.value.connect.off(h), y(() => {\n n.hooks.value.connect.off(h);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n const h = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n Object.keys(t).forEach((d) => {\n if (!h.includes(d)) {\n const w = M(t, d), y = n[d];\n o.run(() => {\n de(\n w,\n (S) => {\n ce(S) && (y.value = S);\n },\n { flush: \"pre\" }\n );\n });\n }\n });\n }\n ].forEach((h) => h());\n }), () => o.stop();\n}\nfunction fi(e, t) {\n return {\n x: e.clientX - t.left,\n y: e.clientY - t.top\n };\n}\nconst rd = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n}, ad = /* @__PURE__ */ ge({\n ...rd,\n props: {\n isSelecting: { type: Boolean }\n },\n setup(e) {\n const {\n id: t,\n vueFlowRef: n,\n getNodes: o,\n getEdges: i,\n viewport: r,\n emits: a,\n userSelectionActive: s,\n removeSelectedElements: l,\n panOnDrag: u,\n userSelectionRect: c,\n elementsSelectable: v,\n nodesSelectionActive: g,\n addSelectedElements: x,\n getSelectedEdges: h,\n getSelectedNodes: d,\n removeNodes: w,\n removeEdges: y,\n selectionMode: S,\n deleteKeyCode: V,\n multiSelectionKeyCode: p,\n multiSelectionActive: N\n } = fe(), T = ie(null), _ = ie(0), P = ie(0), R = ie(), $ = J(() => v.value && (e.isSelecting || s.value));\n _t(V, (z) => {\n if (!z)\n return;\n const W = o.value.reduce((B, q) => ((!q.selected && q.parentNode && B.find((te) => te.id === q.parentNode) || q.selected) && B.push(q), B), []);\n (W || h.value) && (h.value.length > 0 && y(h.value), W.length > 0 && w(W), g.value = !1, l());\n }), _t(p, (z) => {\n N.value = z;\n });\n function D() {\n s.value = !1, c.value = null, _.value = 0, P.value = 0;\n }\n function Q(z) {\n z.target !== T.value || $.value || (a.paneClick(z), l(), g.value = !1);\n }\n function ee(z) {\n var W;\n if (z.target === T.value) {\n if (Array.isArray(u.value) && ((W = u.value) != null && W.includes(2))) {\n z.preventDefault();\n return;\n }\n a.paneContextMenu(z);\n }\n }\n function m(z) {\n z.target === T.value && a.paneScroll(z);\n }\n function A(z) {\n if (R.value = n.value.getBoundingClientRect(), !$.value || !v || !e.isSelecting || z.button !== 0 || z.target !== T.value || !R.value)\n return;\n const { x: W, y: B } = fi(z, R.value);\n l(), c.value = {\n width: 0,\n height: 0,\n startX: W,\n startY: B,\n x: W,\n y: B\n }, s.value = !0, a.selectionStart(z);\n }\n function E(z) {\n if (!$.value)\n return a.paneMouseMove(z);\n if (!e.isSelecting || !R.value || !c.value)\n return;\n s.value || (s.value = !0), g.value && (g.value = !1);\n const W = fi(z, R.value), B = c.value.startX ?? 0, q = c.value.startY ?? 0, te = {\n ...c.value,\n x: W.x < B ? W.x : B,\n y: W.y < q ? W.y : q,\n width: Math.abs(W.x - B),\n height: Math.abs(W.y - q)\n }, re = Ci(\n o.value,\n c.value,\n r.value,\n S.value === fo.Partial\n ), k = sn(re, i.value);\n _.value = re.length, P.value = k.length, c.value = te, x([...re, ...k]);\n }\n function G(z) {\n $.value && z.button === 0 && (!s.value && c.value && z.target === T.value && Q(z), g.value = _.value > 0, D(), a.selectionEnd(z));\n }\n function Z(z) {\n var W;\n if (!$.value)\n return a.paneMouseLeave(z);\n s.value && (g.value = _.value > 0, (W = a.selectionEnd) == null || W.call(a, z)), D();\n }\n function K(z) {\n $.value || a.paneMouseEnter(z);\n }\n return (z, W) => (oe(), se(\"div\", {\n ref_key: \"container\",\n ref: T,\n key: `pane-${C(t)}`,\n class: Ke([\"vue-flow__pane vue-flow__container\", { selection: e.isSelecting }]),\n onClick: Q,\n onContextmenu: ee,\n onWheelPassive: m,\n onMouseenter: K,\n onMousedown: A,\n onMousemove: E,\n onMouseup: G,\n onMouseleave: Z\n }, [\n xe(z.$slots, \"default\"),\n C(s) && C(c) ? (oe(), ze(au, { key: 0 })) : Ee(\"\", !0),\n C(g) && C(d).length ? (oe(), ze(iu, { key: 1 })) : Ee(\"\", !0)\n ], 34));\n }\n}), sd = { class: \"vue-flow__nodes vue-flow__container\" }, ld = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n}, ud = /* @__PURE__ */ ge({\n ...ld,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"nodesDraggable\"), i = M(n, \"nodesFocusable\"), r = M(n, \"elementsSelectable\"), a = M(n, \"nodesConnectable\"), s = M(n, \"getNodes\"), l = M(n, \"getNodesInitialized\"), u = M(n, \"getNodeTypes\"), c = M(n, \"updateNodeDimensions\"), v = M(n, \"emits\");\n let g = ie();\n ye(() => s.value.length > 0 && l.value.length === s.value.length).toBe(!0).then(() => {\n Ue(() => {\n v.value.nodesInitialized(l.value);\n });\n }), Ve(() => {\n g.value = new ResizeObserver((S) => {\n const V = S.map((p) => ({\n id: p.target.getAttribute(\"data-id\"),\n nodeElement: p.target,\n forceUpdate: !0\n }));\n c.value(V);\n });\n }), gi(() => {\n var S;\n return (S = g.value) == null ? void 0 : S.disconnect();\n });\n function x(S) {\n return typeof S > \"u\" ? o.value : S;\n }\n function h(S) {\n return typeof S > \"u\" ? r.value : S;\n }\n function d(S) {\n return typeof S > \"u\" ? a.value : S;\n }\n function w(S) {\n return typeof S > \"u\" ? i.value : S;\n }\n function y(S, V) {\n const p = S || \"default\";\n let N = V ?? u.value[p];\n const T = on();\n if (typeof N == \"string\" && T) {\n const P = Object.keys(T.appContext.components);\n P && P.includes(p) && (N = pi(p, !1));\n }\n if (typeof N != \"string\")\n return N;\n const _ = t == null ? void 0 : t[`node-${p}`];\n return _ || (v.value.error(new ve(he.NODE_TYPE_MISSING, N)), !1);\n }\n return (S, V) => (oe(), se(\"div\", sd, [\n C(g) ? (oe(!0), se(Ce, { key: 0 }, dt(C(s), (p) => (oe(), ze(C(Tl), {\n id: p.id,\n key: p.id,\n \"resize-observer\": C(g),\n type: y(p.type, p.template),\n name: p.type || \"default\",\n draggable: x(p.draggable),\n selectable: h(p.selectable),\n connectable: d(p.connectable),\n focusable: w(p.focusable),\n node: p\n }, null, 8, [\"id\", \"resize-observer\", \"type\", \"name\", \"draggable\", \"selectable\", \"connectable\", \"focusable\", \"node\"]))), 128)) : Ee(\"\", !0)\n ]));\n }\n}), cd = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"], dd = [\"stroke\", \"stroke-width\", \"fill\"], fd = [\"stroke\", \"stroke-width\"], hd = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n}, gd = /* @__PURE__ */ ge({\n ...hd,\n props: {\n id: null,\n type: null,\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(e) {\n return (t, n) => (oe(), se(\"marker\", {\n id: e.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${e.width}`,\n markerHeight: `${e.height}`,\n markerUnits: e.markerUnits,\n orient: e.orient\n }, [\n e.type === C(Yn).ArrowClosed ? (oe(), se(\"polyline\", {\n key: 0,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: e.color,\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 8, dd)) : Ee(\"\", !0),\n e.type === C(Yn).Arrow ? (oe(), se(\"polyline\", {\n key: 1,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 8, fd)) : Ee(\"\", !0)\n ], 8, cd));\n }\n}), vd = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n}, md = /* @__PURE__ */ ge({\n ...vd,\n setup(e) {\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"connectionLineOptions\"), r = M(t, \"defaultMarkerColor\"), a = J(() => {\n const s = [], l = [], u = (c) => {\n if (c) {\n const v = Xe(c, n.value);\n s.includes(v) || (typeof c == \"object\" ? l.push({ ...c, id: v, color: c.color || r.value }) : l.push({ id: v, color: r.value, type: c }), s.push(v));\n }\n };\n return [i.value.markerEnd, i.value.markerStart].forEach(u), o.value.reduce((c, v) => ([v.markerStart, v.markerEnd].forEach(u), c.sort((g, x) => g.id.localeCompare(x.id))), l), l;\n });\n return (s, l) => (oe(), se(\"defs\", null, [\n (oe(!0), se(Ce, null, dt(C(a), (u) => (oe(), ze(gd, {\n id: u.id,\n key: u.id,\n type: u.type,\n color: u.color,\n width: u.width,\n height: u.height,\n markerUnits: u.markerUnits,\n \"stroke-width\": u.strokeWidth,\n orient: u.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]))), 128))\n ]));\n }\n}), pd = {\n key: 0,\n class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\"\n}, yd = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n}, xd = /* @__PURE__ */ ge({\n ...yd,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"connectionStartHandle\"), i = M(n, \"nodesConnectable\"), r = M(n, \"edgesUpdatable\"), a = M(n, \"edgesFocusable\"), s = M(n, \"elementsSelectable\"), l = M(n, \"getSelectedNodes\"), u = M(n, \"findNode\"), c = M(n, \"edges\"), v = M(n, \"getEdges\"), g = M(n, \"getNodesInitialized\"), x = M(n, \"getEdgeTypes\"), h = M(n, \"elevateEdgesOnSelect\"), d = M(n, \"dimensions\"), w = M(n, \"emits\"), y = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P;\n return (P = o.value) != null && P.nodeId ? u.value(o.value.nodeId) : !1;\n }\n ), S = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P, R;\n return !!(y.value && (typeof y.value.connectable > \"u\" ? i.value : y.value.connectable) && ((P = o.value) != null && P.nodeId) && ((R = o.value) != null && R.type));\n }\n ), V = Sn(\n [\n () => c.value.map((P) => P.zIndex),\n () => h.value ? [l.value.length] : [0],\n () => h.value ? g.value.map((P) => P.computedPosition.z) : []\n ],\n () => Ea(v.value, u.value, h.value)\n );\n function p(P) {\n return typeof P > \"u\" ? s.value : P;\n }\n function N(P) {\n return typeof P > \"u\" ? r.value : P;\n }\n function T(P) {\n return typeof P > \"u\" ? a.value : P;\n }\n function _(P, R) {\n const $ = P || \"default\";\n let D = R ?? x.value[$];\n const Q = on();\n if (typeof D == \"string\" && Q) {\n const m = Object.keys(Q.appContext.components);\n m && m.includes($) && (D = pi($, !1));\n }\n if (D && typeof D != \"string\")\n return D;\n const ee = t == null ? void 0 : t[`edge-${$}`];\n return ee || (w.value.error(new ve(he.EDGE_TYPE_MISSING, D)), !1);\n }\n return (P, R) => C(d).width && C(d).height ? (oe(), se(Ce, { key: 0 }, [\n (oe(!0), se(Ce, null, dt(C(V), ($) => (oe(), se(\"svg\", {\n key: $.level,\n class: \"vue-flow__edges vue-flow__container\",\n style: Le(`z-index: ${$.level}`)\n }, [\n $.isMaxLevel ? (oe(), ze(md, { key: 0 })) : Ee(\"\", !0),\n ct(\"g\", null, [\n (oe(!0), se(Ce, null, dt($.edges, (D) => (oe(), ze(C(Kl), {\n id: D.id,\n key: D.id,\n edge: D,\n type: _(D.type, D.template),\n name: D.type || \"default\",\n selectable: p(D.selectable),\n updatable: N(D.updatable),\n focusable: T(D.focusable)\n }, null, 8, [\"id\", \"edge\", \"type\", \"name\", \"selectable\", \"updatable\", \"focusable\"]))), 128))\n ])\n ], 4))), 128)),\n C(S) && C(y) ? (oe(), se(\"svg\", pd, [\n qe(tu, { \"source-node\": C(y) }, null, 8, [\"source-node\"])\n ])) : Ee(\"\", !0)\n ], 64)) : Ee(\"\", !0);\n }\n}), _d = /* @__PURE__ */ ct(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1), wd = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n}, bd = /* @__PURE__ */ ge({\n ...wd,\n setup(e) {\n const { id: t, viewport: n, emits: o, d3Zoom: i, d3Selection: r, dimensions: a, ...s } = fe(), l = ie(!oo);\n return ye(() => i.value && r.value && a.value.width > 0 && a.value.height > 0).toBeTruthy().then(() => {\n o.paneReady({\n id: t,\n viewport: n,\n emits: o,\n d3Zoom: i,\n d3Selection: r,\n dimensions: a,\n ...s\n }), setTimeout(() => {\n l.value = !0;\n }, 0);\n }), (u, c) => (oe(), se(\"div\", {\n key: `transform-${C(t)}`,\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: Le({\n transform: `translate(${C(n).x}px,${C(n).y}px) scale(${C(n).zoom})`,\n opacity: C(l) ? void 0 : 0\n })\n }, [\n qe(xd),\n _d,\n qe(ud),\n xe(u.$slots, \"default\")\n ], 4));\n }\n}), Ed = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n}, Sd = /* @__PURE__ */ ge({\n ...Ed,\n setup(e) {\n const {\n id: t,\n minZoom: n,\n maxZoom: o,\n defaultViewport: i,\n translateExtent: r,\n dimensions: a,\n zoomActivationKeyCode: s,\n selectionKeyCode: l,\n panActivationKeyCode: u,\n panOnScroll: c,\n panOnScrollMode: v,\n panOnScrollSpeed: g,\n panOnDrag: x,\n zoomOnDoubleClick: h,\n zoomOnPinch: d,\n zoomOnScroll: w,\n preventScrolling: y,\n noWheelClassName: S,\n noPanClassName: V,\n emits: p,\n connectionStartHandle: N,\n userSelectionActive: T,\n paneDragging: _,\n d3Zoom: P,\n d3Selection: R,\n d3ZoomHandler: $,\n viewport: D,\n viewportRef: Q\n } = fe(), ee = ie(), m = ie(!1), A = ie(!1);\n let E = !1, G = 0, Z = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const K = _t(u), z = J(() => !m.value && x.value && K.value), W = J(\n () => l.value !== !0 && m.value || l.value === !0 && !z.value\n );\n Ve(() => {\n oa(ee, re);\n const H = ao();\n ro(H, \"resize\", re);\n }), Ve(() => {\n const H = ee.value, f = H.getBoundingClientRect(), b = ed().scaleExtent([n.value, o.value]).translateExtent(r.value), L = we(H).call(b), I = L.on(\"wheel.zoom\"), F = et.translate(i.value.x ?? 0, i.value.y ?? 0).scale(je(i.value.zoom ?? 1, n.value, o.value)), U = [\n [0, 0],\n [f.width, f.height]\n ], Y = b.constrain()(F, U, r.value);\n b.transform(L, Y), P.value = b, R.value = L, $.value = I, D.value = { x: Y.x, y: Y.y, zoom: Y.k }, Q.value = H, _t(l, (O) => {\n m.value = O;\n });\n const ne = _t(s);\n bo(() => {\n m.value && T.value && !A.value ? b.on(\"zoom\", null) : !m.value && !T.value && b.on(\"zoom\", (O) => {\n D.value = { x: O.transform.x, y: O.transform.y, zoom: O.transform.k };\n const ae = te(O.transform);\n E = B(x.value, G ?? 0), p.viewportChange(ae), p.move({ event: O, flowTransform: ae });\n });\n }), b.on(\"start\", (O) => {\n var me;\n if (!O.sourceEvent)\n return null;\n G = O.sourceEvent.button, A.value = !0;\n const ae = te(O.transform);\n ((me = O.sourceEvent) == null ? void 0 : me.type) === \"mousedown\" && (_.value = !0), Z = ae, p.viewportChangeStart(ae), p.moveStart({ event: O, flowTransform: ae });\n }), b.on(\"end\", (O) => {\n if (!O.sourceEvent)\n return null;\n if (A.value = !1, _.value = !1, B(x.value, G ?? 0) && !E && p.paneContextMenu(O.sourceEvent), E = !1, q(Z, O.transform)) {\n const ae = te(O.transform);\n Z = ae, p.viewportChangeEnd(ae), p.moveEnd({ event: O, flowTransform: ae });\n }\n }), bo(() => {\n c.value && !ne.value && !T.value ? L.on(\n \"wheel.zoom\",\n (O) => {\n if (k(O, S.value))\n return !1;\n O.preventDefault(), O.stopImmediatePropagation();\n const ae = L.property(\"__zoom\").k || 1;\n if (O.ctrlKey && d.value) {\n const Tt = Ne(O), _r = -O.deltaY * (O.deltaMode === 1 ? 0.05 : O.deltaMode ? 1 : 2e-3) * 10, wr = ae * 2 ** _r;\n b.scaleTo(L, wr, Tt);\n return;\n }\n const me = O.deltaMode === 1 ? 20 : 1, En = v.value === Ut.Vertical ? 0 : O.deltaX * me, Ot = v.value === Ut.Horizontal ? 0 : O.deltaY * me;\n b.translateBy(\n L,\n -(En / ae) * g.value,\n -(Ot / ae) * g.value\n );\n },\n { passive: !1 }\n ) : typeof I < \"u\" && L.on(\n \"wheel.zoom\",\n function(O, ae) {\n if (!y.value || k(O, S.value))\n return null;\n O.preventDefault(), I.call(this, O, ae);\n },\n { passive: !1 }\n );\n }), b.filter((O) => {\n var Ot, Tt;\n const ae = ne.value || w.value, me = d.value && O.ctrlKey;\n if (O.button === 1 && O.type === \"mousedown\" && ((Ot = O.target) != null && Ot.closest(\".vue-flow__node\") || (Tt = O.target) != null && Tt.closest(\".vue-flow__edge\")))\n return !0;\n if (!x.value && !ae && !c.value && !h.value && !d.value || T.value || !h.value && O.type === \"dblclick\" || k(O, S.value) && O.type === \"wheel\" || k(O, V.value) && O.type !== \"wheel\" || !d.value && O.ctrlKey && O.type === \"wheel\" || !ae && !c.value && !me && O.type === \"wheel\" || !x.value && (O.type === \"mousedown\" || O.type === \"touchstart\") || Array.isArray(x.value) && !x.value.includes(O.button) && (O.type === \"mousedown\" || O.type === \"touchstart\"))\n return !1;\n const En = Array.isArray(x.value) && x.value.includes(O.button) || !O.button || O.button <= 1;\n return (!O.ctrlKey || O.type === \"wheel\") && En;\n });\n });\n function B(H, f) {\n return f === 2 && Array.isArray(H) && H.includes(2);\n }\n function q(H, f) {\n return H.x !== f.x && !isNaN(f.x) || H.y !== f.y && !isNaN(f.y) || H.zoom !== f.k && !isNaN(f.k);\n }\n function te(H) {\n return {\n x: H.x,\n y: H.y,\n zoom: H.k\n };\n }\n function re() {\n if (!ee.value)\n return;\n const { width: H, height: f } = rn(ee.value);\n (H === 0 || f === 0) && p.error(new ve(he.MISSING_VIEWPORT_DIMENSIONS)), a.value.width = H || 500, a.value.height = f || 500;\n }\n function k(H, f) {\n return H.target.closest(`.${f}`);\n }\n return (H, f) => (oe(), se(Ce, null, [\n (oe(), se(\"div\", {\n ref_key: \"viewportEl\",\n ref: ee,\n key: `viewport-${C(t)}`,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n qe(ad, {\n \"is-selecting\": C(W),\n class: Ke({ connecting: !!C(N), dragging: C(_), draggable: !!C(x) })\n }, {\n default: Fe(() => [\n qe(bd, null, {\n default: Fe(() => [\n xe(H.$slots, \"zoom-pane\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"class\"])\n ])),\n xe(H.$slots, \"default\")\n ], 64));\n }\n}), Nd = [\"id\"], Cd = [\"id\"], Md = [\"id\"], $d = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n}, kd = /* @__PURE__ */ ge({\n ...$d,\n setup(e) {\n const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = fe(), i = {\n position: \"absolute\",\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: \"hidden\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n clipPath: \"inset(100%)\"\n };\n return (r, a) => (oe(), se(Ce, null, [\n ct(\"div\", {\n id: `${C(Qi)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select a node. \" + Vn(C(n) ? \"\" : \"You can then use the arrow keys to move the node around.\") + \" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. \", 9, Nd),\n ct(\"div\", {\n id: `${C(Ji)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, Cd),\n C(n) ? Ee(\"\", !0) : (oe(), se(\"div\", {\n key: 0,\n id: `${C(Ml)}-${C(t)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n style: i\n }, Vn(C(o)), 9, Md))\n ], 64));\n }\n}), Od = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n}, Ld = /* @__PURE__ */ ge({\n ...Od,\n props: {\n id: null,\n modelValue: null,\n nodes: null,\n edges: null,\n edgeTypes: null,\n nodeTypes: null,\n connectionMode: null,\n connectionLineType: null,\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: null,\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: null,\n selectionKeyCode: null,\n multiSelectionKeyCode: null,\n zoomActivationKeyCode: null,\n panActivationKeyCode: null,\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: null,\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: null,\n maxZoom: null,\n defaultViewport: null,\n translateExtent: null,\n nodeExtent: null,\n defaultMarkerColor: null,\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: null,\n panOnScrollMode: null,\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: null,\n edgeUpdaterRadius: null,\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: null,\n noWheelClassName: null,\n noPanClassName: null,\n defaultEdgeOptions: null,\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n __experimentalFeatures: null\n },\n emits: [\"nodesChange\", \"edgesChange\", \"nodeDoubleClick\", \"nodeClick\", \"nodeMouseEnter\", \"nodeMouseMove\", \"nodeMouseLeave\", \"nodeContextMenu\", \"nodeDragStart\", \"nodeDrag\", \"nodeDragStop\", \"nodesInitialized\", \"miniMapNodeClick\", \"miniMapNodeDoubleClick\", \"miniMapNodeMouseEnter\", \"miniMapNodeMouseMove\", \"miniMapNodeMouseLeave\", \"connect\", \"connectStart\", \"connectEnd\", \"clickConnectStart\", \"clickConnectEnd\", \"moveStart\", \"move\", \"moveEnd\", \"selectionDragStart\", \"selectionDrag\", \"selectionDragStop\", \"selectionContextMenu\", \"selectionStart\", \"selectionEnd\", \"viewportChangeStart\", \"viewportChange\", \"viewportChangeEnd\", \"paneReady\", \"paneScroll\", \"paneClick\", \"paneContextMenu\", \"paneMouseEnter\", \"paneMouseMove\", \"paneMouseLeave\", \"edgeContextMenu\", \"edgeMouseEnter\", \"edgeMouseMove\", \"edgeMouseLeave\", \"edgeDoubleClick\", \"edgeClick\", \"edgeUpdateStart\", \"edgeUpdate\", \"edgeUpdateEnd\", \"updateNodeInternals\", \"error\", \"update:modelValue\", \"update:nodes\", \"update:edges\"],\n setup(e, { expose: t, emit: n }) {\n const o = e, i = yt(o, \"modelValue\", n), r = yt(o, \"nodes\", n), a = yt(o, \"edges\", n), { vueFlowRef: s, hooks: l, getNodeTypes: u, getEdgeTypes: c, ...v } = fe(o), g = id({ modelValue: i, nodes: r, edges: a }, o, {\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n });\n da(n, l);\n const x = ie();\n return ut(ln, Ir()), Pr(() => {\n g();\n }), Ve(() => {\n s.value = x.value;\n }), t({\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n }), (h, d) => (oe(), se(\"div\", {\n ref_key: \"el\",\n ref: x,\n class: \"vue-flow\"\n }, [\n qe(Sd, null, {\n nodes: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(u)), (w) => xe(h.$slots, `node-${w}`)), 256))\n ]),\n edges: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(c)), (w) => xe(h.$slots, `edge-${w}`)), 256))\n ]),\n \"connection-name\": Fe(() => [\n xe(h.$slots, \"connection-line\")\n ]),\n \"zoom-pane\": Fe(() => [\n xe(h.$slots, \"zoom-pane\")\n ]),\n default: Fe(() => [\n xe(h.$slots, \"default\")\n ]),\n _: 3\n }),\n qe(kd)\n ], 512));\n }\n}), Td = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n}, Gd = /* @__PURE__ */ ge({\n ...Td,\n props: {\n position: null\n },\n setup(e) {\n const t = e, { userSelectionActive: n } = fe(), o = J(() => `${t.position}`.split(\"-\"));\n return (i, r) => (oe(), se(\"div\", {\n class: Ke([\"vue-flow__panel\", C(o)]),\n style: Le({ pointerEvents: C(n) ? \"none\" : \"all\" })\n }, [\n xe(i.$slots, \"default\")\n ], 6));\n }\n}), Bn = 0.1, Fd = (e) => {\n const t = fe({ id: e }), n = M(t, \"nodes\"), o = M(t, \"d3Zoom\"), i = M(t, \"d3Selection\"), r = M(t, \"dimensions\"), a = M(t, \"translateExtent\"), s = M(t, \"minZoom\"), l = M(t, \"maxZoom\"), u = M(t, \"viewport\"), c = M(t, \"snapToGrid\"), v = M(t, \"snapGrid\"), g = M(t, \"getNodes\");\n return {\n zoomIn: (d) => {\n x(1.2, d == null ? void 0 : d.duration);\n },\n zoomOut: (d) => {\n x(1 / 1.2, d == null ? void 0 : d.duration);\n },\n zoomTo: (d, w) => {\n i.value && o.value && o.value.scaleTo(Rn(i.value, w == null ? void 0 : w.duration), d);\n },\n setTransform: (d, w) => {\n h(d.x, d.y, d.zoom, w == null ? void 0 : w.duration);\n },\n getTransform: () => ({\n x: u.value.x,\n y: u.value.y,\n zoom: u.value.zoom\n }),\n fitView: (d = {\n padding: Bn,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!n.value.length)\n return;\n const w = (d.includeHiddenNodes ? n.value : g.value).filter((N) => {\n var P;\n const T = N.initialized && N.dimensions.width && N.dimensions.height;\n let _ = !0;\n return (P = d.nodes) != null && P.length && (_ = d.nodes.includes(N.id)), T && _;\n }), y = co(w), { x: S, y: V, zoom: p } = Zt(\n y,\n r.value.width,\n r.value.height,\n d.minZoom ?? s.value,\n d.maxZoom ?? l.value,\n d.padding ?? Bn,\n d.offset\n );\n h(S, V, p, d == null ? void 0 : d.duration);\n },\n setCenter: (d, w, y) => {\n const S = typeof (y == null ? void 0 : y.zoom) < \"u\" ? y.zoom : l.value, V = r.value.width / 2 - d * S, p = r.value.height / 2 - w * S;\n h(V, p, S, y == null ? void 0 : y.duration);\n },\n fitBounds: (d, w = { padding: Bn }) => {\n const { x: y, y: S, zoom: V } = Zt(d, r.value.width, r.value.height, s.value, l.value, w.padding);\n h(y, S, V, w == null ? void 0 : w.duration);\n },\n project: (d) => uo(d, u.value, c.value, v.value)\n };\n function x(d, w) {\n i.value && o.value && o.value.scaleBy(Rn(i.value, w), d);\n }\n function h(d, w, y, S) {\n const { x: V, y: p } = so({ x: -d, y: -w }, a.value), N = et.translate(-V, -p).scale(y);\n i.value && o.value && o.value.transform(Rn(i.value, S), N);\n }\n};\nfunction Rn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Yd(e) {\n const t = e ?? He(Oi, \"\"), n = He(Ti, null), { findEdge: o, emits: i } = fe(), r = o(t);\n return r || i.error(new ve(he.EDGE_NOT_FOUND, t)), {\n id: t,\n edge: r,\n edgeEl: n\n };\n}\nexport {\n vn as BaseEdge,\n Bl as BezierEdge,\n Ye as ConnectionLineType,\n Qe as ConnectionMode,\n Rd as EdgeLabelRenderer,\n Al as EdgeText,\n he as ErrorCode,\n ot as GlobalVueFlowStorage,\n Kt as Handle,\n Yn as MarkerType,\n $i as NodeIdInjection,\n Ut as PanOnScrollMode,\n Gd as Panel,\n xa as PanelPosition,\n j as Position,\n fo as SelectionMode,\n Rl as SimpleBezierEdge,\n ir as SmoothStepEdge,\n Gl as StepEdge,\n Fl as StraightEdge,\n Ld as VueFlow,\n ve as VueFlowError,\n zo as VueFlowInjection,\n zd as addEdge,\n nn as applyChanges,\n Vd as applyEdgeChanges,\n Hd as applyNodeChanges,\n je as clamp,\n Ei as connectionExists,\n lu as defaultEdgeTypes,\n su as defaultNodeTypes,\n nr as getBezierEdgeCenter,\n Kn as getBezierPath,\n Bd as getBoundsofRects,\n sn as getConnectedEdges,\n Dd as getIncomers,\n Xe as getMarkerId,\n Ci as getNodesInside,\n Pd as getOutgoers,\n co as getRectOfNodes,\n or as getSimpleBezierPath,\n tr as getSimpleEdgeCenter,\n qn as getSmoothStepPath,\n rr as getStraightPath,\n Zt as getTransformForBounds,\n va as graphPosToZoomedPos,\n $e as isEdge,\n fa as isGraphEdge,\n nt as isGraphNode,\n xt as isNode,\n uo as pointToRendererPoint,\n va as rendererPointToPoint,\n Ad as updateEdge,\n Yd as useEdge,\n Ra as useGetPointerPosition,\n Di as useHandle,\n _a as useNode,\n fe as useVueFlow,\n Fd as useZoomPanHelper\n};\n","\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","import { App } from 'vue'\n\nimport NodeEditor from '@/components/NodeEditor.vue'\nimport StateEditor from '@/components/StateEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('NodeEditor', NodeEditor)\n\tapp.component('StateEditor', StateEditor)\n}\n\nexport { install, NodeEditor, StateEditor }\n"],"names":["Eo","oo","Dr","zr","Ae","Ie","Pe","Ar","le","C","Br","i","r","yi","Rr","ie","Er","So","Vr","Sn","a","de","l","u","br","c","v","g","Mt","hi","Vt","Hr","on","Ve","Ue","Hn","x","h","d","w","S","V","p","Sr","y","N","T","ye","No","Lr","Gr","Fr","Yr","Xr","Zr","Ur","Yt","xi","_i","Co","Wr","Kr","qr","tt","wi","io","ro","jr","Mo","Qr","Jr","Ln","Gn","$o","ea","ta","na","oa","ko","ia","Oo","ra","aa","To","sa","yt","J","ua","wt","ca","da","Nr","he","Nn","ve","ao","Io","Fn","rn","je","so","Po","$e","fa","xt","nt","ha","ga","it","ce","lo","an","Ei","uo","Si","Xt","Ni","co","Ci","sn","Zt","ma","Mi","Xe","o","pa","ya","Do","fo","Ye","Qe","Yn","Ut","zo","$i","ki","Oi","Ti","ln","_a","He","fe","ho","rt","n","Wt","Ao","wa","ba","Ea","Cn","Bo","Sa","Ro","Ii","Na","Ca","Vo","Pi","It","Di","_","P","R","$","D","Q","m","G","A","E","Z","Y","L","f","B","F","I","U","ne","W","b","K","q","z","te","re","k","H","Ma","$a","ka","Kt","ge","M","ee","oe","se","Ke","xe","un","ue","Oa","cn","Ta","dn","Ia","Ho","Pa","Mn","zi","Da","za","go","Ai","Aa","Ba","Ra","Lo","Xn","Va","fn","Ht","Ha","La","Go","Zn","Fo","hn","Ga","Fa","Bi","Ya","vo","Xa","_e","Za","Ua","Ri","Wa","Ka","Vi","Hi","qa","ja","Qa","Ja","es","ts","ns","os","is","Li","rs","qt","as","ss","ls","us","cs","ds","fs","hs","gs","vs","ms","ps","ys","xs","_s","ws","bs","Es","Ss","Ns","Cs","Ms","$s","ks","Os","Gi","Ts","Is","Ps","Ds","ft","zs","As","Bs","Rs","Fi","mo","Yi","Xi","Zi","Vs","Hs","Ls","Gs","Fs","Ys","Xs","Zs","Us","Ws","Ks","qs","js","Qs","Js","el","tl","nl","ol","il","rl","al","sl","ll","ul","cl","dl","fl","hl","gl","Ui","vl","ml","pl","yl","Wi","$t","xl","we","_l","Ne","wl","bt","$n","at","Ki","qi","Pt","Un","bl","El","Sl","Nl","Cl","ji","Qi","Ji","Ml","er","st","Wn","t","$l","kl","_t","Ol","ut","gi","Tl","Il","Pl","Dl","zl","Al","Le","Ee","ct","vi","Ce","Cr","Vn","ze","mi","gn","vn","tr","nr","Dt","Yo","Kn","mn","Bl","Xo","or","pn","Rl","Zo","Vl","Uo","Hl","Ll","qn","yn","ir","xn","Gl","rr","_n","Fl","Yl","Xl","po","Wo","Zl","Ul","Wl","Kl","ql","jl","Rd","Mr","Ql","Jl","eu","tu","s","$r","nu","ou","iu","ru","au","su","lu","uu","ar","cu","yo","sr","kt","Et","jt","lt","St","Me","du","fu","hu","gu","vu","mu","pu","Ko","Nt","qo","yu","xu","jo","lr","Qo","pe","zt","ti","_u","jn","We","Qt","Jo","wu","ei","Ze","be","bu","kn","ni","At","ur","Eu","Su","Nu","cr","oi","Re","Qn","On","Cu","Mu","$u","ii","Jn","dr","Bt","ku","Ou","fr","Tu","Iu","Pu","ri","Du","zu","Au","ht","mt","gt","hr","Jt","pt","en","Je","wn","Ct","gr","xo","Bu","tn","vr","eo","Ru","ai","Hu","Vu","si","Lu","Gu","mr","li","to","Lt","ui","no","Gt","bn","Fu","_o","Se","ke","Yu","Xu","Zu","Uu","wo","pr","Wu","Ku","qu","ju","Qu","Ju","ec","tc","nc","oc","ic","rc","ac","sc","lc","uc","cc","dc","fc","hc","gc","vc","mc","Be","pc","yc","xc","_c","wc","bc","Ec","Sc","Nc","Cc","Mc","yr","$c","kc","Oc","Tc","Ic","Pc","Dc","zc","Ac","Bc","Rc","Vc","Hc","Lc","xr","Gc","Fc","Oe","Yc","Xc","Zc","Uc","Rt","Wc","De","et","Tn","vt","Kc","qc","ci","jc","Qc","Jc","ed","In","Ge","td","nd","Pn","Dn","nn","Te","di","zn","An","od","O","ae","me","ot","kr","Or","id","Tr","fi","rd","ad","sd","ld","ud","pi","dt","cd","dd","fd","hd","gd","vd","md","pd","yd","xd","qe","_d","wd","bd","Ed","Sd","bo","Tt","_r","wr","En","Ot","Fe","Nd","Cd","Md","$d","kd","Od","Ld","Ir","Pr","props","__props","emit","__emit","positionMap","Position","sourcePosition","computed","targetPosition","labelInput","ref","newLabel","showInput","lastClick","nodeOnClick","now","showLabelInput","nextTick","submitNewLabel","__default__","useVueFlow","labelOnClick","path","getBezierPath","containerClass","vueFlowInstance","hover","activeElementKey","vueFlowElements","activeElementIndex","j","elements","_elements","key","newValue","getNodes","onPaneReady","onMounted","handleKeypress","onBeforeUnmount","shiftTerminal","currentTerminal","shiftOutput","shiftInput","onWheel","$event","e","fitView","addNode","newNodePosition","makeEdge","activeNode","nodeId","edgeId","onConnect","onEdgeDoubleClick","labelChanged","states","stateHash","hasInputs","stateElements","edges","edgeKey","target","onElementsChange","idToLabel","label","install","app","NodeEditor","StateEditor"],"mappings":"oRACA,IAAIA,GACJ,MAAMC,GAAK,OAAO,OAAS,IAAKC,GAAM,GAAM,OAAO,EAAI,IAAKC,GAAM,GAAM,OAAO,GAAK,UAAWC,GAAM,GAAM,OAAO,GAAK,WAAYC,GAAM,GAAM,OAAO,GAAK,SAAUC,GAAM,GAAM,OAAO,GAAK,SAAUC,GAAK,IAAM,CAClN,EACAN,KAAQD,GAAK,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,GAAG,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EACrI,SAASQ,GAAG,EAAG,CACb,OAAO,OAAO,GAAK,WAAa,EAAC,EAAKC,EAAAA,MAAE,CAAC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EAAIirB,EAAS,OAAQjrB,IAAK,CACrC,IAAA2S,EAAKsY,EAASjrB,CAAC,EACf2S,EAAG,MAAQ,QAEPga,EAAAha,EAAG,KAAK,EAAI,CAClB,GAAI,CAAC,CAAA,EAEIA,EAAG,MAAQ,SAEdga,EAAAha,EAAG,KAAK,EAAI,CAClB,KAAM,OAAA,EAEGA,EAAG,QAAUA,EAAG,QAE1Boa,EAAMpa,EAAG,MAAM,EAAIoa,EAAMpa,EAAG,MAAM,GAAK,GACvCoa,EAAMpa,EAAG,MAAM,EAAEA,EAAG,KAAK,EAAI,CAC5B,OAAQA,EAAG,MAAA,GAILga,EAAAha,EAAG,KAAK,EAAI,CAClB,GAAI,CAAC,CAAA,EAGGwa,EAAAxa,EAAG,EAAE,EAAIA,EAAG,KACvB,CAEA,QAASwY,KAAO4B,EAAO,CAElB,IAAAK,EAAQD,EAAUhC,CAAG,EAChB,QAAA6B,KAAWD,EAAM5B,CAAG,EACrBwB,EAAAS,CAAK,EAAE,GAAGJ,CAAO,EAAID,EAAM5B,CAAG,EAAE6B,CAAO,CAEhD,CACA5D,EAAK,oBAAqBuD,CAAM,CAAA,qPCjHjC,SAASU,GAAQC,EAAwB,CACpCA,EAAA,UAAU,aAAcC,EAAU,EAClCD,EAAA,UAAU,cAAeE,EAAW,CACzC","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/node_editor/package.json b/node_editor/package.json index 2b97d4db..85bc886f 100644 --- a/node_editor/package.json +++ b/node_editor/package.json @@ -26,15 +26,15 @@ }, "dependencies": { "@vue-flow/core": "~1.19.3", - "vue": "^3.2.47", + "vue": "^3.4.23", "vue-router": "^4", "xstate": "~4.37.2" }, "devDependencies": { - "@histoire/plugin-vue": "^0.16.1", - "@vitejs/plugin-vue": "^4.2.1", - "histoire": "^0.16.1", - "vite": "^4.3.5" + "@histoire/plugin-vue": "^0.17.17", + "@vitejs/plugin-vue": "^5.0.4", + "histoire": "^0.17.17", + "vite": "^5.2.9" }, "engines": { "node": ">=20.11.0" diff --git a/stonecrop/package.json b/stonecrop/package.json index bd5640cd..71621a74 100644 --- a/stonecrop/package.json +++ b/stonecrop/package.json @@ -30,7 +30,7 @@ "pinia-shared-state": "^0.3.0", "pinia-undo": "^0.1.9", "pinia-xstate": "^1.0.9", - "vue": "^3.2.47", + "vue": "^3.4.23", "vue-router": "^4", "xstate": "~4.37.2" }, @@ -39,12 +39,12 @@ "@stonecrop/atable": "workspace:*", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", - "@vitejs/plugin-vue": "^4.2.1", + "@vitejs/plugin-vue": "^5.0.4", "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", "typescript": "^5.0.4", - "vite": "^4.3.5" + "vite": "^5.2.9" }, "engines": { "node": ">=20.11.0" diff --git a/themes/package.json b/themes/package.json index 123adf74..56db915f 100644 --- a/themes/package.json +++ b/themes/package.json @@ -8,9 +8,9 @@ "preview": "vite preview" }, "devDependencies": { - "@vitejs/plugin-vue": "^4.2.1", - "vite": "^4.3.5", - "vue": "^3.2.47" + "@vitejs/plugin-vue": "^5.0.4", + "vite": "^5.2.9", + "vue": "^3.4.23" }, "engines": { "node": ">=20.11.0" diff --git a/utilities/dist/utilities.js.map b/utilities/dist/utilities.js.map index a31e05dd..f1ef8b4f 100644 --- a/utilities/dist/utilities.js.map +++ b/utilities/dist/utilities.js.map @@ -1 +1 @@ -{"version":3,"file":"utilities.js","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.21/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.21/node_modules/@vueuse/core/index.mjs","../src/composables/keyboard.ts","../src/index.ts"],"sourcesContent":["import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { onMounted, onBeforeUnmount } from 'vue'\nimport { useElementVisibility } from '@vueuse/core'\n\nimport type { KeyboardNavigationOptions, KeypressHandlers } from 'types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet isVisible = useElementVisibility(element).value\n\tisVisible = isVisible && element.offsetHeight > 0\n\treturn isVisible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getUpCell($target)\n}\n\nconst _getUpCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\tconst $prevRowCells = Array.from($prevRow.children)\n\t\t\tconst $prevCell = $prevRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($prevCell) {\n\t\t\t\t$upCell = $prevCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevRow = element.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\t$upCell = $prevRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn _getUpCell($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navCell = $firstRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$topCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild as HTMLTableRowElement\n\t\t\tif ($firstRow) {\n\t\t\t\t$topCell = $firstRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn _getDownCell($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getDownCell($target)\n}\n\nconst _getDownCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tif ($nextRow) {\n\t\t\tconst $nextRowCells = Array.from($nextRow.children)\n\t\t\tconst $nextCell = $nextRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($nextCell) {\n\t\t\t\t$downCell = $nextCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextRow = element.nextElementSibling as HTMLTableRowElement\n\t\tif ($nextRow) {\n\t\t\t$downCell = $nextRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn _getDownCell($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navCell = $lastRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$bottomCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild as HTMLTableRowElement\n\t\t\tif ($lastRow) {\n\t\t\t\t$bottomCell = $lastRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn _getUpCell($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getPrevCell($target)\n}\n\nconst _getPrevCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tif (element.previousElementSibling) {\n\t\t$prevCell = element.previousElementSibling as HTMLElement\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\t$prevCell = $prevRow?.lastElementChild as HTMLElement\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn _getPrevCell($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getNextCell($target)\n}\n\nconst _getNextCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tif (element.nextElementSibling) {\n\t\t$nextCell = element.nextElementSibling as HTMLElement\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\t$nextCell = $nextRow?.firstElementChild as HTMLElement\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn _getNextCell($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $firstCell = $parent.firstElementChild as HTMLElement | null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn _getNextCell($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $lastCell = $parent.lastElementChild as HTMLElement | null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn _getPrevCell($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\t// get parent element\n\t\tlet $parent: Element | null = null\n\t\tif (option.parent) {\n\t\t\tif (typeof option.parent === 'string') {\n\t\t\t\t$parent = document.querySelector(option.parent)\n\t\t\t} else if (option.parent instanceof Element) {\n\t\t\t\t$parent = option.parent\n\t\t\t} else {\n\t\t\t\t$parent = option.parent.value\n\t\t\t}\n\t\t}\n\n\t\t// generate a list of selector(s)\n\t\tlet selectors: Element[] = []\n\n\t\tif (option.selectors) {\n\t\t\tif (typeof option.selectors === 'string') {\n\t\t\t\tselectors = $parent\n\t\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t\t} else if (option.selectors instanceof Element) {\n\t\t\t\tselectors.push(option.selectors)\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectors.push(element.$el as Element)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst $children = Array.from($parent.children)\n\t\t\tselectors = $children.filter((selector: HTMLElement) => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = (eventKeyMap[event.key] as string) || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(key => modifierKeys.includes(key))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(key => {\n\t\t\t\t\t\tconst modifierKey = key.charAt(0).toUpperCase() + key.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.addEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.removeEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\n\nfunction install(app: App /* options */) {}\n\nexport { defaultKeypressHandlers, install, useKeyboardNav }\n"],"names":["_a","isClient","isString","val","noop","resolveUnref","r","unref","identity","arg","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","unrefElement","elRef","plain","defaultWindow","useEventListener","args","target","events","listeners","options","cleanups","cleanup","register","el","event","listener","options2","stopWatch","watch","stop","_global","globalKey","useElementVisibility","element","window","scrollTarget","elementIsVisible","ref","testBounding","document","rect","SwipeDirection","SwipeDirection2","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","_TransitionPresets","isVisible","isFocusable","getUpCell","$target","_getUpCell","$upCell","$prevRow","$prevCell","getTopCell","$topCell","$table","$navCell","$firstRow","_getDownCell","getDownCell","$downCell","$nextRow","$nextCell","getBottomCell","$bottomCell","$lastRow","getPrevCell","_getPrevCell","getNextCell","_getNextCell","getFirstCell","$firstCell","getLastCell","$lastCell","modifierKeys","eventKeyMap","defaultKeypressHandlers","useKeyboardNav","getSelectors","option","$parent","selectors","selector","getEventListener","activeKey","handlers","eventType","keys","hasModifier","isModifierActive","modifierKey","modifier","onMounted","onBeforeUnmount","install","app"],"mappings":";AAgCA,IAAIA;AACJ,MAAMC,IAAW,OAAO,SAAW,KAU7BC,IAAW,CAACC,MAAQ,OAAOA,KAAQ,UAMnCC,IAAO,MAAM;AACnB;AAMcH,OAAcD,IAAK,UAAU,OAAO,SAAS,OAAO,cAAc,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AWb,KAAUvE,GAAS;AACvB,YAAAyE,IAAYH,EAAaC,CAAM;AACrC,iBAAWG,KAAYD;AACtB,QAAAC,EAAS,iBAAiB,WAAWC,EAAiBJ,CAAM,CAAC;AAAA,IAE/D;AAAA,EAAA,CACA,GAEDc,EAAgB,MAAM;AACrB,eAAWd,KAAUvE,GAAS;AACvB,YAAAyE,IAAYH,EAAaC,CAAM;AACrC,iBAAWG,KAAYD;AACtB,QAAAC,EAAS,oBAAoB,WAAWC,EAAiBJ,CAAM,CAAC;AAAA,IAElE;AAAA,EAAA,CACA;AACF;ACnbA,SAASe,GAAQC,GAAwB;AAAC;","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"utilities.js","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.23/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.23/node_modules/@vueuse/core/index.mjs","../src/composables/keyboard.ts","../src/index.ts"],"sourcesContent":["import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { onMounted, onBeforeUnmount } from 'vue'\nimport { useElementVisibility } from '@vueuse/core'\n\nimport type { KeyboardNavigationOptions, KeypressHandlers } from 'types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet isVisible = useElementVisibility(element).value\n\tisVisible = isVisible && element.offsetHeight > 0\n\treturn isVisible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getUpCell($target)\n}\n\nconst _getUpCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\tconst $prevRowCells = Array.from($prevRow.children)\n\t\t\tconst $prevCell = $prevRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($prevCell) {\n\t\t\t\t$upCell = $prevCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevRow = element.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\t$upCell = $prevRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn _getUpCell($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navCell = $firstRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$topCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild as HTMLTableRowElement\n\t\t\tif ($firstRow) {\n\t\t\t\t$topCell = $firstRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn _getDownCell($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getDownCell($target)\n}\n\nconst _getDownCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tif ($nextRow) {\n\t\t\tconst $nextRowCells = Array.from($nextRow.children)\n\t\t\tconst $nextCell = $nextRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($nextCell) {\n\t\t\t\t$downCell = $nextCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextRow = element.nextElementSibling as HTMLTableRowElement\n\t\tif ($nextRow) {\n\t\t\t$downCell = $nextRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn _getDownCell($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navCell = $lastRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$bottomCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild as HTMLTableRowElement\n\t\t\tif ($lastRow) {\n\t\t\t\t$bottomCell = $lastRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn _getUpCell($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getPrevCell($target)\n}\n\nconst _getPrevCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tif (element.previousElementSibling) {\n\t\t$prevCell = element.previousElementSibling as HTMLElement\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\t$prevCell = $prevRow?.lastElementChild as HTMLElement\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn _getPrevCell($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getNextCell($target)\n}\n\nconst _getNextCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tif (element.nextElementSibling) {\n\t\t$nextCell = element.nextElementSibling as HTMLElement\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\t$nextCell = $nextRow?.firstElementChild as HTMLElement\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn _getNextCell($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $firstCell = $parent.firstElementChild as HTMLElement | null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn _getNextCell($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $lastCell = $parent.lastElementChild as HTMLElement | null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn _getPrevCell($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\t// get parent element\n\t\tlet $parent: Element | null = null\n\t\tif (option.parent) {\n\t\t\tif (typeof option.parent === 'string') {\n\t\t\t\t$parent = document.querySelector(option.parent)\n\t\t\t} else if (option.parent instanceof Element) {\n\t\t\t\t$parent = option.parent\n\t\t\t} else {\n\t\t\t\t$parent = option.parent.value\n\t\t\t}\n\t\t}\n\n\t\t// generate a list of selector(s)\n\t\tlet selectors: Element[] = []\n\n\t\tif (option.selectors) {\n\t\t\tif (typeof option.selectors === 'string') {\n\t\t\t\tselectors = $parent\n\t\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t\t} else if (option.selectors instanceof Element) {\n\t\t\t\tselectors.push(option.selectors)\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectors.push(element.$el as Element)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst $children = Array.from($parent.children)\n\t\t\tselectors = $children.filter((selector: HTMLElement) => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = (eventKeyMap[event.key] as string) || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(key => modifierKeys.includes(key))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(key => {\n\t\t\t\t\t\tconst modifierKey = key.charAt(0).toUpperCase() + key.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.addEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.removeEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\n\nfunction install(app: App /* options */) {}\n\nexport { defaultKeypressHandlers, install, useKeyboardNav }\n"],"names":["_a","isClient","isString","val","noop","resolveUnref","r","unref","identity","arg","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","unrefElement","elRef","plain","defaultWindow","useEventListener","args","target","events","listeners","options","cleanups","cleanup","register","el","event","listener","options2","stopWatch","watch","stop","_global","globalKey","useElementVisibility","element","window","scrollTarget","elementIsVisible","ref","testBounding","document","rect","SwipeDirection","SwipeDirection2","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","_TransitionPresets","isVisible","isFocusable","getUpCell","$target","_getUpCell","$upCell","$prevRow","$prevCell","getTopCell","$topCell","$table","$navCell","$firstRow","_getDownCell","getDownCell","$downCell","$nextRow","$nextCell","getBottomCell","$bottomCell","$lastRow","getPrevCell","_getPrevCell","getNextCell","_getNextCell","getFirstCell","$firstCell","getLastCell","$lastCell","modifierKeys","eventKeyMap","defaultKeypressHandlers","useKeyboardNav","getSelectors","option","$parent","selectors","selector","getEventListener","activeKey","handlers","eventType","keys","hasModifier","isModifierActive","modifierKey","modifier","onMounted","onBeforeUnmount","install","app"],"mappings":";AAgCA,IAAIA;AACJ,MAAMC,I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CAAK;AAAA,cAEhB;AAAA;AAAA;AAIF,UAAK4E,KACJ3E,EAASD,CAAK;AAAA,MAGjB;AAAA,IACD;AAAA,EAAA;AAIF,EAAA+E,EAAU,MAAM;AACf,eAAWb,KAAUvE,GAAS;AACvB,YAAAyE,IAAYH,EAAaC,CAAM;AACrC,iBAAWG,KAAYD;AACtB,QAAAC,EAAS,iBAAiB,WAAWC,EAAiBJ,CAAM,CAAC;AAAA,IAE/D;AAAA,EAAA,CACA,GAEDc,EAAgB,MAAM;AACrB,eAAWd,KAAUvE,GAAS;AACvB,YAAAyE,IAAYH,EAAaC,CAAM;AACrC,iBAAWG,KAAYD;AACtB,QAAAC,EAAS,oBAAoB,WAAWC,EAAiBJ,CAAM,CAAC;AAAA,IAElE;AAAA,EAAA,CACA;AACF;ACnbA,SAASe,GAAQC,GAAwB;AAAC;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/utilities/dist/utilities.umd.cjs.map b/utilities/dist/utilities.umd.cjs.map index d31b5221..4700ec40 100644 --- a/utilities/dist/utilities.umd.cjs.map +++ b/utilities/dist/utilities.umd.cjs.map @@ -1 +1 @@ -{"version":3,"file":"utilities.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.21/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.21/node_modules/@vueuse/core/index.mjs","../src/composables/keyboard.ts","../src/index.ts"],"sourcesContent":["import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { onMounted, onBeforeUnmount } from 'vue'\nimport { useElementVisibility } from '@vueuse/core'\n\nimport type { KeyboardNavigationOptions, KeypressHandlers } from 'types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet isVisible = useElementVisibility(element).value\n\tisVisible = isVisible && element.offsetHeight > 0\n\treturn isVisible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getUpCell($target)\n}\n\nconst _getUpCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\tconst $prevRowCells = Array.from($prevRow.children)\n\t\t\tconst $prevCell = $prevRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($prevCell) {\n\t\t\t\t$upCell = $prevCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevRow = element.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\t$upCell = $prevRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn _getUpCell($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navCell = $firstRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$topCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild as HTMLTableRowElement\n\t\t\tif ($firstRow) {\n\t\t\t\t$topCell = $firstRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn _getDownCell($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getDownCell($target)\n}\n\nconst _getDownCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tif ($nextRow) {\n\t\t\tconst $nextRowCells = Array.from($nextRow.children)\n\t\t\tconst $nextCell = $nextRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($nextCell) {\n\t\t\t\t$downCell = $nextCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextRow = element.nextElementSibling as HTMLTableRowElement\n\t\tif ($nextRow) {\n\t\t\t$downCell = $nextRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn _getDownCell($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navCell = $lastRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$bottomCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild as HTMLTableRowElement\n\t\t\tif ($lastRow) {\n\t\t\t\t$bottomCell = $lastRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn _getUpCell($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getPrevCell($target)\n}\n\nconst _getPrevCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tif (element.previousElementSibling) {\n\t\t$prevCell = element.previousElementSibling as HTMLElement\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\t$prevCell = $prevRow?.lastElementChild as HTMLElement\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn _getPrevCell($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getNextCell($target)\n}\n\nconst _getNextCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tif (element.nextElementSibling) {\n\t\t$nextCell = element.nextElementSibling as HTMLElement\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\t$nextCell = $nextRow?.firstElementChild as HTMLElement\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn _getNextCell($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $firstCell = $parent.firstElementChild as HTMLElement | null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn _getNextCell($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $lastCell = $parent.lastElementChild as HTMLElement | null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn _getPrevCell($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\t// get parent element\n\t\tlet $parent: Element | null = null\n\t\tif (option.parent) {\n\t\t\tif (typeof option.parent === 'string') {\n\t\t\t\t$parent = document.querySelector(option.parent)\n\t\t\t} else if (option.parent instanceof Element) {\n\t\t\t\t$parent = option.parent\n\t\t\t} else {\n\t\t\t\t$parent = option.parent.value\n\t\t\t}\n\t\t}\n\n\t\t// generate a list of selector(s)\n\t\tlet selectors: Element[] = []\n\n\t\tif (option.selectors) {\n\t\t\tif (typeof option.selectors === 'string') {\n\t\t\t\tselectors = $parent\n\t\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t\t} else if (option.selectors instanceof Element) {\n\t\t\t\tselectors.push(option.selectors)\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectors.push(element.$el as Element)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst $children = Array.from($parent.children)\n\t\t\tselectors = $children.filter((selector: HTMLElement) => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = (eventKeyMap[event.key] as string) || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(key => modifierKeys.includes(key))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(key => {\n\t\t\t\t\t\tconst modifierKey = key.charAt(0).toUpperCase() + key.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.addEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.removeEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\n\nfunction install(app: App /* options */) {}\n\nexport { defaultKeypressHandlers, install, useKeyboardNav }\n"],"names":["_a","isClient","isString","val","noop","resolveUnref","r","unref","identity","arg","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","unrefElement","elRef","plain","defaultWindow","useEventListener","args","target","events","listeners","options","cleanups","cleanup","register","el","event","listener","options2","stopWatch","watch","stop","_global","globalKey","useElementVisibility","element","window","scrollTarget","elementIsVisible","ref","testBounding","document","rect","SwipeDirection","SwipeDirection2","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","isVisible","isFocusable","getUpCell","$target","_getUpCell","$upCell","$prevRow","$prevCell","getTopCell","$topCell","$table","$navCell","$firstRow","_getDownCell","getDownCell","$downCell","$nextRow","$nextCell","getBottomCell","$bottomCell","$lastRow","getPrevCell","_getPrevCell","getNextCell","_getNextCell","getFirstCell","$firstCell","getLastCell","$lastCell","modifierKeys","eventKeyMap","defaultKeypressHandlers","useKeyboardNav","getSelectors","option","$parent","selectors","selector","getEventListener","activeKey","handlers","eventType","keys","hasModifier","isModifierActive","modifierKey","modifier","onMounted","onBeforeUnmount","install","app"],"mappings":"4QAgCA,IAAIA,EACJ,MAAMC,EAAW,OAAO,OAAW,IAU7BC,EAAYC,GAAQ,OAAOA,GAAQ,SAMnCC,EAAO,IAAM,CACnB,EAMcH,KAAcD,EAAK,QAAU,KAAO,OAAS,OAAO,YAAc,MAAgBA,EAAG,YAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAGjK,SAASK,EAAaC,EAAG,CACvB,OAAO,OAAOA,GAAM,WAAaA,EAAC,EAAKC,EAAAA,MAAMD,CAAC,CAChD,CA2IA,SAASE,EAASC,EAAK,CACrB,OAAOA,CACT,CA6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b,KAAUtE,EAAS,CACvB,MAAAwE,EAAYH,EAAaC,CAAM,EACrC,UAAWG,KAAYD,EACtBC,EAAS,iBAAiB,UAAWC,EAAiBJ,CAAM,CAAC,CAE/D,CAAA,CACA,EAEDc,EAAAA,gBAAgB,IAAM,CACrB,UAAWd,KAAUtE,EAAS,CACvB,MAAAwE,EAAYH,EAAaC,CAAM,EACrC,UAAWG,KAAYD,EACtBC,EAAS,oBAAoB,UAAWC,EAAiBJ,CAAM,CAAC,CAElE,CAAA,CACA,CACF,CCnbA,SAASe,GAAQC,EAAwB,CAAC","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"utilities.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.23/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.23/node_modules/@vueuse/core/index.mjs","../src/composables/keyboard.ts","../src/index.ts"],"sourcesContent":["import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { onMounted, onBeforeUnmount } from 'vue'\nimport { useElementVisibility } from '@vueuse/core'\n\nimport type { KeyboardNavigationOptions, KeypressHandlers } from 'types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet isVisible = useElementVisibility(element).value\n\tisVisible = isVisible && element.offsetHeight > 0\n\treturn isVisible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getUpCell($target)\n}\n\nconst _getUpCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\tconst $prevRowCells = Array.from($prevRow.children)\n\t\t\tconst $prevCell = $prevRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($prevCell) {\n\t\t\t\t$upCell = $prevCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevRow = element.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\t$upCell = $prevRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn _getUpCell($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navCell = $firstRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$topCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild as HTMLTableRowElement\n\t\t\tif ($firstRow) {\n\t\t\t\t$topCell = $firstRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn _getDownCell($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getDownCell($target)\n}\n\nconst _getDownCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tif ($nextRow) {\n\t\t\tconst $nextRowCells = Array.from($nextRow.children)\n\t\t\tconst $nextCell = $nextRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($nextCell) {\n\t\t\t\t$downCell = $nextCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextRow = element.nextElementSibling as HTMLTableRowElement\n\t\tif ($nextRow) {\n\t\t\t$downCell = $nextRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn _getDownCell($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navCell = $lastRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$bottomCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild as HTMLTableRowElement\n\t\t\tif ($lastRow) {\n\t\t\t\t$bottomCell = $lastRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn _getUpCell($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getPrevCell($target)\n}\n\nconst _getPrevCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tif (element.previousElementSibling) {\n\t\t$prevCell = element.previousElementSibling as HTMLElement\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\t$prevCell = $prevRow?.lastElementChild as HTMLElement\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn _getPrevCell($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getNextCell($target)\n}\n\nconst _getNextCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tif (element.nextElementSibling) {\n\t\t$nextCell = element.nextElementSibling as HTMLElement\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\t$nextCell = $nextRow?.firstElementChild as HTMLElement\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn _getNextCell($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $firstCell = $parent.firstElementChild as HTMLElement | null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn _getNextCell($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $lastCell = $parent.lastElementChild as HTMLElement | null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn _getPrevCell($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\t// get parent element\n\t\tlet $parent: Element | null = null\n\t\tif (option.parent) {\n\t\t\tif (typeof option.parent === 'string') {\n\t\t\t\t$parent = document.querySelector(option.parent)\n\t\t\t} else if (option.parent instanceof Element) {\n\t\t\t\t$parent = option.parent\n\t\t\t} else {\n\t\t\t\t$parent = option.parent.value\n\t\t\t}\n\t\t}\n\n\t\t// generate a list of selector(s)\n\t\tlet selectors: Element[] = []\n\n\t\tif (option.selectors) {\n\t\t\tif (typeof option.selectors === 'string') {\n\t\t\t\tselectors = $parent\n\t\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t\t} else if (option.selectors instanceof Element) {\n\t\t\t\tselectors.push(option.selectors)\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectors.push(element.$el as Element)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst $children = Array.from($parent.children)\n\t\t\tselectors = $children.filter((selector: HTMLElement) => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = (eventKeyMap[event.key] as string) || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(key => modifierKeys.includes(key))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(key => {\n\t\t\t\t\t\tconst modifierKey = key.charAt(0).toUpperCase() + key.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.addEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.removeEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\n\nfunction install(app: App /* options */) {}\n\nexport { defaultKeypressHandlers, install, useKeyboardNav }\n"],"names":["_a","isClient","isString","val","noop","resolveUnref","r","unref","identity","arg","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","unrefElement","elRef","plain","defaultWindow","useEventListener","args","target","events","listeners","options","cleanups","cleanup","register","el","event","listener","options2","stopWatch","watch","stop","_global","globalKey","useElementVisibility","element","window","scrollTarget","elementIsVisible","ref","testBounding","document","rect","SwipeDirection","SwipeDirection2","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","isVisible","isFocusable","getUpCell","$target","_getUpCell","$upCell","$prevRow","$prevCell","getTopCell","$topCell","$table","$navCell","$firstRow","_getDownCell","getDownCell","$downCell","$nextRow","$nextCell","getBottomCell","$bottomCell","$lastRow","getPrevCell","_getPrevCell","getNextCell","_getNextCell","getFirstCell","$firstCell","getLastCell","$lastCell","modifierKeys","eventKeyMap","defaultKeypressHandlers","useKeyboardNav","getSelectors","option","$parent","selectors","selector","getEventListener","activeKey","handlers","eventType","keys","hasModifier","isModifierActive","modifierKey","modifier","onMounted","onBeforeUnmount","install","app"],"mappings":"4QAgCA,IAAIA,EACJ,MAAMC,EAAW,OAAO,OAAW,IAU7BC,EAAYC,GAAQ,OAAOA,GAAQ,SAMnCC,EAAO,IAAM,CACnB,EAMcH,KAAcD,EAAK,QAAU,KAAO,OAAS,OAAO,YAAc,MAAgBA,EAAG,YAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAGjK,SAASK,EAAaC,EAAG,CACvB,OAAO,OAAOA,GAAM,WAAaA,EAAC,EAAKC,EAAAA,MAAMD,CAAC,CAChD,CA2IA,SAASE,EAASC,EAAK,CACrB,OAAOA,CACT,CA6EA,SAASC,EAAkBC,EAAI,CAC7B,OAAIC,EAAe,gBAAA,GACjBC,EAAc,eAACF,CAAE,EACV,IAEF,EACT,CCzMA,SAASG,EAAaC,EAAO,CAC3B,IAAIf,EACJ,MAAMgB,EAAQX,EAAaU,CAAK,EAChC,OAAQf,EAAKgB,GAAS,KAAO,OAASA,EAAM,MAAQ,KAAOhB,EAAKgB,CAClE,CAEA,MAAMC,EAAgBhB,EAAW,OAAS,OAK1C,SAASiB,KAAoBC,EAAM,CACjC,I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CACA,CACF,CCnbA,SAASe,GAAQC,EAAwB,CAAC","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/utilities/package.json b/utilities/package.json index 6a14a27d..9da09bd0 100644 --- a/utilities/package.json +++ b/utilities/package.json @@ -26,21 +26,21 @@ "story:preview": "histoire preview" }, "dependencies": { - "vue": "^3.2.47" + "vue": "^3.4.23" }, "devDependencies": { - "@histoire/plugin-vue": "^0.16.1", + "@histoire/plugin-vue": "^0.17.17", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", - "@vitejs/plugin-vue": "^4.2.1", + "@vitejs/plugin-vue": "^5.0.4", "@vueuse/core": "^9.13.0", "cypress": "^12.11.0", "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", - "histoire": "^0.16.1", + "histoire": "^0.17.17", "typescript": "^5.0.4", - "vite": "^4.3.5", + "vite": "^5.2.9", "vue-router": "^4" }, "engines": { From 01d89f30e468276e41ae653286267606a3840c90 Mon Sep 17 00:00:00 2001 From: Rohan Date: Fri, 19 Apr 2024 17:22:27 +0530 Subject: [PATCH 2/2] [project] remove dist folders from monorepo (#116) * fix: remove dist folders from monorepo * fix: add changelogs --------- Co-authored-by: Rohan Bansal --- .github/workflows/release-package.yml | 2 +- .gitignore | 33 +- aform/dist/aform.js | 869 -- aform/dist/aform.js.map | 1 - aform/dist/aform.umd.cjs | 2 - aform/dist/aform.umd.cjs.map | 1 - aform/dist/style.css | 1 - aform/package.json | 23 +- atable/dist/atable.js | 769 -- atable/dist/atable.js.map | 1 - atable/dist/atable.umd.cjs | 2 - atable/dist/atable.umd.cjs.map | 1 - atable/dist/style.css | 1 - atable/package.json | 23 +- beam/package.json | 41 +- code_editor/dist/code-editor.js | 778 -- code_editor/dist/code-editor.js.map | 1 - code_editor/dist/code-editor.umd.cjs | 12 - code_editor/dist/code-editor.umd.cjs.map | 1 - code_editor/dist/style.css | 1 - code_editor/package.json | 23 +- .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + .../fix-stonecrop-dist_2024-04-19-06-56.json | 10 + common/config/rush/version-policies.json | 2 +- desktop/dist/desktop.js | 4965 ------------ desktop/dist/desktop.js.map | 1 - desktop/dist/desktop.umd.cjs | 45 - desktop/dist/desktop.umd.cjs.map | 1 - desktop/dist/style.css | 1 - desktop/package.json | 25 +- examples/package.json | 2 +- graphql_client/dist/graphql-client.js | 3075 -------- graphql_client/dist/graphql-client.js.map | 1 - graphql_client/dist/graphql-client.umd.cjs | 60 - .../dist/graphql-client.umd.cjs.map | 1 - graphql_client/package.json | 23 +- node_editor/dist/node-editor.js | 6987 ----------------- node_editor/dist/node-editor.js.map | 1 - node_editor/dist/node-editor.umd.cjs | 21 - node_editor/dist/node-editor.umd.cjs.map | 1 - node_editor/dist/style.css | 1 - node_editor/package.json | 23 +- rush.json | 22 +- stonecrop/dist/stonecrop.js | 5319 ------------- stonecrop/dist/stonecrop.umd.cjs | 5322 ------------- stonecrop/package.json | 23 +- themes/dist/style.css | 1 - themes/dist/themes.js | 2 - themes/dist/themes.js.map | 1 - themes/dist/themes.umd.cjs | 2 - themes/dist/themes.umd.cjs.map | 1 - themes/package.json | 17 +- utilities/dist/utilities.js | 333 - utilities/dist/utilities.js.map | 1 - utilities/dist/utilities.umd.cjs | 2 - utilities/dist/utilities.umd.cjs.map | 1 - utilities/package.json | 23 +- 64 files changed, 335 insertions(+), 28647 deletions(-) delete mode 100644 aform/dist/aform.js delete mode 100644 aform/dist/aform.js.map delete mode 100644 aform/dist/aform.umd.cjs delete mode 100644 aform/dist/aform.umd.cjs.map delete mode 100644 aform/dist/style.css delete mode 100644 atable/dist/atable.js delete mode 100644 atable/dist/atable.js.map delete mode 100644 atable/dist/atable.umd.cjs delete mode 100644 atable/dist/atable.umd.cjs.map delete mode 100644 atable/dist/style.css delete mode 100644 code_editor/dist/code-editor.js delete mode 100644 code_editor/dist/code-editor.js.map delete mode 100644 code_editor/dist/code-editor.umd.cjs delete mode 100644 code_editor/dist/code-editor.umd.cjs.map delete mode 100644 code_editor/dist/style.css create mode 100644 common/changes/@stonecrop/aform/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/atable/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/code-editor/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/desktop/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/graphql-client/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/node-editor/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/stonecrop/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/themes/fix-stonecrop-dist_2024-04-19-06-56.json create mode 100644 common/changes/@stonecrop/utilities/fix-stonecrop-dist_2024-04-19-06-56.json delete mode 100644 desktop/dist/desktop.js delete mode 100644 desktop/dist/desktop.js.map delete mode 100644 desktop/dist/desktop.umd.cjs delete mode 100644 desktop/dist/desktop.umd.cjs.map delete mode 100644 desktop/dist/style.css delete mode 100644 graphql_client/dist/graphql-client.js delete mode 100644 graphql_client/dist/graphql-client.js.map delete mode 100644 graphql_client/dist/graphql-client.umd.cjs delete mode 100644 graphql_client/dist/graphql-client.umd.cjs.map delete mode 100644 node_editor/dist/node-editor.js delete mode 100644 node_editor/dist/node-editor.js.map delete mode 100644 node_editor/dist/node-editor.umd.cjs delete mode 100644 node_editor/dist/node-editor.umd.cjs.map delete mode 100644 node_editor/dist/style.css delete mode 100644 stonecrop/dist/stonecrop.js delete mode 100644 stonecrop/dist/stonecrop.umd.cjs delete mode 100644 themes/dist/style.css delete mode 100644 themes/dist/themes.js delete mode 100644 themes/dist/themes.js.map delete mode 100644 themes/dist/themes.umd.cjs delete mode 100644 themes/dist/themes.umd.cjs.map delete mode 100644 utilities/dist/utilities.js delete mode 100644 utilities/dist/utilities.js.map delete mode 100644 utilities/dist/utilities.umd.cjs delete mode 100644 utilities/dist/utilities.umd.cjs.map diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index a62a0f5f..8b100d3b 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -6,7 +6,7 @@ on: - closed jobs: - publish-gpr: + publish-npm: if: github.event.pull_request.merged == true runs-on: ubuntu-latest permissions: diff --git a/.gitignore b/.gitignore index 215af065..5d2b84e6 100644 --- a/.gitignore +++ b/.gitignore @@ -58,14 +58,45 @@ jspm_packages/ # OS X temporary files .DS_Store +# Visual Studio Code +.vscode +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!*.code-workspace + +# IntelliJ IDEA project files; if you want to commit IntelliJ settings, this recipe may be helpful: +# https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +.idea/ +*.iml + # Rush temporary files common/deploy/ common/temp/ common/autoinstallers/*/.npmrc **/.rush/temp/ +*.lock + +# Heft temporary files +.cache +.heft + +# Common toolchain intermediate files +temp +lib +lib-amd +lib-es6 +lib-esnext +lib-commonjs +lib-shim +dist +dist-storybook +*.scss.ts +*.sass.ts # Typescript build files **/tsconfig.tsbuildinfo # XState generated files -**/*.typegen.ts \ No newline at end of file +**/*.typegen.ts diff --git a/aform/dist/aform.js b/aform/dist/aform.js deleted file mode 100644 index f15f3d8c..00000000 --- a/aform/dist/aform.js +++ /dev/null @@ -1,869 +0,0 @@ -import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from "vue"; -const Ve = { id: "checkbox-container" }, xe = ["id", "readonly", "required"], Be = { id: "custom-checkbox" }, Pe = ["for"], qe = ["innerHTML"], He = /* @__PURE__ */ D({ - __name: "ACheckbox", - props: /* @__PURE__ */ se({ - label: {}, - required: { type: Boolean }, - readOnly: { type: Boolean }, - uuid: {}, - validation: { default: () => ({ errorMessage: " " }) } - }, { - modelValue: {}, - modelModifiers: {} - }), - emits: ["update:modelValue"], - setup(e) { - const t = ae(e, "modelValue"); - return (n, o) => (f(), h("div", null, [ - i("label", Ve, [ - C(i("input", { - "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l), - type: "checkbox", - id: n.uuid, - class: "checkbox", - readonly: n.readOnly, - required: n.required - }, null, 8, xe), [ - [be, t.value] - ]), - i("span", Be, k(t.value), 1) - ]), - i("label", { - for: n.uuid, - id: "checkbox-label" - }, k(n.label), 9, Pe), - C(i("p", { - innerHTML: n.validation.errorMessage - }, null, 8, qe), [ - [O, n.validation.errorMessage] - ]) - ])); - } -}), M = (e, t) => { - const n = e.__vccOpts || e; - for (const [o, l] of t) - n[o] = l; - return n; -}, Fe = /* @__PURE__ */ M(He, [["__scopeId", "data-v-5093f1cb"]]), Re = /* @__PURE__ */ i("div", null, [ - /* @__PURE__ */ i("input", { type: "text" }), - /* @__PURE__ */ i("input", { type: "text" }), - /* @__PURE__ */ i("input", { type: "text" }) -], -1), Ue = /* @__PURE__ */ D({ - __name: "AComboBox", - props: ["event", "cellData", "tableID"], - setup(e) { - return (t, n) => { - const o = we("ATableModal"); - return f(), H(o, { - event: e.event, - cellData: e.cellData, - class: "amodal" - }, { - default: Ce(() => [ - Re - ]), - _: 1 - }, 8, ["event", "cellData"]); - }; - } -}); -var W; -const de = typeof window < "u", Qe = (e) => typeof e == "string", Ye = () => { -}; -de && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function ce(e) { - return typeof e == "function" ? e() : S(e); -} -function je(e) { - return e; -} -function We(e) { - return De() ? (Ee(e), !0) : !1; -} -function q(e) { - var t; - const n = ce(e); - return (t = n == null ? void 0 : n.$el) != null ? t : n; -} -const pe = de ? window : void 0; -function Ne(...e) { - let t, n, o, l; - if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t) - return Ye; - Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]); - const s = [], a = () => { - s.forEach((d) => d()), s.length = 0; - }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => { - a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g)))); - }, { immediate: !0, flush: "post" }), u = () => { - p(), a(); - }; - return We(u), u; -} -const N = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, z = "__vueuse_ssr_handlers__"; -N[z] = N[z] || {}; -function ze(e, { window: t = pe, scrollTarget: n } = {}) { - const o = y(!1), l = () => { - if (!t) - return; - const s = t.document, a = q(e); - if (!a) - o.value = !1; - else { - const r = a.getBoundingClientRect(); - o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0; - } - }; - return F(() => q(e), () => l(), { immediate: !0, flush: "post" }), t && Ne(n || t, "scroll", l, { - capture: !1, - passive: !0 - }), o; -} -var G; -(function(e) { - e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; -})(G || (G = {})); -var Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => { - for (var n in t || (t = {})) - Ke.call(t, n) && J(e, n, t[n]); - if (K) - for (var n of K(t)) - Je.call(t, n) && J(e, n, t[n]); - return e; -}; -const Ze = { - 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] -}; -Xe({ - linear: je -}, Ze); -const E = (e) => { - let t = ze(e).value; - return t = t && e.offsetHeight > 0, t; -}, A = (e) => e.tabIndex >= 0, X = (e) => { - const t = e.target; - return U(t); -}, U = (e) => { - var t; - let n; - if (e instanceof HTMLTableCellElement) { - const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; - if (o) { - const l = Array.from(o.children)[e.cellIndex]; - l && (n = l); - } - } else if (e instanceof HTMLTableRowElement) { - const o = e.previousElementSibling; - o && (n = o); - } - return n && (!A(n) || !E(n)) ? U(n) : n; -}, et = (e) => { - var t; - const n = e.target; - let o; - if (n instanceof HTMLTableCellElement) { - const l = (t = n.parentElement) == null ? void 0 : t.parentElement; - if (l) { - const s = l.firstElementChild.children[n.cellIndex]; - s && (o = s); - } - } else if (n instanceof HTMLTableRowElement) { - const l = n.parentElement; - if (l) { - const s = l.firstElementChild; - s && (o = s); - } - } - return o && (!A(o) || !E(o)) ? Q(o) : o; -}, Z = (e) => { - const t = e.target; - return Q(t); -}, Q = (e) => { - var t; - let n; - if (e instanceof HTMLTableCellElement) { - const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; - if (o) { - const l = Array.from(o.children)[e.cellIndex]; - l && (n = l); - } - } else if (e instanceof HTMLTableRowElement) { - const o = e.nextElementSibling; - o && (n = o); - } - return n && (!A(n) || !E(n)) ? Q(n) : n; -}, tt = (e) => { - var t; - const n = e.target; - let o; - if (n instanceof HTMLTableCellElement) { - const l = (t = n.parentElement) == null ? void 0 : t.parentElement; - if (l) { - const s = l.lastElementChild.children[n.cellIndex]; - s && (o = s); - } - } else if (n instanceof HTMLTableRowElement) { - const l = n.parentElement; - if (l) { - const s = l.lastElementChild; - s && (o = s); - } - } - return o && (!A(o) || !E(o)) ? U(o) : o; -}, ee = (e) => { - const t = e.target; - return Y(t); -}, Y = (e) => { - var t; - let n; - if (e.previousElementSibling) - n = e.previousElementSibling; - else { - const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; - n = o == null ? void 0 : o.lastElementChild; - } - return n && (!A(n) || !E(n)) ? Y(n) : n; -}, te = (e) => { - const t = e.target; - return j(t); -}, j = (e) => { - var t; - let n; - if (e.nextElementSibling) - n = e.nextElementSibling; - else { - const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; - n = o == null ? void 0 : o.firstElementChild; - } - return n && (!A(n) || !E(n)) ? j(n) : n; -}, ne = (e) => { - const t = e.target.parentElement.firstElementChild; - return t && (!A(t) || !E(t)) ? j(t) : t; -}, oe = (e) => { - const t = e.target.parentElement.lastElementChild; - return t && (!A(t) || !E(t)) ? Y(t) : t; -}, $ = ["alt", "control", "shift", "meta"], nt = { - ArrowUp: "up", - ArrowDown: "down", - ArrowLeft: "left", - ArrowRight: "right" -}, fe = { - "keydown.up": (e) => { - const t = X(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.down": (e) => { - const t = Z(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.left": (e) => { - const t = ee(e); - e.preventDefault(), e.stopPropagation(), t && t.focus(); - }, - "keydown.right": (e) => { - const t = te(e); - e.preventDefault(), e.stopPropagation(), t && t.focus(); - }, - "keydown.control.up": (e) => { - const t = et(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.down": (e) => { - const t = tt(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.left": (e) => { - const t = ne(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.right": (e) => { - const t = oe(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.end": (e) => { - const t = oe(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.enter": (e) => { - if (e.target instanceof HTMLTableCellElement) { - e.preventDefault(), e.stopPropagation(); - const t = Z(e); - t && t.focus(); - } - }, - "keydown.shift.enter": (e) => { - if (e.target instanceof HTMLTableCellElement) { - e.preventDefault(), e.stopPropagation(); - const t = X(e); - t && t.focus(); - } - }, - "keydown.home": (e) => { - const t = ne(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.tab": (e) => { - const t = te(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.shift.tab": (e) => { - const t = ee(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - } -}; -function ot(e) { - const t = (o) => { - let l = null; - o.parent && (typeof o.parent == "string" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value); - let s = []; - if (o.selectors) - if (typeof o.selectors == "string") - s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors)); - else if (o.selectors instanceof Element) - s.push(o.selectors); - else if (Array.isArray(o.selectors.value)) - for (const a of o.selectors.value) - a instanceof Element ? s.push(a) : s.push(a.$el); - else - s.push(o.selectors.value); - else - s = Array.from(l.children).filter((a) => A(a) && E(a)); - return s; - }, n = (o) => (l) => { - const s = nt[l.key] || l.key.toLowerCase(); - if ($.includes(s)) - return; - const a = o.handlers || fe; - for (const r of Object.keys(a)) { - const [p, ...u] = r.split("."); - if (p === "keydown" && u.includes(s)) { - const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => { - const _ = m.charAt(0).toUpperCase() + m.slice(1); - return l.getModifierState(_); - }); - if (g.length > 0) { - if (b) { - for (const m of $) - if (u.includes(m)) { - const _ = m.charAt(0).toUpperCase() + m.slice(1); - l.getModifierState(_) && d(l); - } - } - } else - b || d(l); - } - } - }; - re(() => { - for (const o of e) { - const l = t(o); - for (const s of l) - s.addEventListener("keydown", n(o)); - } - }), ke(() => { - for (const o of e) { - const l = t(o); - for (const s of l) - s.removeEventListener("keydown", n(o)); - } - }); -} -const lt = ["event", "colIndex", "rowIndex", "tableid"], st = { colspan: "5" }, at = ["onClick"], rt = 6, I = 7, it = /* @__PURE__ */ D({ - __name: "ADate", - props: { - colIndex: {}, - rowIndex: {}, - tableid: {}, - event: {}, - indent: {}, - readonly: { type: Boolean } - }, - setup(e) { - const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]); - re(async () => { - let c = n.cellData(t.colIndex, t.rowIndex); - c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae(); - const T = document.getElementsByClassName("selecteddate"); - if (T.length > 0) - T[0].focus(); - else { - const v = document.getElementsByClassName("todaysdate"); - v.length > 0 && v[0].focus(); - } - }), F([s, a], () => { - p(); - }); - const p = () => { - r.value = []; - const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T); - for (let w of Array(43).keys()) - r.value.push(v + w * 864e5); - }, u = () => { - a.value -= 1; - }, d = () => { - a.value += 1; - }, g = () => { - s.value == 0 ? (s.value = 11, u()) : s.value -= 1; - }, b = () => { - s.value == 11 ? (s.value = 0, d()) : s.value += 1; - }, m = (c) => { - if (s.value === o.getMonth()) - return o.toDateString() === new Date(c).toDateString(); - }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => { - l.value = new Date(r.value[T]), ve(); - }, ve = () => { - n.setCellData(t.rowIndex, t.colIndex, l.value.getTime()); - }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, { - year: "numeric", - month: "long" - })); - return ot([ - { - parent: "table.adate", - selectors: "td", - handlers: { - ...fe, - "keydown.pageup": g, - "keydown.shift.pageup": u, - "keydown.pagedown": b, - "keydown.shift.pagedown": d - } - } - ]), (c, T) => c.readonly ? ue("", !0) : (f(), h("div", { - key: 0, - event: c.event, - colIndex: c.colIndex, - rowIndex: c.rowIndex, - tableid: c.tableid, - class: "adate", - tabindex: "0", - ref: "adatepicker" - }, [ - i("table", null, [ - i("tr", null, [ - i("td", { - onClick: g, - tabindex: -1 - }, "<"), - i("th", st, k(ge.value), 1), - i("td", { - onClick: b, - tabindex: -1 - }, ">") - ]), - (f(), h(V, null, x(rt, (v) => i("tr", { key: v }, [ - (f(), h(V, null, x(I, (w) => i("td", { - key: (v - 1) * I + w, - contenteditable: !1, - spellcheck: !1, - tabindex: 0, - style: Ie({ - border: _(r.value[(v - 1) * I + w]) ? "2px solid var(--focus-cell-outline)" : "none", - borderBottomColor: m(r.value[(v - 1) * I + w]) ? "var(--focus-cell-outline)" : "none" - }), - onClick: Me((ye) => he(ye, (v - 1) * I + w), ["prevent", "stop"]), - class: B({ - todaysdate: m(r.value[(v - 1) * I + w]), - selecteddate: _(r.value[(v - 1) * I + w]) - }) - }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64)) - ])), 64)) - ]) - ], 8, lt)); - } -}), ut = /* @__PURE__ */ M(it, [["__scopeId", "data-v-169f1184"]]), dt = D({ - name: "ADropdown", - props: { - modelValue: { - type: String, - required: !1, - default: "" - }, - label: { - type: String, - required: !0 - }, - value: String, - items: { - type: Array, - required: !1, - default: () => [] - }, - isAsync: { - type: Boolean, - required: !1, - default: !1 - } - }, - emits: ["update:modelValue", "filterChanged"], - data() { - return { - results: [], - search: this.modelValue, - isLoading: !1, - arrowCounter: 0, - isOpen: !1 - }; - }, - watch: { - items: function(e, t) { - this.isLoading = !1, this.results = e; - } - }, - mounted() { - document.addEventListener("click", this.handleClickOutside), this.filterResults(); - }, - destroyed() { - document.removeEventListener("click", this.handleClickOutside); - }, - methods: { - setResult(e) { - this.search = e, this.closeResults(); - }, - filterResults() { - this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1); - }, - onChange() { - this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit("filterChanged", this.search)) : this.filterResults(); - }, - handleClickOutside(e) { - this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0); - }, - closeResults() { - this.isOpen = !1, this.items.includes(this.search) || (this.search = ""), this.$emit("update:modelValue", this.search); - }, - onArrowDown() { - this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1); - }, - onArrowUp() { - this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1); - }, - onEnter() { - this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0; - }, - openWithSearch() { - this.search = "", this.onChange(), this.$refs.mopInput.focus(); - } - } -}), ct = { class: "input-wrapper" }, pt = { - id: "autocomplete-results", - class: "autocomplete-results" -}, ft = { - key: 0, - class: "loading autocomplete-result" -}, mt = ["onClick"]; -function ht(e, t, n, o, l, s) { - return f(), h("div", { - class: B(["autocomplete", { isOpen: e.isOpen }]) - }, [ - i("div", ct, [ - C(i("input", { - ref: "mopInput", - type: "text", - onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)), - onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)), - "onUpdate:modelValue": t[2] || (t[2] = (a) => e.search = a), - onKeydown: [ - t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), ["down"])), - t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), ["up"])), - t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), ["enter"])) - ] - }, null, 544), [ - [R, e.search] - ]), - C(i("ul", pt, [ - e.isLoading ? (f(), h("li", ft, "Loading results...")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h("li", { - key: r, - onClick: (p) => e.setResult(a), - class: B(["autocomplete-result", { "is-active": r === e.arrowCounter }]) - }, k(a), 11, mt))), 128)) - ], 512), [ - [O, e.isOpen] - ]), - i("label", null, k(e.label), 1) - ]) - ], 2); -} -const vt = /* @__PURE__ */ M(dt, [["render", ht]]), gt = /* @__PURE__ */ D({ - __name: "CollapseButton", - props: { - collapsed: { type: Boolean } - }, - setup(e) { - return (t, n) => (f(), h("button", { - class: B(["collapse-button", t.collapsed ? "rotated" : "unrotated"]) - }, "×", 2)); - } -}), yt = /* @__PURE__ */ M(gt, [["__scopeId", "data-v-6f1c1b45"]]), bt = /* @__PURE__ */ D({ - __name: "AForm", - props: { - modelValue: {}, - data: {}, - readonly: { type: Boolean } - }, - emits: ["update:modelValue"], - setup(e, { emit: t }) { - const n = e, o = t, l = y(n.data || {}), s = (r) => { - let p = {}; - for (const [u, d] of Object.entries(r)) - ["component", "fieldtype"].includes(u) || (p[u] = d), u === "rows" && d && d.length === 0 && (p.rows = l.value[r.fieldname]); - return p; - }, a = L({ - get: () => n.modelValue.map((r, p) => L({ - get() { - return r.value; - }, - set: (u) => { - n.modelValue[p].value = u, o("update:modelValue", n.modelValue); - } - })), - set: () => { - } - }); - return (r, p) => (f(), h("form", null, [ - (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({ - key: d, - schema: u, - modelValue: a.value[d].value, - "onUpdate:modelValue": (g) => a.value[d].value = g, - data: l.value[u.fieldname], - readonly: r.readonly - }, s(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128)) - ])); - } -}), me = /* @__PURE__ */ M(bt, [["__scopeId", "data-v-74d66cf2"]]), wt = /* @__PURE__ */ D({ - __name: "AFieldset", - props: { - schema: {}, - label: {}, - collapsible: { type: Boolean }, - data: {} - }, - setup(e) { - const t = e, n = y(t.data || []); - let o = y(!1), l = y(t.collapsible); - const s = y(t.schema); - function a(r) { - r.preventDefault(), l.value && (o.value = !o.value); - } - return (r, p) => (f(), h("fieldset", null, [ - i("legend", { - onClick: a, - onSubmit: a - }, [ - Se(k(r.label) + " ", 1), - S(l) ? (f(), H(yt, { - key: 0, - collapsed: S(o) - }, null, 8, ["collapsed"])) : ue("", !0) - ], 32), - Oe(r.$slots, "default", { collapsed: S(o) }, () => [ - C($e(me, { - modelValue: s.value, - "onUpdate:modelValue": p[0] || (p[0] = (u) => s.value = u), - data: n.value - }, null, 8, ["modelValue", "data"]), [ - [O, !S(o)] - ]) - ], !0) - ])); - } -}), Ct = /* @__PURE__ */ M(wt, [["__scopeId", "data-v-cad9b578"]]), kt = ["id", "disabled", "required"], Dt = ["for"], Et = ["innerHTML"], At = /* @__PURE__ */ D({ - __name: "ANumericInput", - props: /* @__PURE__ */ se({ - label: {}, - required: { type: Boolean }, - readonly: { type: Boolean }, - uuid: {}, - validation: { default: () => ({ errorMessage: " " }) } - }, { - modelValue: {}, - modelModifiers: {} - }), - emits: ["update:modelValue"], - setup(e) { - const t = ae(e, "modelValue"); - return (n, o) => (f(), h("div", null, [ - C(i("input", { - "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l), - type: "number", - id: n.uuid, - disabled: n.readonly, - required: n.required - }, null, 8, kt), [ - [R, t.value] - ]), - i("label", { for: n.uuid }, k(n.label), 9, Dt), - C(i("p", { - innerHTML: n.validation.errorMessage - }, null, 8, Et), [ - [O, n.validation.errorMessage] - ]) - ])); - } -}), It = /* @__PURE__ */ M(At, [["__scopeId", "data-v-02907cd6"]]), le = { - date: "##/##/####", - datetime: "####/##/## ##:##", - time: "##:##", - fulltime: "##:##:##", - phone: "(###) ### - ####", - card: "#### #### #### ####" -}; -function Mt(e) { - try { - return Function(`"use strict";return (${e})`)(); - } catch { - } -} -function Tt(e) { - var n; - let t = e.value; - if (t) { - const o = Mt(t); - if (o) { - const l = e.instance.locale; - t = o(l); - } - } else { - const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase(); - l && le[l] && (t = le[l]); - } - return t; -} -function _t(e, t) { - t || (t = "#"); - let n = e; - const o = [t, "/", "-", "(", ")", " "]; - for (const l of o) - n = n.replaceAll(l, ""); - return n; -} -function St(e, t, n) { - n || (n = "#"); - let o = t; - for (const l of e) { - const s = o.indexOf(n); - if (s !== -1) { - const a = o.substring(0, s), r = o.substring(s + 1); - o = a + l + r; - } - } - return o.slice(0, t.length); -} -function Ot(e, t) { - const n = Tt(t); - if (!n) - return; - const o = "#", l = e.value, s = _t(l, o); - if (s) { - const a = St(s, n, o); - t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a; - } else - e.value = n; -} -const $t = D({ - name: "ATextInput", - props: { - schema: { - type: Object, - required: !0 - }, - label: { - type: String, - required: !0 - }, - modelValue: { - type: null - }, - mask: { - type: String - }, - required: { - type: Boolean - }, - readonly: { - type: Boolean - }, - uuid: { - type: String - }, - validation: { - type: Object, - default: () => ({ errorMessage: " " }) - } - }, - setup(e, t) { - const n = y(!1), o = ie("locale", ""); - return { inputText: L({ - get() { - return e.modelValue; - }, - set(s) { - t.emit("update:modelValue", s); - } - }), locale: o, maskFilled: n }; - }, - directives: { - mask: Ot - } -}), Lt = ["id", "disabled", "maxlength", "required"], Vt = ["for"], xt = ["innerHTML"]; -function Bt(e, t, n, o, l, s) { - const a = Le("mask"); - return f(), h("div", null, [ - C(i("input", { - "onUpdate:modelValue": t[0] || (t[0] = (r) => e.inputText = r), - id: e.uuid, - disabled: e.readonly, - maxlength: e.mask ? e.maskFilled && e.mask.length : void 0, - required: e.required - }, null, 8, Lt), [ - [R, e.inputText], - [a, e.mask] - ]), - i("label", { for: e.uuid }, k(e.label), 9, Vt), - C(i("p", { - innerHTML: e.validation.errorMessage - }, null, 8, xt), [ - [O, e.validation.errorMessage] - ]) - ]); -} -const Pt = /* @__PURE__ */ M($t, [["render", Bt], ["__scopeId", "data-v-76dba9b8"]]); -function Ht(e) { - e.component("ACheckbox", Fe), e.component("ACombobox", Ue), e.component("ADate", ut), e.component("ADropdown", vt), e.component("AFieldset", Ct), e.component("AForm", me), e.component("ANumericInput", It), e.component("ATextInput", Pt); -} -export { - Fe as ACheckbox, - Ue as AComboBox, - ut as ADate, - vt as ADropdown, - Ct as AFieldset, - me as AForm, - It as ANumericInput, - Pt as ATextInput, - Ht as install -}; -//# sourceMappingURL=aform.js.map diff --git a/aform/dist/aform.js.map b/aform/dist/aform.js.map deleted file mode 100644 index f5c58a94..00000000 --- a/aform/dist/aform.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","s","c","a","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","t","ne","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","props","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","value","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","emit","__emit","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;;;AA2BM,UAAAA,IAAWC,GAA2CC,GAAA,YAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1B7D,IAAIC;AACJ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U,aAAaC,EAAS,GAChCD,EAAA,UAAU,aAAaE,EAAS,GAChCF,EAAA,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,aAAaI,EAAS,GAChCJ,EAAA,UAAU,aAAaK,EAAS,GAChCL,EAAA,UAAU,SAASM,EAAK,GACxBN,EAAA,UAAU,iBAAiBO,EAAa,GACxCP,EAAA,UAAU,cAAcQ,EAAU;AAGvC;"} \ No newline at end of file diff --git a/aform/dist/aform.umd.cjs b/aform/dist/aform.umd.cjs deleted file mode 100644 index 9b15691d..00000000 --- a/aform/dist/aform.umd.cjs +++ /dev/null @@ -1,2 +0,0 @@ -(function(m,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(m=typeof globalThis<"u"?globalThis:m||self,n(m["@stonecrop/aform"]={},m.Vue))})(this,function(m,n){"use strict";const ne={id:"checkbox-container"},oe=["id","readonly","required"],le={id:"custom-checkbox"},ae=["for"],re=["innerHTML"],se=n.defineComponent({__name:"ACheckbox",props:n.mergeModels({label:{},required:{type:Boolean},readOnly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,l)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("label",ne,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"checkbox",id:o.uuid,class:"checkbox",readonly:o.readOnly,required:o.required},null,8,oe),[[n.vModelCheckbox,t.value]]),n.createElementVNode("span",le,n.toDisplayString(t.value),1)]),n.createElementVNode("label",{for:o.uuid,id:"checkbox-label"},n.toDisplayString(o.label),9,ae),n.withDirectives(n.createElementVNode("p",{innerHTML:o.validation.errorMessage},null,8,re),[[n.vShow,o.validation.errorMessage]])]))}}),E=(e,t)=>{const o=e.__vccOpts||e;for(const[l,a]of t)o[l]=a;return o},$=E(se,[["__scopeId","data-v-5093f1cb"]]),ie=n.createElementVNode("div",null,[n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"})],-1),O=n.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(e){return(t,o)=>{const l=n.resolveComponent("ATableModal");return n.openBlock(),n.createBlock(l,{event:e.event,cellData:e.cellData,class:"amodal"},{default:n.withCtx(()=>[ie]),_:1},8,["event","cellData"])}}});var L;const v=typeof window<"u",ce=e=>typeof e=="string",de=()=>{};v&&(L=window==null?void 0:window.navigator)!=null&&L.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function N(e){return typeof e=="function"?e():n.unref(e)}function ue(e){return e}function pe(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function I(e){var t;const o=N(e);return(t=o==null?void 0:o.$el)!=null?t:o}const F=v?window:void 0;function fe(...e){let t,o,l,a;if(ce(e[0])||Array.isArray(e[0])?([o,l,a]=e,t=F):[t,o,l,a]=e,!t)return de;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const r=[],s=()=>{r.forEach(d=>d()),r.length=0},i=(d,y,g,f)=>(d.addEventListener(y,g,f),()=>d.removeEventListener(y,g,f)),p=n.watch(()=>[I(t),N(a)],([d,y])=>{s(),d&&r.push(...o.flatMap(g=>l.map(f=>i(d,g,f,y))))},{immediate:!0,flush:"post"}),c=()=>{p(),s()};return pe(c),c}const P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__";P[q]=P[q]||{};function me(e,{window:t=F,scrollTarget:o}={}){const l=n.ref(!1),a=()=>{if(!t)return;const r=t.document,s=I(e);if(!s)l.value=!1;else{const i=s.getBoundingClientRect();l.value=i.top<=(t.innerHeight||r.documentElement.clientHeight)&&i.left<=(t.innerWidth||r.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return n.watch(()=>I(e),()=>a(),{immediate:!0,flush:"post"}),t&&fe(o||t,"scroll",a,{capture:!1,passive:!0}),l}var x;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(x||(x={}));var he=Object.defineProperty,H=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,R=(e,t,o)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,we=(e,t)=>{for(var o in t||(t={}))ye.call(t,o)&&R(e,o,t[o]);if(H)for(var o of H(t))ge.call(t,o)&&R(e,o,t[o]);return e};we({linear:ue},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const w=e=>{let t=me(e).value;return t=t&&e.offsetHeight>0,t},b=e=>e.tabIndex>=0,U=e=>{const t=e.target;return M(t)},M=e=>{var t;let o;if(e instanceof HTMLTableCellElement){const l=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(l){const a=Array.from(l.children)[e.cellIndex];a&&(o=a)}}else if(e instanceof HTMLTableRowElement){const l=e.previousElementSibling;l&&(o=l)}return o&&(!b(o)||!w(o))?M(o):o},be=e=>{var t;const o=e.target;let l;if(o instanceof HTMLTableCellElement){const a=(t=o.parentElement)==null?void 0:t.parentElement;if(a){const r=a.firstElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.firstElementChild;r&&(l=r)}}return l&&(!b(l)||!w(l))?S(l):l},j=e=>{const t=e.target;return S(t)},S=e=>{var t;let o;if(e instanceof HTMLTableCellElement){const l=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(l){const a=Array.from(l.children)[e.cellIndex];a&&(o=a)}}else if(e instanceof HTMLTableRowElement){const l=e.nextElementSibling;l&&(o=l)}return o&&(!b(o)||!w(o))?S(o):o},ke=e=>{var t;const o=e.target;let l;if(o instanceof HTMLTableCellElement){const a=(t=o.parentElement)==null?void 0:t.parentElement;if(a){const r=a.lastElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.lastElementChild;r&&(l=r)}}return l&&(!b(l)||!w(l))?M(l):l},Q=e=>{const t=e.target;return B(t)},B=e=>{var t;let o;if(e.previousElementSibling)o=e.previousElementSibling;else{const l=(t=e.parentElement)==null?void 0:t.previousElementSibling;o=l==null?void 0:l.lastElementChild}return o&&(!b(o)||!w(o))?B(o):o},Y=e=>{const t=e.target;return _(t)},_=e=>{var t;let o;if(e.nextElementSibling)o=e.nextElementSibling;else{const l=(t=e.parentElement)==null?void 0:t.nextElementSibling;o=l==null?void 0:l.firstElementChild}return o&&(!b(o)||!w(o))?_(o):o},z=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!b(t)||!w(t))?_(t):t},W=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!b(t)||!w(t))?B(t):t},V=["alt","control","shift","meta"],Ee={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},K={"keydown.up":e=>{const t=U(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=j(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Q(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Y(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=be(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=ke(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=j(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=U(e);t&&t.focus()}},"keydown.home":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Y(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Q(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Ce(e){const t=l=>{let a=null;l.parent&&(typeof l.parent=="string"?a=document.querySelector(l.parent):l.parent instanceof Element?a=l.parent:a=l.parent.value);let r=[];if(l.selectors)if(typeof l.selectors=="string")r=a?Array.from(a.querySelectorAll(l.selectors)):Array.from(document.querySelectorAll(l.selectors));else if(l.selectors instanceof Element)r.push(l.selectors);else if(Array.isArray(l.selectors.value))for(const s of l.selectors.value)s instanceof Element?r.push(s):r.push(s.$el);else r.push(l.selectors.value);else r=Array.from(a.children).filter(s=>b(s)&&w(s));return r},o=l=>a=>{const r=Ee[a.key]||a.key.toLowerCase();if(V.includes(r))return;const s=l.handlers||K;for(const i of Object.keys(s)){const[p,...c]=i.split(".");if(p==="keydown"&&c.includes(r)){const d=s[i],y=c.filter(f=>V.includes(f)),g=V.some(f=>{const A=f.charAt(0).toUpperCase()+f.slice(1);return a.getModifierState(A)});if(y.length>0){if(g){for(const f of V)if(c.includes(f)){const A=f.charAt(0).toUpperCase()+f.slice(1);a.getModifierState(A)&&d(a)}}}else g||d(a)}}};n.onMounted(()=>{for(const l of e){const a=t(l);for(const r of a)r.addEventListener("keydown",o(l))}}),n.onBeforeUnmount(()=>{for(const l of e){const a=t(l);for(const r of a)r.removeEventListener("keydown",o(l))}})}const De=["event","colIndex","rowIndex","tableid"],Ae={colspan:"5"},Ve=["onClick"],Ie=6,C=7,G=E(n.defineComponent({__name:"ADate",props:{colIndex:{},rowIndex:{},tableid:{},event:{},indent:{},readonly:{type:Boolean}},setup(e){const t=e,o=n.inject(t.tableid),l=new Date,a=n.ref(),r=n.ref(),s=n.ref(),i=n.ref([]);n.onMounted(async()=>{let u=o.cellData(t.colIndex,t.rowIndex);u?(u instanceof Date||(u=new Date(u)),a.value=u,r.value=a.value.getMonth(),s.value=a.value.getFullYear()):(r.value=l.getMonth(),s.value=l.getFullYear()),p(),await n.nextTick();const D=document.getElementsByClassName("selecteddate");if(D.length>0)D[0].focus();else{const h=document.getElementsByClassName("todaysdate");h.length>0&&h[0].focus()}}),n.watch([r,s],()=>{p()});const p=()=>{i.value=[];const u=new Date(s.value,r.value,1),D=u.getDay(),h=u.setDate(u.getDate()-D);for(let k of Array(43).keys())i.value.push(h+k*864e5)},c=()=>{s.value-=1},d=()=>{s.value+=1},y=()=>{r.value==0?(r.value=11,c()):r.value-=1},g=()=>{r.value==11?(r.value=0,d()):r.value+=1},f=u=>{if(r.value===l.getMonth())return l.toDateString()===new Date(u).toDateString()},A=u=>new Date(u).toDateString()===new Date(a.value).toDateString(),We=(u,D)=>{a.value=new Date(i.value[D]),Ke()},Ke=()=>{o.setCellData(t.rowIndex,t.colIndex,a.value.getTime())},Ge=n.computed(()=>new Date(s.value,r.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ce([{parent:"table.adate",selectors:"td",handlers:{...K,"keydown.pageup":y,"keydown.shift.pageup":c,"keydown.pagedown":g,"keydown.shift.pagedown":d}}]),(u,D)=>u.readonly?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,event:u.event,colIndex:u.colIndex,rowIndex:u.rowIndex,tableid:u.tableid,class:"adate",tabindex:"0",ref:"adatepicker"},[n.createElementVNode("table",null,[n.createElementVNode("tr",null,[n.createElementVNode("td",{onClick:y,tabindex:-1},"<"),n.createElementVNode("th",Ae,n.toDisplayString(Ge.value),1),n.createElementVNode("td",{onClick:g,tabindex:-1},">")]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(Ie,h=>n.createElementVNode("tr",{key:h},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(C,k=>n.createElementVNode("td",{key:(h-1)*C+k,contenteditable:!1,spellcheck:!1,tabindex:0,style:n.normalizeStyle({border:A(i.value[(h-1)*C+k])?"2px solid var(--focus-cell-outline)":"none",borderBottomColor:f(i.value[(h-1)*C+k])?"var(--focus-cell-outline)":"none"}),onClick:n.withModifiers(Je=>We(Je,(h-1)*C+k),["prevent","stop"]),class:n.normalizeClass({todaysdate:f(i.value[(h-1)*C+k]),selecteddate:A(i.value[(h-1)*C+k])})},n.toDisplayString(new Date(i.value[(h-1)*C+k]).getDate()),15,Ve)),64))])),64))])],8,De))}}),[["__scopeId","data-v-169f1184"]]),Me=n.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}}),Se={class:"input-wrapper"},Be={id:"autocomplete-results",class:"autocomplete-results"},_e={key:0,class:"loading autocomplete-result"},Te=["onClick"];function $e(e,t,o,l,a,r){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["autocomplete",{isOpen:e.isOpen}])},[n.createElementVNode("div",Se,[n.withDirectives(n.createElementVNode("input",{ref:"mopInput",type:"text",onInput:t[0]||(t[0]=(...s)=>e.onChange&&e.onChange(...s)),onFocus:t[1]||(t[1]=(...s)=>e.onChange&&e.onChange(...s)),"onUpdate:modelValue":t[2]||(t[2]=s=>e.search=s),onKeydown:[t[3]||(t[3]=n.withKeys((...s)=>e.onArrowDown&&e.onArrowDown(...s),["down"])),t[4]||(t[4]=n.withKeys((...s)=>e.onArrowUp&&e.onArrowUp(...s),["up"])),t[5]||(t[5]=n.withKeys((...s)=>e.onEnter&&e.onEnter(...s),["enter"]))]},null,544),[[n.vModelText,e.search]]),n.withDirectives(n.createElementVNode("ul",Be,[e.isLoading?(n.openBlock(),n.createElementBlock("li",_e,"Loading results...")):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(e.results,(s,i)=>(n.openBlock(),n.createElementBlock("li",{key:i,onClick:p=>e.setResult(s),class:n.normalizeClass(["autocomplete-result",{"is-active":i===e.arrowCounter}])},n.toDisplayString(s),11,Te))),128))],512),[[n.vShow,e.isOpen]]),n.createElementVNode("label",null,n.toDisplayString(e.label),1)])],2)}const J=E(Me,[["render",$e]]),Oe=E(n.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["collapse-button",t.collapsed?"rotated":"unrotated"])},"×",2))}}),[["__scopeId","data-v-6f1c1b45"]]),T=E(n.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,l=t,a=n.ref(o.data||{}),r=i=>{let p={};for(const[c,d]of Object.entries(i))["component","fieldtype"].includes(c)||(p[c]=d),c==="rows"&&d&&d.length===0&&(p.rows=a.value[i.fieldname]);return p},s=n.computed({get:()=>o.modelValue.map((i,p)=>n.computed({get(){return i.value},set:c=>{o.modelValue[p].value=c,l("update:modelValue",o.modelValue)}})),set:()=>{}});return(i,p)=>(n.openBlock(),n.createElementBlock("form",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.modelValue,(c,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(c.component),n.mergeProps({key:d,schema:c,modelValue:s.value[d].value,"onUpdate:modelValue":y=>s.value[d].value=y,data:a.value[c.fieldname],readonly:i.readonly},r(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-74d66cf2"]]),X=E(n.defineComponent({__name:"AFieldset",props:{schema:{},label:{},collapsible:{type:Boolean},data:{}},setup(e){const t=e,o=n.ref(t.data||[]);let l=n.ref(!1),a=n.ref(t.collapsible);const r=n.ref(t.schema);function s(i){i.preventDefault(),a.value&&(l.value=!l.value)}return(i,p)=>(n.openBlock(),n.createElementBlock("fieldset",null,[n.createElementVNode("legend",{onClick:s,onSubmit:s},[n.createTextVNode(n.toDisplayString(i.label)+" ",1),n.unref(a)?(n.openBlock(),n.createBlock(Oe,{key:0,collapsed:n.unref(l)},null,8,["collapsed"])):n.createCommentVNode("",!0)],32),n.renderSlot(i.$slots,"default",{collapsed:n.unref(l)},()=>[n.withDirectives(n.createVNode(T,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=c=>r.value=c),data:o.value},null,8,["modelValue","data"]),[[n.vShow,!n.unref(l)]])],!0)]))}}),[["__scopeId","data-v-cad9b578"]]),Le=["id","disabled","required"],ve=["for"],Ne=["innerHTML"],Z=E(n.defineComponent({__name:"ANumericInput",props:n.mergeModels({label:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,l)=>(n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"number",id:o.uuid,disabled:o.readonly,required:o.required},null,8,Le),[[n.vModelText,t.value]]),n.createElementVNode("label",{for:o.uuid},n.toDisplayString(o.label),9,ve),n.withDirectives(n.createElementVNode("p",{innerHTML:o.validation.errorMessage},null,8,Ne),[[n.vShow,o.validation.errorMessage]])]))}}),[["__scopeId","data-v-02907cd6"]]),ee={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Fe(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Pe(e){var o;let t=e.value;if(t){const l=Fe(t);if(l){const a=e.instance.locale;t=l(a)}}else{const a=(o=e.instance.schema.fieldtype)==null?void 0:o.toLowerCase();a&&ee[a]&&(t=ee[a])}return t}function qe(e,t){t||(t="#");let o=e;const l=[t,"/","-","(",")"," "];for(const a of l)o=o.replaceAll(a,"");return o}function xe(e,t,o){o||(o="#");let l=t;for(const a of e){const r=l.indexOf(o);if(r!==-1){const s=l.substring(0,r),i=l.substring(r+1);l=s+a+i}}return l.slice(0,t.length)}function He(e,t){const o=Pe(t);if(!o)return;const l="#",a=e.value,r=qe(a,l);if(r){const s=xe(r,o,l);t.instance.maskFilled&&(t.instance.maskFilled=!s.includes(l)),e.value=s}else e.value=o}const Re=n.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const o=n.ref(!1),l=n.inject("locale","");return{inputText:n.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:l,maskFilled:o}},directives:{mask:He}}),Ue=["id","disabled","maxlength","required"],je=["for"],Qe=["innerHTML"];function Ye(e,t,o,l,a,r){const s=n.resolveDirective("mask");return n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>e.inputText=i),id:e.uuid,disabled:e.readonly,maxlength:e.mask?e.maskFilled&&e.mask.length:void 0,required:e.required},null,8,Ue),[[n.vModelText,e.inputText],[s,e.mask]]),n.createElementVNode("label",{for:e.uuid},n.toDisplayString(e.label),9,je),n.withDirectives(n.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Qe),[[n.vShow,e.validation.errorMessage]])])}const te=E(Re,[["render",Ye],["__scopeId","data-v-76dba9b8"]]);function ze(e){e.component("ACheckbox",$),e.component("ACombobox",O),e.component("ADate",G),e.component("ADropdown",J),e.component("AFieldset",X),e.component("AForm",T),e.component("ANumericInput",Z),e.component("ATextInput",te)}m.ACheckbox=$,m.AComboBox=O,m.ADate=G,m.ADropdown=J,m.AFieldset=X,m.AForm=T,m.ANumericInput=Z,m.ATextInput=te,m.install=ze,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=aform.umd.cjs.map diff --git a/aform/dist/aform.umd.cjs.map b/aform/dist/aform.umd.cjs.map deleted file mode 100644 index 74e08e1f..00000000 --- a/aform/dist/aform.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aform.umd.cjs","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","t","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","props","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","value","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","emit","__emit","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":"4nBA2BM,MAAAA,EAAWC,EAAAA,SAA2CC,EAAA,YAAC,kqCC1B7D,IAAIC,EACJ,MAAMC,EAAI,OAAO,OAAS,IAAKC,GAAK,GAAM,OAAO,GAAK,SAAUC,GAAI,IAAM,CAC1E,EACAF,IAAOD,EAAI,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,EAAE,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAClI,SAASI,EAAE,EAAG,CACZ,OAAO,OAAO,GAAK,WAAa,EAAC,EAAKC,EAAAA,MAAE,CAAC,CAC3C,CACA,SAASC,GAAE,EAAG,CACZ,OAAO,CACT,CACA,SAASC,GAAE,EAAG,CACZ,OAAOC,EAAAA,gBAAG,GAAIC,iBAAE,CAAC,EAAG,IAAM,EAC5B,CACA,SAASC,EAAE,EAAG,CACZ,IAAI,EACJ,MAAMC,EAAIP,EAAE,CAAC,EACb,OAAQ,EAAIO,GAAK,KAAO,OAASA,EAAE,MAAQ,KAAO,EAAIA,CACxD,CACA,MAAMC,EAAIX,EAAI,OAAS,OACvB,SAASY,MAAK,EAAG,CACf,IAAI,EAAGF,EAAGG,EAAGC,EACb,GAAIb,GAAE,EAAE,CAAC,CAAC,GAAK,MAAM,QAAQ,EAAE,CAAC,CAAC,GAAK,CAACS,EAAGG,EAAGC,CAAC,EAAI,EAAG,EAAIH,GAAK,CAAC,EAAGD,EAAGG,EAAGC,CAAC,EAAI,EAAG,CAAC,EAC/E,OAAOZ,GACT,MAAM,QAAQQ,CAAC,IAAMA,EAAI,CAACA,CAAC,GAAI,MAAM,QAAQG,CAAC,IAAMA,EAAI,CAACA,CAAC,GAC1D,MAAME,EAAI,GAAI,EAAI,IAAM,CACtBA,EAAE,QAASC,GAAMA,EAAG,CAAA,EAAGD,EAAE,OAAS,CACnC,EAAEE,EAAI,CAACD,EAAGE,EAAGC,EAAGC,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AAA,OAAA,OAGY0D,SAAAA,EAAAA,QAAAA,EAKDrB,KAAAA,EAAAA,EAAAA,EAAAA,CAAAA,CAAAA,EAAAA,WAAAA,EAAAA,SAAAA,EACT,CAAuC2B,EAAAhE,EAAA,IAAA,CAAA,CAAA,EACKiE,EAAAA,mBAAAA,QAAW,CAAY,IAAAjE,EAAA,IAAA,EAAAkE,EAAA,gBAAAlE,EAAA,KAAA,EAAA,EAAAH,EAAA,EAVrEW,EAAA,eAAAD,EAAA,mBAAA,IAAA,CAAA,UAUa0D,EAAW,WAAA,YAAA,EAAA,KAAA,EAAAnE,EAAA,EAAA,wGCGxB,SAASqE,GAAQC,EAAwB,CACpCA,EAAA,UAAU,YAAaC,CAAS,EAChCD,EAAA,UAAU,YAAaE,CAAS,EAChCF,EAAA,UAAU,QAASG,CAAK,EACxBH,EAAA,UAAU,YAAaI,CAAS,EAChCJ,EAAA,UAAU,YAAaK,CAAS,EAChCL,EAAA,UAAU,QAASM,CAAK,EACxBN,EAAA,UAAU,gBAAiBO,CAAa,EACxCP,EAAA,UAAU,aAAcQ,EAAU,CAGvC"} \ No newline at end of file diff --git a/aform/dist/style.css b/aform/dist/style.css deleted file mode 100644 index d540f438..00000000 --- a/aform/dist/style.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";div[data-v-5093f1cb]{display:inline-block;min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}p[data-v-5093f1cb],label[data-v-5093f1cb]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-5093f1cb]{width:100%;color:red;font-size:85%}.checkbox[data-v-5093f1cb]{visibility:hidden}.checkbox+#custom-checkbox[data-v-5093f1cb]:after{content:"⬡";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}.checkbox:checked+#custom-checkbox[data-v-5093f1cb]:after{content:"⬣";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}#custom-checkbox[data-v-5093f1cb]{display:inline-block}#checkbox-container[data-v-5093f1cb]{display:inline-block;min-width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;height:1.15rem;border-radius:.25rem}#checkbox-container[data-v-5093f1cb]:hover{border:1px solid var(--input-active-border-color)}#checkbox-container:hover+label[data-v-5093f1cb]{color:var(--input-active-label-color)}#checkbox-label[data-v-5093f1cb]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}[data-v-169f1184]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}[data-v-169f1184]:root{font-family:var(--font-family)}.aform-primary-action[data-v-169f1184]{font-size:100%;text-align:center;min-height:2em;padding:.25rem 1rem;border:1px solid var(--primary-color);color:var(--primary-text-color);background-color:var(--primary-color);outline:2px solid var(--primary-text-color);transition:outline-offset .2s ease;font-size:var(--font-size);margin:.5ch}.aform-primary-action[data-v-169f1184]:hover,.aform-primary-action[data-v-169f1184]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adate[data-v-169f1184]{border:2px solid var(--focus-cell-outline);position:absolute;z-index:100;font-size:var(--table-font-size);display:inline-table;background-color:var(--row-color-zebra-light);color:var(--cell-text-color);outline:none;width:calc(100% - 4px)}.adate tr[data-v-169f1184]{height:1.15rem;text-align:center;vertical-align:middle}.adate td[data-v-169f1184]{border:2px solid transparent;min-width:2.25ch}.adate td[data-v-169f1184]:hover{border:2px solid var(--focus-cell-outline)}.adate td[data-v-169f1184]{border:1px;border-style:solid;border-color:var(--cell-border-color);border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--cell-text-color);text-overflow:ellipsis;overflow:hidden;padding-left:.5ch;padding-right:.5ch}.adate td[data-v-169f1184]:focus,.adate td[data-v-169f1184]:focus-within{background-color:var(--focus-cell-background);outline-width:2px;outline-style:solid;outline-color:var(--focus-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}button[data-v-169f1184]{background-color:var(--row-color-zebra-light);border:none;padding:0;margin:0;color:var(--cell-text-color);outline:none;font-size:var(--table-font-size)}.dateheader[data-v-169f1184]{font-weight:700;display:flex;align-items:center;justify-content:space-between}.adate .todaysdate[data-v-169f1184]{border-bottom-color:var(--focus-cell-outline)}.adate .selecteddate[data-v-169f1184]{border:2px solid var(--focus-cell-outline)}.autocomplete{position:relative}.input-wrapper{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}input:focus{border:1px solid var(--input-active-border-color);border-radius:.25rem .25rem 0 0;border-bottom:none}label{display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}.autocomplete-results{position:absolute;width:calc(100% - 1ch + 1.5px);z-index:1;padding:0;margin:0;color:#000;border:1px solid var(--input-active-border-color);border-radius:0 0 .25rem .25rem;border-top:none}.autocomplete-result{list-style:none;text-align:left;padding:4px 6px;cursor:pointer}.autocomplete-result.is-active,.autocomplete-result:hover{background-color:var(--row-color-zebra-light);color:#000}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}form[data-v-74d66cf2]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline}fieldset[data-v-cad9b578]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--gray-50)}legend[data-v-cad9b578]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;-webkit-user-select:none;user-select:none}.collapse-button[data-v-cad9b578]{float:right}div[data-v-02907cd6]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-02907cd6]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-02907cd6],label[data-v-02907cd6]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-02907cd6]{width:100%;color:red;font-size:85%}label[data-v-02907cd6]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-02907cd6]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-02907cd6]{color:var(--input-active-label-color)}div[data-v-76dba9b8]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-76dba9b8]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-76dba9b8],label[data-v-76dba9b8]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-76dba9b8]{width:100%;color:red;font-size:85%}label[data-v-76dba9b8]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-76dba9b8]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-76dba9b8]{color:var(--input-active-label-color)} diff --git a/aform/package.json b/aform/package.json index cddbfe66..8cd9e6a0 100644 --- a/aform/package.json +++ b/aform/package.json @@ -1,8 +1,20 @@ { "name": "@stonecrop/aform", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "aform" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/aform.js", @@ -12,10 +24,11 @@ }, "main": "dist/aform.js", "module": "dist/aform.js", + "umd": "dist/aform.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.vue" + "src/*" ], "scripts": { "build": "tsc -b && vite build", @@ -59,8 +72,10 @@ "peerDependencies": { "@stonecrop/atable": "workspace:*" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/aform.umd.cjs" + } } diff --git a/atable/dist/atable.js b/atable/dist/atable.js deleted file mode 100644 index e15f0a9d..00000000 --- a/atable/dist/atable.js +++ /dev/null @@ -1,769 +0,0 @@ -import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from "vue"; -var J; -const pe = typeof window < "u", Ae = (t) => typeof t == "string", Te = () => { -}; -pe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function fe(t) { - return typeof t == "function" ? t() : r(t); -} -function Oe(t) { - return t; -} -function De(t) { - return Ee() ? (ke(t), !0) : !1; -} -function U(t) { - var e; - const n = fe(t); - return (e = n == null ? void 0 : n.$el) != null ? e : n; -} -const me = pe ? window : void 0; -function Se(...t) { - let e, n, o, a; - if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e) - return Te; - Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]); - const l = [], s = () => { - l.forEach((f) => f()), l.length = 0; - }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => { - s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c)))); - }, { immediate: !0, flush: "post" }), p = () => { - d(), s(); - }; - return De(p), p; -} -const X = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Y = "__vueuse_ssr_handlers__"; -X[Y] = X[Y] || {}; -function Re(t, { window: e = me, scrollTarget: n } = {}) { - const o = k(!1), a = () => { - if (!e) - return; - const l = e.document, s = U(t); - if (!s) - o.value = !1; - else { - const i = s.getBoundingClientRect(); - o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0; - } - }; - return j(() => U(t), () => a(), { immediate: !0, flush: "post" }), e && Se(n || e, "scroll", a, { - capture: !1, - passive: !0 - }), o; -} -var Z; -(function(t) { - t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE"; -})(Z || (Z = {})); -var Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => { - for (var n in e || (e = {})) - He.call(e, n) && ee(t, n, e[n]); - if (K) - for (var n of K(e)) - Le.call(e, n) && ee(t, n, e[n]); - return t; -}; -const Ne = { - 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] -}; -Me({ - linear: Oe -}, Ne); -const x = (t) => { - let e = Re(t).value; - return e = e && t.offsetHeight > 0, e; -}, I = (t) => t.tabIndex >= 0, te = (t) => { - const e = t.target; - return V(e); -}, V = (t) => { - var e; - let n; - if (t instanceof HTMLTableCellElement) { - const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling; - if (o) { - const a = Array.from(o.children)[t.cellIndex]; - a && (n = a); - } - } else if (t instanceof HTMLTableRowElement) { - const o = t.previousElementSibling; - o && (n = o); - } - return n && (!I(n) || !x(n)) ? V(n) : n; -}, Ue = (t) => { - var e; - const n = t.target; - let o; - if (n instanceof HTMLTableCellElement) { - const a = (e = n.parentElement) == null ? void 0 : e.parentElement; - if (a) { - const l = a.firstElementChild.children[n.cellIndex]; - l && (o = l); - } - } else if (n instanceof HTMLTableRowElement) { - const a = n.parentElement; - if (a) { - const l = a.firstElementChild; - l && (o = l); - } - } - return o && (!I(o) || !x(o)) ? B(o) : o; -}, ne = (t) => { - const e = t.target; - return B(e); -}, B = (t) => { - var e; - let n; - if (t instanceof HTMLTableCellElement) { - const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling; - if (o) { - const a = Array.from(o.children)[t.cellIndex]; - a && (n = a); - } - } else if (t instanceof HTMLTableRowElement) { - const o = t.nextElementSibling; - o && (n = o); - } - return n && (!I(n) || !x(n)) ? B(n) : n; -}, je = (t) => { - var e; - const n = t.target; - let o; - if (n instanceof HTMLTableCellElement) { - const a = (e = n.parentElement) == null ? void 0 : e.parentElement; - if (a) { - const l = a.lastElementChild.children[n.cellIndex]; - l && (o = l); - } - } else if (n instanceof HTMLTableRowElement) { - const a = n.parentElement; - if (a) { - const l = a.lastElementChild; - l && (o = l); - } - } - return o && (!I(o) || !x(o)) ? V(o) : o; -}, oe = (t) => { - const e = t.target; - return Q(e); -}, Q = (t) => { - var e; - let n; - if (t.previousElementSibling) - n = t.previousElementSibling; - else { - const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling; - n = o == null ? void 0 : o.lastElementChild; - } - return n && (!I(n) || !x(n)) ? Q(n) : n; -}, le = (t) => { - const e = t.target; - return F(e); -}, F = (t) => { - var e; - let n; - if (t.nextElementSibling) - n = t.nextElementSibling; - else { - const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling; - n = o == null ? void 0 : o.firstElementChild; - } - return n && (!I(n) || !x(n)) ? F(n) : n; -}, ae = (t) => { - const e = t.target.parentElement.firstElementChild; - return e && (!I(e) || !x(e)) ? F(e) : e; -}, re = (t) => { - const e = t.target.parentElement.lastElementChild; - return e && (!I(e) || !x(e)) ? Q(e) : e; -}, D = ["alt", "control", "shift", "meta"], We = { - ArrowUp: "up", - ArrowDown: "down", - ArrowLeft: "left", - ArrowRight: "right" -}, we = { - "keydown.up": (t) => { - const e = te(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.down": (t) => { - const e = ne(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.left": (t) => { - const e = oe(t); - t.preventDefault(), t.stopPropagation(), e && e.focus(); - }, - "keydown.right": (t) => { - const e = le(t); - t.preventDefault(), t.stopPropagation(), e && e.focus(); - }, - "keydown.control.up": (t) => { - const e = Ue(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.control.down": (t) => { - const e = je(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.control.left": (t) => { - const e = ae(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.control.right": (t) => { - const e = re(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.end": (t) => { - const e = re(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.enter": (t) => { - if (t.target instanceof HTMLTableCellElement) { - t.preventDefault(), t.stopPropagation(); - const e = ne(t); - e && e.focus(); - } - }, - "keydown.shift.enter": (t) => { - if (t.target instanceof HTMLTableCellElement) { - t.preventDefault(), t.stopPropagation(); - const e = te(t); - e && e.focus(); - } - }, - "keydown.home": (t) => { - const e = ae(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.tab": (t) => { - const e = le(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - }, - "keydown.shift.tab": (t) => { - const e = oe(t); - e && (t.preventDefault(), t.stopPropagation(), e.focus()); - } -}; -function q(t) { - const e = (o) => { - let a = null; - o.parent && (typeof o.parent == "string" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value); - let l = []; - if (o.selectors) - if (typeof o.selectors == "string") - l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors)); - else if (o.selectors instanceof Element) - l.push(o.selectors); - else if (Array.isArray(o.selectors.value)) - for (const s of o.selectors.value) - s instanceof Element ? l.push(s) : l.push(s.$el); - else - l.push(o.selectors.value); - else - l = Array.from(a.children).filter((s) => I(s) && x(s)); - return l; - }, n = (o) => (a) => { - const l = We[a.key] || a.key.toLowerCase(); - if (D.includes(l)) - return; - const s = o.handlers || we; - for (const i of Object.keys(s)) { - const [d, ...p] = i.split("."); - if (d === "keydown" && p.includes(l)) { - const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => { - const E = h.charAt(0).toUpperCase() + h.slice(1); - return a.getModifierState(E); - }); - if (c.length > 0) { - if (v) { - for (const h of D) - if (p.includes(h)) { - const E = h.charAt(0).toUpperCase() + h.slice(1); - a.getModifierState(E) && f(a); - } - } - } else - v || f(a); - } - } - }; - xe(() => { - for (const o of t) { - const a = e(o); - for (const l of a) - l.addEventListener("keydown", n(o)); - } - }), Ie(() => { - for (const o of t) { - const a = e(o); - for (const l of a) - l.removeEventListener("keydown", n(o)); - } - }); -} -const Ve = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({ - __name: "ACell", - props: { - colIndex: {}, - rowIndex: {}, - tableid: {}, - addNavigation: { type: [Boolean, Object], default: !0 }, - tabIndex: { default: 0 }, - clickHandler: {} - }, - setup(t) { - var E; - const e = t, n = O(e.tableid), o = k(null); - let a = k(!1); - const l = R(() => { - const u = n.cellData(e.colIndex, e.rowIndex); - if (n.columns[e.colIndex].format) { - const g = n.columns[e.colIndex].format; - return typeof g == "function" ? g(u) : typeof g == "string" ? Function(`"use strict";return (${g})`)()(u) : u; - } else - return u; - }), s = (u) => { - if (e.clickHandler) { - e.clickHandler(u); - return; - } - if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) { - const g = o.value.getBoundingClientRect(); - n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps; - } - }; - if (e.addNavigation) { - let u = { - ...we, - "keydown.f2": s, - "keydown.alt.up": s, - "keydown.alt.down": s, - "keydown.alt.left": s, - "keydown.alt.right": s - }; - typeof e.addNavigation == "object" && (u = { - ...u, - ...e.addNavigation - }), q([ - { - selectors: o, - handlers: u - } - ]); - } - const i = R(() => n.columns[e.colIndex].align || "center"), d = R(() => n.columns[e.colIndex].width || "40ch"); - let p = ""; - const f = () => { - o.value && (p = o.value.innerText); - }, c = () => { - o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event("change")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p)); - }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : "inherit", h = { - textAlign: i.value, - width: d.value, - backgroundColor: a.value ? "var(--cell-modified-color)" : "inherit", - fontWeight: a.value ? "bold" : "inherit", - paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent) - }; - return (u, g) => (m(), b("td", { - ref_key: "cell", - ref: o, - "data-colindex": u.colIndex, - "data-rowindex": u.rowIndex, - "data-editable": r(n).columns[u.colIndex].edit, - contenteditable: r(n).columns[u.colIndex].edit, - tabindex: u.tabIndex, - spellcheck: !1, - style: h, - onFocus: f, - onPaste: c, - onBlur: c, - onInput: c, - onClick: s, - onMousedown: s - }, [ - r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({ - key: 0, - value: l.value - }, r(n).columns[u.colIndex].cellComponentProps), null, 16, ["value"])) : (m(), b("span", Be, T(l.value), 1)) - ], 40, Ve)); - } -}), _ = (t, e) => { - const n = t.__vccOpts || t; - for (const [o, a] of e) - n[o] = a; - return n; -}, he = /* @__PURE__ */ _(Qe, [["__scopeId", "data-v-07dfe445"]]), Fe = ["tabindex"], qe = ["tabindex"], ze = ["colspan"], Ge = /* @__PURE__ */ C({ - __name: "AExpansionRow", - props: { - row: {}, - rowIndex: {}, - tableid: {}, - tabIndex: { default: -1 }, - addNavigation: {} - }, - setup(t) { - const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? "▼" : "►"; - if (e.addNavigation !== void 0) { - const s = Object.assign({}, e.addNavigation); - s["keydown.control.g"] = (i) => { - i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex); - }, q([ - { - selectors: o, - handlers: s - } - ]); - } - return (s, i) => (m(), b(L, null, [ - A("tr", W(s.$attrs, { - ref_key: "rowEl", - ref: o, - tabindex: s.tabIndex, - class: "expandable-row" - }), [ - A("td", { - tabIndex: -1, - onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)), - class: "row-index" - }, T(l()), 1), - y(s.$slots, "row", {}, void 0, !0) - ], 16, Fe), - r(n).display[e.rowIndex].expanded ? (m(), b("tr", { - key: 0, - ref_key: "rowExpanded", - ref: a, - tabindex: s.tabIndex, - class: "expanded-row" - }, [ - A("td", { - tabIndex: -1, - colspan: r(n).columns.length + 1, - class: "expanded-row-content" - }, [ - y(s.$slots, "content", {}, void 0, !0) - ], 8, ze) - ], 8, qe)) : M("", !0) - ], 64)); - } -}), Je = /* @__PURE__ */ _(Ge, [["__scopeId", "data-v-b2e2ed2d"]]), Xe = ["tabindex"], Ye = { - key: 0, - tabIndex: -1, - class: "list-index" -}, Ze = /* @__PURE__ */ C({ - __name: "ARow", - props: { - row: {}, - rowIndex: {}, - tableid: {}, - tabIndex: { default: -1 }, - addNavigation: {} - }, - setup(t) { - de((d) => ({ - "5b18ee03": r(a) - })); - const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== "tree" ? "" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? "-" : "+" : "", s = () => n.config.view !== "tree" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => { - n.toggleRowExpand(d); - }; - return e.addNavigation && q([ - { - selectors: o, - handlers: e.addNavigation - } - ]), (d, p) => ce((m(), b("tr", { - ref_key: "rowEl", - ref: o, - tabindex: d.tabIndex, - class: "table-row" - }, [ - r(n).config.view === "list" ? (m(), b("td", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === "tree" ? (m(), b("td", { - key: 1, - tabIndex: -1, - class: "tree-index", - onClick: p[0] || (p[0] = (f) => i(d.rowIndex)) - }, T(l()), 1)) : y(d.$slots, "indexCell", { key: 2 }, void 0, !0), - y(d.$slots, "default", {}, void 0, !0) - ], 8, Xe)), [ - [ue, s()] - ]); - } -}), be = /* @__PURE__ */ _(Ze, [["__scopeId", "data-v-4c71a067"]]); -let S; -const Ke = new Uint8Array(16); -function et() { - if (!S && (S = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S)) - throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); - return S(Ke); -} -const w = []; -for (let t = 0; t < 256; ++t) - w.push((t + 256).toString(16).slice(1)); -function tt(t, e = 0) { - return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + "-" + w[t[e + 4]] + w[t[e + 5]] + "-" + w[t[e + 6]] + w[t[e + 7]] + "-" + w[t[e + 8]] + w[t[e + 9]] + "-" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]]; -} -const nt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = { - randomUUID: nt -}; -function ge(t, e, n) { - if (se.randomUUID && !e && !t) - return se.randomUUID(); - t = t || {}; - const o = t.random || (t.rng || et)(); - if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) { - n = n || 0; - for (let a = 0; a < 16; ++a) - e[n + a] = o[a]; - return e; - } - return tt(o); -} -class ot { - constructor(e, n, o, a, l, s) { - this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 }); - } - createTableObject() { - const e = {}; - for (const [n, o] of this.columns.entries()) - for (const [a, l] of this.rows.entries()) - e[`${n}:${a}`] = l[o.name]; - return e; - } - createDisplayObject(e) { - const n = [Object.assign({}, { modified: !1 })]; - if (e && "0:0" in e) - return e; - const o = /* @__PURE__ */ new Set(); - for (let a = this.rows.length - 1; a >= 0; a--) { - const l = this.rows[a]; - l.parent && o.add(l.parent), n[a] = { - childrenOpen: !1, - expanded: !1, - indent: l.indent || null, - isParent: o.has(a), - isRoot: l.parent === null || l.parent === void 0, - modified: !1, - open: l.parent === null || l.parent === void 0, - parent: l.parent - }; - } - return $(n); - } - get zeroColumn() { - return ["list", "tree", "list-expansion"].includes(this.config.view); - } - get numberedRowWidth() { - return R(() => String(Math.ceil(this.rows.length / 100) + 1) + "ch"); - } - cellData(e, n) { - return this.table[`${e}:${n}`]; - } - setCellData(e, n, o) { - this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o; - const a = this.columns[n]; - return this.rows[e][a.name] = o, this.table[`${n}:${e}`]; - } - toggleRowExpand(e) { - if (this.config.view === "tree") { - this.display[e].childrenOpen = !this.display[e].childrenOpen; - for (let n = this.rows.length - 1; n >= 0; n--) - this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n)); - } else - this.config.view === "list-expansion" && (this.display[e].expanded = !this.display[e].expanded); - } -} -const lt = { key: 0 }, at = { - class: "atable-header-row", - tabindex: "-1" -}, rt = { - key: 0, - id: "header-index" -}, st = /* @__PURE__ */ C({ - __name: "ATableHeader", - props: { - columns: {}, - config: {}, - tableid: {} - }, - setup(t) { - de((l) => ({ - "12d06943": r(o) - })); - const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({ - minWidth: l.width || "40ch", - textAlign: l.align || "center", - width: n.config.fullWidth ? "auto" : null - }); - return (l, s) => l.columns.length ? (m(), b("thead", lt, [ - A("tr", at, [ - r(n).zeroColumn ? (m(), b("th", rt)) : M("", !0), - (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b("th", { - key: d, - tabindex: "-1", - style: H(a(i)) - }, [ - y(l.$slots, "default", {}, () => [ - Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1) - ], !0) - ], 4))), 128)) - ]) - ])) : M("", !0); - } -}), ve = /* @__PURE__ */ _(st, [["__scopeId", "data-v-16e66636"]]), it = /* @__PURE__ */ C({ - __name: "ATableModal", - props: { - colIndex: {}, - rowIndex: {}, - tableid: {} - }, - setup(t) { - O(t.tableid); - const n = (o) => { - o.stopPropagation(); - }; - return (o, a) => (m(), b("div", { - ref: "amodal", - class: "amodal", - tabindex: "-1", - onClick: n, - onInput: n - }, [ - y(o.$slots, "default", {}, void 0, !0) - ], 544)); - } -}), ye = /* @__PURE__ */ _(it, [["__scopeId", "data-v-10a48b2a"]]), dt = /* @__PURE__ */ C({ - __name: "ATable", - props: { - id: {}, - modelValue: {}, - columns: {}, - rows: { default: () => [] }, - config: { default: () => new Object() }, - tableid: {} - }, - emits: ["update:modelValue"], - setup(t, { emit: e }) { - const n = t, o = e; - let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config); - _e(l.id, l), j( - () => l.rows, - (i) => { - o("update:modelValue", i); - }, - { deep: !0 } - ); - const s = (i) => { - var d; - (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1); - }; - return window.addEventListener("click", s), window.addEventListener("keydown", (i) => { - if (i.key === "Escape" && l.modal.visible) { - l.modal.visible = !1; - const d = l.modal.parent; - d && $e().then(() => { - const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`); - c && c[0].focus(); - }); - } - }), (i, d) => (m(), b("table", { - class: "atable", - style: H({ width: r(l).config.fullWidth ? "100%" : "auto" }) - }, [ - y(i.$slots, "header", { data: r(l) }, () => [ - z(ve, { - columns: r(l).columns, - config: r(l).config, - tableid: r(l).id - }, null, 8, ["columns", "config", "tableid"]) - ], !0), - A("tbody", null, [ - y(i.$slots, "body", { data: r(l) }, () => [ - (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, { - key: p.id || r(ge)(), - row: p, - rowIndex: f, - tableid: r(l).id - }, { - default: G(() => [ - (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, { - key: `${v}:${f}`, - tableid: r(l).id, - col: c, - spellcheck: "false", - rowIndex: f, - colIndex: v + (r(l).zeroColumn ? 0 : -1), - component: c.cellComponent, - style: H({ - textAlign: (c == null ? void 0 : c.align) || "center", - minWidth: (c == null ? void 0 : c.width) || "40ch", - width: r(l).config.fullWidth ? "auto" : null - }) - }, null, 8, ["tableid", "col", "rowIndex", "colIndex", "component", "style"]))), 128)) - ]), - _: 2 - }, 1032, ["row", "rowIndex", "tableid"]))), 128)) - ], !0) - ]), - y(i.$slots, "footer", { data: r(l) }, void 0, !0), - y(i.$slots, "modal", { data: r(l) }, () => [ - ce(z(ye, { - colIndex: r(l).modal.colIndex, - rowIndex: r(l).modal.rowIndex, - tableid: r(l).id, - style: H({ - left: r(l).modal.left + "px", - top: r(l).modal.top + "px", - maxWidth: r(l).modal.width + "px" - }) - }, { - default: G(() => [ - (m(), P(ie(r(l).modal.component), W({ - key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`, - colIndex: r(l).modal.colIndex, - rowIndex: r(l).modal.rowIndex, - tableid: r(l).id - }, r(l).modal.componentProps), null, 16, ["colIndex", "rowIndex", "tableid"])) - ]), - _: 1 - }, 8, ["colIndex", "rowIndex", "tableid", "style"]), [ - [ue, r(l).modal.visible] - ]) - ], !0) - ], 4)); - } -}), ct = /* @__PURE__ */ _(dt, [["__scopeId", "data-v-55d8ba05"]]); -function ft(t) { - t.component("ACell", he), t.component("AExpansionRow", Je), t.component("ARow", be), t.component("ATable", ct), t.component("ATableHeader", ve), t.component("ATableModal", ye); -} -export { - he as ACell, - Je as AExpansionRow, - be as ARow, - ct as ATable, - ve as ATableHeader, - ye as ATableModal, - ot as TableDataStore, - ft as install -}; -//# sourceMappingURL=atable.js.map diff --git a/atable/dist/atable.js.map b/atable/dist/atable.js.map deleted file mode 100644 index fb761f59..00000000 --- a/atable/dist/atable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"atable.js","sources":["../../utilities/dist/utilities.js","../src/components/ACell.vue","../src/components/AExpansionRow.vue","../src/components/ARow.vue","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/rng.js","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/native.js","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js","../src/components/index.ts","../src/components/ATableHeader.vue","../src/components/ATableModal.vue","../src/components/ATable.vue","../src/index.ts"],"sourcesContent":["import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 } from 'uuid'\nimport { computed, reactive } from 'vue'\n\nimport type { TableDisplay, TableRow, TableColumn, TableConfig, TableModal } from '../../types'\n\nexport default class TableDataStore {\n\tid: string\n\trows: TableRow[]\n\tcolumns: TableColumn[]\n\tconfig: TableConfig\n\ttable: { [key: string]: any }\n\tdisplay: TableDisplay[]\n\tmodal: TableModal\n\n\tconstructor(\n\t\tid?: string,\n\t\tcolumns?: TableColumn[],\n\t\trows?: TableRow[],\n\t\tconfig?: TableConfig,\n\t\ttable?: { [key: string]: any },\n\t\tdisplay?: TableDisplay[]\n\t) {\n\t\tthis.id = id || v4()\n\t\tthis.rows = rows\n\t\tthis.columns = reactive(columns)\n\t\tthis.config = reactive(config)\n\t\tthis.table = table || reactive(this.createTableObject())\n\t\tthis.display = this.createDisplayObject(display)\n\t\tthis.modal = reactive({ visible: false })\n\t}\n\n\tcreateTableObject() {\n\t\tconst table = {}\n\t\tfor (const [colIndex, column] of this.columns.entries()) {\n\t\t\tfor (const [rowIndex, row] of this.rows.entries()) {\n\t\t\t\ttable[`${colIndex}:${rowIndex}`] = row[column.name]\n\t\t\t}\n\t\t}\n\t\treturn table\n\t}\n\n\tcreateDisplayObject(display?: TableDisplay[]) {\n\t\tconst defaultDisplay: TableDisplay[] = [Object.assign({}, { modified: false })]\n\n\t\t// TODO: (typing) what is the type of `display` here?\n\t\tif (display) {\n\t\t\tif ('0:0' in display) {\n\t\t\t\treturn display\n\t\t\t}\n\t\t\t// else if ('default' in display) {\n\t\t\t// \t// TODO: (typing) what is the possible input here for 'default'?\n\t\t\t// \tdefaultDisplay = display.default\n\t\t\t// }\n\t\t}\n\n\t\t// TODO: (typing) is this type correct for the parent set?\n\t\tconst parents = new Set()\n\t\tfor (let rowIndex = this.rows.length - 1; rowIndex >= 0; rowIndex--) {\n\t\t\tconst row = this.rows[rowIndex]\n\t\t\tif (row.parent) {\n\t\t\t\tparents.add(row.parent)\n\t\t\t}\n\n\t\t\tdefaultDisplay[rowIndex] = {\n\t\t\t\tchildrenOpen: false,\n\t\t\t\texpanded: false,\n\t\t\t\tindent: row.indent || null,\n\t\t\t\tisParent: parents.has(rowIndex),\n\t\t\t\tisRoot: row.parent === null || row.parent === undefined,\n\t\t\t\tmodified: false,\n\t\t\t\topen: row.parent === null || row.parent === undefined,\n\t\t\t\tparent: row.parent,\n\t\t\t}\n\t\t}\n\n\t\treturn reactive(defaultDisplay)\n\t}\n\n\tget zeroColumn() {\n\t\treturn ['list', 'tree', 'list-expansion'].includes(this.config.view)\n\t}\n\n\tget numberedRowWidth() {\n\t\treturn computed(() => {\n\t\t\treturn String(Math.ceil(this.rows.length / 100) + 1) + 'ch'\n\t\t})\n\t}\n\n\tcellData(colIndex: number, rowIndex: number): T {\n\t\treturn this.table[`${colIndex}:${rowIndex}`]\n\t}\n\n\tsetCellData(rowIndex: number, colIndex: number, value: any) {\n\t\tif (this.table[`${colIndex}:${rowIndex}`] !== value) {\n\t\t\tthis.display[rowIndex].modified = true\n\t\t}\n\t\tthis.table[`${colIndex}:${rowIndex}`] = value\n\t\tconst col = this.columns[colIndex]\n\t\tthis.rows[rowIndex][col.name] = value\n\t\treturn this.table[`${colIndex}:${rowIndex}`]\n\t}\n\n\ttoggleRowExpand(rowIndex: number) {\n\t\tif (this.config.view === 'tree') {\n\t\t\tthis.display[rowIndex].childrenOpen = !this.display[rowIndex].childrenOpen\n\t\t\tfor (let index = this.rows.length - 1; index >= 0; index--) {\n\t\t\t\tif (this.display[index].parent === rowIndex) {\n\t\t\t\t\tthis.display[index].open = !this.display[index].open\n\t\t\t\t\tif (this.display[index].childrenOpen) {\n\t\t\t\t\t\tthis.toggleRowExpand(index)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.config.view === 'list-expansion') {\n\t\t\tthis.display[rowIndex].expanded = !this.display[rowIndex].expanded\n\t\t}\n\t}\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACell from '@/components/ACell.vue'\nimport AExpansionRow from '@/components/AExpansionRow.vue'\nimport ARow from '@/components/ARow.vue'\nimport ATable from '@/components/ATable.vue'\nimport ATableHeader from '@/components/ATableHeader.vue'\nimport ATableModal from '@/components/ATableModal.vue'\nimport TableDataStore from './components'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACell', ACell)\n\tapp.component('AExpansionRow', AExpansionRow)\n\tapp.component('ARow', ARow)\n\tapp.component('ATable', ATable)\n\tapp.component('ATableHeader', ATableHeader)\n\tapp.component('ATableModal', ATableModal)\n}\n\nexport { install, ACell, AExpansionRow, ARow, ATable, ATableHeader, ATableModal, TableDataStore }\n"],"names":["v","M","F","e","j","H","Q","q","G","U","K","y","t","r","N","z","n","o","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","l","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","props","__props","tableData","inject","cell","ref","cellModified","displayValue","computed","data","format","handleInput","event","domRect","cellWidth","handlers","defaultKeypressHandlers","useKeyboardNav","textAlign","currentData","onFocus","onChange","getIndent","colKey","indent","cellStyle","_a","rowEl","rowExpanded","getRowExpandSymbol","keyboardNav","numberedRowWidth","rowVisible","toggleRowExpand","rowIndex","getRandomValues","rnds8","rng","byteToHex","unsafeStringify","arr","offset","randomUUID","native","v4","options","buf","rnds","TableDataStore","id","columns","rows","config","table","display","reactive","colIndex","column","row","defaultDisplay","parents","value","col","index","getHeaderCellStyle","emit","__emit","provide","watch","newValue","clickOutside","$parent","nextTick","$parentCell","install","app","ACell","AExpansionRow","ARow","ATable","ATableHeader","ATableModal"],"mappings":";AACA,IAAIA;AACJ,MAAMC,KAAI,OAAO,SAAS,KAAKC,KAAI,CAACC,MAAM,OAAOA,KAAK,UAAUC,KAAI,MAAM;AAC1E;AACAH,OAAOD,IAAI,UAAU,OAAO,SAAS,OAAO,cAAc,QAAQA,EAAE,aAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AAClI,SAASK,GAAEF,GAAG;AACZ,SAAO,OAAOA,KAAK,aAAaA,EAAC,IAAKG,EAAEH,CAAC;AAC3C;AACA,SAASI,GAAEJ,GAAG;AACZ,SAAOA;AACT;AACA,SAASK,GAAEL,GAAG;AACZ,SAAOM,GAAG,KAAIC,GAAEP,CAAC,GAAG,MAAM;AAC5B;AACA,SAASQ,EAAER,GAAG;AACZ,MAAIS;AACJ,QAAMC,IAAIR,GAAEF,CAAC;AACb,UAAQS,IAAIC,KAAK,OAAO,SAASA,EAAE,QAAQ,OAAOD,IAAIC;AACxD;AACA,MAAMC,KAAIb,KAAI,SAAS;AACvB,SAASc,MAAKZ,GAAG;AACf,MAAIS,GAAGC,GAAGG,GAAGC;AACb,MAAIf,GAAEC,EAAE,CAAC,CAAC,KAAK,MAAM,QAAQA,EAAE,CAAC,CAAC,KAAK,CAACU,GAAGG,GAAGC,CAAC,IAAId,GAAGS,IAAIE,MAAK,CAACF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GAAwB;AACpC,EAAAA,EAAA,UAAU,SAASC,EAAK,GACxBD,EAAA,UAAU,iBAAiBE,EAAa,GACxCF,EAAA,UAAU,QAAQG,EAAI,GACtBH,EAAA,UAAU,UAAUI,EAAM,GAC1BJ,EAAA,UAAU,gBAAgBK,EAAY,GACtCL,EAAA,UAAU,eAAeM,EAAW;AACzC;","x_google_ignoreList":[4,5,6,7]} \ No newline at end of file diff --git a/atable/dist/atable.umd.cjs b/atable/dist/atable.umd.cjs deleted file mode 100644 index 22064e62..00000000 --- a/atable/dist/atable.umd.cjs +++ /dev/null @@ -1,2 +0,0 @@ -(function(h,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(h=typeof globalThis<"u"?globalThis:h||self,n(h["@stonecrop/atable"]={},h.Vue))})(this,function(h,n){"use strict";var N;const H=typeof window<"u",ne=t=>typeof t=="string",oe=()=>{};H&&(N=window==null?void 0:window.navigator)!=null&&N.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function L(t){return typeof t=="function"?t():n.unref(t)}function le(t){return t}function re(t){return n.getCurrentScope()?(n.onScopeDispose(t),!0):!1}function _(t){var e;const o=L(t);return(e=o==null?void 0:o.$el)!=null?e:o}const V=H?window:void 0;function ae(...t){let e,o,l,a;if(ne(t[0])||Array.isArray(t[0])?([o,l,a]=t,e=V):[e,o,l,a]=t,!e)return oe;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const r=[],i=()=>{r.forEach(m=>m()),r.length=0},s=(m,c,b,w)=>(m.addEventListener(c,b,w),()=>m.removeEventListener(c,b,w)),d=n.watch(()=>[_(e),L(a)],([m,c])=>{i(),m&&r.push(...o.flatMap(b=>l.map(w=>s(m,b,w,c))))},{immediate:!0,flush:"post"}),p=()=>{d(),i()};return re(p),p}const M=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},j="__vueuse_ssr_handlers__";M[j]=M[j]||{};function ie(t,{window:e=V,scrollTarget:o}={}){const l=n.ref(!1),a=()=>{if(!e)return;const r=e.document,i=_(t);if(!i)l.value=!1;else{const s=i.getBoundingClientRect();l.value=s.top<=(e.innerHeight||r.documentElement.clientHeight)&&s.left<=(e.innerWidth||r.documentElement.clientWidth)&&s.bottom>=0&&s.right>=0}};return n.watch(()=>_(t),()=>a(),{immediate:!0,flush:"post"}),e&&ae(o||e,"scroll",a,{capture:!1,passive:!0}),l}var U;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(U||(U={}));var se=Object.defineProperty,W=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,F=(t,e,o)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,fe=(t,e)=>{for(var o in e||(e={}))de.call(e,o)&&F(t,o,e[o]);if(W)for(var o of W(e))ce.call(e,o)&&F(t,o,e[o]);return t};fe({linear:le},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const y=t=>{let e=ie(t).value;return e=e&&t.offsetHeight>0,e},x=t=>t.tabIndex>=0,Q=t=>{const e=t.target;return S(e)},S=t=>{var e;let o;if(t instanceof HTMLTableCellElement){const l=(e=t.parentElement)==null?void 0:e.previousElementSibling;if(l){const a=Array.from(l.children)[t.cellIndex];a&&(o=a)}}else if(t instanceof HTMLTableRowElement){const l=t.previousElementSibling;l&&(o=l)}return o&&(!x(o)||!y(o))?S(o):o},pe=t=>{var e;const o=t.target;let l;if(o instanceof HTMLTableCellElement){const a=(e=o.parentElement)==null?void 0:e.parentElement;if(a){const r=a.firstElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.firstElementChild;r&&(l=r)}}return l&&(!x(l)||!y(l))?A(l):l},z=t=>{const e=t.target;return A(e)},A=t=>{var e;let o;if(t instanceof HTMLTableCellElement){const l=(e=t.parentElement)==null?void 0:e.nextElementSibling;if(l){const a=Array.from(l.children)[t.cellIndex];a&&(o=a)}}else if(t instanceof HTMLTableRowElement){const l=t.nextElementSibling;l&&(o=l)}return o&&(!x(o)||!y(o))?A(o):o},me=t=>{var e;const o=t.target;let l;if(o instanceof HTMLTableCellElement){const a=(e=o.parentElement)==null?void 0:e.parentElement;if(a){const r=a.lastElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.lastElementChild;r&&(l=r)}}return l&&(!x(l)||!y(l))?S(l):l},q=t=>{const e=t.target;return T(e)},T=t=>{var e;let o;if(t.previousElementSibling)o=t.previousElementSibling;else{const l=(e=t.parentElement)==null?void 0:e.previousElementSibling;o=l==null?void 0:l.lastElementChild}return o&&(!x(o)||!y(o))?T(o):o},G=t=>{const e=t.target;return $(e)},$=t=>{var e;let o;if(t.nextElementSibling)o=t.nextElementSibling;else{const l=(e=t.parentElement)==null?void 0:e.nextElementSibling;o=l==null?void 0:l.firstElementChild}return o&&(!x(o)||!y(o))?$(o):o},J=t=>{const e=t.target.parentElement.firstElementChild;return e&&(!x(e)||!y(e))?$(e):e},X=t=>{const e=t.target.parentElement.lastElementChild;return e&&(!x(e)||!y(e))?T(e):e},k=["alt","control","shift","meta"],ue={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Y={"keydown.up":t=>{const e=Q(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.down":t=>{const e=z(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.left":t=>{const e=q(t);t.preventDefault(),t.stopPropagation(),e&&e.focus()},"keydown.right":t=>{const e=G(t);t.preventDefault(),t.stopPropagation(),e&&e.focus()},"keydown.control.up":t=>{const e=pe(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.down":t=>{const e=me(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.left":t=>{const e=J(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.right":t=>{const e=X(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.end":t=>{const e=X(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const e=z(t);e&&e.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const e=Q(t);e&&e.focus()}},"keydown.home":t=>{const e=J(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.tab":t=>{const e=G(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.shift.tab":t=>{const e=q(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())}};function D(t){const e=l=>{let a=null;l.parent&&(typeof l.parent=="string"?a=document.querySelector(l.parent):l.parent instanceof Element?a=l.parent:a=l.parent.value);let r=[];if(l.selectors)if(typeof l.selectors=="string")r=a?Array.from(a.querySelectorAll(l.selectors)):Array.from(document.querySelectorAll(l.selectors));else if(l.selectors instanceof Element)r.push(l.selectors);else if(Array.isArray(l.selectors.value))for(const i of l.selectors.value)i instanceof Element?r.push(i):r.push(i.$el);else r.push(l.selectors.value);else r=Array.from(a.children).filter(i=>x(i)&&y(i));return r},o=l=>a=>{const r=ue[a.key]||a.key.toLowerCase();if(k.includes(r))return;const i=l.handlers||Y;for(const s of Object.keys(i)){const[d,...p]=s.split(".");if(d==="keydown"&&p.includes(r)){const m=i[s],c=p.filter(w=>k.includes(w)),b=k.some(w=>{const E=w.charAt(0).toUpperCase()+w.slice(1);return a.getModifierState(E)});if(c.length>0){if(b){for(const w of k)if(p.includes(w)){const E=w.charAt(0).toUpperCase()+w.slice(1);a.getModifierState(E)&&m(a)}}}else b||m(a)}}};n.onMounted(()=>{for(const l of t){const a=e(l);for(const r of a)r.addEventListener("keydown",o(l))}}),n.onBeforeUnmount(()=>{for(const l of t){const a=e(l);for(const r of a)r.removeEventListener("keydown",o(l))}})}const we=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],he={key:1},ge=n.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},clickHandler:{}},setup(t){var E;const e=t,o=n.inject(e.tableid),l=n.ref(null);let a=n.ref(!1);const r=n.computed(()=>{const f=o.cellData(e.colIndex,e.rowIndex);if(o.columns[e.colIndex].format){const g=o.columns[e.colIndex].format;return typeof g=="function"?g(f):typeof g=="string"?Function(`"use strict";return (${g})`)()(f):f}else return f}),i=f=>{if(e.clickHandler){e.clickHandler(f);return}if(o.columns[e.colIndex].mask,o.columns[e.colIndex].modalComponent){const g=l.value.getBoundingClientRect();o.modal.visible=!0,o.modal.colIndex=e.colIndex,o.modal.rowIndex=e.rowIndex,o.modal.parent=l.value,o.modal.top=g.top+g.height,o.modal.left=g.left,o.modal.width=d.value,o.modal.component=o.columns[e.colIndex].modalComponent,o.modal.componentProps=o.columns[e.colIndex].modalComponentProps}};if(e.addNavigation){let f={...Y,"keydown.f2":i,"keydown.alt.up":i,"keydown.alt.down":i,"keydown.alt.left":i,"keydown.alt.right":i};typeof e.addNavigation=="object"&&(f={...f,...e.addNavigation}),D([{selectors:l,handlers:f}])}const s=n.computed(()=>o.columns[e.colIndex].align||"center"),d=n.computed(()=>o.columns[e.colIndex].width||"40ch");let p="";const m=()=>{l.value&&(p=l.value.innerText)},c=()=>{l.value&&l.value.innerHTML!==p&&(p=l.value.innerText,l.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[e.colIndex].format||o.setCellData(e.rowIndex,e.colIndex,p))},b=(f,g)=>g&&f===0&&g>0?`${g}ch`:"inherit",w={textAlign:s.value,width:d.value,backgroundColor:a.value?"var(--cell-modified-color)":"inherit",fontWeight:a.value?"bold":"inherit",paddingLeft:b(e.colIndex,(E=o.display[e.rowIndex])==null?void 0:E.indent)};return(f,g)=>(n.openBlock(),n.createElementBlock("td",{ref_key:"cell",ref:l,"data-colindex":f.colIndex,"data-rowindex":f.rowIndex,"data-editable":n.unref(o).columns[f.colIndex].edit,contenteditable:n.unref(o).columns[f.colIndex].edit,tabindex:f.tabIndex,spellcheck:!1,style:w,onFocus:m,onPaste:c,onBlur:c,onInput:c,onClick:i,onMousedown:i},[n.unref(o).columns[f.colIndex].cellComponent?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(o).columns[f.colIndex].cellComponent),n.mergeProps({key:0,value:r.value},n.unref(o).columns[f.colIndex].cellComponentProps),null,16,["value"])):(n.openBlock(),n.createElementBlock("span",he,n.toDisplayString(r.value),1))],40,we))}}),I=(t,e)=>{const o=t.__vccOpts||t;for(const[l,a]of e)o[l]=a;return o},B=I(ge,[["__scopeId","data-v-07dfe445"]]),be=["tabindex"],ye=["tabindex"],xe=["colspan"],Z=I(n.defineComponent({__name:"AExpansionRow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(t){const e=t,o=n.inject(e.tableid),l=n.ref(null),a=n.ref(null),r=()=>o.display[e.rowIndex].expanded?"▼":"►";if(e.addNavigation!==void 0){const i=Object.assign({},e.addNavigation);i["keydown.control.g"]=s=>{s.stopPropagation(),s.preventDefault(),o.toggleRowExpand(e.rowIndex)},D([{selectors:l,handlers:i}])}return(i,s)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("tr",n.mergeProps(i.$attrs,{ref_key:"rowEl",ref:l,tabindex:i.tabIndex,class:"expandable-row"}),[n.createElementVNode("td",{tabIndex:-1,onClick:s[0]||(s[0]=d=>n.unref(o).toggleRowExpand(i.rowIndex)),class:"row-index"},n.toDisplayString(r()),1),n.renderSlot(i.$slots,"row",{},void 0,!0)],16,be),n.unref(o).display[e.rowIndex].expanded?(n.openBlock(),n.createElementBlock("tr",{key:0,ref_key:"rowExpanded",ref:a,tabindex:i.tabIndex,class:"expanded-row"},[n.createElementVNode("td",{tabIndex:-1,colspan:n.unref(o).columns.length+1,class:"expanded-row-content"},[n.renderSlot(i.$slots,"content",{},void 0,!0)],8,xe)],8,ye)):n.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-b2e2ed2d"]]),Ie=["tabindex"],Ee={key:0,tabIndex:-1,class:"list-index"},O=I(n.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(t){n.useCssVars(d=>({"5b18ee03":n.unref(a)}));const e=t,o=n.inject(e.tableid),l=n.ref(null),a=o.numberedRowWidth.value,r=()=>o.config.view!=="tree"?"":o.display[e.rowIndex].isRoot||o.display[e.rowIndex].isParent?o.display[e.rowIndex].childrenOpen?"-":"+":"",i=()=>o.config.view!=="tree"||o.display[e.rowIndex].isRoot||o.display[e.rowIndex].open,s=d=>{o.toggleRowExpand(d)};return e.addNavigation&&D([{selectors:l,handlers:e.addNavigation}]),(d,p)=>n.withDirectives((n.openBlock(),n.createElementBlock("tr",{ref_key:"rowEl",ref:l,tabindex:d.tabIndex,class:"table-row"},[n.unref(o).config.view==="list"?(n.openBlock(),n.createElementBlock("td",Ee,n.toDisplayString(d.rowIndex+1),1)):n.unref(o).config.view==="tree"?(n.openBlock(),n.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:p[0]||(p[0]=m=>s(d.rowIndex))},n.toDisplayString(r()),1)):n.renderSlot(d.$slots,"indexCell",{key:2},void 0,!0),n.renderSlot(d.$slots,"default",{},void 0,!0)],8,Ie)),[[n.vShow,i()]])}}),[["__scopeId","data-v-4c71a067"]]);let C;const ke=new Uint8Array(16);function Ce(){if(!C&&(C=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!C))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C(ke)}const u=[];for(let t=0;t<256;++t)u.push((t+256).toString(16).slice(1));function _e(t,e=0){return u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]}const K={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v(t,e,o){if(K.randomUUID&&!e&&!t)return K.randomUUID();t=t||{};const l=t.random||(t.rng||Ce)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){o=o||0;for(let a=0;a<16;++a)e[o+a]=l[a];return e}return _e(l)}class ee{constructor(e,o,l,a,r,i){this.id=e||v(),this.rows=l,this.columns=n.reactive(o),this.config=n.reactive(a),this.table=r||n.reactive(this.createTableObject()),this.display=this.createDisplayObject(i),this.modal=n.reactive({visible:!1})}createTableObject(){const e={};for(const[o,l]of this.columns.entries())for(const[a,r]of this.rows.entries())e[`${o}:${a}`]=r[l.name];return e}createDisplayObject(e){const o=[Object.assign({},{modified:!1})];if(e&&"0:0"in e)return e;const l=new Set;for(let a=this.rows.length-1;a>=0;a--){const r=this.rows[a];r.parent&&l.add(r.parent),o[a]={childrenOpen:!1,expanded:!1,indent:r.indent||null,isParent:l.has(a),isRoot:r.parent===null||r.parent===void 0,modified:!1,open:r.parent===null||r.parent===void 0,parent:r.parent}}return n.reactive(o)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return n.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(e,o){return this.table[`${e}:${o}`]}setCellData(e,o,l){this.table[`${o}:${e}`]!==l&&(this.display[e].modified=!0),this.table[`${o}:${e}`]=l;const a=this.columns[o];return this.rows[e][a.name]=l,this.table[`${o}:${e}`]}toggleRowExpand(e){if(this.config.view==="tree"){this.display[e].childrenOpen=!this.display[e].childrenOpen;for(let o=this.rows.length-1;o>=0;o--)this.display[o].parent===e&&(this.display[o].open=!this.display[o].open,this.display[o].childrenOpen&&this.toggleRowExpand(o))}else this.config.view==="list-expansion"&&(this.display[e].expanded=!this.display[e].expanded)}}const Se={key:0},Ae={class:"atable-header-row",tabindex:"-1"},Te={key:0,id:"header-index"},R=I(n.defineComponent({__name:"ATableHeader",props:{columns:{},config:{},tableid:{}},setup(t){n.useCssVars(r=>({"12d06943":n.unref(l)}));const e=t,o=n.inject(e.tableid),l=o.numberedRowWidth.value,a=r=>({minWidth:r.width||"40ch",textAlign:r.align||"center",width:o.config.fullWidth?"auto":null});return(r,i)=>r.columns.length?(n.openBlock(),n.createElementBlock("thead",Se,[n.createElementVNode("tr",Ae,[n.unref(o).zeroColumn?(n.openBlock(),n.createElementBlock("th",Te)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.columns,(s,d)=>(n.openBlock(),n.createElementBlock("th",{key:d,tabindex:"-1",style:n.normalizeStyle(a(s))},[n.renderSlot(r.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(s.label||String.fromCharCode(d+97).toUpperCase()),1)],!0)],4))),128))])])):n.createCommentVNode("",!0)}}),[["__scopeId","data-v-16e66636"]]),P=I(n.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(t){const e=t;n.inject(e.tableid);const o=l=>{l.stopPropagation()};return(l,a)=>(n.openBlock(),n.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",onClick:o,onInput:o},[n.renderSlot(l.$slots,"default",{},void 0,!0)],544))}}),[["__scopeId","data-v-10a48b2a"]]),te=I(n.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(t,{emit:e}){const o=t,l=e;let a=o.modelValue?o.modelValue:o.rows,r=new ee(o.id,o.columns,a,o.config);n.provide(r.id,r),n.watch(()=>r.rows,s=>{l("update:modelValue",s)},{deep:!0});const i=s=>{var d;(d=r.modal.parent)!=null&&d.contains(s.target)||r.modal.visible&&(r.modal.visible=!1)};return window.addEventListener("click",i),window.addEventListener("keydown",s=>{if(s.key==="Escape"&&r.modal.visible){r.modal.visible=!1;const d=r.modal.parent;d&&n.nextTick().then(()=>{const p=d.dataset.rowindex,m=d.dataset.colindex,c=document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${m}']`);c&&c[0].focus()})}}),(s,d)=>(n.openBlock(),n.createElementBlock("table",{class:"atable",style:n.normalizeStyle({width:n.unref(r).config.fullWidth?"100%":"auto"})},[n.renderSlot(s.$slots,"header",{data:n.unref(r)},()=>[n.createVNode(R,{columns:n.unref(r).columns,config:n.unref(r).config,tableid:n.unref(r).id},null,8,["columns","config","tableid"])],!0),n.createElementVNode("tbody",null,[n.renderSlot(s.$slots,"body",{data:n.unref(r)},()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r).rows,(p,m)=>(n.openBlock(),n.createBlock(O,{key:p.id||n.unref(v)(),row:p,rowIndex:m,tableid:n.unref(r).id},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r).columns,(c,b)=>(n.openBlock(),n.createBlock(B,{key:`${b}:${m}`,tableid:n.unref(r).id,col:c,spellcheck:"false",rowIndex:m,colIndex:b+(n.unref(r).zeroColumn?0:-1),component:c.cellComponent,style:n.normalizeStyle({textAlign:(c==null?void 0:c.align)||"center",minWidth:(c==null?void 0:c.width)||"40ch",width:n.unref(r).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))],!0)]),n.renderSlot(s.$slots,"footer",{data:n.unref(r)},void 0,!0),n.renderSlot(s.$slots,"modal",{data:n.unref(r)},()=>[n.withDirectives(n.createVNode(P,{colIndex:n.unref(r).modal.colIndex,rowIndex:n.unref(r).modal.rowIndex,tableid:n.unref(r).id,style:n.normalizeStyle({left:n.unref(r).modal.left+"px",top:n.unref(r).modal.top+"px",maxWidth:n.unref(r).modal.width+"px"})},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(r).modal.component),n.mergeProps({key:`${n.unref(r).modal.rowIndex}:${n.unref(r).modal.colIndex}`,colIndex:n.unref(r).modal.colIndex,rowIndex:n.unref(r).modal.rowIndex,tableid:n.unref(r).id},n.unref(r).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[n.vShow,n.unref(r).modal.visible]])],!0)],4))}}),[["__scopeId","data-v-55d8ba05"]]);function $e(t){t.component("ACell",B),t.component("AExpansionRow",Z),t.component("ARow",O),t.component("ATable",te),t.component("ATableHeader",R),t.component("ATableModal",P)}h.ACell=B,h.AExpansionRow=Z,h.ARow=O,h.ATable=te,h.ATableHeader=R,h.ATableModal=P,h.TableDataStore=ee,h.install=$e,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=atable.umd.cjs.map diff --git a/atable/dist/atable.umd.cjs.map b/atable/dist/atable.umd.cjs.map deleted file mode 100644 index 57283ee1..00000000 --- a/atable/dist/atable.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"atable.umd.cjs","sources":["../../utilities/dist/utilities.js","../src/components/ACell.vue","../src/components/AExpansionRow.vue","../src/components/ARow.vue","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/rng.js","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/native.js","../../common/temp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js","../src/components/index.ts","../src/components/ATableHeader.vue","../src/components/ATableModal.vue","../src/components/ATable.vue","../src/index.ts"],"sourcesContent":["import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 } from 'uuid'\nimport { computed, reactive } from 'vue'\n\nimport type { TableDisplay, TableRow, TableColumn, TableConfig, TableModal } from '../../types'\n\nexport default class TableDataStore {\n\tid: string\n\trows: TableRow[]\n\tcolumns: TableColumn[]\n\tconfig: TableConfig\n\ttable: { [key: string]: any }\n\tdisplay: TableDisplay[]\n\tmodal: TableModal\n\n\tconstructor(\n\t\tid?: string,\n\t\tcolumns?: TableColumn[],\n\t\trows?: TableRow[],\n\t\tconfig?: TableConfig,\n\t\ttable?: { [key: string]: any },\n\t\tdisplay?: TableDisplay[]\n\t) {\n\t\tthis.id = id || v4()\n\t\tthis.rows = rows\n\t\tthis.columns = reactive(columns)\n\t\tthis.config = reactive(config)\n\t\tthis.table = table || reactive(this.createTableObject())\n\t\tthis.display = this.createDisplayObject(display)\n\t\tthis.modal = reactive({ visible: false })\n\t}\n\n\tcreateTableObject() {\n\t\tconst table = {}\n\t\tfor (const [colIndex, column] of this.columns.entries()) {\n\t\t\tfor (const [rowIndex, row] of this.rows.entries()) {\n\t\t\t\ttable[`${colIndex}:${rowIndex}`] = row[column.name]\n\t\t\t}\n\t\t}\n\t\treturn table\n\t}\n\n\tcreateDisplayObject(display?: TableDisplay[]) {\n\t\tconst defaultDisplay: TableDisplay[] = [Object.assign({}, { modified: false })]\n\n\t\t// TODO: (typing) what is the type of `display` here?\n\t\tif (display) {\n\t\t\tif ('0:0' in display) {\n\t\t\t\treturn display\n\t\t\t}\n\t\t\t// else if ('default' in display) {\n\t\t\t// \t// TODO: (typing) what is the possible input here for 'default'?\n\t\t\t// \tdefaultDisplay = display.default\n\t\t\t// }\n\t\t}\n\n\t\t// TODO: (typing) is this type correct for the parent set?\n\t\tconst parents = new Set()\n\t\tfor (let rowIndex = this.rows.length - 1; rowIndex >= 0; rowIndex--) {\n\t\t\tconst row = this.rows[rowIndex]\n\t\t\tif (row.parent) {\n\t\t\t\tparents.add(row.parent)\n\t\t\t}\n\n\t\t\tdefaultDisplay[rowIndex] = {\n\t\t\t\tchildrenOpen: false,\n\t\t\t\texpanded: false,\n\t\t\t\tindent: row.indent || null,\n\t\t\t\tisParent: parents.has(rowIndex),\n\t\t\t\tisRoot: row.parent === null || row.parent === undefined,\n\t\t\t\tmodified: false,\n\t\t\t\topen: row.parent === null || row.parent === undefined,\n\t\t\t\tparent: row.parent,\n\t\t\t}\n\t\t}\n\n\t\treturn reactive(defaultDisplay)\n\t}\n\n\tget zeroColumn() {\n\t\treturn ['list', 'tree', 'list-expansion'].includes(this.config.view)\n\t}\n\n\tget numberedRowWidth() {\n\t\treturn computed(() => {\n\t\t\treturn String(Math.ceil(this.rows.length / 100) + 1) + 'ch'\n\t\t})\n\t}\n\n\tcellData(colIndex: number, rowIndex: number): T {\n\t\treturn this.table[`${colIndex}:${rowIndex}`]\n\t}\n\n\tsetCellData(rowIndex: number, colIndex: number, value: any) {\n\t\tif (this.table[`${colIndex}:${rowIndex}`] !== value) {\n\t\t\tthis.display[rowIndex].modified = true\n\t\t}\n\t\tthis.table[`${colIndex}:${rowIndex}`] = value\n\t\tconst col = this.columns[colIndex]\n\t\tthis.rows[rowIndex][col.name] = value\n\t\treturn this.table[`${colIndex}:${rowIndex}`]\n\t}\n\n\ttoggleRowExpand(rowIndex: number) {\n\t\tif (this.config.view === 'tree') {\n\t\t\tthis.display[rowIndex].childrenOpen = !this.display[rowIndex].childrenOpen\n\t\t\tfor (let index = this.rows.length - 1; index >= 0; index--) {\n\t\t\t\tif (this.display[index].parent === rowIndex) {\n\t\t\t\t\tthis.display[index].open = !this.display[index].open\n\t\t\t\t\tif (this.display[index].childrenOpen) {\n\t\t\t\t\t\tthis.toggleRowExpand(index)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.config.view === 'list-expansion') {\n\t\t\tthis.display[rowIndex].expanded = !this.display[rowIndex].expanded\n\t\t}\n\t}\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACell from '@/components/ACell.vue'\nimport AExpansionRow from '@/components/AExpansionRow.vue'\nimport ARow from '@/components/ARow.vue'\nimport ATable from '@/components/ATable.vue'\nimport ATableHeader from '@/components/ATableHeader.vue'\nimport ATableModal from '@/components/ATableModal.vue'\nimport TableDataStore from './components'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACell', ACell)\n\tapp.component('AExpansionRow', AExpansionRow)\n\tapp.component('ARow', ARow)\n\tapp.component('ATable', ATable)\n\tapp.component('ATableHeader', ATableHeader)\n\tapp.component('ATableModal', ATableModal)\n}\n\nexport { install, ACell, AExpansionRow, ARow, ATable, ATableHeader, ATableModal, TableDataStore }\n"],"names":["v","M","F","e","j","H","Q","q","G","U","K","y","t","r","N","z","n","o","l","s","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","ne","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","props","__props","tableData","inject","cell","ref","cellModified","displayValue","computed","data","format","handleInput","event","domRect","cellWidth","handlers","defaultKeypressHandlers","useKeyboardNav","textAlign","currentData","onFocus","onChange","getIndent","colKey","indent","cellStyle","_a","rowEl","rowExpanded","getRowExpandSymbol","keyboardNav","numberedRowWidth","rowVisible","toggleRowExpand","rowIndex","getRandomValues","rnds8","rng","byteToHex","unsafeStringify","arr","offset","native","v4","options","buf","rnds","TableDataStore","id","columns","rows","config","table","display","reactive","colIndex","column","row","defaultDisplay","parents","value","col","index","getHeaderCellStyle","emit","__emit","provide","watch","newValue","clickOutside","$parent","nextTick","$parentCell","install","app","ACell","AExpansionRow","ARow","ATable","ATableHeader","ATableModal"],"mappings":"yQACA,IAAIA,EACJ,MAAMC,EAAI,OAAO,OAAS,IAAKC,GAAKC,GAAM,OAAOA,GAAK,SAAUC,GAAI,IAAM,CAC1E,EACAH,IAAOD,EAAI,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,EAAE,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAClI,SAASK,EAAEF,EAAG,CACZ,OAAO,OAAOA,GAAK,WAAaA,EAAC,EAAKG,EAAAA,MAAEH,CAAC,CAC3C,CACA,SAASI,GAAEJ,EAAG,CACZ,OAAOA,CAC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M,EAC1BJ,EAAA,UAAU,eAAgBK,CAAY,EACtCL,EAAA,UAAU,cAAeM,CAAW,CACzC","x_google_ignoreList":[4,5,6,7]} \ No newline at end of file diff --git a/atable/dist/style.css b/atable/dist/style.css deleted file mode 100644 index efc1bfc3..00000000 --- a/atable/dist/style.css +++ /dev/null @@ -1 +0,0 @@ -[data-v-07dfe445]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}td[data-v-07dfe445]{border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--cell-text-color);text-overflow:ellipsis;overflow:hidden;padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--atable-row-padding);padding-bottom:var(--atable-row-padding);border-spacing:0px;border-collapse:collapse}td[data-v-07dfe445]:focus,td[data-v-07dfe445]:focus-within{background-color:var(--focus-cell-background);outline-width:2px;outline-style:solid;outline-color:var(--focus-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}[data-v-b2e2ed2d]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}.row-index[data-v-b2e2ed2d]{color:var(--header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch}.expandable-row[data-v-b2e2ed2d]{border-top:1px solid var(--row-border-color);height:var(--atable-row-height)}.expanded-row[data-v-b2e2ed2d]{border-bottom:1px solid var(--row-border-color);border-top:1px solid var(--row-border-color)}.expanded-row-content[data-v-b2e2ed2d]{border-bottom:1px solid var(--row-border-color);border-top:1px solid var(--row-border-color);padding:1.5rem}[data-v-4c71a067]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}.table-row[data-v-4c71a067]{border-top:1px solid var(--row-border-color);height:var(--atable-row-height)}.list-index[data-v-4c71a067]{color:var(--header-text-color);font-weight:700;padding-left:var(--atable-row-padding);padding-right:1em;text-align:center;-webkit-user-select:none;user-select:none;width:var(--5b18ee03);max-width:var(--5b18ee03)}.tree-index[data-v-4c71a067]{color:var(--header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch}[data-v-16e66636]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}thead[data-v-16e66636]{background-color:var(--gray-5)}#header-index[data-v-16e66636]{width:var(--12d06943);max-width:var(--12d06943)}th[data-v-16e66636]{border-width:0px;border-style:solid;border-radius:0;padding-left:.5ch;padding-right:.5ch;padding-top:var(--atable-row-padding);padding-bottom:var(--atable-row-padding);color:var(--gray-60);height:var(--atable-row-height)}th[data-v-16e66636]:focus{outline:none}[data-v-10a48b2a]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}div[data-v-10a48b2a]{z-index:100;position:absolute;background-color:var(--row-color-zebra-dark)}[data-v-55d8ba05]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}table[data-v-55d8ba05]{display:table;border-collapse:collapse;caret-color:var(--brand-color)}table.atable[data-v-55d8ba05],.atable[data-v-55d8ba05]{font-family:var(--atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--table-font-size);border-collapse:collapse}th[data-v-55d8ba05]{box-sizing:border-box;background-color:var(--brand-color);border-width:1px;border-style:solid;border-color:var(--header-border-color);border-radius:0;color:var(--header-text-color)} diff --git a/atable/package.json b/atable/package.json index bb7c641d..6b55d412 100644 --- a/atable/package.json +++ b/atable/package.json @@ -1,8 +1,20 @@ { "name": "@stonecrop/atable", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "atable" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/atable.js", @@ -12,10 +24,11 @@ }, "main": "dist/atable.js", "module": "dist/atable.js", + "umd": "dist/atable.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.vue" + "src/*" ], "scripts": { "build": "tsc -b && vite build", @@ -59,8 +72,10 @@ "peerDependencies": { "@stonecrop/aform": "workspace:*" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/atable.umd.cjs" + } } diff --git a/beam/package.json b/beam/package.json index ab779207..d570e990 100644 --- a/beam/package.json +++ b/beam/package.json @@ -1,7 +1,32 @@ { "name": "@stonecrop/beam", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", + "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "beam" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, + "exports": { + ".": { + "import": "./dist/beam-ui.es.js", + "require": "./dist/beam-ui.umd.js" + } + }, + "main": "./dist/beam-ui.umd.js", + "module": "./dist/beam-ui.es.js", + "files": [ + "dist/*", + "src/*" + ], "scripts": { "dev": "vite serve dev/ -c dev/vite.config.js -d", "build": "vite build dev/ -c dev/vite.config.js -d", @@ -18,18 +43,10 @@ "vite": "^5.2.9", "vue-router": "^4" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "files": [ - "dist" - ], - "main": "./dist/beam-ui.umd.js", - "module": "./dist/beam-ui.es.js", - "exports": { - ".": { - "import": "./dist/beam-ui.es.js", - "require": "./dist/beam-ui.umd.js" - } } } diff --git a/code_editor/dist/code-editor.js b/code_editor/dist/code-editor.js deleted file mode 100644 index 0a1a75d8..00000000 --- a/code_editor/dist/code-editor.js +++ /dev/null @@ -1,778 +0,0 @@ -import { defineComponent as C, ref as $, onMounted as x, openBlock as q, createElementBlock as D, createElementVNode as _ } from "vue"; -function B(e, n, r) { - return n in e ? Object.defineProperty(e, n, { - value: r, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[n] = r, e; -} -function k(e, n) { - var r = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var t = Object.getOwnPropertySymbols(e); - n && (t = t.filter(function(o) { - return Object.getOwnPropertyDescriptor(e, o).enumerable; - })), r.push.apply(r, t); - } - return r; -} -function y(e) { - for (var n = 1; n < arguments.length; n++) { - var r = arguments[n] != null ? arguments[n] : {}; - n % 2 ? k(Object(r), !0).forEach(function(t) { - B(e, t, r[t]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : k(Object(r)).forEach(function(t) { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); - }); - } - return e; -} -function L(e, n) { - if (e == null) - return {}; - var r = {}, t = Object.keys(e), o, i; - for (i = 0; i < t.length; i++) - o = t[i], !(n.indexOf(o) >= 0) && (r[o] = e[o]); - return r; -} -function H(e, n) { - if (e == null) - return {}; - var r = L(e, n), t, o; - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(e); - for (o = 0; o < i.length; o++) - t = i[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]); - } - return r; -} -function M(e, n) { - return R(e) || z(e, n) || F(e, n) || W(); -} -function R(e) { - if (Array.isArray(e)) - return e; -} -function z(e, n) { - if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) { - var r = [], t = !0, o = !1, i = void 0; - try { - for (var a = e[Symbol.iterator](), u; !(t = (u = a.next()).done) && (r.push(u.value), !(n && r.length === n)); t = !0) - ; - } catch (c) { - o = !0, i = c; - } finally { - try { - !t && a.return != null && a.return(); - } finally { - if (o) - throw i; - } - } - return r; - } -} -function F(e, n) { - if (e) { - if (typeof e == "string") - return O(e, n); - var r = Object.prototype.toString.call(e).slice(8, -1); - if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") - return Array.from(e); - if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) - return O(e, n); - } -} -function O(e, n) { - (n == null || n > e.length) && (n = e.length); - for (var r = 0, t = new Array(n); r < n; r++) - t[r] = e[r]; - return t; -} -function W() { - 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 G(e, n, r) { - return n in e ? Object.defineProperty(e, n, { - value: r, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[n] = r, e; -} -function w(e, n) { - var r = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var t = Object.getOwnPropertySymbols(e); - n && (t = t.filter(function(o) { - return Object.getOwnPropertyDescriptor(e, o).enumerable; - })), r.push.apply(r, t); - } - return r; -} -function j(e) { - for (var n = 1; n < arguments.length; n++) { - var r = arguments[n] != null ? arguments[n] : {}; - n % 2 ? w(Object(r), !0).forEach(function(t) { - G(e, t, r[t]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : w(Object(r)).forEach(function(t) { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); - }); - } - return e; -} -function N() { - for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) - n[r] = arguments[r]; - return function(t) { - return n.reduceRight(function(o, i) { - return i(o); - }, t); - }; -} -function d(e) { - return function n() { - for (var r = this, t = arguments.length, o = new Array(t), i = 0; i < t; i++) - o[i] = arguments[i]; - return o.length >= e.length ? e.apply(this, o) : function() { - for (var a = arguments.length, u = new Array(a), c = 0; c < a; c++) - u[c] = arguments[c]; - return n.apply(r, [].concat(o, u)); - }; - }; -} -function m(e) { - return {}.toString.call(e).includes("Object"); -} -function U(e) { - return !Object.keys(e).length; -} -function l(e) { - return typeof e == "function"; -} -function K(e, n) { - return Object.prototype.hasOwnProperty.call(e, n); -} -function V(e, n) { - return m(n) || f("changeType"), Object.keys(n).some(function(r) { - return !K(e, r); - }) && f("changeField"), n; -} -function Y(e) { - l(e) || f("selectorType"); -} -function J(e) { - l(e) || m(e) || f("handlerType"), m(e) && Object.values(e).some(function(n) { - return !l(n); - }) && f("handlersType"); -} -function Q(e) { - e || f("initialIsRequired"), m(e) || f("initialType"), U(e) && f("initialContent"); -} -function X(e, n) { - throw new Error(e[n] || e.default); -} -var Z = { - initialIsRequired: "initial state is required", - initialType: "initial state should be an object", - initialContent: "initial state shouldn't be an empty object", - handlerType: "handler should be an object or a function", - handlersType: "all handlers should be a functions", - selectorType: "selector should be a function", - changeType: "provided value of changes should be an object", - changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state', - default: "an unknown error accured in `state-local` package" -}, f = d(X)(Z), p = { - changes: V, - selector: Y, - handler: J, - initial: Q -}; -function ee(e) { - var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - p.initial(e), p.handler(n); - var r = { - current: e - }, t = d(te)(r, n), o = d(re)(r), i = d(p.changes)(e), a = d(ne)(r); - function u() { - var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(T) { - return T; - }; - return p.selector(s), s(r.current); - } - function c(s) { - N(t, o, i, a)(s); - } - return [u, c]; -} -function ne(e, n) { - return l(n) ? n(e.current) : n; -} -function re(e, n) { - return e.current = j(j({}, e.current), n), n; -} -function te(e, n, r) { - return l(n) ? n(e.current) : Object.keys(r).forEach(function(t) { - var o; - return (o = n[t]) === null || o === void 0 ? void 0 : o.call(n, e.current[t]); - }), r; -} -var oe = { - create: ee -}, ie = { - paths: { - vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs" - } -}; -function ae(e) { - return function n() { - for (var r = this, t = arguments.length, o = new Array(t), i = 0; i < t; i++) - o[i] = arguments[i]; - return o.length >= e.length ? e.apply(this, o) : function() { - for (var a = arguments.length, u = new Array(a), c = 0; c < a; c++) - u[c] = arguments[c]; - return n.apply(r, [].concat(o, u)); - }; - }; -} -function ce(e) { - return {}.toString.call(e).includes("Object"); -} -function ue(e) { - return e || S("configIsRequired"), ce(e) || S("configType"), e.urls ? (fe(), { - paths: { - vs: e.urls.monacoBase - } - }) : e; -} -function fe() { - console.warn(P.deprecation); -} -function de(e, n) { - throw new Error(e[n] || e.default); -} -var P = { - configIsRequired: "the configuration object is required", - configType: "the configuration object should be an object", - default: "an unknown error accured in `@monaco-editor/loader` package", - deprecation: `Deprecation warning! - You are using deprecated way of configuration. - - Instead of using - monaco.config({ urls: { monacoBase: '...' } }) - use - monaco.config({ paths: { vs: '...' } }) - - For more please check the link https://github.com/suren-atoyan/monaco-loader#config - ` -}, S = ae(de)(P), le = { - config: ue -}, ge = function() { - for (var n = arguments.length, r = new Array(n), t = 0; t < n; t++) - r[t] = arguments[t]; - return function(o) { - return r.reduceRight(function(i, a) { - return a(i); - }, o); - }; -}; -function I(e, n) { - return Object.keys(n).forEach(function(r) { - n[r] instanceof Object && e[r] && Object.assign(n[r], I(e[r], n[r])); - }), y(y({}, e), n); -} -var se = { - type: "cancelation", - msg: "operation is manually canceled" -}; -function h(e) { - var n = !1, r = new Promise(function(t, o) { - e.then(function(i) { - return n ? o(se) : t(i); - }), e.catch(o); - }); - return r.cancel = function() { - return n = !0; - }, r; -} -var pe = oe.create({ - config: ie, - isInitialized: !1, - resolve: null, - reject: null, - monaco: null -}), E = M(pe, 2), g = E[0], b = E[1]; -function me(e) { - var n = le.config(e), r = n.monaco, t = H(n, ["monaco"]); - b(function(o) { - return { - config: I(o.config, t), - monaco: r - }; - }); -} -function be() { - var e = g(function(n) { - var r = n.monaco, t = n.isInitialized, o = n.resolve; - return { - monaco: r, - isInitialized: t, - resolve: o - }; - }); - if (!e.isInitialized) { - if (b({ - isInitialized: !0 - }), e.monaco) - return e.resolve(e.monaco), h(v); - if (window.monaco && window.monaco.editor) - return A(window.monaco), e.resolve(window.monaco), h(v); - ge(he, ke)(ye); - } - return h(v); -} -function he(e) { - return document.body.appendChild(e); -} -function ve(e) { - var n = document.createElement("script"); - return e && (n.src = e), n; -} -function ke(e) { - var n = g(function(t) { - var o = t.config, i = t.reject; - return { - config: o, - reject: i - }; - }), r = ve("".concat(n.config.paths.vs, "/loader.js")); - return r.onload = function() { - return e(); - }, r.onerror = n.reject, r; -} -function ye() { - var e = g(function(r) { - var t = r.config, o = r.resolve, i = r.reject; - return { - config: t, - resolve: o, - reject: i - }; - }), n = window.require; - n.config(e.config), n(["vs/editor/editor.main"], function(r) { - A(r), e.resolve(r); - }, function(r) { - e.reject(r); - }); -} -function A(e) { - g().monaco || b({ - monaco: e - }); -} -function Oe() { - return g(function(e) { - var n = e.monaco; - return n; - }); -} -var v = new Promise(function(e, n) { - return b({ - resolve: e, - reject: n - }); -}), we = { - config: me, - init: be, - __getMonacoInstance: Oe -}; -const je = { - base: "vs", - inherit: !0, - colors: { - "editor.foreground": "#24292e", - "editor.background": "#ffffff", - "editor.selectionBackground": "#c8c8fa", - "editor.inactiveSelectionBackground": "#fafbfc", - "editor.lineHighlightBackground": "#fafbfc", - "editorCursor.foreground": "#24292e", - "editorWhitespace.foreground": "#959da5", - "editorIndentGuide.background": "#959da5", - "editorIndentGuide.activeBackground": "#24292e", - "editor.selectionHighlightBorder": "#fafbfc" - }, - rules: [ - { - background: "ffffff", - token: "" - }, - { - foreground: "6a737d", - token: "comment" - }, - { - foreground: "6a737d", - token: "punctuation.definition.comment" - }, - { - foreground: "6a737d", - token: "string.comment" - }, - { - foreground: "005cc5", - token: "constant" - }, - { - foreground: "005cc5", - token: "entity.name.constant" - }, - { - foreground: "005cc5", - token: "variable.other.constant" - }, - { - foreground: "005cc5", - token: "variable.language" - }, - { - foreground: "6f42c1", - token: "entity" - }, - { - foreground: "6f42c1", - token: "entity.name" - }, - { - foreground: "24292e", - token: "variable.parameter.function" - }, - { - foreground: "22863a", - token: "entity.name.tag" - }, - { - foreground: "d73a49", - token: "keyword" - }, - { - foreground: "d73a49", - token: "storage" - }, - { - foreground: "d73a49", - token: "storage.type" - }, - { - foreground: "24292e", - token: "storage.modifier.package" - }, - { - foreground: "24292e", - token: "storage.modifier.import" - }, - { - foreground: "24292e", - token: "storage.type.java" - }, - { - foreground: "032f62", - token: "string" - }, - { - foreground: "032f62", - token: "punctuation.definition.string" - }, - { - foreground: "032f62", - token: "string punctuation.section.embedded source" - }, - { - foreground: "005cc5", - token: "support" - }, - { - foreground: "005cc5", - token: "meta.property-name" - }, - { - foreground: "e36209", - token: "variable" - }, - { - foreground: "24292e", - token: "variable.other" - }, - { - foreground: "b31d28", - fontStyle: "bold italic underline", - token: "invalid.broken" - }, - { - foreground: "b31d28", - fontStyle: "bold italic underline", - token: "invalid.deprecated" - }, - { - foreground: "fafbfc", - background: "b31d28", - fontStyle: "italic underline", - token: "invalid.illegal" - }, - { - foreground: "fafbfc", - background: "d73a49", - fontStyle: "italic underline", - token: "carriage-return" - }, - { - foreground: "b31d28", - fontStyle: "bold italic underline", - token: "invalid.unimplemented" - }, - { - foreground: "b31d28", - token: "message.error" - }, - { - foreground: "24292e", - token: "string source" - }, - { - foreground: "005cc5", - token: "string variable" - }, - { - foreground: "032f62", - token: "source.regexp" - }, - { - foreground: "032f62", - token: "string.regexp" - }, - { - foreground: "032f62", - token: "string.regexp.character-class" - }, - { - foreground: "032f62", - token: "string.regexp constant.character.escape" - }, - { - foreground: "032f62", - token: "string.regexp source.ruby.embedded" - }, - { - foreground: "032f62", - token: "string.regexp string.regexp.arbitrary-repitition" - }, - { - foreground: "22863a", - fontStyle: "bold", - token: "string.regexp constant.character.escape" - }, - { - foreground: "005cc5", - token: "support.constant" - }, - { - foreground: "005cc5", - token: "support.variable" - }, - { - foreground: "005cc5", - token: "meta.module-reference" - }, - { - foreground: "735c0f", - token: "markup.list" - }, - { - foreground: "005cc5", - fontStyle: "bold", - token: "markup.heading" - }, - { - foreground: "005cc5", - fontStyle: "bold", - token: "markup.heading entity.name" - }, - { - foreground: "22863a", - token: "markup.quote" - }, - { - foreground: "24292e", - fontStyle: "italic", - token: "markup.italic" - }, - { - foreground: "24292e", - fontStyle: "bold", - token: "markup.bold" - }, - { - foreground: "005cc5", - token: "markup.raw" - }, - { - foreground: "b31d28", - background: "ffeef0", - token: "markup.deleted" - }, - { - foreground: "b31d28", - background: "ffeef0", - token: "meta.diff.header.from-file" - }, - { - foreground: "b31d28", - background: "ffeef0", - token: "punctuation.definition.deleted" - }, - { - foreground: "22863a", - background: "f0fff4", - token: "markup.inserted" - }, - { - foreground: "22863a", - background: "f0fff4", - token: "meta.diff.header.to-file" - }, - { - foreground: "22863a", - background: "f0fff4", - token: "punctuation.definition.inserted" - }, - { - foreground: "e36209", - background: "ffebda", - token: "markup.changed" - }, - { - foreground: "e36209", - background: "ffebda", - token: "punctuation.definition.changed" - }, - { - foreground: "f6f8fa", - background: "005cc5", - token: "markup.ignored" - }, - { - foreground: "f6f8fa", - background: "005cc5", - token: "markup.untracked" - }, - { - foreground: "6f42c1", - fontStyle: "bold", - token: "meta.diff.range" - }, - { - foreground: "005cc5", - token: "meta.diff.header" - }, - { - foreground: "005cc5", - fontStyle: "bold", - token: "meta.separator" - }, - { - foreground: "005cc5", - token: "meta.output" - }, - { - foreground: "586069", - token: "brackethighlighter.tag" - }, - { - foreground: "586069", - token: "brackethighlighter.curly" - }, - { - foreground: "586069", - token: "brackethighlighter.round" - }, - { - foreground: "586069", - token: "brackethighlighter.square" - }, - { - foreground: "586069", - token: "brackethighlighter.angle" - }, - { - foreground: "586069", - token: "brackethighlighter.quote" - }, - { - foreground: "b31d28", - token: "brackethighlighter.unmatched" - }, - { - foreground: "b31d28", - token: "sublimelinter.mark.error" - }, - { - foreground: "e36209", - token: "sublimelinter.mark.warning" - }, - { - foreground: "959da5", - token: "sublimelinter.gutter-mark" - }, - { - foreground: "032f62", - fontStyle: "underline", - token: "constant.other.reference.link" - }, - { - foreground: "032f62", - fontStyle: "underline", - token: "string.other.link" - } - ] -}, Se = { - ref: "editorContainer", - id: "editor-container" -}, Pe = /* @__PURE__ */ C({ - __name: "ACodeEditor", - props: { - options: {} - }, - setup(e) { - const n = e, r = $(null), t = { - ...n.options, - automaticLayout: !0, - colorDecorators: !0, - lineHeight: 24, - scrollBeyondLastLine: !1 - }; - return x(async () => { - const i = (await we.init()).editor; - i.defineTheme("agritheory", je), i.setTheme("agritheory"), i.create(r.value, t); - }), (o, i) => (q(), D("div", Se, [ - _("div", { - ref_key: "aCodeEditor", - ref: r, - id: "editor-area" - }, null, 512) - ], 512)); - } -}), Ie = (e, n) => { - const r = e.__vccOpts || e; - for (const [t, o] of n) - r[t] = o; - return r; -}, Ee = /* @__PURE__ */ Ie(Pe, [["__scopeId", "data-v-28cc715a"]]); -function Te(e) { - e.component("ACodeEditor", Ee); -} -export { - Ee as ACodeEditor, - Te as install -}; -//# sourceMappingURL=code-editor.js.map diff --git a/code_editor/dist/code-editor.js.map b/code_editor/dist/code-editor.js.map deleted file mode 100644 index 4da07283..00000000 --- a/code_editor/dist/code-editor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"code-editor.js","sources":["../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../common/temp/node_modules/.pnpm/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/config/index.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/loader/index.js","../src/theme/code_editor/agritheory.ts","../src/components/ACodeEditor.vue","../src/index.ts"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _unsupportedIterableToArray as unsupportedIterableToArray };\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n","var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs'\n }\n};\n\nexport default config;\n","function curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport default curry;\n","function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport default isObject;\n","import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\n\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n\n return config;\n}\n/**\n * logs deprecation message\n */\n\n\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport default validators;\nexport { errorHandler, errorMessages };\n","var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport default compose;\n","import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport default merge;\n","// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\n\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport default makeCancelable;\nexport { CANCELATION_MESSAGE };\n","import { slicedToArray as _slicedToArray, objectWithoutProperties as _objectWithoutProperties } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport state from 'state-local';\nimport config$1 from '../config/index.js';\nimport validators from '../validators/index.js';\nimport compose from '../utils/compose.js';\nimport merge from '../utils/deepMerge.js';\nimport makeCancelable from '../utils/makeCancelable.js';\n\n/** the local state of the module */\n\nvar _state$create = state.create({\n config: config$1,\n isInitialized: false,\n resolve: null,\n reject: null,\n monaco: null\n}),\n _state$create2 = _slicedToArray(_state$create, 2),\n getState = _state$create2[0],\n setState = _state$create2[1];\n/**\n * set the loader configuration\n * @param {Object} config - the configuration object\n */\n\n\nfunction config(globalConfig) {\n var _validators$config = validators.config(globalConfig),\n monaco = _validators$config.monaco,\n config = _objectWithoutProperties(_validators$config, [\"monaco\"]);\n\n setState(function (state) {\n return {\n config: merge(state.config, config),\n monaco: monaco\n };\n });\n}\n/**\n * handles the initialization of the monaco-editor\n * @return {Promise} - returns an instance of monaco (with a cancelable promise)\n */\n\n\nfunction init() {\n var state = getState(function (_ref) {\n var monaco = _ref.monaco,\n isInitialized = _ref.isInitialized,\n resolve = _ref.resolve;\n return {\n monaco: monaco,\n isInitialized: isInitialized,\n resolve: resolve\n };\n });\n\n if (!state.isInitialized) {\n setState({\n isInitialized: true\n });\n\n if (state.monaco) {\n state.resolve(state.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n if (window.monaco && window.monaco.editor) {\n storeMonacoInstance(window.monaco);\n state.resolve(window.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n compose(injectScripts, getMonacoLoaderScript)(configureLoader);\n }\n\n return makeCancelable(wrapperPromise);\n}\n/**\n * injects provided scripts into the document.body\n * @param {Object} script - an HTML script element\n * @return {Object} - the injected HTML script element\n */\n\n\nfunction injectScripts(script) {\n return document.body.appendChild(script);\n}\n/**\n * creates an HTML script element with/without provided src\n * @param {string} [src] - the source path of the script\n * @return {Object} - the created HTML script element\n */\n\n\nfunction createScript(src) {\n var script = document.createElement('script');\n return src && (script.src = src), script;\n}\n/**\n * creates an HTML script element with the monaco loader src\n * @return {Object} - the created HTML script element\n */\n\n\nfunction getMonacoLoaderScript(configureLoader) {\n var state = getState(function (_ref2) {\n var config = _ref2.config,\n reject = _ref2.reject;\n return {\n config: config,\n reject: reject\n };\n });\n var loaderScript = createScript(\"\".concat(state.config.paths.vs, \"/loader.js\"));\n\n loaderScript.onload = function () {\n return configureLoader();\n };\n\n loaderScript.onerror = state.reject;\n return loaderScript;\n}\n/**\n * configures the monaco loader\n */\n\n\nfunction configureLoader() {\n var state = getState(function (_ref3) {\n var config = _ref3.config,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n return {\n config: config,\n resolve: resolve,\n reject: reject\n };\n });\n var require = window.require;\n\n require.config(state.config);\n\n require(['vs/editor/editor.main'], function (monaco) {\n storeMonacoInstance(monaco);\n state.resolve(monaco);\n }, function (error) {\n state.reject(error);\n });\n}\n/**\n * store monaco instance in local state\n */\n\n\nfunction storeMonacoInstance(monaco) {\n if (!getState().monaco) {\n setState({\n monaco: monaco\n });\n }\n}\n/**\n * internal helper function\n * extracts stored monaco instance\n * @return {Object|null} - the monaco instance\n */\n\n\nfunction __getMonacoInstance() {\n return getState(function (_ref4) {\n var monaco = _ref4.monaco;\n return monaco;\n });\n}\n\nvar wrapperPromise = new Promise(function (resolve, reject) {\n return setState({\n resolve: resolve,\n reject: reject\n });\n});\nvar loader = {\n config: config,\n init: init,\n __getMonacoInstance: __getMonacoInstance\n};\n\nexport default loader;\n","import { editor } from 'monaco-editor'\n\n// picked from https://bitwiser.in/monaco-themes/\n// currently set to: Github Light\nexport const theme: editor.IStandaloneThemeData = {\n\tbase: 'vs',\n\tinherit: true,\n\tcolors: {\n\t\t'editor.foreground': '#24292e',\n\t\t'editor.background': '#ffffff',\n\t\t'editor.selectionBackground': '#c8c8fa',\n\t\t'editor.inactiveSelectionBackground': '#fafbfc',\n\t\t'editor.lineHighlightBackground': '#fafbfc',\n\t\t'editorCursor.foreground': '#24292e',\n\t\t'editorWhitespace.foreground': '#959da5',\n\t\t'editorIndentGuide.background': '#959da5',\n\t\t'editorIndentGuide.activeBackground': '#24292e',\n\t\t'editor.selectionHighlightBorder': '#fafbfc',\n\t},\n\trules: [\n\t\t{\n\t\t\tbackground: 'ffffff',\n\t\t\ttoken: '',\n\t\t},\n\t\t{\n\t\t\tforeground: '6a737d',\n\t\t\ttoken: 'comment',\n\t\t},\n\t\t{\n\t\t\tforeground: '6a737d',\n\t\t\ttoken: 'punctuation.definition.comment',\n\t\t},\n\t\t{\n\t\t\tforeground: '6a737d',\n\t\t\ttoken: 'string.comment',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'entity.name.constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'variable.other.constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'variable.language',\n\t\t},\n\t\t{\n\t\t\tforeground: '6f42c1',\n\t\t\ttoken: 'entity',\n\t\t},\n\t\t{\n\t\t\tforeground: '6f42c1',\n\t\t\ttoken: 'entity.name',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'variable.parameter.function',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\ttoken: 'entity.name.tag',\n\t\t},\n\t\t{\n\t\t\tforeground: 'd73a49',\n\t\t\ttoken: 'keyword',\n\t\t},\n\t\t{\n\t\t\tforeground: 'd73a49',\n\t\t\ttoken: 'storage',\n\t\t},\n\t\t{\n\t\t\tforeground: 'd73a49',\n\t\t\ttoken: 'storage.type',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'storage.modifier.package',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'storage.modifier.import',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'storage.type.java',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'punctuation.definition.string',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string punctuation.section.embedded source',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'support',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.property-name',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\ttoken: 'variable',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'variable.other',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tfontStyle: 'bold italic underline',\n\t\t\ttoken: 'invalid.broken',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tfontStyle: 'bold italic underline',\n\t\t\ttoken: 'invalid.deprecated',\n\t\t},\n\t\t{\n\t\t\tforeground: 'fafbfc',\n\t\t\tbackground: 'b31d28',\n\t\t\tfontStyle: 'italic underline',\n\t\t\ttoken: 'invalid.illegal',\n\t\t},\n\t\t{\n\t\t\tforeground: 'fafbfc',\n\t\t\tbackground: 'd73a49',\n\t\t\tfontStyle: 'italic underline',\n\t\t\ttoken: 'carriage-return',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tfontStyle: 'bold italic underline',\n\t\t\ttoken: 'invalid.unimplemented',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\ttoken: 'message.error',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'string source',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'string variable',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'source.regexp',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp.character-class',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp constant.character.escape',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp source.ruby.embedded',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp string.regexp.arbitrary-repitition',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'string.regexp constant.character.escape',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'support.constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'support.variable',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.module-reference',\n\t\t},\n\t\t{\n\t\t\tforeground: '735c0f',\n\t\t\ttoken: 'markup.list',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'markup.heading',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'markup.heading entity.name',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\ttoken: 'markup.quote',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\tfontStyle: 'italic',\n\t\t\ttoken: 'markup.italic',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'markup.bold',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'markup.raw',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tbackground: 'ffeef0',\n\t\t\ttoken: 'markup.deleted',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tbackground: 'ffeef0',\n\t\t\ttoken: 'meta.diff.header.from-file',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tbackground: 'ffeef0',\n\t\t\ttoken: 'punctuation.definition.deleted',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tbackground: 'f0fff4',\n\t\t\ttoken: 'markup.inserted',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tbackground: 'f0fff4',\n\t\t\ttoken: 'meta.diff.header.to-file',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tbackground: 'f0fff4',\n\t\t\ttoken: 'punctuation.definition.inserted',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\tbackground: 'ffebda',\n\t\t\ttoken: 'markup.changed',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\tbackground: 'ffebda',\n\t\t\ttoken: 'punctuation.definition.changed',\n\t\t},\n\t\t{\n\t\t\tforeground: 'f6f8fa',\n\t\t\tbackground: '005cc5',\n\t\t\ttoken: 'markup.ignored',\n\t\t},\n\t\t{\n\t\t\tforeground: 'f6f8fa',\n\t\t\tbackground: '005cc5',\n\t\t\ttoken: 'markup.untracked',\n\t\t},\n\t\t{\n\t\t\tforeground: '6f42c1',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'meta.diff.range',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.diff.header',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'meta.separator',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.output',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.tag',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.curly',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.round',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.square',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.angle',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.quote',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\ttoken: 'brackethighlighter.unmatched',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\ttoken: 'sublimelinter.mark.error',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\ttoken: 'sublimelinter.mark.warning',\n\t\t},\n\t\t{\n\t\t\tforeground: '959da5',\n\t\t\ttoken: 'sublimelinter.gutter-mark',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\tfontStyle: 'underline',\n\t\t\ttoken: 'constant.other.reference.link',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\tfontStyle: 'underline',\n\t\t\ttoken: 'string.other.link',\n\t\t},\n\t],\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACodeEditor from '@/components/ACodeEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACodeEditor', ACodeEditor)\n}\n\nexport { install, ACodeEditor }\n"],"names":["_defineProperty","obj","key","value","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","_objectWithoutPropertiesLoose","excluded","sourceKeys","_objectWithoutProperties","sourceSymbolKeys","_slicedToArray","arr","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arr","_n","_d","_e","_i","_s","err","o","minLen","_arrayLikeToArray","n","len","arr2","compose","_len","fns","_key","x","y","f","curry","fn","curried","_this","_len2","args","_key2","_len3","nextArgs","_key3","isObject","isEmpty","isFunction","hasOwnProperty","property","validateChanges","initial","changes","errorHandler","field","validateSelector","selector","validateHandler","handler","_handler","validateInitial","throwError","errorMessages","type","validators","create","state","didUpdate","didStateUpdate","update","updateState","validate","getChanges","extractChanges","getState","setState","causedChanges","_handler$field","index","config","validateConfig","informAboutDeprecation","merge","CANCELATION_MESSAGE","makeCancelable","promise","hasCanceled_","wrappedPromise","resolve","reject","val","_state$create","config$1","_state$create2","globalConfig","_validators$config","monaco","init","_ref","isInitialized","wrapperPromise","storeMonacoInstance","injectScripts","getMonacoLoaderScript","configureLoader","script","createScript","src","_ref2","loaderScript","_ref3","require","error","__getMonacoInstance","_ref4","loader","theme","props","__props","aCodeEditor","ref","editorOptions","onMounted","editor","install","app","ACodeEditor"],"mappings":";AAAA,SAASA,EAAgBC,GAAKC,GAAKC,GAAO;AACxC,SAAID,KAAOD,IACT,OAAO,eAAeA,GAAKC,GAAK;AAAA,IAC9B,OAAOC;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EAChB,CAAK,IAEDF,EAAIC,CAAG,IAAIC,GAGNF;AACT;AAEA,SAASG,EAAQC,GAAQC,GAAgB;AACvC,MAAIC,IAAO,OAAO,KAAKF,CAAM;AAE7B,MAAI,OAAO,uBAAuB;AAChC,QAAIG,IAAU,OAAO,sBAAsBH,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A;AAAA,MACC,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,OAAO;AAAA,IACR;AAAA,EACD;AACD;;;;;;;;;AClVA,UAAMC,IAAQC,GAIRC,IAAcC,EAAI,IAAI,GACtBC,IAAyC;AAAA,MAC9C,GAAGJ,EAAM;AAAA,MACT,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,sBAAsB;AAAA,IAAA;AAGvB,WAAAK,EAAU,YAAY;AAErB,YAAMC,KADiB,MAAMR,GAAO,QACN;AAE9BQ,MAAAA,EAAO,YAAY,cAAcP,EAAK,GACtCO,EAAO,SAAS,YAAY,GAG5BA,EAAO,OAAOJ,EAAY,OAAsBE,CAAa;AAAA,IAAA,CAC7D;;;;;;;;;;;;;;AC/BD,SAASG,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,eAAeC,EAAW;AACzC;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]} \ No newline at end of file diff --git a/code_editor/dist/code-editor.umd.cjs b/code_editor/dist/code-editor.umd.cjs deleted file mode 100644 index 58f77ad9..00000000 --- a/code_editor/dist/code-editor.umd.cjs +++ /dev/null @@ -1,12 +0,0 @@ -(function(d,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(d=typeof globalThis<"u"?globalThis:d||self,u(d["@stonecrop/code-editor"]={},d.Vue))})(this,function(d,u){"use strict";function _(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function O(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,t)}return r}function w(e){for(var n=1;n=0)&&(r[o]=e[o]);return r}function q(e,n){if(e==null)return{};var r=x(e,n),t,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function D(e,n){return B(e)||L(e,n)||M(e,n)||H()}function B(e){if(Array.isArray(e))return e}function L(e,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],t=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),f;!(t=(f=a.next()).done)&&(r.push(f.value),!(n&&r.length===n));t=!0);}catch(c){o=!0,i=c}finally{try{!t&&a.return!=null&&a.return()}finally{if(o)throw i}}return r}}function M(e,n){if(e){if(typeof e=="string")return j(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,n)}}function j(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r=e.length?e.apply(this,o):function(){for(var a=arguments.length,f=new Array(a),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};b.initial(e),b.handler(n);var r={current:e},t=s(Z)(r,n),o=s(X)(r),i=s(b.changes)(e),a=s(Q)(r);function f(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(we){return we};return b.selector(k),k(r.current)}function c(k){z(t,o,i,a)(k)}return[f,c]}function Q(e,n){return g(n)?n(e.current):n}function X(e,n){return e.current=P(P({},e.current),n),n}function Z(e,n,r){return g(n)?n(e.current):Object.keys(r).forEach(function(t){var o;return(o=n[t])===null||o===void 0?void 0:o.call(n,e.current[t])}),r}var ee={create:J},ne={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function re(e){return function n(){for(var r=this,t=arguments.length,o=new Array(t),i=0;i=e.length?e.apply(this,o):function(){for(var a=arguments.length,f=new Array(a),c=0;c{const r=e.__vccOpts||e;for(const[t,o]of n)r[t]=o;return r})(u.defineComponent({__name:"ACodeEditor",props:{options:{}},setup(e){const n=e,r=u.ref(null),t={...n.options,automaticLayout:!0,colorDecorators:!0,lineHeight:24,scrollBeyondLastLine:!1};return u.onMounted(async()=>{const i=(await ke.init()).editor;i.defineTheme("agritheory",ve),i.setTheme("agritheory"),i.create(r.value,t)}),(o,i)=>(u.openBlock(),u.createElementBlock("div",ye,[u.createElementVNode("div",{ref_key:"aCodeEditor",ref:r,id:"editor-area"},null,512)],512))}}),[["__scopeId","data-v-28cc715a"]]);function Oe(e){e.component("ACodeEditor",$)}d.ACodeEditor=$,d.install=Oe,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=code-editor.umd.cjs.map diff --git a/code_editor/dist/code-editor.umd.cjs.map b/code_editor/dist/code-editor.umd.cjs.map deleted file mode 100644 index 7abea444..00000000 --- a/code_editor/dist/code-editor.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"code-editor.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../common/temp/node_modules/.pnpm/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/config/index.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../common/temp/node_modules/.pnpm/@monaco-editor+loader@1.3.3_monaco-editor@0.34.1/node_modules/@monaco-editor/loader/lib/es/loader/index.js","../src/theme/code_editor/agritheory.ts","../src/components/ACodeEditor.vue","../src/index.ts"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _unsupportedIterableToArray as unsupportedIterableToArray };\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n","var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs'\n }\n};\n\nexport default config;\n","function curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport default curry;\n","function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport default isObject;\n","import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\n\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n\n return config;\n}\n/**\n * logs deprecation message\n */\n\n\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport default validators;\nexport { errorHandler, errorMessages };\n","var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport default compose;\n","import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport default merge;\n","// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\n\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport default makeCancelable;\nexport { CANCELATION_MESSAGE };\n","import { slicedToArray as _slicedToArray, objectWithoutProperties as _objectWithoutProperties } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport state from 'state-local';\nimport config$1 from '../config/index.js';\nimport validators from '../validators/index.js';\nimport compose from '../utils/compose.js';\nimport merge from '../utils/deepMerge.js';\nimport makeCancelable from '../utils/makeCancelable.js';\n\n/** the local state of the module */\n\nvar _state$create = state.create({\n config: config$1,\n isInitialized: false,\n resolve: null,\n reject: null,\n monaco: null\n}),\n _state$create2 = _slicedToArray(_state$create, 2),\n getState = _state$create2[0],\n setState = _state$create2[1];\n/**\n * set the loader configuration\n * @param {Object} config - the configuration object\n */\n\n\nfunction config(globalConfig) {\n var _validators$config = validators.config(globalConfig),\n monaco = _validators$config.monaco,\n config = _objectWithoutProperties(_validators$config, [\"monaco\"]);\n\n setState(function (state) {\n return {\n config: merge(state.config, config),\n monaco: monaco\n };\n });\n}\n/**\n * handles the initialization of the monaco-editor\n * @return {Promise} - returns an instance of monaco (with a cancelable promise)\n */\n\n\nfunction init() {\n var state = getState(function (_ref) {\n var monaco = _ref.monaco,\n isInitialized = _ref.isInitialized,\n resolve = _ref.resolve;\n return {\n monaco: monaco,\n isInitialized: isInitialized,\n resolve: resolve\n };\n });\n\n if (!state.isInitialized) {\n setState({\n isInitialized: true\n });\n\n if (state.monaco) {\n state.resolve(state.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n if (window.monaco && window.monaco.editor) {\n storeMonacoInstance(window.monaco);\n state.resolve(window.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n compose(injectScripts, getMonacoLoaderScript)(configureLoader);\n }\n\n return makeCancelable(wrapperPromise);\n}\n/**\n * injects provided scripts into the document.body\n * @param {Object} script - an HTML script element\n * @return {Object} - the injected HTML script element\n */\n\n\nfunction injectScripts(script) {\n return document.body.appendChild(script);\n}\n/**\n * creates an HTML script element with/without provided src\n * @param {string} [src] - the source path of the script\n * @return {Object} - the created HTML script element\n */\n\n\nfunction createScript(src) {\n var script = document.createElement('script');\n return src && (script.src = src), script;\n}\n/**\n * creates an HTML script element with the monaco loader src\n * @return {Object} - the created HTML script element\n */\n\n\nfunction getMonacoLoaderScript(configureLoader) {\n var state = getState(function (_ref2) {\n var config = _ref2.config,\n reject = _ref2.reject;\n return {\n config: config,\n reject: reject\n };\n });\n var loaderScript = createScript(\"\".concat(state.config.paths.vs, \"/loader.js\"));\n\n loaderScript.onload = function () {\n return configureLoader();\n };\n\n loaderScript.onerror = state.reject;\n return loaderScript;\n}\n/**\n * configures the monaco loader\n */\n\n\nfunction configureLoader() {\n var state = getState(function (_ref3) {\n var config = _ref3.config,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n return {\n config: config,\n resolve: resolve,\n reject: reject\n };\n });\n var require = window.require;\n\n require.config(state.config);\n\n require(['vs/editor/editor.main'], function (monaco) {\n storeMonacoInstance(monaco);\n state.resolve(monaco);\n }, function (error) {\n state.reject(error);\n });\n}\n/**\n * store monaco instance in local state\n */\n\n\nfunction storeMonacoInstance(monaco) {\n if (!getState().monaco) {\n setState({\n monaco: monaco\n });\n }\n}\n/**\n * internal helper function\n * extracts stored monaco instance\n * @return {Object|null} - the monaco instance\n */\n\n\nfunction __getMonacoInstance() {\n return getState(function (_ref4) {\n var monaco = _ref4.monaco;\n return monaco;\n });\n}\n\nvar wrapperPromise = new Promise(function (resolve, reject) {\n return setState({\n resolve: resolve,\n reject: reject\n });\n});\nvar loader = {\n config: config,\n init: init,\n __getMonacoInstance: __getMonacoInstance\n};\n\nexport default loader;\n","import { editor } from 'monaco-editor'\n\n// picked from https://bitwiser.in/monaco-themes/\n// currently set to: Github Light\nexport const theme: editor.IStandaloneThemeData = {\n\tbase: 'vs',\n\tinherit: true,\n\tcolors: {\n\t\t'editor.foreground': '#24292e',\n\t\t'editor.background': '#ffffff',\n\t\t'editor.selectionBackground': '#c8c8fa',\n\t\t'editor.inactiveSelectionBackground': '#fafbfc',\n\t\t'editor.lineHighlightBackground': '#fafbfc',\n\t\t'editorCursor.foreground': '#24292e',\n\t\t'editorWhitespace.foreground': '#959da5',\n\t\t'editorIndentGuide.background': '#959da5',\n\t\t'editorIndentGuide.activeBackground': '#24292e',\n\t\t'editor.selectionHighlightBorder': '#fafbfc',\n\t},\n\trules: [\n\t\t{\n\t\t\tbackground: 'ffffff',\n\t\t\ttoken: '',\n\t\t},\n\t\t{\n\t\t\tforeground: '6a737d',\n\t\t\ttoken: 'comment',\n\t\t},\n\t\t{\n\t\t\tforeground: '6a737d',\n\t\t\ttoken: 'punctuation.definition.comment',\n\t\t},\n\t\t{\n\t\t\tforeground: '6a737d',\n\t\t\ttoken: 'string.comment',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'entity.name.constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'variable.other.constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'variable.language',\n\t\t},\n\t\t{\n\t\t\tforeground: '6f42c1',\n\t\t\ttoken: 'entity',\n\t\t},\n\t\t{\n\t\t\tforeground: '6f42c1',\n\t\t\ttoken: 'entity.name',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'variable.parameter.function',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\ttoken: 'entity.name.tag',\n\t\t},\n\t\t{\n\t\t\tforeground: 'd73a49',\n\t\t\ttoken: 'keyword',\n\t\t},\n\t\t{\n\t\t\tforeground: 'd73a49',\n\t\t\ttoken: 'storage',\n\t\t},\n\t\t{\n\t\t\tforeground: 'd73a49',\n\t\t\ttoken: 'storage.type',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'storage.modifier.package',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'storage.modifier.import',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'storage.type.java',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'punctuation.definition.string',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string punctuation.section.embedded source',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'support',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.property-name',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\ttoken: 'variable',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'variable.other',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tfontStyle: 'bold italic underline',\n\t\t\ttoken: 'invalid.broken',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tfontStyle: 'bold italic underline',\n\t\t\ttoken: 'invalid.deprecated',\n\t\t},\n\t\t{\n\t\t\tforeground: 'fafbfc',\n\t\t\tbackground: 'b31d28',\n\t\t\tfontStyle: 'italic underline',\n\t\t\ttoken: 'invalid.illegal',\n\t\t},\n\t\t{\n\t\t\tforeground: 'fafbfc',\n\t\t\tbackground: 'd73a49',\n\t\t\tfontStyle: 'italic underline',\n\t\t\ttoken: 'carriage-return',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tfontStyle: 'bold italic underline',\n\t\t\ttoken: 'invalid.unimplemented',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\ttoken: 'message.error',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\ttoken: 'string source',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'string variable',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'source.regexp',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp.character-class',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp constant.character.escape',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp source.ruby.embedded',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\ttoken: 'string.regexp string.regexp.arbitrary-repitition',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'string.regexp constant.character.escape',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'support.constant',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'support.variable',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.module-reference',\n\t\t},\n\t\t{\n\t\t\tforeground: '735c0f',\n\t\t\ttoken: 'markup.list',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'markup.heading',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'markup.heading entity.name',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\ttoken: 'markup.quote',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\tfontStyle: 'italic',\n\t\t\ttoken: 'markup.italic',\n\t\t},\n\t\t{\n\t\t\tforeground: '24292e',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'markup.bold',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'markup.raw',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tbackground: 'ffeef0',\n\t\t\ttoken: 'markup.deleted',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tbackground: 'ffeef0',\n\t\t\ttoken: 'meta.diff.header.from-file',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\tbackground: 'ffeef0',\n\t\t\ttoken: 'punctuation.definition.deleted',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tbackground: 'f0fff4',\n\t\t\ttoken: 'markup.inserted',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tbackground: 'f0fff4',\n\t\t\ttoken: 'meta.diff.header.to-file',\n\t\t},\n\t\t{\n\t\t\tforeground: '22863a',\n\t\t\tbackground: 'f0fff4',\n\t\t\ttoken: 'punctuation.definition.inserted',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\tbackground: 'ffebda',\n\t\t\ttoken: 'markup.changed',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\tbackground: 'ffebda',\n\t\t\ttoken: 'punctuation.definition.changed',\n\t\t},\n\t\t{\n\t\t\tforeground: 'f6f8fa',\n\t\t\tbackground: '005cc5',\n\t\t\ttoken: 'markup.ignored',\n\t\t},\n\t\t{\n\t\t\tforeground: 'f6f8fa',\n\t\t\tbackground: '005cc5',\n\t\t\ttoken: 'markup.untracked',\n\t\t},\n\t\t{\n\t\t\tforeground: '6f42c1',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'meta.diff.range',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.diff.header',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\tfontStyle: 'bold',\n\t\t\ttoken: 'meta.separator',\n\t\t},\n\t\t{\n\t\t\tforeground: '005cc5',\n\t\t\ttoken: 'meta.output',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.tag',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.curly',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.round',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.square',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.angle',\n\t\t},\n\t\t{\n\t\t\tforeground: '586069',\n\t\t\ttoken: 'brackethighlighter.quote',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\ttoken: 'brackethighlighter.unmatched',\n\t\t},\n\t\t{\n\t\t\tforeground: 'b31d28',\n\t\t\ttoken: 'sublimelinter.mark.error',\n\t\t},\n\t\t{\n\t\t\tforeground: 'e36209',\n\t\t\ttoken: 'sublimelinter.mark.warning',\n\t\t},\n\t\t{\n\t\t\tforeground: '959da5',\n\t\t\ttoken: 'sublimelinter.gutter-mark',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\tfontStyle: 'underline',\n\t\t\ttoken: 'constant.other.reference.link',\n\t\t},\n\t\t{\n\t\t\tforeground: '032f62',\n\t\t\tfontStyle: 'underline',\n\t\t\ttoken: 'string.other.link',\n\t\t},\n\t],\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACodeEditor from '@/components/ACodeEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACodeEditor', ACodeEditor)\n}\n\nexport { install, ACodeEditor }\n"],"names":["_defineProperty","obj","key","value","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","_objectWithoutPropertiesLoose","excluded","sourceKeys","_objectWithoutProperties","sourceSymbolKeys","_slicedToArray","arr","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arr","_n","_d","_e","_i","_s","err","o","minLen","_arrayLikeToArray","n","len","arr2","compose","_len","fns","_key","x","y","f","curry","fn","curried","_this","_len2","args","_key2","_len3","nextArgs","_key3","isObject","isEmpty","isFunction","hasOwnProperty","property","validateChanges","initial","changes","errorHandler","field","validateSelector","selector","validateHandler","handler","_handler","validateInitial","throwError","errorMessages","type","validators","create","state","didUpdate","didStateUpdate","update","updateState","validate","getChanges","extractChanges","getState","setState","causedChanges","_handler$field","index","config","validateConfig","informAboutDeprecation","merge","CANCELATION_MESSAGE","makeCancelable","promise","hasCanceled_","wrappedPromise","resolve","reject","val","_state$create","config$1","_state$create2","globalConfig","_validators$config","monaco","init","_ref","isInitialized","wrapperPromise","storeMonacoInstance","injectScripts","getMonacoLoaderScript","configureLoader","script","createScript","src","_ref2","loaderScript","_ref3","require","error","__getMonacoInstance","_ref4","loader","theme","props","__props","aCodeEditor","ref","editorOptions","onMounted","editor","install","app","ACodeEditor"],"mappings":"8QAAA,SAASA,EAAgBC,EAAKC,EAAKC,EAAO,CACxC,OAAID,KAAOD,EACT,OAAO,eAAeA,EAAKC,EAAK,CAC9B,MAAOC,EACP,WAAY,GACZ,aAAc,GACd,SAAU,EAChB,CAAK,EAEDF,EAAIC,CAAG,EAAIC,EAGNF,CACT,CAEA,SAASG,EAAQC,EAAQC,EAAgB,CACvC,IAAIC,EAAO,OAAO,KAAKF,CAAM,EAE7B,GAAI,OAAO,sBAAuB,CAChC,IAAIG,EAAU,OAAO,sBAAsBH,CAAM,EAC7CC,IAAgBE,EAAUA,EAAQ,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BACR,EACA,CACC,WAAY,SACZ,MAAO,iBACR,EACA,CACC,WAAY,SACZ,MAAO,SACR,EACA,CACC,WAAY,SACZ,MAAO,SACR,EACA,CACC,WAAY,SACZ,MAAO,cACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,yBACR,EACA,CACC,WAAY,SACZ,MAAO,mBACR,EACA,CACC,WAAY,SACZ,MAAO,QACR,EACA,CACC,WAAY,SACZ,MAAO,+BACR,EACA,CACC,WAAY,SACZ,MAAO,4CACR,EACA,CACC,WAAY,SACZ,MAAO,SACR,EACA,CACC,WAAY,SACZ,MAAO,oBACR,EACA,CACC,WAAY,SACZ,MAAO,UACR,EACA,CACC,WAAY,SACZ,MAAO,gBACR,EACA,CACC,WAAY,SACZ,UAAW,wBACX,MAAO,gBACR,EACA,CACC,WAAY,SACZ,UAAW,wBACX,MAAO,oBACR,EACA,CACC,WAAY,SACZ,WAAY,SACZ,UAAW,mBACX,MAAO,iBACR,EACA,CACC,WAAY,SACZ,WAAY,SACZ,UAAW,mBACX,MAAO,iBACR,EACA,CACC,WAAY,SACZ,UAAW,wBACX,MAAO,uBACR,EACA,CACC,WAAY,SACZ,MAAO,eACR,EACA,CACC,WAAY,SACZ,MAAO,eACR,EACA,CACC,WAAY,SACZ,MAAO,iBACR,EACA,CACC,WAAY,SACZ,MAAO,eACR,EACA,CACC,WAAY,SACZ,MAAO,eACR,EACA,CACC,WAAY,SACZ,MAAO,+BACR,EACA,CACC,WAAY,SACZ,MAAO,yCACR,EACA,CACC,WAAY,SACZ,MAAO,oCACR,EACA,CACC,WAAY,SACZ,MAAO,kDACR,EACA,CACC,WAAY,SACZ,UAAW,OACX,MAAO,yCACR,EACA,CACC,WAAY,SACZ,MAAO,kBACR,EACA,CACC,WAAY,SACZ,MAAO,kBACR,EACA,CACC,WAAY,SACZ,MAAO,uBACR,EACA,CACC,WAAY,SACZ,MAAO,aACR,EACA,CACC,WAAY,SACZ,UAAW,OACX,M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,MAAO,mBACR,CACD,CACD,8LClVA,MAAMC,EAAQC,EAIRC,EAAcC,MAAI,IAAI,EACtBC,EAAyC,CAC9C,GAAGJ,EAAM,QACT,gBAAiB,GACjB,gBAAiB,GACjB,WAAY,GACZ,qBAAsB,EAAA,EAGvBK,OAAAA,EAAAA,UAAU,SAAY,CAErB,MAAMC,GADiB,MAAMR,GAAO,QACN,OAE9BQ,EAAO,YAAY,aAAcP,EAAK,EACtCO,EAAO,SAAS,YAAY,EAG5BA,EAAO,OAAOJ,EAAY,MAAsBE,CAAa,CAAA,CAC7D,wLC/BD,SAASG,GAAQC,EAAwB,CACpCA,EAAA,UAAU,cAAeC,CAAW,CACzC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]} \ No newline at end of file diff --git a/code_editor/dist/style.css b/code_editor/dist/style.css deleted file mode 100644 index cd635116..00000000 --- a/code_editor/dist/style.css +++ /dev/null @@ -1 +0,0 @@ -#editor-area[data-v-28cc715a]{width:100%;height:100%} diff --git a/code_editor/package.json b/code_editor/package.json index 14c27b72..9dcf0c5e 100644 --- a/code_editor/package.json +++ b/code_editor/package.json @@ -1,8 +1,20 @@ { "name": "@stonecrop/code-editor", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "code_editor" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/code-editor.js", @@ -11,10 +23,11 @@ }, "main": "dist/code-editor.js", "module": "dist/code-editor.js", + "umd": "dist/code-editor.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.vue" + "src/*" ], "scripts": { "build": "tsc -b && vite build", @@ -48,8 +61,10 @@ "vite": "^5.2.9", "vue-router": "^4" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/code-editor.umd.cjs" + } } diff --git a/common/changes/@stonecrop/aform/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/aform/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..3e857e45 --- /dev/null +++ b/common/changes/@stonecrop/aform/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/aform", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/aform" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/atable/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/atable/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..64c0f64c --- /dev/null +++ b/common/changes/@stonecrop/atable/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/atable", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/atable" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/code-editor/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/code-editor/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..2091b814 --- /dev/null +++ b/common/changes/@stonecrop/code-editor/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/code-editor", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/code-editor" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/desktop/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/desktop/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..813c8112 --- /dev/null +++ b/common/changes/@stonecrop/desktop/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/desktop", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/desktop" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/graphql-client/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/graphql-client/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..c05fc0d6 --- /dev/null +++ b/common/changes/@stonecrop/graphql-client/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/graphql-client", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/graphql-client" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/node-editor/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/node-editor/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..a841f35e --- /dev/null +++ b/common/changes/@stonecrop/node-editor/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/node-editor", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/node-editor" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/stonecrop/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/stonecrop/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..96e4b9ec --- /dev/null +++ b/common/changes/@stonecrop/stonecrop/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/stonecrop", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/stonecrop" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/themes/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/themes/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..7075758c --- /dev/null +++ b/common/changes/@stonecrop/themes/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/themes", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/themes" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/utilities/fix-stonecrop-dist_2024-04-19-06-56.json b/common/changes/@stonecrop/utilities/fix-stonecrop-dist_2024-04-19-06-56.json new file mode 100644 index 00000000..fe13bc68 --- /dev/null +++ b/common/changes/@stonecrop/utilities/fix-stonecrop-dist_2024-04-19-06-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/utilities", + "comment": "Remove distributable files from git", + "type": "none" + } + ], + "packageName": "@stonecrop/utilities" +} \ No newline at end of file diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index de15a8cb..a1b0be18 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -12,7 +12,7 @@ { "definitionName": "lockStepVersion", "policyName": "stonecrop", - "version": "0.2.4", + "version": "0.2.5", "nextBump": "patch" } // { diff --git a/desktop/dist/desktop.js b/desktop/dist/desktop.js deleted file mode 100644 index 739162f8..00000000 --- a/desktop/dist/desktop.js +++ /dev/null @@ -1,4965 +0,0 @@ -import { defineComponent as q, ref as V, onMounted as Lt, openBlock as C, createElementBlock as A, normalizeClass as co, createElementVNode as T, Fragment as Ie, renderList as Pe, toDisplayString as ce, createCommentVNode as ke, withDirectives as lt, vShow as jt, pushScopeId as lo, popScopeId as uo, inject as Z, computed as B, createBlock as Se, resolveDynamicComponent as Bt, mergeProps as Ut, effectScope as fo, markRaw as Ee, onBeforeMount as wr, shallowRef as br, toRaw as ut, hasInjectionContext as _r, getCurrentInstance as Ht, unref as k, shallowReactive as Er, watch as ue, reactive as _e, isRef as We, isReactive as Wt, toRef as yt, nextTick as Fe, getCurrentScope as po, onScopeDispose as ho, h as mo, provide as nt, toRefs as dn, watchEffect as kr, normalizeStyle as ie, renderSlot as me, createVNode as at, withCtx as it, useCssVars as vo, createTextVNode as go, onBeforeUnmount as Sr, resolveComponent as Or, withKeys as Ye, vModelText as Ir } from "vue"; -const Ft = (e) => (lo("data-v-b7fdfbec"), e = e(), uo(), e), Pr = { class: "action-menu-icon" }, Cr = /* @__PURE__ */ Ft(() => /* @__PURE__ */ T("svg", { - class: "leftBar", - version: "1.1", - id: "Layer_1", - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink", - x: "0px", - y: "0px", - viewBox: "0 0 100 100", - "xml:space": "preserve", - width: "50", - height: "50" -}, [ - /* @__PURE__ */ T("polygon", { points: "54.2,33.4 29.2,58.8 25,54.6 50,29.2 " }) -], -1)), xr = /* @__PURE__ */ Ft(() => /* @__PURE__ */ T("svg", { - class: "rightBar", - version: "1.1", - id: "Layer_1", - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink", - x: "0px", - y: "0px", - viewBox: "0 0 100 100", - "xml:space": "preserve", - width: "50", - height: "50" -}, [ - /* @__PURE__ */ T("polygon", { points: "70.8,58.8 45.8,33.4 50,29.2 75,54.6 " }) -], -1)), $r = [ - Cr, - xr -], Nr = /* @__PURE__ */ Ft(() => /* @__PURE__ */ T("div", { style: { "margin-right": "30px" } }, null, -1)), Rr = ["onclick"], Ar = { key: 1 }, Tr = ["onClick"], Dr = { class: "dropdown-container" }, Vr = { class: "dropdown" }, Mr = ["onclick"], Lr = ["href"], jr = { class: "dropdown-item" }, Br = /* @__PURE__ */ q({ - __name: "ActionSet", - props: { - elements: {} - }, - setup(e) { - const t = e, n = V([]), o = V(!1), r = V(null), s = V(!1), i = V(!1); - Lt(() => { - n.value = t.elements, a(); - }); - const a = () => { - for (let d of n.value) - d.elementType === "dropdown" && (d.show = !1); - }, l = () => { - s.value = !0, r.value = setTimeout(() => { - s.value && (o.value = !0); - }, 500); - }, u = () => { - s.value = !1, i.value = !1, clearTimeout(r.value), o.value = !1; - }, c = (d) => { - const f = !n.value[d].show; - a(), n.value[d].show = f; - }; - return (d, f) => (C(), A("div", { - class: co([{ "open-set": o.value, "hovered-and-closed": i.value }, "action-set collapse"]), - onMouseover: l, - onMouseleave: u - }, [ - T("div", Pr, [ - T("div", { - id: "chevron", - onClick: f[0] || (f[0] = (p) => i.value = !i.value) - }, $r) - ]), - Nr, - (C(!0), A(Ie, null, Pe(n.value, (p, v) => (C(), A("div", { - class: "action-element", - key: v - }, [ - p.elementType == "button" ? (C(), A("button", { - key: 0, - onclick: p.action, - class: "button-default" - }, ce(p.label), 9, Rr)) : ke("", !0), - p.elementType == "dropdown" ? (C(), A("div", Ar, [ - T("button", { - class: "button-default", - onClick: (m) => c(v) - }, ce(p.label), 9, Tr), - lt(T("div", Dr, [ - T("div", Vr, [ - (C(!0), A(Ie, null, Pe(p.actions, (m) => (C(), A("div", { - key: m.label - }, [ - m.action != null ? (C(), A("button", { - key: 0, - onclick: m.action, - class: "dropdown-item" - }, ce(m.label), 9, Mr)) : m.link != null ? (C(), A("a", { - key: 1, - href: m.link - }, [ - T("button", jr, ce(m.label), 1) - ], 8, Lr)) : ke("", !0) - ]))), 128)) - ]) - ], 512), [ - [jt, p.show] - ]) - ])) : ke("", !0) - ]))), 128)) - ], 34)); - } -}), Gt = (e, t) => { - const n = e.__vccOpts || e; - for (const [o, r] of t) - n[o] = r; - return n; -}, Ur = /* @__PURE__ */ Gt(Br, [["__scopeId", "data-v-b7fdfbec"]]), Hr = {}; -function Wr(e, t) { - return C(), A("dialog"); -} -const Fr = /* @__PURE__ */ Gt(Hr, [["render", Wr]]), Gr = (e, t) => { - const n = e.__vccOpts || e; - for (const [o, r] of t) - n[o] = r; - return n; -}; -var fn; -const zr = typeof window < "u"; -zr && (fn = window == null ? void 0 : window.navigator) != null && fn.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function Qr(e) { - return e; -} -const pn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, hn = "__vueuse_ssr_handlers__"; -pn[hn] = pn[hn] || {}; -var mn; -(function(e) { - e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; -})(mn || (mn = {})); -var qr = Object.defineProperty, vn = Object.getOwnPropertySymbols, Kr = Object.prototype.hasOwnProperty, Jr = Object.prototype.propertyIsEnumerable, gn = (e, t, n) => t in e ? qr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yr = (e, t) => { - for (var n in t || (t = {})) - Kr.call(t, n) && gn(e, n, t[n]); - if (vn) - for (var n of vn(t)) - Jr.call(t, n) && gn(e, n, t[n]); - return e; -}; -const Xr = { - 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] -}; -Yr({ - linear: Qr -}, Xr); -q({ - name: "ADropdown", - props: { - modelValue: { - type: String, - required: !1, - default: "" - }, - label: { - type: String, - required: !0 - }, - value: String, - items: { - type: Array, - required: !1, - default: () => [] - }, - isAsync: { - type: Boolean, - required: !1, - default: !1 - } - }, - emits: ["update:modelValue", "filterChanged"], - data() { - return { - results: [], - search: this.modelValue, - isLoading: !1, - arrowCounter: 0, - isOpen: !1 - }; - }, - watch: { - items: function(e, t) { - this.isLoading = !1, this.results = e; - } - }, - mounted() { - document.addEventListener("click", this.handleClickOutside), this.filterResults(); - }, - destroyed() { - document.removeEventListener("click", this.handleClickOutside); - }, - methods: { - setResult(e) { - this.search = e, this.closeResults(); - }, - filterResults() { - this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1); - }, - onChange() { - this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit("filterChanged", this.search)) : this.filterResults(); - }, - handleClickOutside(e) { - this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0); - }, - closeResults() { - this.isOpen = !1, this.items.includes(this.search) || (this.search = ""), this.$emit("update:modelValue", this.search); - }, - onArrowDown() { - this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1); - }, - onArrowUp() { - this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1); - }, - onEnter() { - this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0; - }, - openWithSearch() { - this.search = "", this.onChange(), this.$refs.mopInput.focus(); - } - } -}); -const Zr = /* @__PURE__ */ q({ - __name: "AForm", - props: { - modelValue: {}, - data: {}, - readonly: { type: Boolean } - }, - emits: ["update:modelValue"], - setup(e, { emit: t }) { - const n = e, o = t, r = V(n.data || {}), s = (a) => { - let l = {}; - for (const [u, c] of Object.entries(a)) - ["component", "fieldtype"].includes(u) || (l[u] = c), u === "rows" && c && c.length === 0 && (l.rows = r.value[a.fieldname]); - return l; - }, i = B({ - get: () => n.modelValue.map((a, l) => B({ - get() { - return a.value; - }, - set: (u) => { - n.modelValue[l].value = u, o("update:modelValue", n.modelValue); - } - })), - set: () => { - } - }); - return (a, l) => (C(), A("form", null, [ - (C(!0), A(Ie, null, Pe(a.modelValue, (u, c) => (C(), Se(Bt(u.component), Ut({ - key: c, - schema: u, - modelValue: i.value[c].value, - "onUpdate:modelValue": (d) => i.value[c].value = d, - data: r.value[u.fieldname], - readonly: a.readonly - }, s(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128)) - ])); - } -}), es = /* @__PURE__ */ Gr(Zr, [["__scopeId", "data-v-74d66cf2"]]), yn = { - date: "##/##/####", - datetime: "####/##/## ##:##", - time: "##:##", - fulltime: "##:##:##", - phone: "(###) ### - ####", - card: "#### #### #### ####" -}; -function ts(e) { - try { - return Function(`"use strict";return (${e})`)(); - } catch { - } -} -function ns(e) { - var t; - let n = e.value; - if (n) { - const o = ts(n); - if (o) { - const r = e.instance.locale; - n = o(r); - } - } else { - const o = (t = e.instance.schema.fieldtype) == null ? void 0 : t.toLowerCase(); - o && yn[o] && (n = yn[o]); - } - return n; -} -function os(e, t) { - t || (t = "#"); - let n = e; - const o = [t, "/", "-", "(", ")", " "]; - for (const r of o) - n = n.replaceAll(r, ""); - return n; -} -function rs(e, t, n) { - n || (n = "#"); - let o = t; - for (const r of e) { - const s = o.indexOf(n); - if (s !== -1) { - const i = o.substring(0, s), a = o.substring(s + 1); - o = i + r + a; - } - } - return o.slice(0, t.length); -} -function ss(e, t) { - const n = ns(t); - if (!n) - return; - const o = "#", r = e.value, s = os(r, o); - if (s) { - const i = rs(s, n, o); - t.instance.maskFilled && (t.instance.maskFilled = !i.includes(o)), e.value = i; - } else - e.value = n; -} -q({ - name: "ATextInput", - props: { - schema: { - type: Object, - required: !0 - }, - label: { - type: String, - required: !0 - }, - modelValue: { - type: null - }, - mask: { - type: String - }, - required: { - type: Boolean - }, - readonly: { - type: Boolean - }, - uuid: { - type: String - }, - validation: { - type: Object, - default: () => ({ errorMessage: " " }) - } - }, - setup(e, t) { - const n = V(!1), o = Z("locale", ""); - return { inputText: B({ - get() { - return e.modelValue; - }, - set(r) { - t.emit("update:modelValue", r); - } - }), locale: o, maskFilled: n }; - }, - directives: { - mask: ss - } -}); -function It(e) { - this.message = e || ""; -} -It.prototype = Object.create(Error.prototype, { - constructor: { value: It }, - name: { value: "NotImplemented" }, - stack: { - get: function() { - return new Error().stack; - } - } -}); -class je { - /** - * @constructor - * @param {Registry} registry - The immutable registry - * @param {ReturnType} store - The mutable Pinia store - * @param {Schema} [schema] - (optional) The Stonecrop schema - * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow - * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions - * @returns {Stonecrop} The Stonecrop instance - * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one. - * @example - * const registry = new Registry() - * const store = useDataStore() - * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions) - */ - constructor(t, n, o, r, s) { - if (this.name = "Stonecrop", je._root) - return je._root; - je._root = this, this.registry = t, this.store = n, this.schema = o, this.workflow = r, this.actions = s; - } - /** - * @method setup - * @param {DoctypeMeta} doctype - The doctype to setup - * @returns {void} - * @description Sets up the Stonecrop instance with the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.setup(doctype) - */ - setup(t) { - this.getMeta(t), this.getWorkflow(t), this.getActions(t); - } - /** - * @method getMeta - * @param {DoctypeMeta} doctype - The doctype to get meta for - * @returns {DoctypeMeta} - * @see {@link DoctypeMeta} - * @throws NotImplementedError - * @description Gets the meta for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * const meta = stonecrop.getMeta(doctype) - */ - getMeta(t) { - return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new It(t.doctype); - } - /** - * @method getWorkflow - * @param {DoctypeMeta} doctype - The doctype to get workflow for - * @returns {void} - * @description Gets the workflow for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.getWorkflow(doctype) - */ - getWorkflow(t) { - const n = this.registry.registry[t.slug]; - this.workflow = n.workflow; - } - /** - * @method getActions - * @param {DoctypeMeta} doctype - The doctype to get actions for - * @returns {void} - * @description Gets the actions for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.getActions(doctype) - */ - getActions(t) { - const n = this.registry.registry[t.slug]; - this.actions = n.actions; - } - /** - * @method getRecords - * @param {DoctypeMeta} doctype - The doctype to get records for - * @param {RequestInit} [filters] - The filters to apply to the records - * @returns {Promise} - * @description Gets the records for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * await stonecrop.getRecords(doctype) - * @example - * const doctype = await registry.getMeta('Task') - * const filters = JSON.stringify({ status: 'Open' }) - * await stonecrop.getRecords(doctype, { body: filters }) - */ - async getRecords(t, n) { - this.store.$patch({ records: [] }); - const r = await (await fetch(`/${t.slug}`, n)).json(); - this.store.$patch({ records: r }); - } - /** - * @method getRecord - * @param {DoctypeMeta} doctype - The doctype to get record for - * @param {string} id - The id of the record to get - * @returns {Promise} - * @description Gets the record for the given doctype and id - * @example - * const doctype = await registry.getMeta('Task') - * await stonecrop.getRecord(doctype, 'TASK-00001') - */ - async getRecord(t, n) { - this.store.$patch({ record: {} }); - const r = await (await fetch(`/${t.slug}/${n}`)).json(); - this.store.$patch({ record: r }); - } - /** - * @method runAction - * @param {DoctypeMeta} doctype - The doctype to run action for - * @param {string} action - The action to run - * @param {string[]} [id] - The id(s) of the record(s) to run action on - * @returns {void} - * @description Runs the action for the given doctype and id - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'CREATE') - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001']) - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001']) - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002']) - */ - runAction(t, n, o) { - const s = this.registry.registry[t.slug].actions.get(n), { initialState: i } = this.workflow; - this.workflow.transition(i, { type: n }), s.length > 0 && s.forEach((a) => { - new Function(a)(o); - }); - } -} -var yo = !1; -function Xe(e, t, n) { - return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n); -} -function wt(e, t) { - if (Array.isArray(e)) { - e.splice(t, 1); - return; - } - delete e[t]; -} -function as() { - return wo().__VUE_DEVTOOLS_GLOBAL_HOOK__; -} -function wo() { - return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {}; -} -const is = typeof Proxy == "function", cs = "devtools-plugin:setup", ls = "plugin:settings:set"; -let $e, Pt; -function us() { - var e; - return $e !== void 0 || (typeof window < "u" && window.performance ? ($e = !0, Pt = window.performance) : typeof global < "u" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? ($e = !0, Pt = global.perf_hooks.performance) : $e = !1), $e; -} -function ds() { - return us() ? Pt.now() : Date.now(); -} -class fs { - constructor(t, n) { - this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n; - const o = {}; - if (t.settings) - for (const i in t.settings) { - const a = t.settings[i]; - o[i] = a.defaultValue; - } - const r = `__vue-devtools-plugin-settings__${t.id}`; - let s = Object.assign({}, o); - try { - const i = localStorage.getItem(r), a = JSON.parse(i); - Object.assign(s, a); - } catch { - } - this.fallbacks = { - getSettings() { - return s; - }, - setSettings(i) { - try { - localStorage.setItem(r, JSON.stringify(i)); - } catch { - } - s = i; - }, - now() { - return ds(); - } - }, n && n.on(ls, (i, a) => { - i === this.plugin.id && this.fallbacks.setSettings(a); - }), this.proxiedOn = new Proxy({}, { - get: (i, a) => this.target ? this.target.on[a] : (...l) => { - this.onQueue.push({ - method: a, - args: l - }); - } - }), this.proxiedTarget = new Proxy({}, { - get: (i, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...l) => (this.targetQueue.push({ - method: a, - args: l, - resolve: () => { - } - }), this.fallbacks[a](...l)) : (...l) => new Promise((u) => { - this.targetQueue.push({ - method: a, - args: l, - resolve: u - }); - }) - }); - } - async setRealTarget(t) { - this.target = t; - for (const n of this.onQueue) - this.target.on[n.method](...n.args); - for (const n of this.targetQueue) - n.resolve(await this.target[n.method](...n.args)); - } -} -function zt(e, t) { - const n = e, o = wo(), r = as(), s = is && n.enableEarlyProxy; - if (r && (o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s)) - r.emit(cs, e, t); - else { - const i = s ? new fs(n, r) : null; - (o.__VUE_DEVTOOLS_PLUGINS__ = o.__VUE_DEVTOOLS_PLUGINS__ || []).push({ - pluginDescriptor: n, - setupFn: t, - proxy: i - }), i && t(i.proxiedTarget); - } -} -/*! - * pinia v2.1.7 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */ -let Le; -const Ge = (e) => Le = e, bo = process.env.NODE_ENV !== "production" ? Symbol("pinia") : ( - /* istanbul ignore next */ - Symbol() -); -function Ce(e) { - return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function"; -} -var oe; -(function(e) { - e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function"; -})(oe || (oe = {})); -const dt = typeof window < "u", Be = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && dt, wn = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null }; -function ps(e, { autoBom: t = !1 } = {}) { - return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e; -} -function Qt(e, t, n) { - const o = new XMLHttpRequest(); - o.open("GET", e), o.responseType = "blob", o.onload = function() { - ko(o.response, t, n); - }, o.onerror = function() { - console.error("could not download file"); - }, o.send(); -} -function _o(e) { - const t = new XMLHttpRequest(); - t.open("HEAD", e, !1); - try { - t.send(); - } catch { - } - return t.status >= 200 && t.status <= 299; -} -function ot(e) { - try { - e.dispatchEvent(new MouseEvent("click")); - } catch { - const n = document.createEvent("MouseEvents"); - n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n); - } -} -const rt = typeof navigator == "object" ? navigator : { userAgent: "" }, Eo = /Macintosh/.test(rt.userAgent) && /AppleWebKit/.test(rt.userAgent) && !/Safari/.test(rt.userAgent), ko = dt ? ( - // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program - typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Eo ? hs : ( - // Use msSaveOrOpenBlob as a second approach - "msSaveOrOpenBlob" in rt ? ms : ( - // Fallback to using FileReader and a popup - vs - ) - ) -) : () => { -}; -function hs(e, t = "download", n) { - const o = document.createElement("a"); - o.download = t, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin !== location.origin ? _o(o.href) ? Qt(e, t, n) : (o.target = "_blank", ot(o)) : ot(o)) : (o.href = URL.createObjectURL(e), setTimeout(function() { - URL.revokeObjectURL(o.href); - }, 4e4), setTimeout(function() { - ot(o); - }, 0)); -} -function ms(e, t = "download", n) { - if (typeof e == "string") - if (_o(e)) - Qt(e, t, n); - else { - const o = document.createElement("a"); - o.href = e, o.target = "_blank", setTimeout(function() { - ot(o); - }); - } - else - navigator.msSaveOrOpenBlob(ps(e, n), t); -} -function vs(e, t, n, o) { - if (o = o || open("", "_blank"), o && (o.document.title = o.document.body.innerText = "downloading..."), typeof e == "string") - return Qt(e, t, n); - const r = e.type === "application/octet-stream", s = /constructor/i.test(String(wn.HTMLElement)) || "safari" in wn, i = /CriOS\/[\d]+/.test(navigator.userAgent); - if ((i || r && s || Eo) && typeof FileReader < "u") { - const a = new FileReader(); - a.onloadend = function() { - let l = a.result; - if (typeof l != "string") - throw o = null, new Error("Wrong reader.result type"); - l = i ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"), o ? o.location.href = l : location.assign(l), o = null; - }, a.readAsDataURL(e); - } else { - const a = URL.createObjectURL(e); - o ? o.location.assign(a) : location.href = a, o = null, setTimeout(function() { - URL.revokeObjectURL(a); - }, 4e4); - } -} -function H(e, t) { - const n = "🍍 " + e; - typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, t) : t === "error" ? console.error(n) : t === "warn" ? console.warn(n) : console.log(n); -} -function qt(e) { - return "_a" in e && "install" in e; -} -function So() { - if (!("clipboard" in navigator)) - return H("Your browser doesn't support the Clipboard API", "error"), !0; -} -function Oo(e) { - return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (H('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1; -} -async function gs(e) { - if (!So()) - try { - await navigator.clipboard.writeText(JSON.stringify(e.state.value)), H("Global state copied to clipboard."); - } catch (t) { - if (Oo(t)) - return; - H("Failed to serialize the state. Check the console for more details.", "error"), console.error(t); - } -} -async function ys(e) { - if (!So()) - try { - Io(e, JSON.parse(await navigator.clipboard.readText())), H("Global state pasted from clipboard."); - } catch (t) { - if (Oo(t)) - return; - H("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t); - } -} -async function ws(e) { - try { - ko(new Blob([JSON.stringify(e.state.value)], { - type: "text/plain;charset=utf-8" - }), "pinia-state.json"); - } catch (t) { - H("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t); - } -} -let re; -function bs() { - re || (re = document.createElement("input"), re.type = "file", re.accept = ".json"); - function e() { - return new Promise((t, n) => { - re.onchange = async () => { - const o = re.files; - if (!o) - return t(null); - const r = o.item(0); - return t(r ? { text: await r.text(), file: r } : null); - }, re.oncancel = () => t(null), re.onerror = n, re.click(); - }); - } - return e; -} -async function _s(e) { - try { - const n = await bs()(); - if (!n) - return; - const { text: o, file: r } = n; - Io(e, JSON.parse(o)), H(`Global state imported from "${r.name}".`); - } catch (t) { - H("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t); - } -} -function Io(e, t) { - for (const n in t) { - const o = e.state.value[n]; - o ? Object.assign(o, t[n]) : e.state.value[n] = t[n]; - } -} -function te(e) { - return { - _custom: { - display: e - } - }; -} -const Po = "🍍 Pinia (root)", Ct = "_root"; -function Es(e) { - return qt(e) ? { - id: Ct, - label: Po - } : { - id: e.$id, - label: e.$id - }; -} -function ks(e) { - if (qt(e)) { - const n = Array.from(e._s.keys()), o = e._s; - return { - state: n.map((s) => ({ - editable: !0, - key: s, - value: e.state.value[s] - })), - getters: n.filter((s) => o.get(s)._getters).map((s) => { - const i = o.get(s); - return { - editable: !1, - key: s, - value: i._getters.reduce((a, l) => (a[l] = i[l], a), {}) - }; - }) - }; - } - const t = { - state: Object.keys(e.$state).map((n) => ({ - editable: !0, - key: n, - value: e.$state[n] - })) - }; - return e._getters && e._getters.length && (t.getters = e._getters.map((n) => ({ - editable: !1, - key: n, - value: e[n] - }))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((n) => ({ - editable: !0, - key: n, - value: e[n] - }))), t; -} -function Ss(e) { - return e ? Array.isArray(e) ? e.reduce((t, n) => (t.keys.push(n.key), t.operations.push(n.type), t.oldValue[n.key] = n.oldValue, t.newValue[n.key] = n.newValue, t), { - oldValue: {}, - keys: [], - operations: [], - newValue: {} - }) : { - operation: te(e.type), - key: te(e.key), - oldValue: e.oldValue, - newValue: e.newValue - } : {}; -} -function Os(e) { - switch (e) { - case oe.direct: - return "mutation"; - case oe.patchFunction: - return "$patch"; - case oe.patchObject: - return "$patch"; - default: - return "unknown"; - } -} -let Re = !0; -const st = [], be = "pinia:mutations", z = "pinia", { assign: Is } = Object, ct = (e) => "🍍 " + e; -function Ps(e, t) { - zt({ - id: "dev.esm.pinia", - label: "Pinia 🍍", - logo: "https://pinia.vuejs.org/logo.svg", - packageName: "pinia", - homepage: "https://pinia.vuejs.org", - componentStateTypes: st, - app: e - }, (n) => { - typeof n.now != "function" && H("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({ - id: be, - label: "Pinia 🍍", - color: 15064968 - }), n.addInspector({ - id: z, - label: "Pinia 🍍", - icon: "storage", - treeFilterPlaceholder: "Search stores", - actions: [ - { - icon: "content_copy", - action: () => { - gs(t); - }, - tooltip: "Serialize and copy the state" - }, - { - icon: "content_paste", - action: async () => { - await ys(t), n.sendInspectorTree(z), n.sendInspectorState(z); - }, - tooltip: "Replace the state with the content of your clipboard" - }, - { - icon: "save", - action: () => { - ws(t); - }, - tooltip: "Save the state as a JSON file" - }, - { - icon: "folder_open", - action: async () => { - await _s(t), n.sendInspectorTree(z), n.sendInspectorState(z); - }, - tooltip: "Import the state from a JSON file" - } - ], - nodeActions: [ - { - icon: "restore", - tooltip: 'Reset the state (with "$reset")', - action: (o) => { - const r = t._s.get(o); - r ? typeof r.$reset != "function" ? H(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (r.$reset(), H(`Store "${o}" reset.`)) : H(`Cannot reset "${o}" store because it wasn't found.`, "warn"); - } - } - ] - }), n.on.inspectComponent((o, r) => { - const s = o.componentInstance && o.componentInstance.proxy; - if (s && s._pStores) { - const i = o.componentInstance.proxy._pStores; - Object.values(i).forEach((a) => { - o.instanceData.state.push({ - type: ct(a.$id), - key: "state", - editable: !0, - value: a._isOptionsAPI ? { - _custom: { - value: ut(a.$state), - actions: [ - { - icon: "restore", - tooltip: "Reset the state of this store", - action: () => a.$reset() - } - ] - } - } : ( - // NOTE: workaround to unwrap transferred refs - Object.keys(a.$state).reduce((l, u) => (l[u] = a.$state[u], l), {}) - ) - }), a._getters && a._getters.length && o.instanceData.state.push({ - type: ct(a.$id), - key: "getters", - editable: !1, - value: a._getters.reduce((l, u) => { - try { - l[u] = a[u]; - } catch (c) { - l[u] = c; - } - return l; - }, {}) - }); - }); - } - }), n.on.getInspectorTree((o) => { - if (o.app === e && o.inspectorId === z) { - let r = [t]; - r = r.concat(Array.from(t._s.values())), o.rootNodes = (o.filter ? r.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(o.filter.toLowerCase()) : Po.toLowerCase().includes(o.filter.toLowerCase())) : r).map(Es); - } - }), n.on.getInspectorState((o) => { - if (o.app === e && o.inspectorId === z) { - const r = o.nodeId === Ct ? t : t._s.get(o.nodeId); - if (!r) - return; - r && (o.state = ks(r)); - } - }), n.on.editInspectorState((o, r) => { - if (o.app === e && o.inspectorId === z) { - const s = o.nodeId === Ct ? t : t._s.get(o.nodeId); - if (!s) - return H(`store "${o.nodeId}" not found`, "error"); - const { path: i } = o; - qt(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), Re = !1, o.set(s, i, o.state.value), Re = !0; - } - }), n.on.editComponentState((o) => { - if (o.type.startsWith("🍍")) { - const r = o.type.replace(/^🍍\s*/, ""), s = t._s.get(r); - if (!s) - return H(`store "${r}" not found`, "error"); - const { path: i } = o; - if (i[0] !== "state") - return H(`Invalid path for store "${r}": -${i} -Only state can be modified.`); - i[0] = "$state", Re = !1, o.set(s, i, o.state.value), Re = !0; - } - }); - }); -} -function Cs(e, t) { - st.includes(ct(t.$id)) || st.push(ct(t.$id)), zt({ - id: "dev.esm.pinia", - label: "Pinia 🍍", - logo: "https://pinia.vuejs.org/logo.svg", - packageName: "pinia", - homepage: "https://pinia.vuejs.org", - componentStateTypes: st, - app: e, - settings: { - logStoreChanges: { - label: "Notify about new/deleted stores", - type: "boolean", - defaultValue: !0 - } - // useEmojis: { - // label: 'Use emojis in messages ⚡️', - // type: 'boolean', - // defaultValue: true, - // }, - } - }, (n) => { - const o = typeof n.now == "function" ? n.now.bind(n) : Date.now; - t.$onAction(({ after: i, onError: a, name: l, args: u }) => { - const c = Co++; - n.addTimelineEvent({ - layerId: be, - event: { - time: o(), - title: "🛫 " + l, - subtitle: "start", - data: { - store: te(t.$id), - action: te(l), - args: u - }, - groupId: c - } - }), i((d) => { - ve = void 0, n.addTimelineEvent({ - layerId: be, - event: { - time: o(), - title: "🛬 " + l, - subtitle: "end", - data: { - store: te(t.$id), - action: te(l), - args: u, - result: d - }, - groupId: c - } - }); - }), a((d) => { - ve = void 0, n.addTimelineEvent({ - layerId: be, - event: { - time: o(), - logType: "error", - title: "💥 " + l, - subtitle: "end", - data: { - store: te(t.$id), - action: te(l), - args: u, - error: d - }, - groupId: c - } - }); - }); - }, !0), t._customProperties.forEach((i) => { - ue(() => k(t[i]), (a, l) => { - n.notifyComponentUpdate(), n.sendInspectorState(z), Re && n.addTimelineEvent({ - layerId: be, - event: { - time: o(), - title: "Change", - subtitle: i, - data: { - newValue: a, - oldValue: l - }, - groupId: ve - } - }); - }, { deep: !0 }); - }), t.$subscribe(({ events: i, type: a }, l) => { - if (n.notifyComponentUpdate(), n.sendInspectorState(z), !Re) - return; - const u = { - time: o(), - title: Os(a), - data: Is({ store: te(t.$id) }, Ss(i)), - groupId: ve - }; - a === oe.patchFunction ? u.subtitle = "⤵️" : a === oe.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = { - _custom: { - display: "DebuggerEvent", - type: "object", - tooltip: "raw DebuggerEvent[]", - value: i - } - }), n.addTimelineEvent({ - layerId: be, - event: u - }); - }, { detached: !0, flush: "sync" }); - const r = t._hotUpdate; - t._hotUpdate = Ee((i) => { - r(i), n.addTimelineEvent({ - layerId: be, - event: { - time: o(), - title: "🔥 " + t.$id, - subtitle: "HMR update", - data: { - store: te(t.$id), - info: te("HMR update") - } - } - }), n.notifyComponentUpdate(), n.sendInspectorTree(z), n.sendInspectorState(z); - }); - const { $dispose: s } = t; - t.$dispose = () => { - s(), n.notifyComponentUpdate(), n.sendInspectorTree(z), n.sendInspectorState(z), n.getSettings().logStoreChanges && H(`Disposed "${t.$id}" store 🗑`); - }, n.notifyComponentUpdate(), n.sendInspectorTree(z), n.sendInspectorState(z), n.getSettings().logStoreChanges && H(`"${t.$id}" store installed 🆕`); - }); -} -let Co = 0, ve; -function bn(e, t, n) { - const o = t.reduce((r, s) => (r[s] = ut(e)[s], r), {}); - for (const r in o) - e[r] = function() { - const s = Co, i = n ? new Proxy(e, { - get(...l) { - return ve = s, Reflect.get(...l); - }, - set(...l) { - return ve = s, Reflect.set(...l); - } - }) : e; - ve = s; - const a = o[r].apply(i, arguments); - return ve = void 0, a; - }; -} -function xs({ app: e, store: t, options: n }) { - if (t.$id.startsWith("__hot:")) - return; - t._isOptionsAPI = !!n.state, bn(t, Object.keys(n.actions), t._isOptionsAPI); - const o = t._hotUpdate; - ut(t)._hotUpdate = function(r) { - o.apply(this, arguments), bn(t, Object.keys(r._hmrPayload.actions), !!t._isOptionsAPI); - }, Cs( - e, - // FIXME: is there a way to allow the assignment from Store to StoreGeneric? - t - ); -} -function $s() { - const e = fo(!0), t = e.run(() => V({})); - let n = [], o = []; - const r = Ee({ - install(s) { - Ge(r), r._a = s, s.provide(bo, r), s.config.globalProperties.$pinia = r, Be && Ps(s, r), o.forEach((i) => n.push(i)), o = []; - }, - use(s) { - return !this._a && !yo ? o.push(s) : n.push(s), this; - }, - _p: n, - // it's actually undefined here - // @ts-expect-error - _a: null, - _e: e, - _s: /* @__PURE__ */ new Map(), - state: t - }); - return Be && typeof Proxy < "u" && r.use(xs), r; -} -function xo(e, t) { - for (const n in t) { - const o = t[n]; - if (!(n in e)) - continue; - const r = e[n]; - Ce(r) && Ce(o) && !We(o) && !Wt(o) ? e[n] = xo(r, o) : e[n] = o; - } - return e; -} -const $o = () => { -}; -function _n(e, t, n, o = $o) { - e.push(t); - const r = () => { - const s = e.indexOf(t); - s > -1 && (e.splice(s, 1), o()); - }; - return !n && po() && ho(r), r; -} -function Ne(e, ...t) { - e.slice().forEach((n) => { - n(...t); - }); -} -const Ns = (e) => e(); -function xt(e, t) { - e instanceof Map && t instanceof Map && t.forEach((n, o) => e.set(o, n)), e instanceof Set && t instanceof Set && t.forEach(e.add, e); - for (const n in t) { - if (!t.hasOwnProperty(n)) - continue; - const o = t[n], r = e[n]; - Ce(r) && Ce(o) && e.hasOwnProperty(n) && !We(o) && !Wt(o) ? e[n] = xt(r, o) : e[n] = o; - } - return e; -} -const Rs = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : ( - /* istanbul ignore next */ - Symbol() -); -function As(e) { - return !Ce(e) || !e.hasOwnProperty(Rs); -} -const { assign: X } = Object; -function En(e) { - return !!(We(e) && e.effect); -} -function kn(e, t, n, o) { - const { state: r, actions: s, getters: i } = t, a = n.state.value[e]; - let l; - function u() { - !a && (process.env.NODE_ENV === "production" || !o) && (n.state.value[e] = r ? r() : {}); - const c = process.env.NODE_ENV !== "production" && o ? ( - // use ref() to unwrap refs inside state TODO: check if this is still necessary - dn(V(r ? r() : {}).value) - ) : dn(n.state.value[e]); - return X(c, s, Object.keys(i || {}).reduce((d, f) => (process.env.NODE_ENV !== "production" && f in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`), d[f] = Ee(B(() => { - Ge(n); - const p = n._s.get(e); - return i[f].call(p, p); - })), d), {})); - } - return l = $t(e, u, t, n, o, !0), l; -} -function $t(e, t, n = {}, o, r, s) { - let i; - const a = X({ actions: {} }, n); - if (process.env.NODE_ENV !== "production" && !o._e.active) - throw new Error("Pinia destroyed"); - const l = { - deep: !0 - // flush: 'post', - }; - process.env.NODE_ENV !== "production" && !yo && (l.onTrigger = (E) => { - u ? p = E : u == !1 && !S._hotUpdating && (Array.isArray(p) ? p.push(E) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.")); - }); - let u, c, d = [], f = [], p; - const v = o.state.value[e]; - !s && !v && (process.env.NODE_ENV === "production" || !r) && (o.state.value[e] = {}); - const m = V({}); - let w; - function O(E) { - let b; - u = c = !1, process.env.NODE_ENV !== "production" && (p = []), typeof E == "function" ? (E(o.state.value[e]), b = { - type: oe.patchFunction, - storeId: e, - events: p - }) : (xt(o.state.value[e], E), b = { - type: oe.patchObject, - payload: E, - storeId: e, - events: p - }); - const D = w = Symbol(); - Fe().then(() => { - w === D && (u = !0); - }), c = !0, Ne(d, b, o.state.value[e]); - } - const I = s ? function() { - const { state: b } = n, D = b ? b() : {}; - this.$patch((U) => { - X(U, D); - }); - } : ( - /* istanbul ignore next */ - process.env.NODE_ENV !== "production" ? () => { - throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`); - } : $o - ); - function M() { - i.stop(), d = [], f = [], o._s.delete(e); - } - function W(E, b) { - return function() { - Ge(o); - const D = Array.from(arguments), U = [], ye = []; - function De(G) { - U.push(G); - } - function Ke(G) { - ye.push(G); - } - Ne(f, { - args: D, - name: E, - store: S, - after: De, - onError: Ke - }); - let ne; - try { - ne = b.apply(this && this.$id === e ? this : S, D); - } catch (G) { - throw Ne(ye, G), G; - } - return ne instanceof Promise ? ne.then((G) => (Ne(U, G), G)).catch((G) => (Ne(ye, G), Promise.reject(G))) : (Ne(U, ne), ne); - }; - } - const J = /* @__PURE__ */ Ee({ - actions: {}, - getters: {}, - state: [], - hotState: m - }), Y = { - _p: o, - // _s: scope, - $id: e, - $onAction: _n.bind(null, f), - $patch: O, - $reset: I, - $subscribe(E, b = {}) { - const D = _n(d, E, b.detached, () => U()), U = i.run(() => ue(() => o.state.value[e], (ye) => { - (b.flush === "sync" ? c : u) && E({ - storeId: e, - type: oe.direct, - events: p - }, ye); - }, X({}, l, b))); - return D; - }, - $dispose: M - }, S = _e(process.env.NODE_ENV !== "production" || Be ? X( - { - _hmrPayload: J, - _customProperties: Ee(/* @__PURE__ */ new Set()) - // devtools custom properties - }, - Y - // must be added later - // setupStore - ) : Y); - o._s.set(e, S); - const ee = (o._a && o._a.runWithContext || Ns)(() => o._e.run(() => (i = fo()).run(t))); - for (const E in ee) { - const b = ee[E]; - if (We(b) && !En(b) || Wt(b)) - process.env.NODE_ENV !== "production" && r ? Xe(m.value, E, yt(ee, E)) : s || (v && As(b) && (We(b) ? b.value = v[E] : xt(b, v[E])), o.state.value[e][E] = b), process.env.NODE_ENV !== "production" && J.state.push(E); - else if (typeof b == "function") { - const D = process.env.NODE_ENV !== "production" && r ? b : W(E, b); - ee[E] = D, process.env.NODE_ENV !== "production" && (J.actions[E] = b), a.actions[E] = b; - } else - process.env.NODE_ENV !== "production" && En(b) && (J.getters[E] = s ? ( - // @ts-expect-error - n.getters[E] - ) : b, dt && (ee._getters || // @ts-expect-error: same - (ee._getters = Ee([]))).push(E)); - } - if (X(S, ee), X(ut(S), ee), Object.defineProperty(S, "$state", { - get: () => process.env.NODE_ENV !== "production" && r ? m.value : o.state.value[e], - set: (E) => { - if (process.env.NODE_ENV !== "production" && r) - throw new Error("cannot set hotState"); - O((b) => { - X(b, E); - }); - } - }), process.env.NODE_ENV !== "production" && (S._hotUpdate = Ee((E) => { - S._hotUpdating = !0, E._hmrPayload.state.forEach((b) => { - if (b in S.$state) { - const D = E.$state[b], U = S.$state[b]; - typeof D == "object" && Ce(D) && Ce(U) ? xo(D, U) : E.$state[b] = U; - } - Xe(S, b, yt(E.$state, b)); - }), Object.keys(S.$state).forEach((b) => { - b in E.$state || wt(S, b); - }), u = !1, c = !1, o.state.value[e] = yt(E._hmrPayload, "hotState"), c = !0, Fe().then(() => { - u = !0; - }); - for (const b in E._hmrPayload.actions) { - const D = E[b]; - Xe(S, b, W(b, D)); - } - for (const b in E._hmrPayload.getters) { - const D = E._hmrPayload.getters[b], U = s ? ( - // special handling of options api - B(() => (Ge(o), D.call(S, S))) - ) : D; - Xe(S, b, U); - } - Object.keys(S._hmrPayload.getters).forEach((b) => { - b in E._hmrPayload.getters || wt(S, b); - }), Object.keys(S._hmrPayload.actions).forEach((b) => { - b in E._hmrPayload.actions || wt(S, b); - }), S._hmrPayload = E._hmrPayload, S._getters = E._getters, S._hotUpdating = !1; - })), Be) { - const E = { - writable: !0, - configurable: !0, - // avoid warning on devtools trying to display this property - enumerable: !1 - }; - ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((b) => { - Object.defineProperty(S, b, X({ value: S[b] }, E)); - }); - } - return o._p.forEach((E) => { - if (Be) { - const b = i.run(() => E({ - store: S, - app: o._a, - pinia: o, - options: a - })); - Object.keys(b || {}).forEach((D) => S._customProperties.add(D)), X(S, b); - } else - X(S, i.run(() => E({ - store: S, - app: o._a, - pinia: o, - options: a - }))); - }), process.env.NODE_ENV !== "production" && S.$state && typeof S.$state == "object" && typeof S.$state.constructor == "function" && !S.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be - state: () => new MyClass() -Found in store "${S.$id}".`), v && s && n.hydrate && n.hydrate(S.$state, v), u = !0, c = !0, S; -} -function Ts(e, t, n) { - let o, r; - const s = typeof t == "function"; - if (typeof e == "string") - o = e, r = s ? n : t; - else if (r = e, o = e.id, process.env.NODE_ENV !== "production" && typeof o != "string") - throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.'); - function i(a, l) { - const u = _r(); - if (a = // in test mode, ignore the argument provided as we can always retrieve a - // pinia instance with getActivePinia() - (process.env.NODE_ENV === "test" && Le && Le._testing ? null : a) || (u ? Z(bo, null) : null), a && Ge(a), process.env.NODE_ENV !== "production" && !Le) - throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? -See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. -This will fail in production.`); - a = Le, a._s.has(o) || (s ? $t(o, t, r, a) : kn(o, r, a), process.env.NODE_ENV !== "production" && (i._pinia = a)); - const c = a._s.get(o); - if (process.env.NODE_ENV !== "production" && l) { - const d = "__hot:" + o, f = s ? $t(d, t, r, a, !0) : kn(d, X({}, r), a, !0); - l._hotUpdate(f), delete a.state.value[d], a._s.delete(d); - } - if (process.env.NODE_ENV !== "production" && dt) { - const d = Ht(); - if (d && d.proxy && // avoid adding stores that are just built for hot module replacement - !l) { - const f = d.proxy, p = "_pStores" in f ? f._pStores : f._pStores = {}; - p[o] = c; - } - } - return c; - } - return i.$id = o, i; -} -const Ds = Ts("data", () => { - const e = V([]), t = V({}); - return { records: e, record: t }; -}); -function No(e) { - e || (e = Z("$registry")); - const t = Ds(), n = V(new je(e, t)), o = V(!1); - return wr(async () => { - var r, s; - const i = e.router.currentRoute.value, a = (r = i.params.records) == null ? void 0 : r.toString().toLowerCase(), l = (s = i.params.record) == null ? void 0 : s.toString().toLowerCase(); - if (!a && !l) - return; - const u = await e.getMeta(a); - e.addDoctype(u), n.value.setup(u), a && (l ? await n.value.getRecord(u, l) : await n.value.getRecords(u)), n.value.runAction(u, "LOAD", l ? [l] : void 0), o.value = !0; - }), { stonecrop: n, isReady: o }; -} -/*! - * vue-router v4.2.5 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */ -const ae = typeof window < "u"; -function Vs(e) { - return e.__esModule || e[Symbol.toStringTag] === "Module"; -} -const R = Object.assign; -function bt(e, t) { - const n = {}; - for (const o in t) { - const r = t[o]; - n[o] = K(r) ? r.map(e) : e(r); - } - return n; -} -const Ue = () => { -}, K = Array.isArray; -function $(e) { - const t = Array.from(arguments).slice(1); - console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t)); -} -const Ms = /\/$/, Ls = (e) => e.replace(Ms, ""); -function _t(e, t, n = "/") { - let o, r = {}, s = "", i = ""; - const a = t.indexOf("#"); - let l = t.indexOf("?"); - return a < l && a >= 0 && (l = -1), l > -1 && (o = t.slice(0, l), s = t.slice(l + 1, a > -1 ? a : t.length), r = e(s)), a > -1 && (o = o || t.slice(0, a), i = t.slice(a, t.length)), o = Us(o ?? t, n), { - fullPath: o + (s && "?") + s + i, - path: o, - query: r, - hash: i - }; -} -function js(e, t) { - const n = t.query ? e(t.query) : ""; - return t.path + (n && "?") + n + (t.hash || ""); -} -function Sn(e, t) { - return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/"; -} -function On(e, t, n) { - const o = t.matched.length - 1, r = n.matched.length - 1; - return o > -1 && o === r && ge(t.matched[o], n.matched[r]) && Ro(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash; -} -function ge(e, t) { - return (e.aliasOf || e) === (t.aliasOf || t); -} -function Ro(e, t) { - if (Object.keys(e).length !== Object.keys(t).length) - return !1; - for (const n in e) - if (!Bs(e[n], t[n])) - return !1; - return !0; -} -function Bs(e, t) { - return K(e) ? In(e, t) : K(t) ? In(t, e) : e === t; -} -function In(e, t) { - return K(t) ? e.length === t.length && e.every((n, o) => n === t[o]) : e.length === 1 && e[0] === t; -} -function Us(e, t) { - if (e.startsWith("/")) - return e; - if (process.env.NODE_ENV !== "production" && !t.startsWith("/")) - return $(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e; - if (!e) - return t; - const n = t.split("/"), o = e.split("/"), r = o[o.length - 1]; - (r === ".." || r === ".") && o.push(""); - let s = n.length - 1, i, a; - for (i = 0; i < o.length; i++) - if (a = o[i], a !== ".") - if (a === "..") - s > 1 && s--; - else - break; - return n.slice(0, s).join("/") + "/" + o.slice(i - (i === o.length ? 1 : 0)).join("/"); -} -var ze; -(function(e) { - e.pop = "pop", e.push = "push"; -})(ze || (ze = {})); -var He; -(function(e) { - e.back = "back", e.forward = "forward", e.unknown = ""; -})(He || (He = {})); -function Hs(e) { - if (!e) - if (ae) { - const t = document.querySelector("base"); - e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, ""); - } else - e = "/"; - return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), Ls(e); -} -const Ws = /^[^#]+#/; -function Fs(e, t) { - return e.replace(Ws, "#") + t; -} -function Gs(e, t) { - const n = document.documentElement.getBoundingClientRect(), o = e.getBoundingClientRect(); - return { - behavior: t.behavior, - left: o.left - n.left - (t.left || 0), - top: o.top - n.top - (t.top || 0) - }; -} -const ft = () => ({ - left: window.pageXOffset, - top: window.pageYOffset -}); -function zs(e) { - let t; - if ("el" in e) { - const n = e.el, o = typeof n == "string" && n.startsWith("#"); - if (process.env.NODE_ENV !== "production" && typeof e.el == "string" && (!o || !document.getElementById(e.el.slice(1)))) - try { - const s = document.querySelector(e.el); - if (o && s) { - $(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`); - return; - } - } catch { - $(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`); - return; - } - const r = typeof n == "string" ? o ? document.getElementById(n.slice(1)) : document.querySelector(n) : n; - if (!r) { - process.env.NODE_ENV !== "production" && $(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`); - return; - } - t = Gs(r, e); - } else - t = e; - "scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.pageXOffset, t.top != null ? t.top : window.pageYOffset); -} -function Pn(e, t) { - return (history.state ? history.state.position - t : -1) + e; -} -const Nt = /* @__PURE__ */ new Map(); -function Qs(e, t) { - Nt.set(e, t); -} -function qs(e) { - const t = Nt.get(e); - return Nt.delete(e), t; -} -let Ks = () => location.protocol + "//" + location.host; -function Ao(e, t) { - const { pathname: n, search: o, hash: r } = t, s = e.indexOf("#"); - if (s > -1) { - let a = r.includes(e.slice(s)) ? e.slice(s).length : 1, l = r.slice(a); - return l[0] !== "/" && (l = "/" + l), Sn(l, ""); - } - return Sn(n, e) + o + r; -} -function Js(e, t, n, o) { - let r = [], s = [], i = null; - const a = ({ state: f }) => { - const p = Ao(e, location), v = n.value, m = t.value; - let w = 0; - if (f) { - if (n.value = p, t.value = f, i && i === v) { - i = null; - return; - } - w = m ? f.position - m.position : 0; - } else - o(p); - r.forEach((O) => { - O(n.value, v, { - delta: w, - type: ze.pop, - direction: w ? w > 0 ? He.forward : He.back : He.unknown - }); - }); - }; - function l() { - i = n.value; - } - function u(f) { - r.push(f); - const p = () => { - const v = r.indexOf(f); - v > -1 && r.splice(v, 1); - }; - return s.push(p), p; - } - function c() { - const { history: f } = window; - f.state && f.replaceState(R({}, f.state, { scroll: ft() }), ""); - } - function d() { - for (const f of s) - f(); - s = [], window.removeEventListener("popstate", a), window.removeEventListener("beforeunload", c); - } - return window.addEventListener("popstate", a), window.addEventListener("beforeunload", c, { - passive: !0 - }), { - pauseListeners: l, - listen: u, - destroy: d - }; -} -function Cn(e, t, n, o = !1, r = !1) { - return { - back: e, - current: t, - forward: n, - replaced: o, - position: window.history.length, - scroll: r ? ft() : null - }; -} -function Ys(e) { - const { history: t, location: n } = window, o = { - value: Ao(e, n) - }, r = { value: t.state }; - r.value || s(o.value, { - back: null, - current: o.value, - forward: null, - // the length is off by one, we need to decrease it - position: t.length - 1, - replaced: !0, - // don't add a scroll as the user may have an anchor, and we want - // scrollBehavior to be triggered without a saved position - scroll: null - }, !0); - function s(l, u, c) { - const d = e.indexOf("#"), f = d > -1 ? (n.host && document.querySelector("base") ? e : e.slice(d)) + l : Ks() + e + l; - try { - t[c ? "replaceState" : "pushState"](u, "", f), r.value = u; - } catch (p) { - process.env.NODE_ENV !== "production" ? $("Error with push/replace State", p) : console.error(p), n[c ? "replace" : "assign"](f); - } - } - function i(l, u) { - const c = R({}, t.state, Cn( - r.value.back, - // keep back and forward entries but override current position - l, - r.value.forward, - !0 - ), u, { position: r.value.position }); - s(l, c, !0), o.value = l; - } - function a(l, u) { - const c = R( - {}, - // use current history state to gracefully handle a wrong call to - // history.replaceState - // https://github.com/vuejs/router/issues/366 - r.value, - t.state, - { - forward: l, - scroll: ft() - } - ); - process.env.NODE_ENV !== "production" && !t.state && $(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: - -history.replaceState(history.state, '', url) - -You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`), s(c.current, c, !0); - const d = R({}, Cn(o.value, l, null), { position: c.position + 1 }, u); - s(l, d, !1), o.value = l; - } - return { - location: o, - state: r, - push: a, - replace: i - }; -} -function Xs(e) { - e = Hs(e); - const t = Ys(e), n = Js(e, t.state, t.location, t.replace); - function o(s, i = !0) { - i || n.pauseListeners(), history.go(s); - } - const r = R({ - // it's overridden right after - location: "", - base: e, - go: o, - createHref: Fs.bind(null, e) - }, t, n); - return Object.defineProperty(r, "location", { - enumerable: !0, - get: () => t.location.value - }), Object.defineProperty(r, "state", { - enumerable: !0, - get: () => t.state.value - }), r; -} -function Zs(e) { - return typeof e == "string" || e && typeof e == "object"; -} -function To(e) { - return typeof e == "string" || typeof e == "symbol"; -} -const pe = { - path: "/", - name: void 0, - params: {}, - query: {}, - hash: "", - fullPath: "/", - matched: [], - meta: {}, - redirectedFrom: void 0 -}, Rt = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : ""); -var xn; -(function(e) { - e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated"; -})(xn || (xn = {})); -const ea = { - 1({ location: e, currentLocation: t }) { - return `No match for - ${JSON.stringify(e)}${t ? ` -while being at -` + JSON.stringify(t) : ""}`; - }, - 2({ from: e, to: t }) { - return `Redirected from "${e.fullPath}" to "${na(t)}" via a navigation guard.`; - }, - 4({ from: e, to: t }) { - return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`; - }, - 8({ from: e, to: t }) { - return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`; - }, - 16({ from: e, to: t }) { - return `Avoided redundant navigation to current location: "${e.fullPath}".`; - } -}; -function Te(e, t) { - return process.env.NODE_ENV !== "production" ? R(new Error(ea[e](t)), { - type: e, - [Rt]: !0 - }, t) : R(new Error(), { - type: e, - [Rt]: !0 - }, t); -} -function se(e, t) { - return e instanceof Error && Rt in e && (t == null || !!(e.type & t)); -} -const ta = ["params", "query", "hash"]; -function na(e) { - if (typeof e == "string") - return e; - if ("path" in e) - return e.path; - const t = {}; - for (const n of ta) - n in e && (t[n] = e[n]); - return JSON.stringify(t, null, 2); -} -const $n = "[^/]+?", oa = { - sensitive: !1, - strict: !1, - start: !0, - end: !0 -}, ra = /[.+*?^${}()[\]/\\]/g; -function sa(e, t) { - const n = R({}, oa, t), o = []; - let r = n.start ? "^" : ""; - const s = []; - for (const u of e) { - const c = u.length ? [] : [ - 90 - /* PathScore.Root */ - ]; - n.strict && !u.length && (r += "/"); - for (let d = 0; d < u.length; d++) { - const f = u[d]; - let p = 40 + (n.sensitive ? 0.25 : 0); - if (f.type === 0) - d || (r += "/"), r += f.value.replace(ra, "\\$&"), p += 40; - else if (f.type === 1) { - const { value: v, repeatable: m, optional: w, regexp: O } = f; - s.push({ - name: v, - repeatable: m, - optional: w - }); - const I = O || $n; - if (I !== $n) { - p += 10; - try { - new RegExp(`(${I})`); - } catch (W) { - throw new Error(`Invalid custom RegExp for param "${v}" (${I}): ` + W.message); - } - } - let M = m ? `((?:${I})(?:/(?:${I}))*)` : `(${I})`; - d || (M = // avoid an optional / if there are more segments e.g. /:p?-static - // or /:p?-:p2 - w && u.length < 2 ? `(?:/${M})` : "/" + M), w && (M += "?"), r += M, p += 20, w && (p += -8), m && (p += -20), I === ".*" && (p += -50); - } - c.push(p); - } - o.push(c); - } - if (n.strict && n.end) { - const u = o.length - 1; - o[u][o[u].length - 1] += 0.7000000000000001; - } - n.strict || (r += "/?"), n.end ? r += "$" : n.strict && (r += "(?:/|$)"); - const i = new RegExp(r, n.sensitive ? "" : "i"); - function a(u) { - const c = u.match(i), d = {}; - if (!c) - return null; - for (let f = 1; f < c.length; f++) { - const p = c[f] || "", v = s[f - 1]; - d[v.name] = p && v.repeatable ? p.split("/") : p; - } - return d; - } - function l(u) { - let c = "", d = !1; - for (const f of e) { - (!d || !c.endsWith("/")) && (c += "/"), d = !1; - for (const p of f) - if (p.type === 0) - c += p.value; - else if (p.type === 1) { - const { value: v, repeatable: m, optional: w } = p, O = v in u ? u[v] : ""; - if (K(O) && !m) - throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`); - const I = K(O) ? O.join("/") : O; - if (!I) - if (w) - f.length < 2 && (c.endsWith("/") ? c = c.slice(0, -1) : d = !0); - else - throw new Error(`Missing required param "${v}"`); - c += I; - } - } - return c || "/"; - } - return { - re: i, - score: o, - keys: s, - parse: a, - stringify: l - }; -} -function aa(e, t) { - let n = 0; - for (; n < e.length && n < t.length; ) { - const o = t[n] - e[n]; - if (o) - return o; - n++; - } - return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0; -} -function ia(e, t) { - let n = 0; - const o = e.score, r = t.score; - for (; n < o.length && n < r.length; ) { - const s = aa(o[n], r[n]); - if (s) - return s; - n++; - } - if (Math.abs(r.length - o.length) === 1) { - if (Nn(o)) - return 1; - if (Nn(r)) - return -1; - } - return r.length - o.length; -} -function Nn(e) { - const t = e[e.length - 1]; - return e.length > 0 && t[t.length - 1] < 0; -} -const ca = { - type: 0, - value: "" -}, la = /[a-zA-Z0-9_]/; -function ua(e) { - if (!e) - return [[]]; - if (e === "/") - return [[ca]]; - if (!e.startsWith("/")) - throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`); - function t(p) { - throw new Error(`ERR (${n})/"${u}": ${p}`); - } - let n = 0, o = n; - const r = []; - let s; - function i() { - s && r.push(s), s = []; - } - let a = 0, l, u = "", c = ""; - function d() { - u && (n === 0 ? s.push({ - type: 0, - value: u - }) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), s.push({ - type: 1, - value: u, - regexp: c, - repeatable: l === "*" || l === "+", - optional: l === "*" || l === "?" - })) : t("Invalid state to consume buffer"), u = ""); - } - function f() { - u += l; - } - for (; a < e.length; ) { - if (l = e[a++], l === "\\" && n !== 2) { - o = n, n = 4; - continue; - } - switch (n) { - case 0: - l === "/" ? (u && d(), i()) : l === ":" ? (d(), n = 1) : f(); - break; - case 4: - f(), n = o; - break; - case 1: - l === "(" ? n = 2 : la.test(l) ? f() : (d(), n = 0, l !== "*" && l !== "?" && l !== "+" && a--); - break; - case 2: - l === ")" ? c[c.length - 1] == "\\" ? c = c.slice(0, -1) + l : n = 3 : c += l; - break; - case 3: - d(), n = 0, l !== "*" && l !== "?" && l !== "+" && a--, c = ""; - break; - default: - t("Unknown state"); - break; - } - } - return n === 2 && t(`Unfinished custom RegExp for param "${u}"`), d(), i(), r; -} -function da(e, t, n) { - const o = sa(ua(e.path), n); - if (process.env.NODE_ENV !== "production") { - const s = /* @__PURE__ */ new Set(); - for (const i of o.keys) - s.has(i.name) && $(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), s.add(i.name); - } - const r = R(o, { - record: e, - parent: t, - // these needs to be populated by the parent - children: [], - alias: [] - }); - return t && !r.record.aliasOf == !t.record.aliasOf && t.children.push(r), r; -} -function fa(e, t) { - const n = [], o = /* @__PURE__ */ new Map(); - t = Tn({ strict: !1, end: !0, sensitive: !1 }, t); - function r(c) { - return o.get(c); - } - function s(c, d, f) { - const p = !f, v = pa(c); - process.env.NODE_ENV !== "production" && ga(v, d), v.aliasOf = f && f.record; - const m = Tn(t, c), w = [ - v - ]; - if ("alias" in c) { - const M = typeof c.alias == "string" ? [c.alias] : c.alias; - for (const W of M) - w.push(R({}, v, { - // this allows us to hold a copy of the `components` option - // so that async components cache is hold on the original record - components: f ? f.record.components : v.components, - path: W, - // we might be the child of an alias - aliasOf: f ? f.record : v - // the aliases are always of the same kind as the original since they - // are defined on the same record - })); - } - let O, I; - for (const M of w) { - const { path: W } = M; - if (d && W[0] !== "/") { - const J = d.record.path, Y = J[J.length - 1] === "/" ? "" : "/"; - M.path = d.record.path + (W && Y + W); - } - if (process.env.NODE_ENV !== "production" && M.path === "*") - throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp. -See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.`); - if (O = da(M, d, m), process.env.NODE_ENV !== "production" && d && W[0] === "/" && ya(O, d), f ? (f.alias.push(O), process.env.NODE_ENV !== "production" && va(f, O)) : (I = I || O, I !== O && I.alias.push(O), p && c.name && !An(O) && i(c.name)), v.children) { - const J = v.children; - for (let Y = 0; Y < J.length; Y++) - s(J[Y], O, f && f.children[Y]); - } - f = f || O, (O.record.components && Object.keys(O.record.components).length || O.record.name || O.record.redirect) && l(O); - } - return I ? () => { - i(I); - } : Ue; - } - function i(c) { - if (To(c)) { - const d = o.get(c); - d && (o.delete(c), n.splice(n.indexOf(d), 1), d.children.forEach(i), d.alias.forEach(i)); - } else { - const d = n.indexOf(c); - d > -1 && (n.splice(d, 1), c.record.name && o.delete(c.record.name), c.children.forEach(i), c.alias.forEach(i)); - } - } - function a() { - return n; - } - function l(c) { - let d = 0; - for (; d < n.length && ia(c, n[d]) >= 0 && // Adding children with empty path should still appear before the parent - // https://github.com/vuejs/router/issues/1124 - (c.record.path !== n[d].record.path || !Do(c, n[d])); ) - d++; - n.splice(d, 0, c), c.record.name && !An(c) && o.set(c.record.name, c); - } - function u(c, d) { - let f, p = {}, v, m; - if ("name" in c && c.name) { - if (f = o.get(c.name), !f) - throw Te(1, { - location: c - }); - if (process.env.NODE_ENV !== "production") { - const I = Object.keys(c.params || {}).filter((M) => !f.keys.find((W) => W.name === M)); - I.length && $(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`); - } - m = f.record.name, p = R( - // paramsFromLocation is a new object - Rn( - d.params, - // only keep params that exist in the resolved location - // TODO: only keep optional params coming from a parent record - f.keys.filter((I) => !I.optional).map((I) => I.name) - ), - // discard any existing params in the current location that do not exist here - // #1497 this ensures better active/exact matching - c.params && Rn(c.params, f.keys.map((I) => I.name)) - ), v = f.stringify(p); - } else if ("path" in c) - v = c.path, process.env.NODE_ENV !== "production" && !v.startsWith("/") && $(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), f = n.find((I) => I.re.test(v)), f && (p = f.parse(v), m = f.record.name); - else { - if (f = d.name ? o.get(d.name) : n.find((I) => I.re.test(d.path)), !f) - throw Te(1, { - location: c, - currentLocation: d - }); - m = f.record.name, p = R({}, d.params, c.params), v = f.stringify(p); - } - const w = []; - let O = f; - for (; O; ) - w.unshift(O.record), O = O.parent; - return { - name: m, - path: v, - params: p, - matched: w, - meta: ma(w) - }; - } - return e.forEach((c) => s(c)), { addRoute: s, resolve: u, removeRoute: i, getRoutes: a, getRecordMatcher: r }; -} -function Rn(e, t) { - const n = {}; - for (const o of t) - o in e && (n[o] = e[o]); - return n; -} -function pa(e) { - return { - path: e.path, - redirect: e.redirect, - name: e.name, - meta: e.meta || {}, - aliasOf: void 0, - beforeEnter: e.beforeEnter, - props: ha(e), - children: e.children || [], - instances: {}, - leaveGuards: /* @__PURE__ */ new Set(), - updateGuards: /* @__PURE__ */ new Set(), - enterCallbacks: {}, - components: "components" in e ? e.components || null : e.component && { default: e.component } - }; -} -function ha(e) { - const t = {}, n = e.props || !1; - if ("component" in e) - t.default = n; - else - for (const o in e.components) - t[o] = typeof n == "object" ? n[o] : n; - return t; -} -function An(e) { - for (; e; ) { - if (e.record.aliasOf) - return !0; - e = e.parent; - } - return !1; -} -function ma(e) { - return e.reduce((t, n) => R(t, n.meta), {}); -} -function Tn(e, t) { - const n = {}; - for (const o in e) - n[o] = o in t ? t[o] : e[o]; - return n; -} -function At(e, t) { - return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable; -} -function va(e, t) { - for (const n of e.keys) - if (!n.optional && !t.keys.find(At.bind(null, n))) - return $(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`); - for (const n of t.keys) - if (!n.optional && !e.keys.find(At.bind(null, n))) - return $(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`); -} -function ga(e, t) { - t && t.record.name && !e.name && !e.path && $(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`); -} -function ya(e, t) { - for (const n of t.keys) - if (!e.keys.find(At.bind(null, n))) - return $(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`); -} -function Do(e, t) { - return t.children.some((n) => n === e || Do(e, n)); -} -const Vo = /#/g, wa = /&/g, ba = /\//g, _a = /=/g, Ea = /\?/g, Mo = /\+/g, ka = /%5B/g, Sa = /%5D/g, Lo = /%5E/g, Oa = /%60/g, jo = /%7B/g, Ia = /%7C/g, Bo = /%7D/g, Pa = /%20/g; -function Kt(e) { - return encodeURI("" + e).replace(Ia, "|").replace(ka, "[").replace(Sa, "]"); -} -function Ca(e) { - return Kt(e).replace(jo, "{").replace(Bo, "}").replace(Lo, "^"); -} -function Tt(e) { - return Kt(e).replace(Mo, "%2B").replace(Pa, "+").replace(Vo, "%23").replace(wa, "%26").replace(Oa, "`").replace(jo, "{").replace(Bo, "}").replace(Lo, "^"); -} -function xa(e) { - return Tt(e).replace(_a, "%3D"); -} -function $a(e) { - return Kt(e).replace(Vo, "%23").replace(Ea, "%3F"); -} -function Na(e) { - return e == null ? "" : $a(e).replace(ba, "%2F"); -} -function Qe(e) { - try { - return decodeURIComponent("" + e); - } catch { - process.env.NODE_ENV !== "production" && $(`Error decoding "${e}". Using original value`); - } - return "" + e; -} -function Ra(e) { - const t = {}; - if (e === "" || e === "?") - return t; - const o = (e[0] === "?" ? e.slice(1) : e).split("&"); - for (let r = 0; r < o.length; ++r) { - const s = o[r].replace(Mo, " "), i = s.indexOf("="), a = Qe(i < 0 ? s : s.slice(0, i)), l = i < 0 ? null : Qe(s.slice(i + 1)); - if (a in t) { - let u = t[a]; - K(u) || (u = t[a] = [u]), u.push(l); - } else - t[a] = l; - } - return t; -} -function Dn(e) { - let t = ""; - for (let n in e) { - const o = e[n]; - if (n = xa(n), o == null) { - o !== void 0 && (t += (t.length ? "&" : "") + n); - continue; - } - (K(o) ? o.map((s) => s && Tt(s)) : [o && Tt(o)]).forEach((s) => { - s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s)); - }); - } - return t; -} -function Aa(e) { - const t = {}; - for (const n in e) { - const o = e[n]; - o !== void 0 && (t[n] = K(o) ? o.map((r) => r == null ? null : "" + r) : o == null ? o : "" + o); - } - return t; -} -const Ta = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), Vn = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Jt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Uo = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), Dt = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : ""); -function Ve() { - let e = []; - function t(o) { - return e.push(o), () => { - const r = e.indexOf(o); - r > -1 && e.splice(r, 1); - }; - } - function n() { - e = []; - } - return { - add: t, - list: () => e.slice(), - reset: n - }; -} -function he(e, t, n, o, r) { - const s = o && // name is defined if record is because of the function overload - (o.enterCallbacks[r] = o.enterCallbacks[r] || []); - return () => new Promise((i, a) => { - const l = (d) => { - d === !1 ? a(Te(4, { - from: n, - to: t - })) : d instanceof Error ? a(d) : Zs(d) ? a(Te(2, { - from: t, - to: d - })) : (s && // since enterCallbackArray is truthy, both record and name also are - o.enterCallbacks[r] === s && typeof d == "function" && s.push(d), i()); - }, u = e.call(o && o.instances[r], t, n, process.env.NODE_ENV !== "production" ? Da(l, t, n) : l); - let c = Promise.resolve(u); - if (e.length < 3 && (c = c.then(l)), process.env.NODE_ENV !== "production" && e.length > 2) { - const d = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}: -${e.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`; - if (typeof u == "object" && "then" in u) - c = c.then((f) => l._called ? f : ($(d), Promise.reject(new Error("Invalid navigation guard")))); - else if (u !== void 0 && !l._called) { - $(d), a(new Error("Invalid navigation guard")); - return; - } - } - c.catch((d) => a(d)); - }); -} -function Da(e, t, n) { - let o = 0; - return function() { - o++ === 1 && $(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, o === 1 && e.apply(null, arguments); - }; -} -function Et(e, t, n, o) { - const r = []; - for (const s of e) { - process.env.NODE_ENV !== "production" && !s.components && !s.children.length && $(`Record with path "${s.path}" is either missing a "component(s)" or "children" property.`); - for (const i in s.components) { - let a = s.components[i]; - if (process.env.NODE_ENV !== "production") { - if (!a || typeof a != "object" && typeof a != "function") - throw $(`Component "${i}" in record with path "${s.path}" is not a valid component. Received "${String(a)}".`), new Error("Invalid route component"); - if ("then" in a) { - $(`Component "${i}" in record with path "${s.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`); - const l = a; - a = () => l; - } else - a.__asyncLoader && // warn only once per component - !a.__warnedDefineAsync && (a.__warnedDefineAsync = !0, $(`Component "${i}" in record with path "${s.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`)); - } - if (!(t !== "beforeRouteEnter" && !s.instances[i])) - if (Va(a)) { - const u = (a.__vccOpts || a)[t]; - u && r.push(he(u, n, o, s, i)); - } else { - let l = a(); - process.env.NODE_ENV !== "production" && !("catch" in l) && ($(`Component "${i}" in record with path "${s.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), l = Promise.resolve(l)), r.push(() => l.then((u) => { - if (!u) - return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${s.path}"`)); - const c = Vs(u) ? u.default : u; - s.components[i] = c; - const f = (c.__vccOpts || c)[t]; - return f && he(f, n, o, s, i)(); - })); - } - } - } - return r; -} -function Va(e) { - return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e; -} -function Mn(e) { - const t = Z(Jt), n = Z(Uo), o = B(() => t.resolve(k(e.to))), r = B(() => { - const { matched: l } = o.value, { length: u } = l, c = l[u - 1], d = n.matched; - if (!c || !d.length) - return -1; - const f = d.findIndex(ge.bind(null, c)); - if (f > -1) - return f; - const p = Ln(l[u - 2]); - return ( - // we are dealing with nested routes - u > 1 && // if the parent and matched route have the same path, this link is - // referring to the empty child. Or we currently are on a different - // child of the same parent - Ln(c) === p && // avoid comparing the child with its parent - d[d.length - 1].path !== p ? d.findIndex(ge.bind(null, l[u - 2])) : f - ); - }), s = B(() => r.value > -1 && Ba(n.params, o.value.params)), i = B(() => r.value > -1 && r.value === n.matched.length - 1 && Ro(n.params, o.value.params)); - function a(l = {}) { - return ja(l) ? t[k(e.replace) ? "replace" : "push"]( - k(e.to) - // avoid uncaught errors are they are logged anyway - ).catch(Ue) : Promise.resolve(); - } - if (process.env.NODE_ENV !== "production" && ae) { - const l = Ht(); - if (l) { - const u = { - route: o.value, - isActive: s.value, - isExactActive: i.value - }; - l.__vrl_devtools = l.__vrl_devtools || [], l.__vrl_devtools.push(u), kr(() => { - u.route = o.value, u.isActive = s.value, u.isExactActive = i.value; - }, { flush: "post" }); - } - } - return { - route: o, - href: B(() => o.value.href), - isActive: s, - isExactActive: i, - navigate: a - }; -} -const Ma = /* @__PURE__ */ q({ - name: "RouterLink", - compatConfig: { MODE: 3 }, - props: { - to: { - type: [String, Object], - required: !0 - }, - replace: Boolean, - activeClass: String, - // inactiveClass: String, - exactActiveClass: String, - custom: Boolean, - ariaCurrentValue: { - type: String, - default: "page" - } - }, - useLink: Mn, - setup(e, { slots: t }) { - const n = _e(Mn(e)), { options: o } = Z(Jt), r = B(() => ({ - [jn(e.activeClass, o.linkActiveClass, "router-link-active")]: n.isActive, - // [getLinkClass( - // props.inactiveClass, - // options.linkInactiveClass, - // 'router-link-inactive' - // )]: !link.isExactActive, - [jn(e.exactActiveClass, o.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive - })); - return () => { - const s = t.default && t.default(n); - return e.custom ? s : mo("a", { - "aria-current": n.isExactActive ? e.ariaCurrentValue : null, - href: n.href, - // this would override user added attrs but Vue will still add - // the listener, so we end up triggering both - onClick: n.navigate, - class: r.value - }, s); - }; - } -}), La = Ma; -function ja(e) { - if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) { - if (e.currentTarget && e.currentTarget.getAttribute) { - const t = e.currentTarget.getAttribute("target"); - if (/\b_blank\b/i.test(t)) - return; - } - return e.preventDefault && e.preventDefault(), !0; - } -} -function Ba(e, t) { - for (const n in t) { - const o = t[n], r = e[n]; - if (typeof o == "string") { - if (o !== r) - return !1; - } else if (!K(r) || r.length !== o.length || o.some((s, i) => s !== r[i])) - return !1; - } - return !0; -} -function Ln(e) { - return e ? e.aliasOf ? e.aliasOf.path : e.path : ""; -} -const jn = (e, t, n) => e ?? t ?? n, Ua = /* @__PURE__ */ q({ - name: "RouterView", - // #674 we manually inherit them - inheritAttrs: !1, - props: { - name: { - type: String, - default: "default" - }, - route: Object - }, - // Better compat for @vue/compat users - // https://github.com/vuejs/router/issues/1315 - compatConfig: { MODE: 3 }, - setup(e, { attrs: t, slots: n }) { - process.env.NODE_ENV !== "production" && Wa(); - const o = Z(Dt), r = B(() => e.route || o.value), s = Z(Vn, 0), i = B(() => { - let u = k(s); - const { matched: c } = r.value; - let d; - for (; (d = c[u]) && !d.components; ) - u++; - return u; - }), a = B(() => r.value.matched[i.value]); - nt(Vn, B(() => i.value + 1)), nt(Ta, a), nt(Dt, r); - const l = V(); - return ue(() => [l.value, a.value, e.name], ([u, c, d], [f, p, v]) => { - c && (c.instances[d] = u, p && p !== c && u && u === f && (c.leaveGuards.size || (c.leaveGuards = p.leaveGuards), c.updateGuards.size || (c.updateGuards = p.updateGuards))), u && c && // if there is no instance but to and from are the same this might be - // the first visit - (!p || !ge(c, p) || !f) && (c.enterCallbacks[d] || []).forEach((m) => m(u)); - }, { flush: "post" }), () => { - const u = r.value, c = e.name, d = a.value, f = d && d.components[c]; - if (!f) - return Bn(n.default, { Component: f, route: u }); - const p = d.props[c], v = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null, w = mo(f, R({}, v, t, { - onVnodeUnmounted: (O) => { - O.component.isUnmounted && (d.instances[c] = null); - }, - ref: l - })); - if (process.env.NODE_ENV !== "production" && ae && w.ref) { - const O = { - depth: i.value, - name: d.name, - path: d.path, - meta: d.meta - }; - (K(w.ref) ? w.ref.map((M) => M.i) : [w.ref.i]).forEach((M) => { - M.__vrv_devtools = O; - }); - } - return ( - // pass the vnode to the slot as a prop. - // h and both accept vnodes - Bn(n.default, { Component: w, route: u }) || w - ); - }; - } -}); -function Bn(e, t) { - if (!e) - return null; - const n = e(t); - return n.length === 1 ? n[0] : n; -} -const Ha = Ua; -function Wa() { - const e = Ht(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type; - if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") { - const o = t === "KeepAlive" ? "keep-alive" : "transition"; - $(` can no longer be used directly inside or . -Use slot props instead: - - - <${o}> - - -`); - } -} -function Me(e, t) { - const n = R({}, e, { - // remove variables that can contain vue instances - matched: e.matched.map((o) => Xa(o, ["instances", "children", "aliasOf"])) - }); - return { - _custom: { - type: null, - readOnly: !0, - display: e.fullPath, - tooltip: t, - value: n - } - }; -} -function Ze(e) { - return { - _custom: { - display: e - } - }; -} -let Fa = 0; -function Ga(e, t, n) { - if (t.__hasDevtools) - return; - t.__hasDevtools = !0; - const o = Fa++; - zt({ - id: "org.vuejs.router" + (o ? "." + o : ""), - label: "Vue Router", - packageName: "vue-router", - homepage: "https://router.vuejs.org", - logo: "https://router.vuejs.org/logo.png", - componentStateTypes: ["Routing"], - app: e - }, (r) => { - typeof r.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), r.on.inspectComponent((c, d) => { - c.instanceData && c.instanceData.state.push({ - type: "Routing", - key: "$route", - editable: !1, - value: Me(t.currentRoute.value, "Current Route") - }); - }), r.on.visitComponentTree(({ treeNode: c, componentInstance: d }) => { - if (d.__vrv_devtools) { - const f = d.__vrv_devtools; - c.tags.push({ - label: (f.name ? `${f.name.toString()}: ` : "") + f.path, - textColor: 0, - tooltip: "This component is rendered by <router-view>", - backgroundColor: Ho - }); - } - K(d.__vrl_devtools) && (d.__devtoolsApi = r, d.__vrl_devtools.forEach((f) => { - let p = Go, v = ""; - f.isExactActive ? (p = Fo, v = "This is exactly active") : f.isActive && (p = Wo, v = "This link is active"), c.tags.push({ - label: f.route.path, - textColor: 0, - tooltip: v, - backgroundColor: p - }); - })); - }), ue(t.currentRoute, () => { - l(), r.notifyComponentUpdate(), r.sendInspectorTree(a), r.sendInspectorState(a); - }); - const s = "router:navigations:" + o; - r.addTimelineLayer({ - id: s, - label: `Router${o ? " " + o : ""} Navigations`, - color: 4237508 - }), t.onError((c, d) => { - r.addTimelineEvent({ - layerId: s, - event: { - title: "Error during Navigation", - subtitle: d.fullPath, - logType: "error", - time: r.now(), - data: { error: c }, - groupId: d.meta.__navigationId - } - }); - }); - let i = 0; - t.beforeEach((c, d) => { - const f = { - guard: Ze("beforeEach"), - from: Me(d, "Current Location during this navigation"), - to: Me(c, "Target location") - }; - Object.defineProperty(c.meta, "__navigationId", { - value: i++ - }), r.addTimelineEvent({ - layerId: s, - event: { - time: r.now(), - title: "Start of navigation", - subtitle: c.fullPath, - data: f, - groupId: c.meta.__navigationId - } - }); - }), t.afterEach((c, d, f) => { - const p = { - guard: Ze("afterEach") - }; - f ? (p.failure = { - _custom: { - type: Error, - readOnly: !0, - display: f ? f.message : "", - tooltip: "Navigation Failure", - value: f - } - }, p.status = Ze("❌")) : p.status = Ze("✅"), p.from = Me(d, "Current Location during this navigation"), p.to = Me(c, "Target location"), r.addTimelineEvent({ - layerId: s, - event: { - title: "End of navigation", - subtitle: c.fullPath, - time: r.now(), - data: p, - logType: f ? "warning" : "default", - groupId: c.meta.__navigationId - } - }); - }); - const a = "router-inspector:" + o; - r.addInspector({ - id: a, - label: "Routes" + (o ? " " + o : ""), - icon: "book", - treeFilterPlaceholder: "Search routes" - }); - function l() { - if (!u) - return; - const c = u; - let d = n.getRoutes().filter((f) => !f.parent || // these routes have a parent with no component which will not appear in the view - // therefore we still need to include them - !f.parent.record.components); - d.forEach(qo), c.filter && (d = d.filter((f) => ( - // save matches state based on the payload - Vt(f, c.filter.toLowerCase()) - ))), d.forEach((f) => Qo(f, t.currentRoute.value)), c.rootNodes = d.map(zo); - } - let u; - r.on.getInspectorTree((c) => { - u = c, c.app === e && c.inspectorId === a && l(); - }), r.on.getInspectorState((c) => { - if (c.app === e && c.inspectorId === a) { - const f = n.getRoutes().find((p) => p.record.__vd_id === c.nodeId); - f && (c.state = { - options: Qa(f) - }); - } - }), r.sendInspectorTree(a), r.sendInspectorState(a); - }); -} -function za(e) { - return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : ""; -} -function Qa(e) { - const { record: t } = e, n = [ - { editable: !1, key: "path", value: t.path } - ]; - return t.name != null && n.push({ - editable: !1, - key: "name", - value: t.name - }), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({ - editable: !1, - key: "keys", - value: { - _custom: { - type: null, - readOnly: !0, - display: e.keys.map((o) => `${o.name}${za(o)}`).join(" "), - tooltip: "Param keys", - value: e.keys - } - } - }), t.redirect != null && n.push({ - editable: !1, - key: "redirect", - value: t.redirect - }), e.alias.length && n.push({ - editable: !1, - key: "aliases", - value: e.alias.map((o) => o.record.path) - }), Object.keys(e.record.meta).length && n.push({ - editable: !1, - key: "meta", - value: e.record.meta - }), n.push({ - key: "score", - editable: !1, - value: { - _custom: { - type: null, - readOnly: !0, - display: e.score.map((o) => o.join(", ")).join(" | "), - tooltip: "Score used to sort routes", - value: e.score - } - } - }), n; -} -const Ho = 15485081, Wo = 2450411, Fo = 8702998, qa = 2282478, Go = 16486972, Ka = 6710886; -function zo(e) { - const t = [], { record: n } = e; - n.name != null && t.push({ - label: String(n.name), - textColor: 0, - backgroundColor: qa - }), n.aliasOf && t.push({ - label: "alias", - textColor: 0, - backgroundColor: Go - }), e.__vd_match && t.push({ - label: "matches", - textColor: 0, - backgroundColor: Ho - }), e.__vd_exactActive && t.push({ - label: "exact", - textColor: 0, - backgroundColor: Fo - }), e.__vd_active && t.push({ - label: "active", - textColor: 0, - backgroundColor: Wo - }), n.redirect && t.push({ - label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects", - textColor: 16777215, - backgroundColor: Ka - }); - let o = n.__vd_id; - return o == null && (o = String(Ja++), n.__vd_id = o), { - id: o, - label: n.path, - tags: t, - children: e.children.map(zo) - }; -} -let Ja = 0; -const Ya = /^\/(.*)\/([a-z]*)$/; -function Qo(e, t) { - const n = t.matched.length && ge(t.matched[t.matched.length - 1], e.record); - e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((o) => ge(o, e.record))), e.children.forEach((o) => Qo(o, t)); -} -function qo(e) { - e.__vd_match = !1, e.children.forEach(qo); -} -function Vt(e, t) { - const n = String(e.re).match(Ya); - if (e.__vd_match = !1, !n || n.length < 3) - return !1; - if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t)) - return e.children.forEach((i) => Vt(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1; - const r = e.record.path.toLowerCase(), s = Qe(r); - return !t.startsWith("/") && (s.includes(t) || r.includes(t)) || s.startsWith(t) || r.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => Vt(i, t)); -} -function Xa(e, t) { - const n = {}; - for (const o in e) - t.includes(o) || (n[o] = e[o]); - return n; -} -function Za(e) { - const t = fa(e.routes, e), n = e.parseQuery || Ra, o = e.stringifyQuery || Dn, r = e.history; - if (process.env.NODE_ENV !== "production" && !r) - throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.'); - const s = Ve(), i = Ve(), a = Ve(), l = br(pe); - let u = pe; - ae && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual"); - const c = bt.bind(null, (h) => "" + h), d = bt.bind(null, Na), f = ( - // @ts-expect-error: intentionally avoid the type check - bt.bind(null, Qe) - ); - function p(h, y) { - let g, _; - return To(h) ? (g = t.getRecordMatcher(h), _ = y) : _ = h, t.addRoute(_, g); - } - function v(h) { - const y = t.getRecordMatcher(h); - y ? t.removeRoute(y) : process.env.NODE_ENV !== "production" && $(`Cannot remove non-existent route "${String(h)}"`); - } - function m() { - return t.getRoutes().map((h) => h.record); - } - function w(h) { - return !!t.getRecordMatcher(h); - } - function O(h, y) { - if (y = R({}, y || l.value), typeof h == "string") { - const P = _t(n, h, y.path), L = t.resolve({ path: P.path }, y), we = r.createHref(P.fullPath); - return process.env.NODE_ENV !== "production" && (we.startsWith("//") ? $(`Location "${h}" resolved to "${we}". A resolved location cannot start with multiple slashes.`) : L.matched.length || $(`No match found for location with path "${h}"`)), R(P, L, { - params: f(L.params), - hash: Qe(P.hash), - redirectedFrom: void 0, - href: we - }); - } - let g; - if ("path" in h) - process.env.NODE_ENV !== "production" && "params" in h && !("name" in h) && // @ts-expect-error: the type is never - Object.keys(h.params).length && $(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), g = R({}, h, { - path: _t(n, h.path, y.path).path - }); - else { - const P = R({}, h.params); - for (const L in P) - P[L] == null && delete P[L]; - g = R({}, h, { - params: d(P) - }), y.params = d(y.params); - } - const _ = t.resolve(g, y), N = h.hash || ""; - process.env.NODE_ENV !== "production" && N && !N.startsWith("#") && $(`A \`hash\` should always start with the character "#". Replace "${N}" with "#${N}".`), _.params = c(f(_.params)); - const j = js(o, R({}, h, { - hash: Ca(N), - path: _.path - })), x = r.createHref(j); - return process.env.NODE_ENV !== "production" && (x.startsWith("//") ? $(`Location "${h}" resolved to "${x}". A resolved location cannot start with multiple slashes.`) : _.matched.length || $(`No match found for location with path "${"path" in h ? h.path : h}"`)), R({ - fullPath: j, - // keep the hash encoded so fullPath is effectively path + encodedQuery + - // hash - hash: N, - query: ( - // if the user is using a custom query lib like qs, we might have - // nested objects, so we keep the query as is, meaning it can contain - // numbers at `$route.query`, but at the point, the user will have to - // use their own type anyway. - // https://github.com/vuejs/router/issues/328#issuecomment-649481567 - o === Dn ? Aa(h.query) : h.query || {} - ) - }, _, { - redirectedFrom: void 0, - href: x - }); - } - function I(h) { - return typeof h == "string" ? _t(n, h, l.value.path) : R({}, h); - } - function M(h, y) { - if (u !== h) - return Te(8, { - from: y, - to: h - }); - } - function W(h) { - return S(h); - } - function J(h) { - return W(R(I(h), { replace: !0 })); - } - function Y(h) { - const y = h.matched[h.matched.length - 1]; - if (y && y.redirect) { - const { redirect: g } = y; - let _ = typeof g == "function" ? g(h) : g; - if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ = I(_) : ( - // force empty params - { path: _ } - ), _.params = {}), process.env.NODE_ENV !== "production" && !("path" in _) && !("name" in _)) - throw $(`Invalid redirect found: -${JSON.stringify(_, null, 2)} - when navigating to "${h.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect"); - return R({ - query: h.query, - hash: h.hash, - // avoid transferring params if the redirect has a path - params: "path" in _ ? {} : h.params - }, _); - } - } - function S(h, y) { - const g = u = O(h), _ = l.value, N = h.state, j = h.force, x = h.replace === !0, P = Y(g); - if (P) - return S( - R(I(P), { - state: typeof P == "object" ? R({}, N, P.state) : N, - force: j, - replace: x - }), - // keep original redirectedFrom if it exists - y || g - ); - const L = g; - L.redirectedFrom = y; - let we; - return !j && On(o, _, g) && (we = Te(16, { to: L, from: _ }), un( - _, - _, - // this is a push, the only way for it to be triggered from a - // history.listen is with a redirect, which makes it become a push - !0, - // This cannot be the first navigation because the initial location - // cannot be manually navigated to - !1 - )), (we ? Promise.resolve(we) : E(L, _)).catch((Q) => se(Q) ? ( - // navigation redirects still mark the router as ready - se( - Q, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - ) ? Q : mt(Q) - ) : ( - // reject any unknown error - G(Q, L, _) - )).then((Q) => { - if (Q) { - if (se( - Q, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - )) - return process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at - On(o, O(Q.to), L) && // and we have done it a couple of times - y && // @ts-expect-error: added only in dev - (y._count = y._count ? ( - // @ts-expect-error - y._count + 1 - ) : 1) > 30 ? ($(`Detected a possibly infinite redirection in a navigation guard when going from "${_.fullPath}" to "${L.fullPath}". Aborting to avoid a Stack Overflow. - Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : S( - // keep options - R({ - // preserve an existing replacement but allow the redirect to override it - replace: x - }, I(Q.to), { - state: typeof Q.to == "object" ? R({}, N, Q.to.state) : N, - force: j - }), - // preserve the original redirectedFrom if any - y || L - ); - } else - Q = D(L, _, !0, x, N); - return b(L, _, Q), Q; - }); - } - function ln(h, y) { - const g = M(h, y); - return g ? Promise.reject(g) : Promise.resolve(); - } - function ee(h) { - const y = Je.values().next().value; - return y && typeof y.runWithContext == "function" ? y.runWithContext(h) : h(); - } - function E(h, y) { - let g; - const [_, N, j] = ei(h, y); - g = Et(_.reverse(), "beforeRouteLeave", h, y); - for (const P of _) - P.leaveGuards.forEach((L) => { - g.push(he(L, h, y)); - }); - const x = ln.bind(null, h, y); - return g.push(x), xe(g).then(() => { - g = []; - for (const P of s.list()) - g.push(he(P, h, y)); - return g.push(x), xe(g); - }).then(() => { - g = Et(N, "beforeRouteUpdate", h, y); - for (const P of N) - P.updateGuards.forEach((L) => { - g.push(he(L, h, y)); - }); - return g.push(x), xe(g); - }).then(() => { - g = []; - for (const P of j) - if (P.beforeEnter) - if (K(P.beforeEnter)) - for (const L of P.beforeEnter) - g.push(he(L, h, y)); - else - g.push(he(P.beforeEnter, h, y)); - return g.push(x), xe(g); - }).then(() => (h.matched.forEach((P) => P.enterCallbacks = {}), g = Et(j, "beforeRouteEnter", h, y), g.push(x), xe(g))).then(() => { - g = []; - for (const P of i.list()) - g.push(he(P, h, y)); - return g.push(x), xe(g); - }).catch((P) => se( - P, - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ) ? P : Promise.reject(P)); - } - function b(h, y, g) { - a.list().forEach((_) => ee(() => _(h, y, g))); - } - function D(h, y, g, _, N) { - const j = M(h, y); - if (j) - return j; - const x = y === pe, P = ae ? history.state : {}; - g && (_ || x ? r.replace(h.fullPath, R({ - scroll: x && P && P.scroll - }, N)) : r.push(h.fullPath, N)), l.value = h, un(h, y, g, x), mt(); - } - let U; - function ye() { - U || (U = r.listen((h, y, g) => { - const _ = O(h), N = Y(_); - if (N) { - S(R(N, { replace: !0 }), _).catch(Ue); - return; - } - u = _; - const j = l.value; - ae && Qs(Pn(j.fullPath, g.delta), ft()), E(_, j).catch((x) => se( - x, - 12 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ) ? x : se( - x, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - ) ? (S( - x.to, - _ - // avoid an uncaught rejection, let push call triggerError - ).then((P) => { - se( - P, - 20 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - ) && !g.delta && g.type === ze.pop && r.go(-1, !1); - }).catch(Ue), Promise.reject()) : (g.delta && r.go(-g.delta, !1), G(x, _, j))).then((x) => { - x = x || D( - // after navigation, all matched components are resolved - _, - j, - !1 - ), x && (g.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history - // entry while a different route is displayed - !se( - x, - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ) ? r.go(-g.delta, !1) : g.type === ze.pop && se( - x, - 20 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - ) && r.go(-1, !1)), b(_, j, x); - }).catch(Ue); - })); - } - let De = Ve(), Ke = Ve(), ne; - function G(h, y, g) { - mt(h); - const _ = Ke.list(); - return _.length ? _.forEach((N) => N(h, y, g)) : (process.env.NODE_ENV !== "production" && $("uncaught error during route navigation:"), console.error(h)), Promise.reject(h); - } - function gr() { - return ne && l.value !== pe ? Promise.resolve() : new Promise((h, y) => { - De.add([h, y]); - }); - } - function mt(h) { - return ne || (ne = !h, ye(), De.list().forEach(([y, g]) => h ? g(h) : y()), De.reset()), h; - } - function un(h, y, g, _) { - const { scrollBehavior: N } = e; - if (!ae || !N) - return Promise.resolve(); - const j = !g && qs(Pn(h.fullPath, 0)) || (_ || !g) && history.state && history.state.scroll || null; - return Fe().then(() => N(h, y, j)).then((x) => x && zs(x)).catch((x) => G(x, h, y)); - } - const vt = (h) => r.go(h); - let gt; - const Je = /* @__PURE__ */ new Set(), yr = { - currentRoute: l, - listening: !0, - addRoute: p, - removeRoute: v, - hasRoute: w, - getRoutes: m, - resolve: O, - options: e, - push: W, - replace: J, - go: vt, - back: () => vt(-1), - forward: () => vt(1), - beforeEach: s.add, - beforeResolve: i.add, - afterEach: a.add, - onError: Ke.add, - isReady: gr, - install(h) { - const y = this; - h.component("RouterLink", La), h.component("RouterView", Ha), h.config.globalProperties.$router = y, Object.defineProperty(h.config.globalProperties, "$route", { - enumerable: !0, - get: () => k(l) - }), ae && // used for the initial navigation client side to avoid pushing - // multiple times when the router is used in multiple apps - !gt && l.value === pe && (gt = !0, W(r.location).catch((N) => { - process.env.NODE_ENV !== "production" && $("Unexpected error when starting the router:", N); - })); - const g = {}; - for (const N in pe) - Object.defineProperty(g, N, { - get: () => l.value[N], - enumerable: !0 - }); - h.provide(Jt, y), h.provide(Uo, Er(g)), h.provide(Dt, l); - const _ = h.unmount; - Je.add(h), h.unmount = function() { - Je.delete(h), Je.size < 1 && (u = pe, U && U(), U = null, l.value = pe, gt = !1, ne = !1), _(); - }, process.env.NODE_ENV !== "production" && ae && Ga(h, y, t); - } - }; - function xe(h) { - return h.reduce((y, g) => y.then(() => ee(g)), Promise.resolve()); - } - return yr; -} -function ei(e, t) { - const n = [], o = [], r = [], s = Math.max(t.matched.length, e.matched.length); - for (let i = 0; i < s; i++) { - const a = t.matched[i]; - a && (e.matched.find((u) => ge(u, a)) ? o.push(a) : n.push(a)); - const l = e.matched[i]; - l && (t.matched.find((u) => ge(u, l)) || r.push(l)); - } - return [n, o, r]; -} -Za({ - history: Xs(), - routes: [] -}); -function ti(e) { - return e && typeof e.then == "function"; -} -Promise.resolve(!1); -Promise.resolve(!0); -var Oe = Promise.resolve(); -function Ko(e, t) { - return e || (e = 0), new Promise(function(n) { - return setTimeout(function() { - return n(t); - }, e); - }); -} -function ni(e, t) { - return Math.floor(Math.random() * (t - e + 1) + e); -} -function Yt() { - return Math.random().toString(36).substring(2); -} -var Un = 0, kt = 0; -function pt() { - var e = (/* @__PURE__ */ new Date()).getTime(); - return e === Un ? (kt++, e * 1e3 + kt) : (Un = e, kt = 0, e * 1e3); -} -var oi = pt, ri = "native"; -function si(e) { - var t = { - messagesCallback: null, - bc: new BroadcastChannel(e), - subFns: [] - // subscriberFunctions - }; - return t.bc.onmessage = function(n) { - t.messagesCallback && t.messagesCallback(n.data); - }, t; -} -function ai(e) { - e.bc.close(), e.subFns = []; -} -function ii(e, t) { - try { - return e.bc.postMessage(t, !1), Oe; - } catch (n) { - return Promise.reject(n); - } -} -function ci(e, t) { - e.messagesCallback = t; -} -function li() { - if (typeof window > "u") - return !1; - if (typeof BroadcastChannel == "function") { - if (BroadcastChannel._pubkey) - throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill"); - return !0; - } else - return !1; -} -function ui() { - return 150; -} -var di = { - create: si, - close: ai, - onMessage: ci, - postMessage: ii, - canBeUsed: li, - type: ri, - averageResponseTime: ui, - microSeconds: oi -}, Jo = ( - /** @class */ - function() { - function e(t) { - this.ttl = t, this.map = /* @__PURE__ */ new Map(), this._to = !1; - } - return e.prototype.has = function(t) { - return this.map.has(t); - }, e.prototype.add = function(t) { - var n = this; - this.map.set(t, Yo()), this._to || (this._to = !0, setTimeout(function() { - n._to = !1, fi(n); - }, 0)); - }, e.prototype.clear = function() { - this.map.clear(); - }, e; - }() -); -function fi(e) { - for (var t = Yo() - e.ttl, n = e.map[Symbol.iterator](); ; ) { - var o = n.next().value; - if (!o) - return; - var r = o[0], s = o[1]; - if (s < t) - e.map.delete(r); - else - return; - } -} -function Yo() { - return (/* @__PURE__ */ new Date()).getTime(); -} -function Xt() { - var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = JSON.parse(JSON.stringify(e)); - return typeof t.webWorkerSupport > "u" && (t.webWorkerSupport = !0), t.idb || (t.idb = {}), t.idb.ttl || (t.idb.ttl = 1e3 * 45), t.idb.fallbackInterval || (t.idb.fallbackInterval = 150), e.idb && typeof e.idb.onclose == "function" && (t.idb.onclose = e.idb.onclose), t.localstorage || (t.localstorage = {}), t.localstorage.removeTimeout || (t.localstorage.removeTimeout = 1e3 * 60), e.methods && (t.methods = e.methods), t.node || (t.node = {}), t.node.ttl || (t.node.ttl = 1e3 * 60 * 2), t.node.maxParallelWrites || (t.node.maxParallelWrites = 2048), typeof t.node.useFastPath > "u" && (t.node.useFastPath = !0), t; -} -var pi = pt, hi = "pubkey.broadcast-channel-0-", le = "messages", ht = { - durability: "relaxed" -}, mi = "idb"; -function Xo() { - if (typeof indexedDB < "u") - return indexedDB; - if (typeof window < "u") { - if (typeof window.mozIndexedDB < "u") - return window.mozIndexedDB; - if (typeof window.webkitIndexedDB < "u") - return window.webkitIndexedDB; - if (typeof window.msIndexedDB < "u") - return window.msIndexedDB; - } - return !1; -} -function Zt(e) { - e.commit && e.commit(); -} -function vi(e) { - var t = Xo(), n = hi + e, o = t.open(n); - return o.onupgradeneeded = function(r) { - var s = r.target.result; - s.createObjectStore(le, { - keyPath: "id", - autoIncrement: !0 - }); - }, new Promise(function(r, s) { - o.onerror = function(i) { - return s(i); - }, o.onsuccess = function() { - r(o.result); - }; - }); -} -function gi(e, t, n) { - var o = (/* @__PURE__ */ new Date()).getTime(), r = { - uuid: t, - time: o, - data: n - }, s = e.transaction([le], "readwrite", ht); - return new Promise(function(i, a) { - s.oncomplete = function() { - return i(); - }, s.onerror = function(u) { - return a(u); - }; - var l = s.objectStore(le); - l.add(r), Zt(s); - }); -} -function yi(e, t) { - var n = e.transaction(le, "readonly", ht), o = n.objectStore(le), r = [], s = IDBKeyRange.bound(t + 1, 1 / 0); - if (o.getAll) { - var i = o.getAll(s); - return new Promise(function(l, u) { - i.onerror = function(c) { - return u(c); - }, i.onsuccess = function(c) { - l(c.target.result); - }; - }); - } - function a() { - try { - return s = IDBKeyRange.bound(t + 1, 1 / 0), o.openCursor(s); - } catch { - return o.openCursor(); - } - } - return new Promise(function(l, u) { - var c = a(); - c.onerror = function(d) { - return u(d); - }, c.onsuccess = function(d) { - var f = d.target.result; - f ? f.value.id < t + 1 ? f.continue(t + 1) : (r.push(f.value), f.continue()) : (Zt(n), l(r)); - }; - }); -} -function wi(e, t) { - if (e.closed) - return Promise.resolve([]); - var n = e.db.transaction(le, "readwrite", ht), o = n.objectStore(le); - return Promise.all(t.map(function(r) { - var s = o.delete(r); - return new Promise(function(i) { - s.onsuccess = function() { - return i(); - }; - }); - })); -} -function bi(e, t) { - var n = (/* @__PURE__ */ new Date()).getTime() - t, o = e.transaction(le, "readonly", ht), r = o.objectStore(le), s = []; - return new Promise(function(i) { - r.openCursor().onsuccess = function(a) { - var l = a.target.result; - if (l) { - var u = l.value; - u.time < n ? (s.push(u), l.continue()) : (Zt(o), i(s)); - } else - i(s); - }; - }); -} -function _i(e) { - return bi(e.db, e.options.idb.ttl).then(function(t) { - return wi(e, t.map(function(n) { - return n.id; - })); - }); -} -function Ei(e, t) { - return t = Xt(t), vi(e).then(function(n) { - var o = { - closed: !1, - lastCursorId: 0, - channelName: e, - options: t, - uuid: Yt(), - /** - * emittedMessagesIds - * contains all messages that have been emitted before - * @type {ObliviousSet} - */ - eMIs: new Jo(t.idb.ttl * 2), - // ensures we do not read messages in parallel - writeBlockPromise: Oe, - messagesCallback: null, - readQueuePromises: [], - db: n - }; - return n.onclose = function() { - o.closed = !0, t.idb.onclose && t.idb.onclose(); - }, Zo(o), o; - }); -} -function Zo(e) { - e.closed || er(e).then(function() { - return Ko(e.options.idb.fallbackInterval); - }).then(function() { - return Zo(e); - }); -} -function ki(e, t) { - return !(e.uuid === t.uuid || t.eMIs.has(e.id) || e.data.time < t.messagesCallbackTime); -} -function er(e) { - return e.closed || !e.messagesCallback ? Oe : yi(e.db, e.lastCursorId).then(function(t) { - var n = t.filter(function(o) { - return !!o; - }).map(function(o) { - return o.id > e.lastCursorId && (e.lastCursorId = o.id), o; - }).filter(function(o) { - return ki(o, e); - }).sort(function(o, r) { - return o.time - r.time; - }); - return n.forEach(function(o) { - e.messagesCallback && (e.eMIs.add(o.id), e.messagesCallback(o.data)); - }), Oe; - }); -} -function Si(e) { - e.closed = !0, e.db.close(); -} -function Oi(e, t) { - return e.writeBlockPromise = e.writeBlockPromise.then(function() { - return gi(e.db, e.uuid, t); - }).then(function() { - ni(0, 10) === 0 && _i(e); - }), e.writeBlockPromise; -} -function Ii(e, t, n) { - e.messagesCallbackTime = n, e.messagesCallback = t, er(e); -} -function Pi() { - return !!Xo(); -} -function Ci(e) { - return e.idb.fallbackInterval * 2; -} -var xi = { - create: Ei, - close: Si, - onMessage: Ii, - postMessage: Oi, - canBeUsed: Pi, - type: mi, - averageResponseTime: Ci, - microSeconds: pi -}, $i = pt, Ni = "pubkey.broadcastChannel-", Ri = "localstorage"; -function tr() { - var e; - if (typeof window > "u") - return null; - try { - e = window.localStorage, e = window["ie8-eventlistener/storage"] || window.localStorage; - } catch { - } - return e; -} -function nr(e) { - return Ni + e; -} -function Ai(e, t) { - return new Promise(function(n) { - Ko().then(function() { - var o = nr(e.channelName), r = { - token: Yt(), - time: (/* @__PURE__ */ new Date()).getTime(), - data: t, - uuid: e.uuid - }, s = JSON.stringify(r); - tr().setItem(o, s); - var i = document.createEvent("Event"); - i.initEvent("storage", !0, !0), i.key = o, i.newValue = s, window.dispatchEvent(i), n(); - }); - }); -} -function Ti(e, t) { - var n = nr(e), o = function(s) { - s.key === n && t(JSON.parse(s.newValue)); - }; - return window.addEventListener("storage", o), o; -} -function Di(e) { - window.removeEventListener("storage", e); -} -function Vi(e, t) { - if (t = Xt(t), !or()) - throw new Error("BroadcastChannel: localstorage cannot be used"); - var n = Yt(), o = new Jo(t.localstorage.removeTimeout), r = { - channelName: e, - uuid: n, - eMIs: o - // emittedMessagesIds - }; - return r.listener = Ti(e, function(s) { - r.messagesCallback && s.uuid !== n && (!s.token || o.has(s.token) || s.data.time && s.data.time < r.messagesCallbackTime || (o.add(s.token), r.messagesCallback(s.data))); - }), r; -} -function Mi(e) { - Di(e.listener); -} -function Li(e, t, n) { - e.messagesCallbackTime = n, e.messagesCallback = t; -} -function or() { - var e = tr(); - if (!e) - return !1; - try { - var t = "__broadcastchannel_check"; - e.setItem(t, "works"), e.removeItem(t); - } catch { - return !1; - } - return !0; -} -function ji() { - var e = 120, t = navigator.userAgent.toLowerCase(); - return t.includes("safari") && !t.includes("chrome") ? e * 2 : e; -} -var Bi = { - create: Vi, - close: Mi, - onMessage: Li, - postMessage: Ai, - canBeUsed: or, - type: Ri, - averageResponseTime: ji, - microSeconds: $i -}, Ui = pt, Hi = "simulate", en = /* @__PURE__ */ new Set(); -function Wi(e) { - var t = { - name: e, - messagesCallback: null - }; - return en.add(t), t; -} -function Fi(e) { - en.delete(e); -} -function Gi(e, t) { - return new Promise(function(n) { - return setTimeout(function() { - var o = Array.from(en); - o.filter(function(r) { - return r.name === e.name; - }).filter(function(r) { - return r !== e; - }).filter(function(r) { - return !!r.messagesCallback; - }).forEach(function(r) { - return r.messagesCallback(t); - }), n(); - }, 5); - }); -} -function zi(e, t) { - e.messagesCallback = t; -} -function Qi() { - return !0; -} -function qi() { - return 5; -} -var Ki = { - create: Wi, - close: Fi, - onMessage: zi, - postMessage: Gi, - canBeUsed: Qi, - type: Hi, - averageResponseTime: qi, - microSeconds: Ui -}, Hn = [ - di, - // fastest - xi, - Bi -]; -function Ji(e) { - var t = [].concat(e.methods, Hn).filter(Boolean); - if (e.type) { - if (e.type === "simulate") - return Ki; - var n = t.find(function(r) { - return r.type === e.type; - }); - if (n) - return n; - throw new Error("method-type " + e.type + " not found"); - } - e.webWorkerSupport || (t = t.filter(function(r) { - return r.type !== "idb"; - })); - var o = t.find(function(r) { - return r.canBeUsed(); - }); - if (o) - return o; - throw new Error("No usable method found in " + JSON.stringify(Hn.map(function(r) { - return r.type; - }))); -} -var rr = /* @__PURE__ */ new Set(), Yi = 0, tn = function(t, n) { - this.id = Yi++, rr.add(this), this.name = t, this.options = Xt(n), this.method = Ji(this.options), this._iL = !1, this._onML = null, this._addEL = { - message: [], - internal: [] - }, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, Xi(this); -}; -tn._pubkey = !0; -tn.prototype = { - postMessage: function(t) { - if (this.closed) - throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /** - * In the past when this error appeared, it was really hard to debug. - * So now we log the msg together with the error so it at least - * gives some clue about where in your application this happens. - */ - JSON.stringify(t)); - return Wn(this, "message", t); - }, - postInternal: function(t) { - return Wn(this, "internal", t); - }, - set onmessage(e) { - var t = this.method.microSeconds(), n = { - time: t, - fn: e - }; - Gn(this, "message", this._onML), e && typeof e == "function" ? (this._onML = n, Fn(this, "message", n)) : this._onML = null; - }, - addEventListener: function(t, n) { - var o = this.method.microSeconds(), r = { - time: o, - fn: n - }; - Fn(this, t, r); - }, - removeEventListener: function(t, n) { - var o = this._addEL[t].find(function(r) { - return r.fn === n; - }); - Gn(this, t, o); - }, - close: function() { - var t = this; - if (!this.closed) { - rr.delete(this), this.closed = !0; - var n = this._prepP ? this._prepP : Oe; - return this._onML = null, this._addEL.message = [], n.then(function() { - return Promise.all(Array.from(t._uMP)); - }).then(function() { - return Promise.all(t._befC.map(function(o) { - return o(); - })); - }).then(function() { - return t.method.close(t._state); - }); - } - }, - get type() { - return this.method.type; - }, - get isClosed() { - return this.closed; - } -}; -function Wn(e, t, n) { - var o = e.method.microSeconds(), r = { - time: o, - type: t, - data: n - }, s = e._prepP ? e._prepP : Oe; - return s.then(function() { - var i = e.method.postMessage(e._state, r); - return e._uMP.add(i), i.catch().then(function() { - return e._uMP.delete(i); - }), i; - }); -} -function Xi(e) { - var t = e.method.create(e.name, e.options); - ti(t) ? (e._prepP = t, t.then(function(n) { - e._state = n; - })) : e._state = t; -} -function sr(e) { - return e._addEL.message.length > 0 || e._addEL.internal.length > 0; -} -function Fn(e, t, n) { - e._addEL[t].push(n), Zi(e); -} -function Gn(e, t, n) { - e._addEL[t] = e._addEL[t].filter(function(o) { - return o !== n; - }), ec(e); -} -function Zi(e) { - if (!e._iL && sr(e)) { - var t = function(r) { - e._addEL[r.type].forEach(function(s) { - var i = 1e5, a = s.time - i; - r.time >= a && s.fn(r.data); - }); - }, n = e.method.microSeconds(); - e._prepP ? e._prepP.then(function() { - e._iL = !0, e.method.onMessage(e._state, t, n); - }) : (e._iL = !0, e.method.onMessage(e._state, t, n)); - } -} -function ec(e) { - if (e._iL && !sr(e)) { - e._iL = !1; - var t = e.method.microSeconds(); - e.method.onMessage(e._state, null, t); - } -} -class St extends Error { - /** - * @param {string} message - * @param {string[]} keys - */ - constructor(t, n) { - super(t), this.name = "DevalueError", this.path = n.join(""); - } -} -function zn(e) { - return Object(e) !== e; -} -const tc = /* @__PURE__ */ Object.getOwnPropertyNames( - Object.prototype -).sort().join("\0"); -function nc(e) { - const t = Object.getPrototypeOf(e); - return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === tc; -} -function oc(e) { - return Object.prototype.toString.call(e).slice(8, -1); -} -function rc(e) { - switch (e) { - case '"': - return '\\"'; - case "<": - return "\\u003C"; - case "\\": - return "\\\\"; - case ` -`: - return "\\n"; - case "\r": - return "\\r"; - case " ": - return "\\t"; - case "\b": - return "\\b"; - case "\f": - return "\\f"; - case "\u2028": - return "\\u2028"; - case "\u2029": - return "\\u2029"; - default: - return e < " " ? `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; - } -} -function Ae(e) { - let t = "", n = 0; - const o = e.length; - for (let r = 0; r < o; r += 1) { - const s = e[r], i = rc(s); - i && (t += e.slice(n, r) + i, n = r + 1); - } - return `"${n === 0 ? e : t + e.slice(n)}"`; -} -const nn = -1, ar = -2, ir = -3, cr = -4, lr = -5, on = -6; -function Qn(e, t) { - return sc(JSON.parse(e), t); -} -function sc(e, t) { - if (typeof e == "number") - return r(e, !0); - if (!Array.isArray(e) || e.length === 0) - throw new Error("Invalid input"); - const n = ( - /** @type {any[]} */ - e - ), o = Array(n.length); - function r(s, i = !1) { - if (s === nn) - return; - if (s === ir) - return NaN; - if (s === cr) - return 1 / 0; - if (s === lr) - return -1 / 0; - if (s === on) - return -0; - if (i) - throw new Error("Invalid input"); - if (s in o) - return o[s]; - const a = n[s]; - if (!a || typeof a != "object") - o[s] = a; - else if (Array.isArray(a)) - if (typeof a[0] == "string") { - const l = a[0], u = t == null ? void 0 : t[l]; - if (u) - return o[s] = u(r(a[1])); - switch (l) { - case "Date": - o[s] = new Date(a[1]); - break; - case "Set": - const c = /* @__PURE__ */ new Set(); - o[s] = c; - for (let p = 1; p < a.length; p += 1) - c.add(r(a[p])); - break; - case "Map": - const d = /* @__PURE__ */ new Map(); - o[s] = d; - for (let p = 1; p < a.length; p += 2) - d.set(r(a[p]), r(a[p + 1])); - break; - case "RegExp": - o[s] = new RegExp(a[1], a[2]); - break; - case "Object": - o[s] = Object(a[1]); - break; - case "BigInt": - o[s] = BigInt(a[1]); - break; - case "null": - const f = /* @__PURE__ */ Object.create(null); - o[s] = f; - for (let p = 1; p < a.length; p += 2) - f[a[p]] = r(a[p + 1]); - break; - default: - throw new Error(`Unknown type ${l}`); - } - } else { - const l = new Array(a.length); - o[s] = l; - for (let u = 0; u < a.length; u += 1) { - const c = a[u]; - c !== ar && (l[u] = r(c)); - } - } - else { - const l = {}; - o[s] = l; - for (const u in a) { - const c = a[u]; - l[u] = r(c); - } - } - return o[s]; - } - return r(0); -} -function qn(e, t) { - const n = [], o = /* @__PURE__ */ new Map(), r = []; - for (const u in t) - r.push({ key: u, fn: t[u] }); - const s = []; - let i = 0; - function a(u) { - if (typeof u == "function") - throw new St("Cannot stringify a function", s); - if (o.has(u)) - return o.get(u); - if (u === void 0) - return nn; - if (Number.isNaN(u)) - return ir; - if (u === 1 / 0) - return cr; - if (u === -1 / 0) - return lr; - if (u === 0 && 1 / u < 0) - return on; - const c = i++; - o.set(u, c); - for (const { key: f, fn: p } of r) { - const v = p(u); - if (v) - return n[c] = `["${f}",${a(v)}]`, c; - } - let d = ""; - if (zn(u)) - d = Ot(u); - else - switch (oc(u)) { - case "Number": - case "String": - case "Boolean": - d = `["Object",${Ot(u)}]`; - break; - case "BigInt": - d = `["BigInt",${u}]`; - break; - case "Date": - d = `["Date","${u.toISOString()}"]`; - break; - case "RegExp": - const { source: p, flags: v } = u; - d = v ? `["RegExp",${Ae(p)},"${v}"]` : `["RegExp",${Ae(p)}]`; - break; - case "Array": - d = "["; - for (let m = 0; m < u.length; m += 1) - m > 0 && (d += ","), m in u ? (s.push(`[${m}]`), d += a(u[m]), s.pop()) : d += ar; - d += "]"; - break; - case "Set": - d = '["Set"'; - for (const m of u) - d += `,${a(m)}`; - d += "]"; - break; - case "Map": - d = '["Map"'; - for (const [m, w] of u) - s.push( - `.get(${zn(m) ? Ot(m) : "..."})` - ), d += `,${a(m)},${a(w)}`; - d += "]"; - break; - default: - if (!nc(u)) - throw new St( - "Cannot stringify arbitrary non-POJOs", - s - ); - if (Object.getOwnPropertySymbols(u).length > 0) - throw new St( - "Cannot stringify POJOs with symbolic keys", - s - ); - if (Object.getPrototypeOf(u) === null) { - d = '["null"'; - for (const m in u) - s.push(`.${m}`), d += `,${Ae(m)},${a(u[m])}`, s.pop(); - d += "]"; - } else { - d = "{"; - let m = !1; - for (const w in u) - m && (d += ","), m = !0, s.push(`.${w}`), d += `${Ae(w)}:${a(u[w])}`, s.pop(); - d += "}"; - } - } - return n[c] = d, c; - } - const l = a(e); - return l < 0 ? `${l}` : `[${n.join(",")}]`; -} -function Ot(e) { - const t = typeof e; - return t === "string" ? Ae(e) : e instanceof String ? Ae(e.toString()) : e === void 0 ? nn.toString() : e === 0 && 1 / e < 0 ? on.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e); -} -function ac(e, t, { initialize: n, type: o }) { - let r = `${t.$id}-${e.toString()}`, s = new tn(r, { type: o }), i = !1, a = 0; - ue(() => t[e], (c) => { - i || (a = Date.now(), s.postMessage({ timestamp: a, state: Qn(qn(c)) })), i = !1; - }, { deep: !0 }), s.onmessage = (c) => { - if (c === void 0) { - s.postMessage({ timestamp: a, state: Qn(qn(t[e])) }); - return; - } - c.timestamp <= a || (i = !0, a = c.timestamp, t[e] = c.state); - }; - let l = () => s.postMessage(void 0), u = () => s.close(); - return n && l(), { sync: l, unshare: u }; -} -var ic = (e, t) => Object.keys(t).includes(e), cc = ({ initialize: e = !0, enable: t = !0, type: n }) => ({ store: o, options: r }) => { - var s, i; - let a = ((s = r == null ? void 0 : r.share) == null ? void 0 : s.enable) ?? t, l = ((i = r == null ? void 0 : r.share) == null ? void 0 : i.omit) ?? []; - !a || Object.keys(o.$state).forEach((u) => { - var c; - l.includes(u) || !ic(u, o.$state) || ac(u, o, { initialize: ((c = r == null ? void 0 : r.share) == null ? void 0 : c.initialize) ?? e, type: n }); - }); -}; -const lc = $s(); -lc.use( - cc({ - enable: !0, - initialize: !0 - }) -); -const uc = /* @__PURE__ */ q({ - __name: "Doctype", - setup(e) { - const { stonecrop: t, isReady: n } = No(), o = V([]); - return ue(n, () => { - if (n.value) { - let r = t.value.schema.schema.toArray(); - r.forEach((s, i) => { - const l = t.value.store.record[s.fieldname]; - r[i].value = l; - }), o.value = r; - } - }), (r, s) => k(n) ? (C(), Se(k(es), { - key: 0, - class: "aform-main", - modelValue: o.value, - "onUpdate:modelValue": s[0] || (s[0] = (i) => o.value = i) - }, null, 8, ["modelValue"])) : ke("", !0); - } -}); -var Kn; -const ur = typeof window < "u", dc = (e) => typeof e == "string", fc = () => { -}; -ur && (Kn = window == null ? void 0 : window.navigator) != null && Kn.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function dr(e) { - return typeof e == "function" ? e() : k(e); -} -function pc(e) { - return e; -} -function hc(e) { - return po() ? (ho(e), !0) : !1; -} -function Mt(e) { - var t; - const n = dr(e); - return (t = n == null ? void 0 : n.$el) != null ? t : n; -} -const fr = ur ? window : void 0; -function mc(...e) { - let t, n, o, r; - if (dc(e[0]) || Array.isArray(e[0]) ? ([n, o, r] = e, t = fr) : [t, n, o, r] = e, !t) - return fc; - Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]); - const s = [], i = () => { - s.forEach((c) => c()), s.length = 0; - }, a = (c, d, f, p) => (c.addEventListener(d, f, p), () => c.removeEventListener(d, f, p)), l = ue(() => [Mt(t), dr(r)], ([c, d]) => { - i(), c && s.push(...n.flatMap((f) => o.map((p) => a(c, f, p, d)))); - }, { immediate: !0, flush: "post" }), u = () => { - l(), i(); - }; - return hc(u), u; -} -const Jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Yn = "__vueuse_ssr_handlers__"; -Jn[Yn] = Jn[Yn] || {}; -function vc(e, { window: t = fr, scrollTarget: n } = {}) { - const o = V(!1), r = () => { - if (!t) - return; - const s = t.document, i = Mt(e); - if (!i) - o.value = !1; - else { - const a = i.getBoundingClientRect(); - o.value = a.top <= (t.innerHeight || s.documentElement.clientHeight) && a.left <= (t.innerWidth || s.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0; - } - }; - return ue(() => Mt(e), () => r(), { immediate: !0, flush: "post" }), t && mc(n || t, "scroll", r, { - capture: !1, - passive: !0 - }), o; -} -var Xn; -(function(e) { - e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; -})(Xn || (Xn = {})); -var gc = Object.defineProperty, Zn = Object.getOwnPropertySymbols, yc = Object.prototype.hasOwnProperty, wc = Object.prototype.propertyIsEnumerable, eo = (e, t, n) => t in e ? gc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, bc = (e, t) => { - for (var n in t || (t = {})) - yc.call(t, n) && eo(e, n, t[n]); - if (Zn) - for (var n of Zn(t)) - wc.call(t, n) && eo(e, n, t[n]); - return e; -}; -const _c = { - 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] -}; -bc({ - linear: pc -}, _c); -const de = (e) => { - let t = vc(e).value; - return t = t && e.offsetHeight > 0, t; -}, fe = (e) => e.tabIndex >= 0, to = (e) => { - const t = e.target; - return rn(t); -}, rn = (e) => { - var t; - let n; - if (e instanceof HTMLTableCellElement) { - const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; - if (o) { - const r = Array.from(o.children)[e.cellIndex]; - r && (n = r); - } - } else if (e instanceof HTMLTableRowElement) { - const o = e.previousElementSibling; - o && (n = o); - } - return n && (!fe(n) || !de(n)) ? rn(n) : n; -}, Ec = (e) => { - var t; - const n = e.target; - let o; - if (n instanceof HTMLTableCellElement) { - const r = (t = n.parentElement) == null ? void 0 : t.parentElement; - if (r) { - const s = r.firstElementChild.children[n.cellIndex]; - s && (o = s); - } - } else if (n instanceof HTMLTableRowElement) { - const r = n.parentElement; - if (r) { - const s = r.firstElementChild; - s && (o = s); - } - } - return o && (!fe(o) || !de(o)) ? sn(o) : o; -}, no = (e) => { - const t = e.target; - return sn(t); -}, sn = (e) => { - var t; - let n; - if (e instanceof HTMLTableCellElement) { - const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; - if (o) { - const r = Array.from(o.children)[e.cellIndex]; - r && (n = r); - } - } else if (e instanceof HTMLTableRowElement) { - const o = e.nextElementSibling; - o && (n = o); - } - return n && (!fe(n) || !de(n)) ? sn(n) : n; -}, kc = (e) => { - var t; - const n = e.target; - let o; - if (n instanceof HTMLTableCellElement) { - const r = (t = n.parentElement) == null ? void 0 : t.parentElement; - if (r) { - const s = r.lastElementChild.children[n.cellIndex]; - s && (o = s); - } - } else if (n instanceof HTMLTableRowElement) { - const r = n.parentElement; - if (r) { - const s = r.lastElementChild; - s && (o = s); - } - } - return o && (!fe(o) || !de(o)) ? rn(o) : o; -}, oo = (e) => { - const t = e.target; - return an(t); -}, an = (e) => { - var t; - let n; - if (e.previousElementSibling) - n = e.previousElementSibling; - else { - const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; - n = o == null ? void 0 : o.lastElementChild; - } - return n && (!fe(n) || !de(n)) ? an(n) : n; -}, ro = (e) => { - const t = e.target; - return cn(t); -}, cn = (e) => { - var t; - let n; - if (e.nextElementSibling) - n = e.nextElementSibling; - else { - const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; - n = o == null ? void 0 : o.firstElementChild; - } - return n && (!fe(n) || !de(n)) ? cn(n) : n; -}, so = (e) => { - const t = e.target.parentElement.firstElementChild; - return t && (!fe(t) || !de(t)) ? cn(t) : t; -}, ao = (e) => { - const t = e.target.parentElement.lastElementChild; - return t && (!fe(t) || !de(t)) ? an(t) : t; -}, et = ["alt", "control", "shift", "meta"], Sc = { - ArrowUp: "up", - ArrowDown: "down", - ArrowLeft: "left", - ArrowRight: "right" -}, pr = { - "keydown.up": (e) => { - const t = to(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.down": (e) => { - const t = no(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.left": (e) => { - const t = oo(e); - e.preventDefault(), e.stopPropagation(), t && t.focus(); - }, - "keydown.right": (e) => { - const t = ro(e); - e.preventDefault(), e.stopPropagation(), t && t.focus(); - }, - "keydown.control.up": (e) => { - const t = Ec(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.down": (e) => { - const t = kc(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.left": (e) => { - const t = so(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.right": (e) => { - const t = ao(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.end": (e) => { - const t = ao(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.enter": (e) => { - if (e.target instanceof HTMLTableCellElement) { - e.preventDefault(), e.stopPropagation(); - const t = no(e); - t && t.focus(); - } - }, - "keydown.shift.enter": (e) => { - if (e.target instanceof HTMLTableCellElement) { - e.preventDefault(), e.stopPropagation(); - const t = to(e); - t && t.focus(); - } - }, - "keydown.home": (e) => { - const t = so(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.tab": (e) => { - const t = ro(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.shift.tab": (e) => { - const t = oo(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - } -}; -function hr(e) { - const t = (o) => { - let r = null; - o.parent && (typeof o.parent == "string" ? r = document.querySelector(o.parent) : o.parent instanceof Element ? r = o.parent : r = o.parent.value); - let s = []; - if (o.selectors) - if (typeof o.selectors == "string") - s = r ? Array.from(r.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors)); - else if (o.selectors instanceof Element) - s.push(o.selectors); - else if (Array.isArray(o.selectors.value)) - for (const i of o.selectors.value) - i instanceof Element ? s.push(i) : s.push(i.$el); - else - s.push(o.selectors.value); - else - s = Array.from(r.children).filter((i) => fe(i) && de(i)); - return s; - }, n = (o) => (r) => { - const s = Sc[r.key] || r.key.toLowerCase(); - if (et.includes(s)) - return; - const i = o.handlers || pr; - for (const a of Object.keys(i)) { - const [l, ...u] = a.split("."); - if (l === "keydown" && u.includes(s)) { - const c = i[a], d = u.filter((p) => et.includes(p)), f = et.some((p) => { - const v = p.charAt(0).toUpperCase() + p.slice(1); - return r.getModifierState(v); - }); - if (d.length > 0) { - if (f) { - for (const p of et) - if (u.includes(p)) { - const v = p.charAt(0).toUpperCase() + p.slice(1); - r.getModifierState(v) && c(r); - } - } - } else - f || c(r); - } - } - }; - Lt(() => { - for (const o of e) { - const r = t(o); - for (const s of r) - s.addEventListener("keydown", n(o)); - } - }), Sr(() => { - for (const o of e) { - const r = t(o); - for (const s of r) - s.removeEventListener("keydown", n(o)); - } - }); -} -const Oc = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Ic = { key: 1 }, Pc = /* @__PURE__ */ q({ - __name: "ACell", - props: { - colIndex: {}, - rowIndex: {}, - tableid: {}, - addNavigation: { type: [Boolean, Object], default: !0 }, - tabIndex: { default: 0 }, - clickHandler: {} - }, - setup(e) { - var t; - const n = e, o = Z(n.tableid), r = V(null); - let s = V(!1); - const i = B(() => { - const m = o.cellData(n.colIndex, n.rowIndex); - if (o.columns[n.colIndex].format) { - const w = o.columns[n.colIndex].format; - return typeof w == "function" ? w(m) : typeof w == "string" ? Function(`"use strict";return (${w})`)()(m) : m; - } else - return m; - }), a = (m) => { - if (n.clickHandler) { - n.clickHandler(m); - return; - } - if (o.columns[n.colIndex].mask, o.columns[n.colIndex].modalComponent) { - const w = r.value.getBoundingClientRect(); - o.modal.visible = !0, o.modal.colIndex = n.colIndex, o.modal.rowIndex = n.rowIndex, o.modal.parent = r.value, o.modal.top = w.top + w.height, o.modal.left = w.left, o.modal.width = u.value, o.modal.component = o.columns[n.colIndex].modalComponent, o.modal.componentProps = o.columns[n.colIndex].modalComponentProps; - } - }; - if (n.addNavigation) { - let m = { - ...pr, - "keydown.f2": a, - "keydown.alt.up": a, - "keydown.alt.down": a, - "keydown.alt.left": a, - "keydown.alt.right": a - }; - typeof n.addNavigation == "object" && (m = { - ...m, - ...n.addNavigation - }), hr([ - { - selectors: r, - handlers: m - } - ]); - } - const l = B(() => o.columns[n.colIndex].align || "center"), u = B(() => o.columns[n.colIndex].width || "40ch"); - let c = ""; - const d = () => { - r.value && (c = r.value.innerText); - }, f = () => { - r.value && r.value.innerHTML !== c && (c = r.value.innerText, r.value.dispatchEvent(new Event("change")), s.value = !0, o.columns[n.colIndex].format || o.setCellData(n.rowIndex, n.colIndex, c)); - }, p = (m, w) => w && m === 0 && w > 0 ? `${w}ch` : "inherit", v = { - textAlign: l.value, - width: u.value, - backgroundColor: s.value ? "var(--cell-modified-color)" : "inherit", - fontWeight: s.value ? "bold" : "inherit", - paddingLeft: p(n.colIndex, (t = o.display[n.rowIndex]) == null ? void 0 : t.indent) - }; - return (m, w) => (C(), A("td", { - ref_key: "cell", - ref: r, - "data-colindex": m.colIndex, - "data-rowindex": m.rowIndex, - "data-editable": k(o).columns[m.colIndex].edit, - contenteditable: k(o).columns[m.colIndex].edit, - tabindex: m.tabIndex, - spellcheck: !1, - style: v, - onFocus: d, - onPaste: f, - onBlur: f, - onInput: f, - onClick: a, - onMousedown: a - }, [ - k(o).columns[m.colIndex].cellComponent ? (C(), Se(Bt(k(o).columns[m.colIndex].cellComponent), Ut({ - key: 0, - value: i.value - }, k(o).columns[m.colIndex].cellComponentProps), null, 16, ["value"])) : (C(), A("span", Ic, ce(i.value), 1)) - ], 40, Oc)); - } -}), qe = (e, t) => { - const n = e.__vccOpts || e; - for (const [o, r] of t) - n[o] = r; - return n; -}, Cc = /* @__PURE__ */ qe(Pc, [["__scopeId", "data-v-07dfe445"]]), xc = ["tabindex"], $c = { - key: 0, - tabIndex: -1, - class: "list-index" -}, Nc = /* @__PURE__ */ q({ - __name: "ARow", - props: { - row: {}, - rowIndex: {}, - tableid: {}, - tabIndex: { default: -1 }, - addNavigation: {} - }, - setup(e) { - vo((l) => ({ - "5b18ee03": k(r) - })); - const t = e, n = Z(t.tableid), o = V(null), r = n.numberedRowWidth.value, s = () => n.config.view !== "tree" ? "" : n.display[t.rowIndex].isRoot || n.display[t.rowIndex].isParent ? n.display[t.rowIndex].childrenOpen ? "-" : "+" : "", i = () => n.config.view !== "tree" || n.display[t.rowIndex].isRoot || n.display[t.rowIndex].open, a = (l) => { - n.toggleRowExpand(l); - }; - return t.addNavigation && hr([ - { - selectors: o, - handlers: t.addNavigation - } - ]), (l, u) => lt((C(), A("tr", { - ref_key: "rowEl", - ref: o, - tabindex: l.tabIndex, - class: "table-row" - }, [ - k(n).config.view === "list" ? (C(), A("td", $c, ce(l.rowIndex + 1), 1)) : k(n).config.view === "tree" ? (C(), A("td", { - key: 1, - tabIndex: -1, - class: "tree-index", - onClick: u[0] || (u[0] = (c) => a(l.rowIndex)) - }, ce(s()), 1)) : me(l.$slots, "indexCell", { key: 2 }, void 0, !0), - me(l.$slots, "default", {}, void 0, !0) - ], 8, xc)), [ - [jt, i()] - ]); - } -}), Rc = /* @__PURE__ */ qe(Nc, [["__scopeId", "data-v-4c71a067"]]); -let tt; -const Ac = new Uint8Array(16); -function Tc() { - if (!tt && (tt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !tt)) - throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); - return tt(Ac); -} -const F = []; -for (let e = 0; e < 256; ++e) - F.push((e + 256).toString(16).slice(1)); -function Dc(e, t = 0) { - return F[e[t + 0]] + F[e[t + 1]] + F[e[t + 2]] + F[e[t + 3]] + "-" + F[e[t + 4]] + F[e[t + 5]] + "-" + F[e[t + 6]] + F[e[t + 7]] + "-" + F[e[t + 8]] + F[e[t + 9]] + "-" + F[e[t + 10]] + F[e[t + 11]] + F[e[t + 12]] + F[e[t + 13]] + F[e[t + 14]] + F[e[t + 15]]; -} -const Vc = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), io = { - randomUUID: Vc -}; -function mr(e, t, n) { - if (io.randomUUID && !t && !e) - return io.randomUUID(); - e = e || {}; - const o = e.random || (e.rng || Tc)(); - if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) { - n = n || 0; - for (let r = 0; r < 16; ++r) - t[n + r] = o[r]; - return t; - } - return Dc(o); -} -class Mc { - constructor(t, n, o, r, s, i) { - this.id = t || mr(), this.rows = o, this.columns = _e(n), this.config = _e(r), this.table = s || _e(this.createTableObject()), this.display = this.createDisplayObject(i), this.modal = _e({ visible: !1 }); - } - createTableObject() { - const t = {}; - for (const [n, o] of this.columns.entries()) - for (const [r, s] of this.rows.entries()) - t[`${n}:${r}`] = s[o.name]; - return t; - } - createDisplayObject(t) { - const n = [Object.assign({}, { modified: !1 })]; - if (t && "0:0" in t) - return t; - const o = /* @__PURE__ */ new Set(); - for (let r = this.rows.length - 1; r >= 0; r--) { - const s = this.rows[r]; - s.parent && o.add(s.parent), n[r] = { - childrenOpen: !1, - expanded: !1, - indent: s.indent || null, - isParent: o.has(r), - isRoot: s.parent === null || s.parent === void 0, - modified: !1, - open: s.parent === null || s.parent === void 0, - parent: s.parent - }; - } - return _e(n); - } - get zeroColumn() { - return ["list", "tree", "list-expansion"].includes(this.config.view); - } - get numberedRowWidth() { - return B(() => String(Math.ceil(this.rows.length / 100) + 1) + "ch"); - } - cellData(t, n) { - return this.table[`${t}:${n}`]; - } - setCellData(t, n, o) { - this.table[`${n}:${t}`] !== o && (this.display[t].modified = !0), this.table[`${n}:${t}`] = o; - const r = this.columns[n]; - return this.rows[t][r.name] = o, this.table[`${n}:${t}`]; - } - toggleRowExpand(t) { - if (this.config.view === "tree") { - this.display[t].childrenOpen = !this.display[t].childrenOpen; - for (let n = this.rows.length - 1; n >= 0; n--) - this.display[n].parent === t && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n)); - } else - this.config.view === "list-expansion" && (this.display[t].expanded = !this.display[t].expanded); - } -} -const Lc = { key: 0 }, jc = { - class: "atable-header-row", - tabindex: "-1" -}, Bc = { - key: 0, - id: "header-index" -}, Uc = /* @__PURE__ */ q({ - __name: "ATableHeader", - props: { - columns: {}, - config: {}, - tableid: {} - }, - setup(e) { - vo((r) => ({ - "12d06943": k(n) - })); - const t = Z(e.tableid), n = t.numberedRowWidth.value, o = (r) => ({ - minWidth: r.width || "40ch", - textAlign: r.align || "center", - width: t.config.fullWidth ? "auto" : null - }); - return (r, s) => r.columns.length ? (C(), A("thead", Lc, [ - T("tr", jc, [ - k(t).zeroColumn ? (C(), A("th", Bc)) : ke("", !0), - (C(!0), A(Ie, null, Pe(r.columns, (i, a) => (C(), A("th", { - key: a, - tabindex: "-1", - style: ie(o(i)) - }, [ - me(r.$slots, "default", {}, () => [ - go(ce(i.label || String.fromCharCode(a + 97).toUpperCase()), 1) - ], !0) - ], 4))), 128)) - ]) - ])) : ke("", !0); - } -}), Hc = /* @__PURE__ */ qe(Uc, [["__scopeId", "data-v-16e66636"]]), Wc = /* @__PURE__ */ q({ - __name: "ATableModal", - props: { - colIndex: {}, - rowIndex: {}, - tableid: {} - }, - setup(e) { - Z(e.tableid); - const t = (n) => { - n.stopPropagation(); - }; - return (n, o) => (C(), A("div", { - ref: "amodal", - class: "amodal", - tabindex: "-1", - onClick: t, - onInput: t - }, [ - me(n.$slots, "default", {}, void 0, !0) - ], 544)); - } -}), Fc = /* @__PURE__ */ qe(Wc, [["__scopeId", "data-v-10a48b2a"]]), Gc = /* @__PURE__ */ q({ - __name: "ATable", - props: { - id: {}, - modelValue: {}, - columns: {}, - rows: { default: () => [] }, - config: { default: () => new Object() }, - tableid: {} - }, - emits: ["update:modelValue"], - setup(e, { emit: t }) { - const n = e, o = t; - let r = n.modelValue ? n.modelValue : n.rows, s = new Mc(n.id, n.columns, r, n.config); - nt(s.id, s), ue( - () => s.rows, - (a) => { - o("update:modelValue", a); - }, - { deep: !0 } - ); - const i = (a) => { - var l; - (l = s.modal.parent) != null && l.contains(a.target) || s.modal.visible && (s.modal.visible = !1); - }; - return window.addEventListener("click", i), window.addEventListener("keydown", (a) => { - if (a.key === "Escape" && s.modal.visible) { - s.modal.visible = !1; - const l = s.modal.parent; - l && Fe().then(() => { - const u = l.dataset.rowindex, c = l.dataset.colindex, d = document.querySelectorAll(`[data-rowindex='${u}'][data-colindex='${c}']`); - d && d[0].focus(); - }); - } - }), (a, l) => (C(), A("table", { - class: "atable", - style: ie({ width: k(s).config.fullWidth ? "100%" : "auto" }) - }, [ - me(a.$slots, "header", { data: k(s) }, () => [ - at(Hc, { - columns: k(s).columns, - config: k(s).config, - tableid: k(s).id - }, null, 8, ["columns", "config", "tableid"]) - ], !0), - T("tbody", null, [ - me(a.$slots, "body", { data: k(s) }, () => [ - (C(!0), A(Ie, null, Pe(k(s).rows, (u, c) => (C(), Se(Rc, { - key: u.id || k(mr)(), - row: u, - rowIndex: c, - tableid: k(s).id - }, { - default: it(() => [ - (C(!0), A(Ie, null, Pe(k(s).columns, (d, f) => (C(), Se(Cc, { - key: `${f}:${c}`, - tableid: k(s).id, - col: d, - spellcheck: "false", - rowIndex: c, - colIndex: f + (k(s).zeroColumn ? 0 : -1), - component: d.cellComponent, - style: ie({ - textAlign: (d == null ? void 0 : d.align) || "center", - minWidth: (d == null ? void 0 : d.width) || "40ch", - width: k(s).config.fullWidth ? "auto" : null - }) - }, null, 8, ["tableid", "col", "rowIndex", "colIndex", "component", "style"]))), 128)) - ]), - _: 2 - }, 1032, ["row", "rowIndex", "tableid"]))), 128)) - ], !0) - ]), - me(a.$slots, "footer", { data: k(s) }, void 0, !0), - me(a.$slots, "modal", { data: k(s) }, () => [ - lt(at(Fc, { - colIndex: k(s).modal.colIndex, - rowIndex: k(s).modal.rowIndex, - tableid: k(s).id, - style: ie({ - left: k(s).modal.left + "px", - top: k(s).modal.top + "px", - maxWidth: k(s).modal.width + "px" - }) - }, { - default: it(() => [ - (C(), Se(Bt(k(s).modal.component), Ut({ - key: `${k(s).modal.rowIndex}:${k(s).modal.colIndex}`, - colIndex: k(s).modal.colIndex, - rowIndex: k(s).modal.rowIndex, - tableid: k(s).id - }, k(s).modal.componentProps), null, 16, ["colIndex", "rowIndex", "tableid"])) - ]), - _: 1 - }, 8, ["colIndex", "rowIndex", "tableid", "style"]), [ - [jt, k(s).modal.visible] - ]) - ], !0) - ], 4)); - } -}), zc = /* @__PURE__ */ qe(Gc, [["__scopeId", "data-v-55d8ba05"]]), Qc = /* @__PURE__ */ q({ - __name: "Records", - setup(e) { - const { stonecrop: t, isReady: n } = No(), o = { view: "list" }; - return (r, s) => k(n) ? (C(), Se(k(zc), { - key: 0, - columns: k(t).schema.schema.toArray(), - rows: k(t).store.records, - config: o - }, null, 8, ["columns", "rows"])) : ke("", !0); - } -}), vr = (e) => (lo("data-v-18bfde6e"), e = e(), uo(), e), qc = { class: "tabs" }, Kc = { tabindex: "0" }, Jc = { - version: "1.1", - id: "Capa_1", - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink", - x: "0px", - y: "0px", - viewBox: "0 0 424.098 424.098", - style: { "enable-background": "new 0 0 424.098 424.098" }, - "xml:space": "preserve" -}, Yc = /* @__PURE__ */ vr(() => /* @__PURE__ */ T("g", null, [ - /* @__PURE__ */ T("path", { - style: { fill: "#010002" }, - d: `M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114 - c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276 - c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129 - v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0 - l-56.64-0.114v150.98C359.32,398.29,355.686,401.923,351.191,401.923z M81.03,385.666h262.033V234.67 - c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863 - c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511 - c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129 - C81.03,234.149,81.03,385.666,81.03,385.666z` - }) -], -1)), Xc = [ - Yc -], Zc = { tabindex: "0" }, el = { style: { width: "11pt" } }, tl = /* @__PURE__ */ vr(() => /* @__PURE__ */ T("g", { transform: "matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)" }, [ - /* @__PURE__ */ T("path", { - d: "M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0", - style: { fill: "#000000", "fill-opacity": "1", "fill-rule": "nonzero", stroke: "none" }, - id: "path2" - }) -], -1)), nl = [ - tl -], ol = /* @__PURE__ */ q({ - __name: "SheetNav", - props: { - breadcrumbs: {} - }, - setup(e) { - const t = e, n = V([]), o = V(!0), r = V(!1), s = V(""), i = V(null), a = B(() => o.value ? "unrotated" : "rotated"); - Lt(() => { - n.value = t.breadcrumbs || []; - }); - const l = () => { - o.value = !o.value; - }, u = async () => { - r.value = !r.value, await Fe(() => { - i.value.focus(); - }); - }, c = (p) => { - p.preventDefault(), p.stopPropagation(); - }, d = async (p) => { - p.preventDefault(), p.stopPropagation(), await u(); - }, f = () => { - }; - return (p, v) => { - const m = Or("router-link"); - return C(), A("footer", null, [ - T("ul", qc, [ - T("li", { - class: "hidebreadcrumbs", - onClick: l, - onKeydown: Ye(l, ["enter"]) - }, [ - T("a", Kc, [ - T("div", { - class: co(a.value) - }, "×", 2) - ]) - ], 32), - T("li", { - class: "hometab", - onClick: f, - onKeydown: Ye(f, ["enter"]), - style: ie({ display: o.value ? "block" : "none" }) - }, [ - at(m, { - to: "/home", - tabindex: "0" - }, { - default: it(() => [ - (C(), A("svg", Jc, Xc)) - ]), - _: 1 - }) - ], 36), - T("li", { - class: "searchtab", - onClick: u, - onKeydown: Ye(u, ["enter"]), - style: ie({ display: o.value ? "block" : "none" }) - }, [ - T("a", Zc, [ - T("span", { - style: ie({ display: r.value ? "none" : "block" }) - }, [ - (C(), A("svg", el, nl)) - ], 4), - lt(T("input", { - "onUpdate:modelValue": v[0] || (v[0] = (w) => s.value = w), - ref_key: "searchinput", - ref: i, - style: ie({ display: r.value ? "block" : "none" }), - onClick: v[1] || (v[1] = (w) => c(w)), - onInput: v[2] || (v[2] = (w) => c(w)), - onBlur: v[3] || (v[3] = (w) => d(w)), - onKeydown: v[4] || (v[4] = Ye((w) => d(w), ["enter"])), - type: "text" - }, null, 36), [ - [Ir, s.value] - ]) - ]) - ], 36), - (C(!0), A(Ie, null, Pe(n.value, (w, O) => (C(), A("li", { - key: O, - style: ie({ display: o.value ? "block" : "none" }) - }, [ - at(m, { - tabindex: "0", - to: w.to - }, { - default: it(() => [ - go(ce(w.title), 1) - ]), - _: 2 - }, 1032, ["to"]) - ], 4))), 128)) - ]) - ]); - }; - } -}), rl = /* @__PURE__ */ Gt(ol, [["__scopeId", "data-v-18bfde6e"]]), al = { - install: (e) => { - e.component("ActionSet", Ur), e.component("CommandPalette", Fr), e.component("Doctype", uc), e.component("Records", Qc), e.component("SheetNav", rl); - } -}; -export { - Ur as ActionSet, - Fr as CommandPalette, - uc as Doctype, - Qc as Records, - rl as SheetNav, - al as StonecropDesktop -}; -//# sourceMappingURL=desktop.js.map diff --git a/desktop/dist/desktop.js.map b/desktop/dist/desktop.js.map deleted file mode 100644 index 77f870b1..00000000 --- a/desktop/dist/desktop.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"desktop.js","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from \"vue\";\nconst Ve = { id: \"checkbox-container\" }, xe = [\"id\", \"readonly\", \"required\"], Be = { id: \"custom-checkbox\" }, Pe = [\"for\"], qe = [\"innerHTML\"], He = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n i(\"label\", Ve, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"checkbox\",\n id: n.uuid,\n class: \"checkbox\",\n readonly: n.readOnly,\n required: n.required\n }, null, 8, xe), [\n [be, t.value]\n ]),\n i(\"span\", Be, k(t.value), 1)\n ]),\n i(\"label\", {\n for: n.uuid,\n id: \"checkbox-label\"\n }, k(n.label), 9, Pe),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, qe), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), M = (e, t) => {\n const n = e.__vccOpts || e;\n for (const [o, l] of t)\n n[o] = l;\n return n;\n}, Fe = /* @__PURE__ */ M(He, [[\"__scopeId\", \"data-v-5093f1cb\"]]), Re = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), Ue = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, n) => {\n const o = we(\"ATableModal\");\n return f(), H(o, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: Ce(() => [\n Re\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar W;\nconst de = typeof window < \"u\", Qe = (e) => typeof e == \"string\", Ye = () => {\n};\nde && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction ce(e) {\n return typeof e == \"function\" ? e() : S(e);\n}\nfunction je(e) {\n return e;\n}\nfunction We(e) {\n return De() ? (Ee(e), !0) : !1;\n}\nfunction q(e) {\n var t;\n const n = ce(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst pe = de ? window : void 0;\nfunction Ne(...e) {\n let t, n, o, l;\n if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t)\n return Ye;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const s = [], a = () => {\n s.forEach((d) => d()), s.length = 0;\n }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => {\n a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return We(u), u;\n}\nconst N = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nN[z] = N[z] || {};\nfunction ze(e, { window: t = pe, scrollTarget: n } = {}) {\n const o = y(!1), l = () => {\n if (!t)\n return;\n const s = t.document, a = q(e);\n if (!a)\n o.value = !1;\n else {\n const r = a.getBoundingClientRect();\n o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return F(() => q(e), () => l(), { immediate: !0, flush: \"post\" }), t && Ne(n || t, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => {\n for (var n in t || (t = {}))\n Ke.call(t, n) && J(e, n, t[n]);\n if (K)\n for (var n of K(t))\n Je.call(t, n) && J(e, n, t[n]);\n return e;\n};\nconst Ze = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nXe({\n linear: je\n}, Ze);\nconst E = (e) => {\n let t = ze(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, A = (e) => e.tabIndex >= 0, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.previousElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? U(n) : n;\n}, et = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.firstElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.firstElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? Q(o) : o;\n}, Z = (e) => {\n const t = e.target;\n return Q(t);\n}, Q = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.nextElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? Q(n) : n;\n}, tt = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.lastElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.lastElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? U(o) : o;\n}, ee = (e) => {\n const t = e.target;\n return Y(t);\n}, Y = (e) => {\n var t;\n let n;\n if (e.previousElementSibling)\n n = e.previousElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!A(n) || !E(n)) ? Y(n) : n;\n}, te = (e) => {\n const t = e.target;\n return j(t);\n}, j = (e) => {\n var t;\n let n;\n if (e.nextElementSibling)\n n = e.nextElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!A(n) || !E(n)) ? j(n) : n;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !E(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !E(t)) ? Y(t) : t;\n}, $ = [\"alt\", \"control\", \"shift\", \"meta\"], nt = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, fe = {\n \"keydown.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = te(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = et(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = tt(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = Z(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ot(e) {\n const t = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let s = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n s.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const a of o.selectors.value)\n a instanceof Element ? s.push(a) : s.push(a.$el);\n else\n s.push(o.selectors.value);\n else\n s = Array.from(l.children).filter((a) => A(a) && E(a));\n return s;\n }, n = (o) => (l) => {\n const s = nt[l.key] || l.key.toLowerCase();\n if ($.includes(s))\n return;\n const a = o.handlers || fe;\n for (const r of Object.keys(a)) {\n const [p, ...u] = r.split(\".\");\n if (p === \"keydown\" && u.includes(s)) {\n const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (g.length > 0) {\n if (b) {\n for (const m of $)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n b || d(l);\n }\n }\n };\n re(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.addEventListener(\"keydown\", n(o));\n }\n }), ke(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst lt = [\"event\", \"colIndex\", \"rowIndex\", \"tableid\"], st = { colspan: \"5\" }, at = [\"onClick\"], rt = 6, I = 7, it = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n event: {},\n indent: {},\n readonly: { type: Boolean }\n },\n setup(e) {\n const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]);\n re(async () => {\n let c = n.cellData(t.colIndex, t.rowIndex);\n c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae();\n const T = document.getElementsByClassName(\"selecteddate\");\n if (T.length > 0)\n T[0].focus();\n else {\n const v = document.getElementsByClassName(\"todaysdate\");\n v.length > 0 && v[0].focus();\n }\n }), F([s, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T);\n for (let w of Array(43).keys())\n r.value.push(v + w * 864e5);\n }, u = () => {\n a.value -= 1;\n }, d = () => {\n a.value += 1;\n }, g = () => {\n s.value == 0 ? (s.value = 11, u()) : s.value -= 1;\n }, b = () => {\n s.value == 11 ? (s.value = 0, d()) : s.value += 1;\n }, m = (c) => {\n if (s.value === o.getMonth())\n return o.toDateString() === new Date(c).toDateString();\n }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => {\n l.value = new Date(r.value[T]), ve();\n }, ve = () => {\n n.setCellData(t.rowIndex, t.colIndex, l.value.getTime());\n }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return ot([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...fe,\n \"keydown.pageup\": g,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": d\n }\n }\n ]), (c, T) => c.readonly ? ue(\"\", !0) : (f(), h(\"div\", {\n key: 0,\n event: c.event,\n colIndex: c.colIndex,\n rowIndex: c.rowIndex,\n tableid: c.tableid,\n class: \"adate\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n i(\"table\", null, [\n i(\"tr\", null, [\n i(\"td\", {\n onClick: g,\n tabindex: -1\n }, \"<\"),\n i(\"th\", st, k(ge.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), h(V, null, x(rt, (v) => i(\"tr\", { key: v }, [\n (f(), h(V, null, x(I, (w) => i(\"td\", {\n key: (v - 1) * I + w,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: Ie({\n border: _(r.value[(v - 1) * I + w]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(v - 1) * I + w]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Me((ye) => he(ye, (v - 1) * I + w), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(v - 1) * I + w]),\n selecteddate: _(r.value[(v - 1) * I + w])\n })\n }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64))\n ])), 64))\n ])\n ], 8, lt));\n }\n}), ut = /* @__PURE__ */ M(it, [[\"__scopeId\", \"data-v-169f1184\"]]), dt = D({\n name: \"ADropdown\",\n props: {\n modelValue: {\n type: String,\n required: !1,\n default: \"\"\n },\n label: {\n type: String,\n required: !0\n },\n value: String,\n items: {\n type: Array,\n required: !1,\n default: () => []\n },\n isAsync: {\n type: Boolean,\n required: !1,\n default: !1\n }\n },\n emits: [\"update:modelValue\", \"filterChanged\"],\n data() {\n return {\n results: [],\n search: this.modelValue,\n isLoading: !1,\n arrowCounter: 0,\n isOpen: !1\n };\n },\n watch: {\n items: function(e, t) {\n this.isLoading = !1, this.results = e;\n }\n },\n mounted() {\n document.addEventListener(\"click\", this.handleClickOutside), this.filterResults();\n },\n destroyed() {\n document.removeEventListener(\"click\", this.handleClickOutside);\n },\n methods: {\n setResult(e) {\n this.search = e, this.closeResults();\n },\n filterResults() {\n this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);\n },\n onChange() {\n this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit(\"filterChanged\", this.search)) : this.filterResults();\n },\n handleClickOutside(e) {\n this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);\n },\n closeResults() {\n this.isOpen = !1, this.items.includes(this.search) || (this.search = \"\"), this.$emit(\"update:modelValue\", this.search);\n },\n onArrowDown() {\n this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);\n },\n onArrowUp() {\n this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);\n },\n onEnter() {\n this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;\n },\n openWithSearch() {\n this.search = \"\", this.onChange(), this.$refs.mopInput.focus();\n }\n }\n}), ct = { class: \"input-wrapper\" }, pt = {\n id: \"autocomplete-results\",\n class: \"autocomplete-results\"\n}, ft = {\n key: 0,\n class: \"loading autocomplete-result\"\n}, mt = [\"onClick\"];\nfunction ht(e, t, n, o, l, s) {\n return f(), h(\"div\", {\n class: B([\"autocomplete\", { isOpen: e.isOpen }])\n }, [\n i(\"div\", ct, [\n C(i(\"input\", {\n ref: \"mopInput\",\n type: \"text\",\n onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),\n onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),\n \"onUpdate:modelValue\": t[2] || (t[2] = (a) => e.search = a),\n onKeydown: [\n t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), [\"down\"])),\n t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), [\"up\"])),\n t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), [\"enter\"]))\n ]\n }, null, 544), [\n [R, e.search]\n ]),\n C(i(\"ul\", pt, [\n e.isLoading ? (f(), h(\"li\", ft, \"Loading results...\")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h(\"li\", {\n key: r,\n onClick: (p) => e.setResult(a),\n class: B([\"autocomplete-result\", { \"is-active\": r === e.arrowCounter }])\n }, k(a), 11, mt))), 128))\n ], 512), [\n [O, e.isOpen]\n ]),\n i(\"label\", null, k(e.label), 1)\n ])\n ], 2);\n}\nconst vt = /* @__PURE__ */ M(dt, [[\"render\", ht]]), gt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, n) => (f(), h(\"button\", {\n class: B([\"collapse-button\", t.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n}), yt = /* @__PURE__ */ M(gt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), bt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: {},\n data: {},\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const n = e, o = t, l = y(n.data || {}), s = (r) => {\n let p = {};\n for (const [u, d] of Object.entries(r))\n [\"component\", \"fieldtype\"].includes(u) || (p[u] = d), u === \"rows\" && d && d.length === 0 && (p.rows = l.value[r.fieldname]);\n return p;\n }, a = L({\n get: () => n.modelValue.map((r, p) => L({\n get() {\n return r.value;\n },\n set: (u) => {\n n.modelValue[p].value = u, o(\"update:modelValue\", n.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (r, p) => (f(), h(\"form\", null, [\n (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({\n key: d,\n schema: u,\n modelValue: a.value[d].value,\n \"onUpdate:modelValue\": (g) => a.value[d].value = g,\n data: l.value[u.fieldname],\n readonly: r.readonly\n }, s(u)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n}), me = /* @__PURE__ */ M(bt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), wt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, n = y(t.data || []);\n let o = y(!1), l = y(t.collapsible);\n const s = y(t.schema);\n function a(r) {\n r.preventDefault(), l.value && (o.value = !o.value);\n }\n return (r, p) => (f(), h(\"fieldset\", null, [\n i(\"legend\", {\n onClick: a,\n onSubmit: a\n }, [\n Se(k(r.label) + \" \", 1),\n S(l) ? (f(), H(yt, {\n key: 0,\n collapsed: S(o)\n }, null, 8, [\"collapsed\"])) : ue(\"\", !0)\n ], 32),\n Oe(r.$slots, \"default\", { collapsed: S(o) }, () => [\n C($e(me, {\n modelValue: s.value,\n \"onUpdate:modelValue\": p[0] || (p[0] = (u) => s.value = u),\n data: n.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [O, !S(o)]\n ])\n ], !0)\n ]));\n }\n}), Ct = /* @__PURE__ */ M(wt, [[\"__scopeId\", \"data-v-cad9b578\"]]), kt = [\"id\", \"disabled\", \"required\"], Dt = [\"for\"], Et = [\"innerHTML\"], At = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"number\",\n id: n.uuid,\n disabled: n.readonly,\n required: n.required\n }, null, 8, kt), [\n [R, t.value]\n ]),\n i(\"label\", { for: n.uuid }, k(n.label), 9, Dt),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, Et), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), It = /* @__PURE__ */ M(At, [[\"__scopeId\", \"data-v-02907cd6\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction Mt(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction Tt(e) {\n var n;\n let t = e.value;\n if (t) {\n const o = Mt(t);\n if (o) {\n const l = e.instance.locale;\n t = o(l);\n }\n } else {\n const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase();\n l && le[l] && (t = le[l]);\n }\n return t;\n}\nfunction _t(e, t) {\n t || (t = \"#\");\n let n = e;\n const o = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const l of o)\n n = n.replaceAll(l, \"\");\n return n;\n}\nfunction St(e, t, n) {\n n || (n = \"#\");\n let o = t;\n for (const l of e) {\n const s = o.indexOf(n);\n if (s !== -1) {\n const a = o.substring(0, s), r = o.substring(s + 1);\n o = a + l + r;\n }\n }\n return o.slice(0, t.length);\n}\nfunction Ot(e, t) {\n const n = Tt(t);\n if (!n)\n return;\n const o = \"#\", l = e.value, s = _t(l, o);\n if (s) {\n const a = St(s, n, o);\n t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a;\n } else\n e.value = n;\n}\nconst $t = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const n = y(!1), o = ie(\"locale\", \"\");\n return { inputText: L({\n get() {\n return e.modelValue;\n },\n set(s) {\n t.emit(\"update:modelValue\", s);\n }\n }), locale: o, maskFilled: n };\n },\n directives: {\n mask: Ot\n }\n}), Lt = [\"id\", \"disabled\", \"maxlength\", \"required\"], Vt = [\"for\"], xt = [\"innerHTML\"];\nfunction Bt(e, t, n, o, l, s) {\n const a = Le(\"mask\");\n return f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, Lt), [\n [R, e.inputText],\n [a, e.mask]\n ]),\n i(\"label\", { for: e.uuid }, k(e.label), 9, Vt),\n C(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, xt), [\n [O, e.validation.errorMessage]\n ])\n ]);\n}\nconst Pt = /* @__PURE__ */ M($t, [[\"render\", Bt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Ht(e) {\n e.component(\"ACheckbox\", Fe), e.component(\"ACombobox\", Ue), e.component(\"ADate\", ut), e.component(\"ADropdown\", vt), e.component(\"AFieldset\", Ct), e.component(\"AForm\", me), e.component(\"ANumericInput\", It), e.component(\"ATextInput\", Pt);\n}\nexport {\n Fe as ACheckbox,\n Ue as AComboBox,\n ut as ADate,\n vt as ADropdown,\n Ct as AFieldset,\n me as AForm,\n It as ANumericInput,\n Pt as ATextInput,\n Ht as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nfunction NotImplementedError(message) {\n this.message = message || \"\";\n}\nNotImplementedError.prototype = Object.create(Error.prototype, {\n constructor: { value: NotImplementedError },\n name: { value: \"NotImplemented\" },\n stack: {\n get: function() {\n return new Error().stack;\n }\n }\n});\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.\n * @example\n * const registry = new Registry()\n * const store = useDataStore()\n * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {DoctypeMeta}\n * @see {@link DoctypeMeta}\n * @throws NotImplementedError\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * const meta = stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype);\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.getMeta('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia2, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction loadStoresState(pinia2, state) {\n for (const key in state) {\n const storeState = pinia2.state.value[key];\n if (storeState) {\n Object.assign(storeState, state[key]);\n } else {\n pinia2.state.value[key] = state[key];\n }\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (typeof store.$reset !== \"function\") {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n }) : store;\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n activeAction = void 0;\n return retValue;\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;\n const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup)));\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n if (process.env.NODE_ENV !== \"production\" && typeof id !== \"string\") {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia2, hot) {\n const hasContext = hasInjectionContext();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.getMeta(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, getMeta) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.getMeta = getMeta;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\n/*!\n * vue-router v4.2.5\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n const lastToSegment = toSegments[toSegments.length - 1];\n if (lastToSegment === \"..\" || lastToSegment === \".\") {\n toSegments.push(\"\");\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener, {\n passive: true\n });\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"object\" ? props[name] : props;\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n return app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of enteringRecords) {\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router22 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router22;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true\n });\n }\n app.provide(routerKey, router22);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router22, matcher);\n }\n }\n };\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router2;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n Object.prototype\n).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction get_escaped_char(char) {\n switch (char) {\n case '\"':\n return '\\\\\"';\n case \"<\":\n return \"\\\\u003C\";\n case \"\\\\\":\n return \"\\\\\\\\\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\u2028\":\n return \"\\\\u2028\";\n case \"\\u2029\":\n return \"\\\\u2029\";\n default:\n return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n }\n}\nfunction stringify_string(str) {\n let result = \"\";\n let last_pos = 0;\n const len = str.length;\n for (let i = 0; i < len; i += 1) {\n const char = str[i];\n const replacement = get_escaped_char(char);\n if (replacement) {\n result += str.slice(last_pos, i) + replacement;\n last_pos = i + 1;\n }\n }\n return `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta);\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", registry);\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Ae = (t) => typeof t == \"string\", Te = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : r(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return Ee() ? (ke(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Se(...t) {\n let e, n, o, a;\n if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return Te;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], s = () => {\n l.forEach((f) => f()), l.length = 0;\n }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => {\n s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c))));\n }, { immediate: !0, flush: \"post\" }), p = () => {\n d(), s();\n };\n return De(p), p;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Re(t, { window: e = me, scrollTarget: n } = {}) {\n const o = k(!1), a = () => {\n if (!e)\n return;\n const l = e.document, s = U(t);\n if (!s)\n o.value = !1;\n else {\n const i = s.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => a(), { immediate: !0, flush: \"post\" }), e && Se(n || e, \"scroll\", a, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst x = (t) => {\n let e = Re(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return V(e);\n}, V = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? V(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.firstElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.firstElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.lastElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.lastElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? V(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !x(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], We = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let a = null;\n o.parent && (typeof o.parent == \"string\" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value);\n let l = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n l.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const s of o.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(o.selectors.value);\n else\n l = Array.from(a.children).filter((s) => I(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = We[a.key] || a.key.toLowerCase();\n if (D.includes(l))\n return;\n const s = o.handlers || we;\n for (const i of Object.keys(s)) {\n const [d, ...p] = i.split(\".\");\n if (d === \"keydown\" && p.includes(l)) {\n const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(E);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(E) && f(a);\n }\n }\n } else\n v || f(a);\n }\n }\n };\n xe(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst Ve = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({\n __name: \"ACell\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: {}\n },\n setup(t) {\n var E;\n const e = t, n = O(e.tableid), o = k(null);\n let a = k(!1);\n const l = R(() => {\n const u = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(u) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(u) : u;\n } else\n return u;\n }), s = (u) => {\n if (e.clickHandler) {\n e.clickHandler(u);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let u = {\n ...we,\n \"keydown.f2\": s,\n \"keydown.alt.up\": s,\n \"keydown.alt.down\": s,\n \"keydown.alt.left\": s,\n \"keydown.alt.right\": s\n };\n typeof e.addNavigation == \"object\" && (u = {\n ...u,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: u\n }\n ]);\n }\n const i = R(() => n.columns[e.colIndex].align || \"center\"), d = R(() => n.columns[e.colIndex].width || \"40ch\");\n let p = \"\";\n const f = () => {\n o.value && (p = o.value.innerText);\n }, c = () => {\n o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p));\n }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : \"inherit\", h = {\n textAlign: i.value,\n width: d.value,\n backgroundColor: a.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: a.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent)\n };\n return (u, g) => (m(), b(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": u.colIndex,\n \"data-rowindex\": u.rowIndex,\n \"data-editable\": r(n).columns[u.colIndex].edit,\n contenteditable: r(n).columns[u.colIndex].edit,\n tabindex: u.tabIndex,\n spellcheck: !1,\n style: h,\n onFocus: f,\n onPaste: c,\n onBlur: c,\n onInput: c,\n onClick: s,\n onMousedown: s\n }, [\n r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, T(l.value), 1))\n ], 40, Ve));\n }\n}), _ = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, a] of e)\n n[o] = a;\n return n;\n}, he = /* @__PURE__ */ _(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ C({\n __name: \"AExpansionRow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const s = Object.assign({}, e.addNavigation);\n s[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: s\n }\n ]);\n }\n return (s, i) => (m(), b(L, null, [\n A(\"tr\", W(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n A(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, T(l()), 1),\n y(s.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n r(n).display[e.rowIndex].expanded ? (m(), b(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: a,\n tabindex: s.tabIndex,\n class: \"expanded-row\"\n }, [\n A(\"td\", {\n tabIndex: -1,\n colspan: r(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n y(s.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n}), Je = /* @__PURE__ */ _(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ C({\n __name: \"ARow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n de((d) => ({\n \"5b18ee03\": r(a)\n }));\n const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", s = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => {\n n.toggleRowExpand(d);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (d, p) => ce((m(), b(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: d.tabIndex,\n class: \"table-row\"\n }, [\n r(n).config.view === \"list\" ? (m(), b(\"td\", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === \"tree\" ? (m(), b(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: p[0] || (p[0] = (f) => i(d.rowIndex))\n }, T(l()), 1)) : y(d.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n y(d.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, s()]\n ]);\n }\n}), be = /* @__PURE__ */ _(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet S;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!S && (S = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return S(Ke);\n}\nconst w = [];\nfor (let t = 0; t < 256; ++t)\n w.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + \"-\" + w[t[e + 4]] + w[t[e + 5]] + \"-\" + w[t[e + 6]] + w[t[e + 7]] + \"-\" + w[t[e + 8]] + w[t[e + 9]] + \"-\" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]];\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let a = 0; a < 16; ++a)\n e[n + a] = o[a];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, a, l, s) {\n this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [a, l] of this.rows.entries())\n e[`${n}:${a}`] = l[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let a = this.rows.length - 1; a >= 0; a--) {\n const l = this.rows[a];\n l.parent && o.add(l.parent), n[a] = {\n childrenOpen: !1,\n expanded: !1,\n indent: l.indent || null,\n isParent: o.has(a),\n isRoot: l.parent === null || l.parent === void 0,\n modified: !1,\n open: l.parent === null || l.parent === void 0,\n parent: l.parent\n };\n }\n return $(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return R(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const a = this.columns[n];\n return this.rows[e][a.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ C({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"12d06943\": r(o)\n }));\n const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({\n minWidth: l.width || \"40ch\",\n textAlign: l.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (l, s) => l.columns.length ? (m(), b(\"thead\", lt, [\n A(\"tr\", at, [\n r(n).zeroColumn ? (m(), b(\"th\", rt)) : M(\"\", !0),\n (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b(\"th\", {\n key: d,\n tabindex: \"-1\",\n style: H(a(i))\n }, [\n y(l.$slots, \"default\", {}, () => [\n Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n}), ve = /* @__PURE__ */ _(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ C({\n __name: \"ATableModal\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {}\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, a) => (m(), b(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n y(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n}), ye = /* @__PURE__ */ _(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ C({\n __name: \"ATable\",\n props: {\n id: {},\n modelValue: {},\n columns: {},\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: {}\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t, o = e;\n let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config);\n _e(l.id, l), j(\n () => l.rows,\n (i) => {\n o(\"update:modelValue\", i);\n },\n { deep: !0 }\n );\n const s = (i) => {\n var d;\n (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", s), window.addEventListener(\"keydown\", (i) => {\n if (i.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const d = l.modal.parent;\n d && $e().then(() => {\n const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`);\n c && c[0].focus();\n });\n }\n }), (i, d) => (m(), b(\"table\", {\n class: \"atable\",\n style: H({ width: r(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n y(i.$slots, \"header\", { data: r(l) }, () => [\n z(ve, {\n columns: r(l).columns,\n config: r(l).config,\n tableid: r(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n A(\"tbody\", null, [\n y(i.$slots, \"body\", { data: r(l) }, () => [\n (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, {\n key: p.id || r(ge)(),\n row: p,\n rowIndex: f,\n tableid: r(l).id\n }, {\n default: G(() => [\n (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, {\n key: `${v}:${f}`,\n tableid: r(l).id,\n col: c,\n spellcheck: \"false\",\n rowIndex: f,\n colIndex: v + (r(l).zeroColumn ? 0 : -1),\n component: c.cellComponent,\n style: H({\n textAlign: (c == null ? void 0 : c.align) || \"center\",\n minWidth: (c == null ? void 0 : c.width) || \"40ch\",\n width: r(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n y(i.$slots, \"footer\", { data: r(l) }, void 0, !0),\n y(i.$slots, \"modal\", { data: r(l) }, () => [\n ce(z(ye, {\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id,\n style: H({\n left: r(l).modal.left + \"px\",\n top: r(l).modal.top + \"px\",\n maxWidth: r(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (m(), P(ie(r(l).modal.component), W({\n key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`,\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id\n }, r(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, r(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n}), ct = /* @__PURE__ */ _(dt, [[\"__scopeId\", \"data-v-55d8ba05\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", ve), t.component(\"ATableModal\", ye);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n ve as ATableHeader,\n ye as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["props","__props","_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","M","l","W","de","je","N","z","G","Ge","K","Ke","Je","J","Xe","Ze","D","bt","y","r","p","d","a","L","f","h","V","x","H","Te","_e","g","me","le","Mt","Tt","n","t","_t","St","Ot","ie","s","NotImplementedError","message","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now$1","ApiProxy","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","o","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","storeState","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","isBrowser","isESModule","assign","applyToParams","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","v","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLinkImpl","defineComponent","slots","link","elClass","getLinkClass","h$1","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","info","slot","slotContent","RouterView","parentName","parentSubTreeType","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","resolve2","scrollBehavior","started","router22","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","get_escaped_char","stringify_string","str","last_pos","replacement","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","u","_a2","pinia","newSchema","fieldValue","pe","Ae","fe","Oe","De","Ee","ke","U","Se","c","j","X","Y","Re","Z","Pe","He","Le","ee","Me","Ne","I","te","Ue","B","ne","oe","Q","F","ae","We","we","q","E","xe","Ie","Ve","Be","Qe","C","O","R","P","T","_","he","Ye","ce","ue","be","S","et","w","tt","nt","se","ge","ot","$","lt","at","rt","st","A","Ce","ve","it","ye","dt","$e","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,UAAMA,IAAQC,GAIRC,IAAYC,EAAkB,CAAA,CAAE,GAChCC,IAASD,EAAI,EAAK,GAClBE,IAAUF,EAAoB,IAAI,GAClCG,IAAQH,EAAI,EAAK,GACjBI,IAAeJ,EAAI,EAAK;AAE9B,IAAAK,GAAU,MAAM;AACf,MAAAN,EAAU,QAAQF,EAAM,UACTS;IAAA,CACf;AAED,UAAMA,IAAiB,MAAM;AACnB,eAAAC,KAAWR,EAAU;AACzB,QAAAQ,EAAQ,gBAAgB,eAC3BA,EAAQ,OAAO;AAAA,IAEjB,GAGKC,IAAU,MAAM;AACrB,MAAAL,EAAM,QAAQ,IACND,EAAA,QAAQ,WAAW,MAAM;AAChC,Q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AY;AACjB,MAAAL,EAAA,QAAQ,CAACA,EAAe,OACvC,MAAMlvB,GAAS,MAAM;AACpB,QAAAovB,EAAY,MAAM;MAAM,CACxB;AAAA,IAAA,GAGII,IAAoB,CAAC51B,MAA8B;AACxD,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB;AAAA,IAAA,GAGjB61B,IAAe,OAAO71B,MAAsC;AACjE,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB,GACtB,MAAM21B,EAAa;AAAA,IAAA,GAGdG,IAAe,MAA6C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEC9GnDrgC,KAAA;AAAA,EACd,SAAS,CAACgL,MAAa;AAClB,IAAAA,EAAA,UAAU,aAAas1B,EAAS,GAChCt1B,EAAA,UAAU,kBAAkBu1B,EAAc,GAC1Cv1B,EAAA,UAAU,WAAWw1B,EAAO,GAC5Bx1B,EAAA,UAAU,WAAWy1B,EAAO,GAC5Bz1B,EAAA,UAAU,YAAY01B,EAAQ;AAAA,EACnC;AACD;"} \ No newline at end of file diff --git a/desktop/dist/desktop.umd.cjs b/desktop/dist/desktop.umd.cjs deleted file mode 100644 index 8ff22cc1..00000000 --- a/desktop/dist/desktop.umd.cjs +++ /dev/null @@ -1,45 +0,0 @@ -(function(W,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(W=typeof globalThis<"u"?globalThis:W||self,s(W["@stonecrop/desktop"]={},W.Vue))})(this,function(W,s){"use strict";const ze=e=>(s.pushScopeId("data-v-b7fdfbec"),e=e(),s.popScopeId(),e),Do={class:"action-menu-icon"},Vo=[ze(()=>s.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1)),ze(()=>s.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1))],Bo=ze(()=>s.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),Mo=["onclick"],Lo={key:1},jo=["onClick"],Uo={class:"dropdown-container"},Ho={class:"dropdown"},Fo=["onclick"],Wo=["href"],zo={class:"dropdown-item"},Go=s.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=e,n=s.ref([]),o=s.ref(!1),r=s.ref(null),a=s.ref(!1),c=s.ref(!1);s.onMounted(()=>{n.value=t.elements,i()});const i=()=>{for(let f of n.value)f.elementType==="dropdown"&&(f.show=!1)},u=()=>{a.value=!0,r.value=setTimeout(()=>{a.value&&(o.value=!0)},500)},d=()=>{a.value=!1,c.value=!1,clearTimeout(r.value),o.value=!1},l=f=>{const p=!n.value[f].show;i(),n.value[f].show=p};return(f,p)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([{"open-set":o.value,"hovered-and-closed":c.value},"action-set collapse"]),onMouseover:u,onMouseleave:d},[s.createElementVNode("div",Do,[s.createElementVNode("div",{id:"chevron",onClick:p[0]||(p[0]=h=>c.value=!c.value)},Vo)]),Bo,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(h,y)=>(s.openBlock(),s.createElementBlock("div",{class:"action-element",key:y},[h.elementType=="button"?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:h.action,class:"button-default"},s.toDisplayString(h.label),9,Mo)):s.createCommentVNode("",!0),h.elementType=="dropdown"?(s.openBlock(),s.createElementBlock("div",Lo,[s.createElementVNode("button",{class:"button-default",onClick:g=>l(y)},s.toDisplayString(h.label),9,jo),s.withDirectives(s.createElementVNode("div",Uo,[s.createElementVNode("div",Ho,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.actions,g=>(s.openBlock(),s.createElementBlock("div",{key:g.label},[g.action!=null?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:g.action,class:"dropdown-item"},s.toDisplayString(g.label),9,Fo)):g.link!=null?(s.openBlock(),s.createElementBlock("a",{key:1,href:g.link},[s.createElementVNode("button",zo,s.toDisplayString(g.label),1)],8,Wo)):s.createCommentVNode("",!0)]))),128))])],512),[[s.vShow,h.show]])])):s.createCommentVNode("",!0)]))),128))],34))}}),Ge=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$t=Ge(Go,[["__scopeId","data-v-b7fdfbec"]]),Qo={};function qo(e,t){return s.openBlock(),s.createElementBlock("dialog")}const Rt=Ge(Qo,[["render",qo]]),Ko=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};var Tt;typeof window<"u"&&(Tt=window==null?void 0:window.navigator)!=null&&Tt.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Jo(e){return e}const At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dt="__vueuse_ssr_handlers__";At[Dt]=At[Dt]||{};var Vt;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Vt||(Vt={}));var Yo=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Xo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,Mt=(e,t,n)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,er=(e,t)=>{for(var n in t||(t={}))Xo.call(t,n)&&Mt(e,n,t[n]);if(Bt)for(var n of Bt(t))Zo.call(t,n)&&Mt(e,n,t[n]);return e};er({linear:Jo},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]}),s.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}});const tr=s.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=s.ref(n.data||{}),a=i=>{let u={};for(const[d,l]of Object.entries(i))["component","fieldtype"].includes(d)||(u[d]=l),d==="rows"&&l&&l.length===0&&(u.rows=r.value[i.fieldname]);return u},c=s.computed({get:()=>n.modelValue.map((i,u)=>s.computed({get(){return i.value},set:d=>{n.modelValue[u].value=d,o("update:modelValue",n.modelValue)}})),set:()=>{}});return(i,u)=>(s.openBlock(),s.createElementBlock("form",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.modelValue,(d,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(d.component),s.mergeProps({key:l,schema:d,modelValue:c.value[l].value,"onUpdate:modelValue":f=>c.value[l].value=f,data:r.value[d.fieldname],readonly:i.readonly},a(d)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),nr=Ko(tr,[["__scopeId","data-v-74d66cf2"]]),Lt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function or(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function rr(e){var t;let n=e.value;if(n){const o=or(n);if(o){const r=e.instance.locale;n=o(r)}}else{const o=(t=e.instance.schema.fieldtype)==null?void 0:t.toLowerCase();o&&Lt[o]&&(n=Lt[o])}return n}function sr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function ar(e,t,n){n||(n="#");let o=t;for(const r of e){const a=o.indexOf(n);if(a!==-1){const c=o.substring(0,a),i=o.substring(a+1);o=c+r+i}}return o.slice(0,t.length)}function ir(e,t){const n=rr(t);if(!n)return;const o="#",r=e.value,a=sr(r,o);if(a){const c=ar(a,n,o);t.instance.maskFilled&&(t.instance.maskFilled=!c.includes(o)),e.value=c}else e.value=n}s.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const n=s.ref(!1),o=s.inject("locale","");return{inputText:s.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:o,maskFilled:n}},directives:{mask:ir}});function Qe(e){this.message=e||""}Qe.prototype=Object.create(Error.prototype,{constructor:{value:Qe},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});class ve{constructor(t,n,o,r,a){if(this.name="Stonecrop",ve._root)return ve._root;ve._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=r,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new Qe(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const r=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:r})}async getRecord(t,n){this.store.$patch({record:{}});const r=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:r})}runAction(t,n,o){const a=this.registry.registry[t.slug].actions.get(n),{initialState:c}=this.workflow;this.workflow.transition(c,{type:n}),a.length>0&&a.forEach(i=>{new Function(i)(o)})}}var jt=!1;function $e(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function qe(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function cr(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const lr=typeof Proxy=="function",ur="devtools-plugin:setup",dr="plugin:settings:set";let pe,Ke;function fr(){var e;return pe!==void 0||(typeof window<"u"&&window.performance?(pe=!0,Ke=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(pe=!0,Ke=global.perf_hooks.performance):pe=!1),pe}function pr(){return fr()?Ke.now():Date.now()}class hr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const c in t.settings){const i=t.settings[c];o[c]=i.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const c=localStorage.getItem(r),i=JSON.parse(c);Object.assign(a,i)}catch{}this.fallbacks={getSettings(){return a},setSettings(c){try{localStorage.setItem(r,JSON.stringify(c))}catch{}a=c},now(){return pr()}},n&&n.on(dr,(c,i)=>{c===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(c,i)=>this.target?this.target.on[i]:(...u)=>{this.onQueue.push({method:i,args:u})}}),this.proxiedTarget=new Proxy({},{get:(c,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...u)=>(this.targetQueue.push({method:i,args:u,resolve:()=>{}}),this.fallbacks[i](...u)):(...u)=>new Promise(d=>{this.targetQueue.push({method:i,args:u,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Je(e,t){const n=e,o=Ut(),r=cr(),a=lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(ur,e,t);else{const c=a?new hr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:c}),c&&t(c.proxiedTarget)}}/*! - * pinia v2.1.7 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */let _e;const be=e=>_e=e,Ht=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ce(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var J;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(J||(J={}));const Re=typeof window<"u",Ee=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&Re,Ft=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ye(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Gt(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Wt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Te(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Ae=typeof navigator=="object"?navigator:{userAgent:""},zt=/Macintosh/.test(Ae.userAgent)&&/AppleWebKit/.test(Ae.userAgent)&&!/Safari/.test(Ae.userAgent),Gt=Re?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!zt?gr:"msSaveOrOpenBlob"in Ae?yr:wr:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?Wt(o.href)?Ye(e,t,n):(o.target="_blank",Te(o)):Te(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Te(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(Wt(e))Ye(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Te(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function wr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ye(e,t,n);const r=e.type==="application/octet-stream",a=/constructor/i.test(String(Ft.HTMLElement))||"safari"in Ft,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||r&&a||zt)&&typeof FileReader<"u"){const i=new FileReader;i.onloadend=function(){let u=i.result;if(typeof u!="string")throw o=null,new Error("Wrong reader.result type");u=c?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=u:location.assign(u),o=null},i.readAsDataURL(e)}else{const i=URL.createObjectURL(e);o?o.location.assign(i):location.href=i,o=null,setTimeout(function(){URL.revokeObjectURL(i)},4e4)}}function B(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Xe(e){return"_a"in e&&"install"in e}function Qt(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function qt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function vr(e){if(!Qt())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(t){if(qt(t))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function _r(e){if(!Qt())try{Kt(e,JSON.parse(await navigator.clipboard.readText())),B("Global state pasted from clipboard.")}catch(t){if(qt(t))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function br(e){try{Gt(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let X;function Er(){X||(X=document.createElement("input"),X.type="file",X.accept=".json");function e(){return new Promise((t,n)=>{X.onchange=async()=>{const o=X.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},X.oncancel=()=>t(null),X.onerror=n,X.click()})}return e}async function kr(e){try{const n=await Er()();if(!n)return;const{text:o,file:r}=n;Kt(e,JSON.parse(o)),B(`Global state imported from "${r.name}".`)}catch(t){B("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Kt(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function q(e){return{_custom:{display:e}}}const Jt="🍍 Pinia (root)",Ze="_root";function Sr(e){return Xe(e)?{id:Ze,label:Jt}:{id:e.$id,label:e.$id}}function Or(e){if(Xe(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:n.filter(a=>o.get(a)._getters).map(a=>{const c=o.get(a);return{editable:!1,key:a,value:c._getters.reduce((i,u)=>(i[u]=c[u],i),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Ir(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:q(e.type),key:q(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Cr(e){switch(e){case J.direct:return"mutation";case J.patchFunction:return"$patch";case J.patchObject:return"$patch";default:return"unknown"}}let he=!0;const De=[],le="pinia:mutations",j="pinia",{assign:Nr}=Object,Ve=e=>"🍍 "+e;function Pr(e,t){Je({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:De,app:e},n=>{typeof n.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:le,label:"Pinia 🍍",color:15064968}),n.addInspector({id:j,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{vr(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await _r(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{br(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const r=t._s.get(o);r?typeof r.$reset!="function"?B(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(r.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,r)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const c=o.componentInstance.proxy._pStores;Object.values(c).forEach(i=>{o.instanceData.state.push({type:Ve(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:s.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((u,d)=>(u[d]=i.$state[d],u),{})}),i._getters&&i._getters.length&&o.instanceData.state.push({type:Ve(i.$id),key:"getters",editable:!1,value:i._getters.reduce((u,d)=>{try{u[d]=i[d]}catch(l){u[d]=l}return u},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===j){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):Jt.toLowerCase().includes(o.filter.toLowerCase())):r).map(Sr)}}),n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===j){const r=o.nodeId===Ze?t:t._s.get(o.nodeId);if(!r)return;r&&(o.state=Or(r))}}),n.on.editInspectorState((o,r)=>{if(o.app===e&&o.inspectorId===j){const a=o.nodeId===Ze?t:t._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:c}=o;Xe(a)?c.unshift("state"):(c.length!==1||!a._customProperties.has(c[0])||c[0]in a.$state)&&c.unshift("$state"),he=!1,o.set(a,c,o.state.value),he=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const r=o.type.replace(/^🍍\s*/,""),a=t._s.get(r);if(!a)return B(`store "${r}" not found`,"error");const{path:c}=o;if(c[0]!=="state")return B(`Invalid path for store "${r}": -${c} -Only state can be modified.`);c[0]="$state",he=!1,o.set(a,c,o.state.value),he=!0}})})}function xr(e,t){De.includes(Ve(t.$id))||De.push(Ve(t.$id)),Je({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:De,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:c,onError:i,name:u,args:d})=>{const l=Yt++;n.addTimelineEvent({layerId:le,event:{time:o(),title:"🛫 "+u,subtitle:"start",data:{store:q(t.$id),action:q(u),args:d},groupId:l}}),c(f=>{re=void 0,n.addTimelineEvent({layerId:le,event:{time:o(),title:"🛬 "+u,subtitle:"end",data:{store:q(t.$id),action:q(u),args:d,result:f},groupId:l}})}),i(f=>{re=void 0,n.addTimelineEvent({layerId:le,event:{time:o(),logType:"error",title:"💥 "+u,subtitle:"end",data:{store:q(t.$id),action:q(u),args:d,error:f},groupId:l}})})},!0),t._customProperties.forEach(c=>{s.watch(()=>s.unref(t[c]),(i,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(j),he&&n.addTimelineEvent({layerId:le,event:{time:o(),title:"Change",subtitle:c,data:{newValue:i,oldValue:u},groupId:re}})},{deep:!0})}),t.$subscribe(({events:c,type:i},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(j),!he)return;const d={time:o(),title:Cr(i),data:Nr({store:q(t.$id)},Ir(c)),groupId:re};i===J.patchFunction?d.subtitle="⤵️":i===J.patchObject?d.subtitle="🧩":c&&!Array.isArray(c)&&(d.subtitle=c.type),c&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),n.addTimelineEvent({layerId:le,event:d})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=s.markRaw(c=>{r(c),n.addTimelineEvent({layerId:le,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:q(t.$id),info:q("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`"${t.$id}" store installed 🆕`)})}let Yt=0,re;function Xt(e,t,n){const o=t.reduce((r,a)=>(r[a]=s.toRaw(e)[a],r),{});for(const r in o)e[r]=function(){const a=Yt,c=n?new Proxy(e,{get(...u){return re=a,Reflect.get(...u)},set(...u){return re=a,Reflect.set(...u)}}):e;re=a;const i=o[r].apply(c,arguments);return re=void 0,i}}function $r({app:e,store:t,options:n}){if(t.$id.startsWith("__hot:"))return;t._isOptionsAPI=!!n.state,Xt(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;s.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),Xt(t,Object.keys(r._hmrPayload.actions),!!t._isOptionsAPI)},xr(e,t)}function Rr(){const e=s.effectScope(!0),t=e.run(()=>s.ref({}));let n=[],o=[];const r=s.markRaw({install(a){be(r),r._a=a,a.provide(Ht,r),a.config.globalProperties.$pinia=r,Ee&&Pr(a,r),o.forEach(c=>n.push(c)),o=[]},use(a){return!this._a&&!jt?o.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Ee&&typeof Proxy<"u"&&r.use($r),r}function Zt(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const r=e[n];ce(r)&&ce(o)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Zt(r,o):e[n]=o}return e}const en=()=>{};function tn(e,t,n,o=en){e.push(t);const r=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&s.getCurrentScope()&&s.onScopeDispose(r),r}function me(e,...t){e.slice().forEach(n=>{n(...t)})}const Tr=e=>e();function et(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,o)=>e.set(o,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ce(r)&&ce(o)&&e.hasOwnProperty(n)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=et(r,o):e[n]=o}return e}const Ar=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Dr(e){return!ce(e)||!e.hasOwnProperty(Ar)}const{assign:z}=Object;function nn(e){return!!(s.isRef(e)&&e.effect)}function on(e,t,n,o){const{state:r,actions:a,getters:c}=t,i=n.state.value[e];let u;function d(){!i&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=r?r():{});const l=process.env.NODE_ENV!=="production"&&o?s.toRefs(s.ref(r?r():{}).value):s.toRefs(n.state.value[e]);return z(l,a,Object.keys(c||{}).reduce((f,p)=>(process.env.NODE_ENV!=="production"&&p in l&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),f[p]=s.markRaw(s.computed(()=>{be(n);const h=n._s.get(e);return c[p].call(h,h)})),f),{}))}return u=tt(e,d,t,n,o,!0),u}function tt(e,t,n={},o,r,a){let c;const i=z({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const u={deep:!0};process.env.NODE_ENV!=="production"&&!jt&&(u.onTrigger=k=>{d?h=k:d==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(k):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,l,f=[],p=[],h;const y=o.state.value[e];!a&&!y&&(process.env.NODE_ENV==="production"||!r)&&(o.state.value[e]={});const g=s.ref({});let _;function O(k){let b;d=l=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof k=="function"?(k(o.state.value[e]),b={type:J.patchFunction,storeId:e,events:h}):(et(o.state.value[e],k),b={type:J.patchObject,payload:k,storeId:e,events:h});const R=_=Symbol();s.nextTick().then(()=>{_===R&&(d=!0)}),l=!0,me(f,b,o.state.value[e])}const I=a?function(){const{state:b}=n,R=b?b():{};this.$patch(V=>{z(V,R)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:en;function T(){c.stop(),f=[],p=[],o._s.delete(e)}function L(k,b){return function(){be(o);const R=Array.from(arguments),V=[],de=[];function xe(U){V.push(U)}function Fe(U){de.push(U)}me(p,{args:R,name:k,store:S,after:xe,onError:Fe});let Y;try{Y=b.apply(this&&this.$id===e?this:S,R)}catch(U){throw me(de,U),U}return Y instanceof Promise?Y.then(U=>(me(V,U),U)).catch(U=>(me(de,U),Promise.reject(U))):(me(V,Y),Y)}}const G=s.markRaw({actions:{},getters:{},state:[],hotState:g}),Q={_p:o,$id:e,$onAction:tn.bind(null,p),$patch:O,$reset:I,$subscribe(k,b={}){const R=tn(f,k,b.detached,()=>V()),V=c.run(()=>s.watch(()=>o.state.value[e],de=>{(b.flush==="sync"?l:d)&&k({storeId:e,type:J.direct,events:h},de)},z({},u,b)));return R},$dispose:T},S=s.reactive(process.env.NODE_ENV!=="production"||Ee?z({_hmrPayload:G,_customProperties:s.markRaw(new Set)},Q):Q);o._s.set(e,S);const K=(o._a&&o._a.runWithContext||Tr)(()=>o._e.run(()=>(c=s.effectScope()).run(t)));for(const k in K){const b=K[k];if(s.isRef(b)&&!nn(b)||s.isReactive(b))process.env.NODE_ENV!=="production"&&r?$e(g.value,k,s.toRef(K,k)):a||(y&&Dr(b)&&(s.isRef(b)?b.value=y[k]:et(b,y[k])),o.state.value[e][k]=b),process.env.NODE_ENV!=="production"&&G.state.push(k);else if(typeof b=="function"){const R=process.env.NODE_ENV!=="production"&&r?b:L(k,b);K[k]=R,process.env.NODE_ENV!=="production"&&(G.actions[k]=b),i.actions[k]=b}else process.env.NODE_ENV!=="production"&&nn(b)&&(G.getters[k]=a?n.getters[k]:b,Re&&(K._getters||(K._getters=s.markRaw([]))).push(k))}if(z(S,K),z(s.toRaw(S),K),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&r?g.value:o.state.value[e],set:k=>{if(process.env.NODE_ENV!=="production"&&r)throw new Error("cannot set hotState");O(b=>{z(b,k)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=s.markRaw(k=>{S._hotUpdating=!0,k._hmrPayload.state.forEach(b=>{if(b in S.$state){const R=k.$state[b],V=S.$state[b];typeof R=="object"&&ce(R)&&ce(V)?Zt(R,V):k.$state[b]=V}$e(S,b,s.toRef(k.$state,b))}),Object.keys(S.$state).forEach(b=>{b in k.$state||qe(S,b)}),d=!1,l=!1,o.state.value[e]=s.toRef(k._hmrPayload,"hotState"),l=!0,s.nextTick().then(()=>{d=!0});for(const b in k._hmrPayload.actions){const R=k[b];$e(S,b,L(b,R))}for(const b in k._hmrPayload.getters){const R=k._hmrPayload.getters[b],V=a?s.computed(()=>(be(o),R.call(S,S))):R;$e(S,b,V)}Object.keys(S._hmrPayload.getters).forEach(b=>{b in k._hmrPayload.getters||qe(S,b)}),Object.keys(S._hmrPayload.actions).forEach(b=>{b in k._hmrPayload.actions||qe(S,b)}),S._hmrPayload=k._hmrPayload,S._getters=k._getters,S._hotUpdating=!1})),Ee){const k={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(b=>{Object.defineProperty(S,b,z({value:S[b]},k))})}return o._p.forEach(k=>{if(Ee){const b=c.run(()=>k({store:S,app:o._a,pinia:o,options:i}));Object.keys(b||{}).forEach(R=>S._customProperties.add(R)),z(S,b)}else z(S,c.run(()=>k({store:S,app:o._a,pinia:o,options:i})))}),process.env.NODE_ENV!=="production"&&S.$state&&typeof S.$state=="object"&&typeof S.$state.constructor=="function"&&!S.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be - state: () => new MyClass() -Found in store "${S.$id}".`),y&&a&&n.hydrate&&n.hydrate(S.$state,y),d=!0,l=!0,S}function Vr(e,t,n){let o,r;const a=typeof t=="function";if(typeof e=="string")o=e,r=a?n:t;else if(r=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function c(i,u){const d=s.hasInjectionContext();if(i=(process.env.NODE_ENV==="test"&&_e&&_e._testing?null:i)||(d?s.inject(Ht,null):null),i&&be(i),process.env.NODE_ENV!=="production"&&!_e)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? -See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. -This will fail in production.`);i=_e,i._s.has(o)||(a?tt(o,t,r,i):on(o,r,i),process.env.NODE_ENV!=="production"&&(c._pinia=i));const l=i._s.get(o);if(process.env.NODE_ENV!=="production"&&u){const f="__hot:"+o,p=a?tt(f,t,r,i,!0):on(f,z({},r),i,!0);u._hotUpdate(p),delete i.state.value[f],i._s.delete(f)}if(process.env.NODE_ENV!=="production"&&Re){const f=s.getCurrentInstance();if(f&&f.proxy&&!u){const p=f.proxy,h="_pStores"in p?p._pStores:p._pStores={};h[o]=l}}return l}return c.$id=o,c}const Br=Vr("data",()=>{const e=s.ref([]),t=s.ref({});return{records:e,record:t}});function rn(e){e||(e=s.inject("$registry"));const t=Br(),n=s.ref(new ve(e,t)),o=s.ref(!1);return s.onBeforeMount(async()=>{var r,a;const c=e.router.currentRoute.value,i=(r=c.params.records)==null?void 0:r.toString().toLowerCase(),u=(a=c.params.record)==null?void 0:a.toString().toLowerCase();if(!i&&!u)return;const d=await e.getMeta(i);e.addDoctype(d),n.value.setup(d),i&&(u?await n.value.getRecord(d,u):await n.value.getRecords(d)),n.value.runAction(d,"LOAD",u?[u]:void 0),o.value=!0}),{stonecrop:n,isReady:o}}/*! - * vue-router v4.2.5 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */const Z=typeof window<"u";function Mr(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const x=Object.assign;function nt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const ke=()=>{},F=Array.isArray;function P(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const Lr=/\/$/,jr=e=>e.replace(Lr,"");function ot(e,t,n="/"){let o,r={},a="",c="";const i=t.indexOf("#");let u=t.indexOf("?");return i=0&&(u=-1),u>-1&&(o=t.slice(0,u),a=t.slice(u+1,i>-1?i:t.length),r=e(a)),i>-1&&(o=o||t.slice(0,i),c=t.slice(i,t.length)),o=Fr(o??t,n),{fullPath:o+(a&&"?")+a+c,path:o,query:r,hash:c}}function Ur(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function sn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function an(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&se(t.matched[o],n.matched[r])&&cn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function se(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Hr(e[n],t[n]))return!1;return!0}function Hr(e,t){return F(e)?ln(e,t):F(t)?ln(t,e):e===t}function ln(e,t){return F(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Fr(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return P(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let a=n.length-1,c,i;for(c=0;c1&&a--;else break;return n.slice(0,a).join("/")+"/"+o.slice(c-(c===o.length?1:0)).join("/")}var Se;(function(e){e.pop="pop",e.push="push"})(Se||(Se={}));var Oe;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Oe||(Oe={}));function Wr(e){if(!e)if(Z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jr(e)}const zr=/^[^#]+#/;function Gr(e,t){return e.replace(zr,"#")+t}function Qr(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Be=()=>({left:window.pageXOffset,top:window.pageYOffset});function qr(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const a=document.querySelector(e.el);if(o&&a){P(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{P(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r){process.env.NODE_ENV!=="production"&&P(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=Qr(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function un(e,t){return(history.state?history.state.position-t:-1)+e}const rt=new Map;function Kr(e,t){rt.set(e,t)}function Jr(e){const t=rt.get(e);return rt.delete(e),t}let Yr=()=>location.protocol+"//"+location.host;function dn(e,t){const{pathname:n,search:o,hash:r}=t,a=e.indexOf("#");if(a>-1){let i=r.includes(e.slice(a))?e.slice(a).length:1,u=r.slice(i);return u[0]!=="/"&&(u="/"+u),sn(u,"")}return sn(n,e)+o+r}function Xr(e,t,n,o){let r=[],a=[],c=null;const i=({state:p})=>{const h=dn(e,location),y=n.value,g=t.value;let _=0;if(p){if(n.value=h,t.value=p,c&&c===y){c=null;return}_=g?p.position-g.position:0}else o(h);r.forEach(O=>{O(n.value,y,{delta:_,type:Se.pop,direction:_?_>0?Oe.forward:Oe.back:Oe.unknown})})};function u(){c=n.value}function d(p){r.push(p);const h=()=>{const y=r.indexOf(p);y>-1&&r.splice(y,1)};return a.push(h),h}function l(){const{history:p}=window;p.state&&p.replaceState(x({},p.state,{scroll:Be()}),"")}function f(){for(const p of a)p();a=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:u,listen:d,destroy:f}}function fn(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Be():null}}function Zr(e){const{history:t,location:n}=window,o={value:dn(e,n)},r={value:t.state};r.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(u,d,l){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:Yr()+e+u;try{t[l?"replaceState":"pushState"](d,"",p),r.value=d}catch(h){process.env.NODE_ENV!=="production"?P("Error with push/replace State",h):console.error(h),n[l?"replace":"assign"](p)}}function c(u,d){const l=x({},t.state,fn(r.value.back,u,r.value.forward,!0),d,{position:r.value.position});a(u,l,!0),o.value=u}function i(u,d){const l=x({},r.value,t.state,{forward:u,scroll:Be()});process.env.NODE_ENV!=="production"&&!t.state&&P(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: - -history.replaceState(history.state, '', url) - -You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`),a(l.current,l,!0);const f=x({},fn(o.value,u,null),{position:l.position+1},d);a(u,f,!1),o.value=u}return{location:o,state:r,push:i,replace:c}}function es(e){e=Wr(e);const t=Zr(e),n=Xr(e,t.state,t.location,t.replace);function o(a,c=!0){c||n.pauseListeners(),history.go(a)}const r=x({location:"",base:e,go:o,createHref:Gr.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function ts(e){return typeof e=="string"||e&&typeof e=="object"}function pn(e){return typeof e=="string"||typeof e=="symbol"}const ae={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},st=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var hn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(hn||(hn={}));const ns={1({location:e,currentLocation:t}){return`No match for - ${JSON.stringify(e)}${t?` -while being at -`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${rs(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ge(e,t){return process.env.NODE_ENV!=="production"?x(new Error(ns[e](t)),{type:e,[st]:!0},t):x(new Error,{type:e,[st]:!0},t)}function ee(e,t){return e instanceof Error&&st in e&&(t==null||!!(e.type&t))}const os=["params","query","hash"];function rs(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of os)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const mn="[^/]+?",ss={sensitive:!1,strict:!1,start:!0,end:!0},as=/[.+*?^${}()[\]/\\]/g;function is(e,t){const n=x({},ss,t),o=[];let r=n.start?"^":"";const a=[];for(const d of e){const l=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function ls(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const us={type:0,value:""},ds=/[a-zA-Z0-9_]/;function fs(e){if(!e)return[[]];if(e==="/")return[[us]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${d}": ${h}`)}let n=0,o=n;const r=[];let a;function c(){a&&r.push(a),a=[]}let i=0,u,d="",l="";function f(){d&&(n===0?a.push({type:0,value:d}):n===1||n===2||n===3?(a.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:d,regexp:l,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=u}for(;i{c(I)}:ke}function c(l){if(pn(l)){const f=o.get(l);f&&(o.delete(l),n.splice(n.indexOf(f),1),f.children.forEach(c),f.alias.forEach(c))}else{const f=n.indexOf(l);f>-1&&(n.splice(f,1),l.record.name&&o.delete(l.record.name),l.children.forEach(c),l.alias.forEach(c))}}function i(){return n}function u(l){let f=0;for(;f=0&&(l.record.path!==n[f].record.path||!_n(l,n[f]));)f++;n.splice(f,0,l),l.record.name&&!wn(l)&&o.set(l.record.name,l)}function d(l,f){let p,h={},y,g;if("name"in l&&l.name){if(p=o.get(l.name),!p)throw ge(1,{location:l});if(process.env.NODE_ENV!=="production"){const I=Object.keys(l.params||{}).filter(T=>!p.keys.find(L=>L.name===T));I.length&&P(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}g=p.record.name,h=x(yn(f.params,p.keys.filter(I=>!I.optional).map(I=>I.name)),l.params&&yn(l.params,p.keys.map(I=>I.name))),y=p.stringify(h)}else if("path"in l)y=l.path,process.env.NODE_ENV!=="production"&&!y.startsWith("/")&&P(`The Matcher cannot resolve relative paths but received "${y}". Unless you directly called \`matcher.resolve("${y}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),p=n.find(I=>I.re.test(y)),p&&(h=p.parse(y),g=p.record.name);else{if(p=f.name?o.get(f.name):n.find(I=>I.re.test(f.path)),!p)throw ge(1,{location:l,currentLocation:f});g=p.record.name,h=x({},f.params,l.params),y=p.stringify(h)}const _=[];let O=p;for(;O;)_.unshift(O.record),O=O.parent;return{name:g,path:y,params:h,matched:_,meta:ys(_)}}return e.forEach(l=>a(l)),{addRoute:a,resolve:d,removeRoute:c,getRoutes:i,getRecordMatcher:r}}function yn(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function ms(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:gs(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function gs(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function wn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ys(e){return e.reduce((t,n)=>x(t,n.meta),{})}function vn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function at(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function ws(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(at.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(at.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function vs(e,t){t&&t.record.name&&!e.name&&!e.path&&P(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function _s(e,t){for(const n of t.keys)if(!e.keys.find(at.bind(null,n)))return P(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function _n(e,t){return t.children.some(n=>n===e||_n(e,n))}const bn=/#/g,bs=/&/g,Es=/\//g,ks=/=/g,Ss=/\?/g,En=/\+/g,Os=/%5B/g,Is=/%5D/g,kn=/%5E/g,Cs=/%60/g,Sn=/%7B/g,Ns=/%7C/g,On=/%7D/g,Ps=/%20/g;function it(e){return encodeURI(""+e).replace(Ns,"|").replace(Os,"[").replace(Is,"]")}function xs(e){return it(e).replace(Sn,"{").replace(On,"}").replace(kn,"^")}function ct(e){return it(e).replace(En,"%2B").replace(Ps,"+").replace(bn,"%23").replace(bs,"%26").replace(Cs,"`").replace(Sn,"{").replace(On,"}").replace(kn,"^")}function $s(e){return ct(e).replace(ks,"%3D")}function Rs(e){return it(e).replace(bn,"%23").replace(Ss,"%3F")}function Ts(e){return e==null?"":Rs(e).replace(Es,"%2F")}function Ie(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&P(`Error decoding "${e}". Using original value`)}return""+e}function As(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ra&&ct(a)):[o&&ct(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function Ds(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=F(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Vs=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),lt=Symbol(process.env.NODE_ENV!=="production"?"router":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),ut=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Ce(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ie(e,t,n,o,r){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((c,i)=>{const u=f=>{f===!1?i(ge(4,{from:n,to:t})):f instanceof Error?i(f):ts(f)?i(ge(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),c())},d=e.call(o&&o.instances[r],t,n,process.env.NODE_ENV!=="production"?Bs(u,t,n):u);let l=Promise.resolve(d);if(e.length<3&&(l=l.then(u)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: -${e.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof d=="object"&&"then"in d)l=l.then(p=>u._called?p:(P(f),Promise.reject(new Error("Invalid navigation guard"))));else if(d!==void 0&&!u._called){P(f),i(new Error("Invalid navigation guard"));return}}l.catch(f=>i(f))})}function Bs(e,t,n){let o=0;return function(){o++===1&&P(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function dt(e,t,n,o){const r=[];for(const a of e){process.env.NODE_ENV!=="production"&&!a.components&&!a.children.length&&P(`Record with path "${a.path}" is either missing a "component(s)" or "children" property.`);for(const c in a.components){let i=a.components[c];if(process.env.NODE_ENV!=="production"){if(!i||typeof i!="object"&&typeof i!="function")throw P(`Component "${c}" in record with path "${a.path}" is not a valid component. Received "${String(i)}".`),new Error("Invalid route component");if("then"in i){P(`Component "${c}" in record with path "${a.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const u=i;i=()=>u}else i.__asyncLoader&&!i.__warnedDefineAsync&&(i.__warnedDefineAsync=!0,P(`Component "${c}" in record with path "${a.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(Ms(i)){const d=(i.__vccOpts||i)[t];d&&r.push(ie(d,n,o,a,c))}else{let u=i();process.env.NODE_ENV!=="production"&&!("catch"in u)&&(P(`Component "${c}" in record with path "${a.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),u=Promise.resolve(u)),r.push(()=>u.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${a.path}"`));const l=Mr(d)?d.default:d;a.components[c]=l;const p=(l.__vccOpts||l)[t];return p&&ie(p,n,o,a,c)()}))}}}return r}function Ms(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Pn(e){const t=s.inject(lt),n=s.inject(Nn),o=s.computed(()=>t.resolve(s.unref(e.to))),r=s.computed(()=>{const{matched:u}=o.value,{length:d}=u,l=u[d-1],f=n.matched;if(!l||!f.length)return-1;const p=f.findIndex(se.bind(null,l));if(p>-1)return p;const h=xn(u[d-2]);return d>1&&xn(l)===h&&f[f.length-1].path!==h?f.findIndex(se.bind(null,u[d-2])):p}),a=s.computed(()=>r.value>-1&&Us(n.params,o.value.params)),c=s.computed(()=>r.value>-1&&r.value===n.matched.length-1&&cn(n.params,o.value.params));function i(u={}){return js(u)?t[s.unref(e.replace)?"replace":"push"](s.unref(e.to)).catch(ke):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&Z){const u=s.getCurrentInstance();if(u){const d={route:o.value,isActive:a.value,isExactActive:c.value};u.__vrl_devtools=u.__vrl_devtools||[],u.__vrl_devtools.push(d),s.watchEffect(()=>{d.route=o.value,d.isActive=a.value,d.isExactActive=c.value},{flush:"post"})}}return{route:o,href:s.computed(()=>o.value.href),isActive:a,isExactActive:c,navigate:i}}const Ls=s.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Pn,setup(e,{slots:t}){const n=s.reactive(Pn(e)),{options:o}=s.inject(lt),r=s.computed(()=>({[$n(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[$n(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:s.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}});function js(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Us(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!F(r)||r.length!==o.length||o.some((a,c)=>a!==r[c]))return!1}return!0}function xn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const $n=(e,t,n)=>e??t??n,Hs=s.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Ws();const o=s.inject(ut),r=s.computed(()=>e.route||o.value),a=s.inject(Cn,0),c=s.computed(()=>{let d=s.unref(a);const{matched:l}=r.value;let f;for(;(f=l[d])&&!f.components;)d++;return d}),i=s.computed(()=>r.value.matched[c.value]);s.provide(Cn,s.computed(()=>c.value+1)),s.provide(Vs,i),s.provide(ut,r);const u=s.ref();return s.watch(()=>[u.value,i.value,e.name],([d,l,f],[p,h,y])=>{l&&(l.instances[f]=d,h&&h!==l&&d&&d===p&&(l.leaveGuards.size||(l.leaveGuards=h.leaveGuards),l.updateGuards.size||(l.updateGuards=h.updateGuards))),d&&l&&(!h||!se(l,h)||!p)&&(l.enterCallbacks[f]||[]).forEach(g=>g(d))},{flush:"post"}),()=>{const d=r.value,l=e.name,f=i.value,p=f&&f.components[l];if(!p)return Rn(n.default,{Component:p,route:d});const h=f.props[l],y=h?h===!0?d.params:typeof h=="function"?h(d):h:null,g=O=>{O.component.isUnmounted&&(f.instances[l]=null)},_=s.h(p,x({},y,t,{onVnodeUnmounted:g,ref:u}));if(process.env.NODE_ENV!=="production"&&Z&&_.ref){const O={depth:c.value,name:f.name,path:f.path,meta:f.meta};(F(_.ref)?_.ref.map(T=>T.i):[_.ref.i]).forEach(T=>{T.__vrv_devtools=O})}return Rn(n.default,{Component:_,route:d})||_}}});function Rn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Fs=Hs;function Ws(){const e=s.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const o=t==="KeepAlive"?"keep-alive":"transition";P(` can no longer be used directly inside or . -Use slot props instead: - - - <${o}> - - -`)}}function Ne(e,t){const n=x({},e,{matched:e.matched.map(o=>Zs(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Me(e){return{_custom:{display:e}}}let zs=0;function Gs(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=zs++;Je({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((l,f)=>{l.instanceData&&l.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ne(t.currentRoute.value,"Current Route")})}),r.on.visitComponentTree(({treeNode:l,componentInstance:f})=>{if(f.__vrv_devtools){const p=f.__vrv_devtools;l.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:Tn})}F(f.__vrl_devtools)&&(f.__devtoolsApi=r,f.__vrl_devtools.forEach(p=>{let h=Vn,y="";p.isExactActive?(h=Dn,y="This is exactly active"):p.isActive&&(h=An,y="This link is active"),l.tags.push({label:p.route.path,textColor:0,tooltip:y,backgroundColor:h})}))}),s.watch(t.currentRoute,()=>{u(),r.notifyComponentUpdate(),r.sendInspectorTree(i),r.sendInspectorState(i)});const a="router:navigations:"+o;r.addTimelineLayer({id:a,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((l,f)=>{r.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:f.fullPath,logType:"error",time:r.now(),data:{error:l},groupId:f.meta.__navigationId}})});let c=0;t.beforeEach((l,f)=>{const p={guard:Me("beforeEach"),from:Ne(f,"Current Location during this navigation"),to:Ne(l,"Target location")};Object.defineProperty(l.meta,"__navigationId",{value:c++}),r.addTimelineEvent({layerId:a,event:{time:r.now(),title:"Start of navigation",subtitle:l.fullPath,data:p,groupId:l.meta.__navigationId}})}),t.afterEach((l,f,p)=>{const h={guard:Me("afterEach")};p?(h.failure={_custom:{type:Error,readOnly:!0,display:p?p.message:"",tooltip:"Navigation Failure",value:p}},h.status=Me("❌")):h.status=Me("✅"),h.from=Ne(f,"Current Location during this navigation"),h.to=Ne(l,"Target location"),r.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:l.fullPath,time:r.now(),data:h,logType:p?"warning":"default",groupId:l.meta.__navigationId}})});const i="router-inspector:"+o;r.addInspector({id:i,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function u(){if(!d)return;const l=d;let f=n.getRoutes().filter(p=>!p.parent||!p.parent.record.components);f.forEach(Ln),l.filter&&(f=f.filter(p=>ft(p,l.filter.toLowerCase()))),f.forEach(p=>Mn(p,t.currentRoute.value)),l.rootNodes=f.map(Bn)}let d;r.on.getInspectorTree(l=>{d=l,l.app===e&&l.inspectorId===i&&u()}),r.on.getInspectorState(l=>{if(l.app===e&&l.inspectorId===i){const p=n.getRoutes().find(h=>h.record.__vd_id===l.nodeId);p&&(l.state={options:qs(p)})}}),r.sendInspectorTree(i),r.sendInspectorState(i)})}function Qs(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function qs(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${Qs(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Tn=15485081,An=2450411,Dn=8702998,Ks=2282478,Vn=16486972,Js=6710886;function Bn(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:Ks}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Vn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Tn}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Dn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:An}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:Js});let o=n.__vd_id;return o==null&&(o=String(Ys++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(Bn)}}let Ys=0;const Xs=/^\/(.*)\/([a-z]*)$/;function Mn(e,t){const n=t.matched.length&&se(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>se(o,e.record))),e.children.forEach(o=>Mn(o,t))}function Ln(e){e.__vd_match=!1,e.children.forEach(Ln)}function ft(e,t){const n=String(e.re).match(Xs);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(c=>ft(c,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const r=e.record.path.toLowerCase(),a=Ie(r);return!t.startsWith("/")&&(a.includes(t)||r.includes(t))||a.startsWith(t)||r.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(c=>ft(c,t))}function Zs(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function ea(e){const t=hs(e.routes,e),n=e.parseQuery||As,o=e.stringifyQuery||In,r=e.history;if(process.env.NODE_ENV!=="production"&&!r)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const a=Ce(),c=Ce(),i=Ce(),u=s.shallowRef(ae);let d=ae;Z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=nt.bind(null,m=>""+m),f=nt.bind(null,Ts),p=nt.bind(null,Ie);function h(m,v){let w,E;return pn(m)?(w=t.getRecordMatcher(m),E=v):E=m,t.addRoute(E,w)}function y(m){const v=t.getRecordMatcher(m);v?t.removeRoute(v):process.env.NODE_ENV!=="production"&&P(`Cannot remove non-existent route "${String(m)}"`)}function g(){return t.getRoutes().map(m=>m.record)}function _(m){return!!t.getRecordMatcher(m)}function O(m,v){if(v=x({},v||u.value),typeof m=="string"){const C=ot(n,m,v.path),A=t.resolve({path:C.path},v),fe=r.createHref(C.fullPath);return process.env.NODE_ENV!=="production"&&(fe.startsWith("//")?P(`Location "${m}" resolved to "${fe}". A resolved location cannot start with multiple slashes.`):A.matched.length||P(`No match found for location with path "${m}"`)),x(C,A,{params:p(A.params),hash:Ie(C.hash),redirectedFrom:void 0,href:fe})}let w;if("path"in m)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&P(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),w=x({},m,{path:ot(n,m.path,v.path).path});else{const C=x({},m.params);for(const A in C)C[A]==null&&delete C[A];w=x({},m,{params:f(C)}),v.params=f(v.params)}const E=t.resolve(w,v),$=m.hash||"";process.env.NODE_ENV!=="production"&&$&&!$.startsWith("#")&&P(`A \`hash\` should always start with the character "#". Replace "${$}" with "#${$}".`),E.params=l(p(E.params));const D=Ur(o,x({},m,{hash:xs($),path:E.path})),N=r.createHref(D);return process.env.NODE_ENV!=="production"&&(N.startsWith("//")?P(`Location "${m}" resolved to "${N}". A resolved location cannot start with multiple slashes.`):E.matched.length||P(`No match found for location with path "${"path"in m?m.path:m}"`)),x({fullPath:D,hash:$,query:o===In?Ds(m.query):m.query||{}},E,{redirectedFrom:void 0,href:N})}function I(m){return typeof m=="string"?ot(n,m,u.value.path):x({},m)}function T(m,v){if(d!==m)return ge(8,{from:v,to:m})}function L(m){return S(m)}function G(m){return L(x(I(m),{replace:!0}))}function Q(m){const v=m.matched[m.matched.length-1];if(v&&v.redirect){const{redirect:w}=v;let E=typeof w=="function"?w(m):w;if(typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=I(E):{path:E},E.params={}),process.env.NODE_ENV!=="production"&&!("path"in E)&&!("name"in E))throw P(`Invalid redirect found: -${JSON.stringify(E,null,2)} - when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return x({query:m.query,hash:m.hash,params:"path"in E?{}:m.params},E)}}function S(m,v){const w=d=O(m),E=u.value,$=m.state,D=m.force,N=m.replace===!0,C=Q(w);if(C)return S(x(I(C),{state:typeof C=="object"?x({},$,C.state):$,force:D,replace:N}),v||w);const A=w;A.redirectedFrom=v;let fe;return!D&&an(o,E,w)&&(fe=ge(16,{to:A,from:E}),Ao(E,E,!0,!1)),(fe?Promise.resolve(fe):k(A,E)).catch(H=>ee(H)?ee(H,2)?H:Nt(H):U(H,A,E)).then(H=>{if(H){if(ee(H,2))return process.env.NODE_ENV!=="production"&&an(o,O(H.to),A)&&v&&(v._count=v._count?v._count+1:1)>30?(P(`Detected a possibly infinite redirection in a navigation guard when going from "${E.fullPath}" to "${A.fullPath}". Aborting to avoid a Stack Overflow. - Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S(x({replace:N},I(H.to),{state:typeof H.to=="object"?x({},$,H.to.state):$,force:D}),v||A)}else H=R(A,E,!0,N,$);return b(A,E,H),H})}function To(m,v){const w=T(m,v);return w?Promise.reject(w):Promise.resolve()}function K(m){const v=We.values().next().value;return v&&typeof v.runWithContext=="function"?v.runWithContext(m):m()}function k(m,v){let w;const[E,$,D]=ta(m,v);w=dt(E.reverse(),"beforeRouteLeave",m,v);for(const C of E)C.leaveGuards.forEach(A=>{w.push(ie(A,m,v))});const N=To.bind(null,m,v);return w.push(N),we(w).then(()=>{w=[];for(const C of a.list())w.push(ie(C,m,v));return w.push(N),we(w)}).then(()=>{w=dt($,"beforeRouteUpdate",m,v);for(const C of $)C.updateGuards.forEach(A=>{w.push(ie(A,m,v))});return w.push(N),we(w)}).then(()=>{w=[];for(const C of D)if(C.beforeEnter)if(F(C.beforeEnter))for(const A of C.beforeEnter)w.push(ie(A,m,v));else w.push(ie(C.beforeEnter,m,v));return w.push(N),we(w)}).then(()=>(m.matched.forEach(C=>C.enterCallbacks={}),w=dt(D,"beforeRouteEnter",m,v),w.push(N),we(w))).then(()=>{w=[];for(const C of c.list())w.push(ie(C,m,v));return w.push(N),we(w)}).catch(C=>ee(C,8)?C:Promise.reject(C))}function b(m,v,w){i.list().forEach(E=>K(()=>E(m,v,w)))}function R(m,v,w,E,$){const D=T(m,v);if(D)return D;const N=v===ae,C=Z?history.state:{};w&&(E||N?r.replace(m.fullPath,x({scroll:N&&C&&C.scroll},$)):r.push(m.fullPath,$)),u.value=m,Ao(m,v,w,N),Nt()}let V;function de(){V||(V=r.listen((m,v,w)=>{const E=O(m),$=Q(E);if($){S(x($,{replace:!0}),E).catch(ke);return}d=E;const D=u.value;Z&&Kr(un(D.fullPath,w.delta),Be()),k(E,D).catch(N=>ee(N,12)?N:ee(N,2)?(S(N.to,E).then(C=>{ee(C,20)&&!w.delta&&w.type===Se.pop&&r.go(-1,!1)}).catch(ke),Promise.reject()):(w.delta&&r.go(-w.delta,!1),U(N,E,D))).then(N=>{N=N||R(E,D,!1),N&&(w.delta&&!ee(N,8)?r.go(-w.delta,!1):w.type===Se.pop&&ee(N,20)&&r.go(-1,!1)),b(E,D,N)}).catch(ke)}))}let xe=Ce(),Fe=Ce(),Y;function U(m,v,w){Nt(m);const E=Fe.list();return E.length?E.forEach($=>$(m,v,w)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function Zi(){return Y&&u.value!==ae?Promise.resolve():new Promise((m,v)=>{xe.add([m,v])})}function Nt(m){return Y||(Y=!m,de(),xe.list().forEach(([v,w])=>m?w(m):v()),xe.reset()),m}function Ao(m,v,w,E){const{scrollBehavior:$}=e;if(!Z||!$)return Promise.resolve();const D=!w&&Jr(un(m.fullPath,0))||(E||!w)&&history.state&&history.state.scroll||null;return s.nextTick().then(()=>$(m,v,D)).then(N=>N&&qr(N)).catch(N=>U(N,m,v))}const Pt=m=>r.go(m);let xt;const We=new Set,ec={currentRoute:u,listening:!0,addRoute:h,removeRoute:y,hasRoute:_,getRoutes:g,resolve:O,options:e,push:L,replace:G,go:Pt,back:()=>Pt(-1),forward:()=>Pt(1),beforeEach:a.add,beforeResolve:c.add,afterEach:i.add,onError:Fe.add,isReady:Zi,install(m){const v=this;m.component("RouterLink",Ls),m.component("RouterView",Fs),m.config.globalProperties.$router=v,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>s.unref(u)}),Z&&!xt&&u.value===ae&&(xt=!0,L(r.location).catch($=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",$)}));const w={};for(const $ in ae)Object.defineProperty(w,$,{get:()=>u.value[$],enumerable:!0});m.provide(lt,v),m.provide(Nn,s.shallowReactive(w)),m.provide(ut,u);const E=m.unmount;We.add(m),m.unmount=function(){We.delete(m),We.size<1&&(d=ae,V&&V(),V=null,u.value=ae,xt=!1,Y=!1),E()},process.env.NODE_ENV!=="production"&&Z&&Gs(m,v,t)}};function we(m){return m.reduce((v,w)=>v.then(()=>K(w)),Promise.resolve())}return ec}function ta(e,t){const n=[],o=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let c=0;cse(d,i))?o.push(i):n.push(i));const u=e.matched[c];u&&(t.matched.find(d=>se(d,u))||r.push(u))}return[n,o,r]}ea({history:es(),routes:[]});function na(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ue=Promise.resolve();function jn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function oa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function pt(){return Math.random().toString(36).substring(2)}var Un=0,ht=0;function Le(){var e=new Date().getTime();return e===Un?(ht++,e*1e3+ht):(Un=e,ht=0,e*1e3)}var ra=Le,sa="native";function aa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function ia(e){e.bc.close(),e.subFns=[]}function ca(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function la(e,t){e.messagesCallback=t}function ua(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function da(){return 150}var fa={create:aa,close:ia,onMessage:la,postMessage:ca,canBeUsed:ua,type:sa,averageResponseTime:da,microSeconds:ra},Hn=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,Fn()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,pa(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function pa(e){for(var t=Fn()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],a=o[1];if(a0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ha=Le,ma="pubkey.broadcast-channel-0-",te="messages",je={durability:"relaxed"},ga="idb";function Wn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function gt(e){e.commit&&e.commit()}function ya(e){var t=Wn(),n=ma+e,o=t.open(n);return o.onupgradeneeded=function(r){var a=r.target.result;a.createObjectStore(te,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,a){o.onerror=function(c){return a(c)},o.onsuccess=function(){r(o.result)}})}function wa(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},a=e.transaction([te],"readwrite",je);return new Promise(function(c,i){a.oncomplete=function(){return c()},a.onerror=function(d){return i(d)};var u=a.objectStore(te);u.add(r),gt(a)})}function va(e,t){var n=e.transaction(te,"readonly",je),o=n.objectStore(te),r=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var c=o.getAll(a);return new Promise(function(u,d){c.onerror=function(l){return d(l)},c.onsuccess=function(l){u(l.target.result)}})}function i(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(u,d){var l=i();l.onerror=function(f){return d(f)},l.onsuccess=function(f){var p=f.target.result;p?p.value.ide.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Sa(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ue})}function Oa(e){e.closed=!0,e.db.close()}function Ia(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return wa(e.db,e.uuid,t)}).then(function(){oa(0,10)===0&&Ea(e)}),e.writeBlockPromise}function Ca(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Gn(e)}function Na(){return!!Wn()}function Pa(e){return e.idb.fallbackInterval*2}var xa={create:ka,close:Oa,onMessage:Ca,postMessage:Ia,canBeUsed:Na,type:ga,averageResponseTime:Pa,microSeconds:ha},$a=Le,Ra="pubkey.broadcastChannel-",Ta="localstorage";function Qn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function qn(e){return Ra+e}function Aa(e,t){return new Promise(function(n){jn().then(function(){var o=qn(e.channelName),r={token:pt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(r);Qn().setItem(o,a);var c=document.createEvent("Event");c.initEvent("storage",!0,!0),c.key=o,c.newValue=a,window.dispatchEvent(c),n()})})}function Da(e,t){var n=qn(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Va(e){window.removeEventListener("storage",e)}function Ba(e,t){if(t=mt(t),!Kn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=pt(),o=new Hn(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=Da(e,function(a){r.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time0||e._addEL.internal.length>0}function eo(e,t,n){e._addEL[t].push(n),ei(e)}function to(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ti(e)}function ei(e){if(!e._iL&&Zn(e)){var t=function(r){e._addEL[r.type].forEach(function(a){var c=1e5,i=a.time-c;r.time>=i&&a.fn(r.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ti(e){if(e._iL&&!Zn(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}class vt extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function no(e){return Object(e)!==e}const ni=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oi(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===ni}function ri(e){return Object.prototype.toString.call(e).slice(8,-1)}function si(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case` -`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function ye(e){let t="",n=0;const o=e.length;for(let r=0;r0&&(f+=","),g in d?(a.push(`[${g}]`),f+=i(d[g]),a.pop()):f+=oo;f+="]";break;case"Set":f='["Set"';for(const g of d)f+=`,${i(g)}`;f+="]";break;case"Map":f='["Map"';for(const[g,_]of d)a.push(`.get(${no(g)?Et(g):"..."})`),f+=`,${i(g)},${i(_)}`;f+="]";break;default:if(!oi(d))throw new vt("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(d).length>0)throw new vt("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(d)===null){f='["null"';for(const g in d)a.push(`.${g}`),f+=`,${ye(g)},${i(d[g])}`,a.pop();f+="]"}else{f="{";let g=!1;for(const _ in d)g&&(f+=","),g=!0,a.push(`.${_}`),f+=`${ye(_)}:${i(d[_])}`,a.pop();f+="}"}}return n[l]=f,l}const u=i(e);return u<0?`${u}`:`[${n.join(",")}]`}function Et(e){const t=typeof e;return t==="string"?ye(e):e instanceof String?ye(e.toString()):e===void 0?_t.toString():e===0&&1/e<0?bt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ii(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,a=new wt(r,{type:o}),c=!1,i=0;s.watch(()=>t[e],l=>{c||(i=Date.now(),a.postMessage({timestamp:i,state:io(co(l))})),c=!1},{deep:!0}),a.onmessage=l=>{if(l===void 0){a.postMessage({timestamp:i,state:io(co(t[e]))});return}l.timestamp<=i||(c=!0,i=l.timestamp,t[e]=l.state)};let u=()=>a.postMessage(void 0),d=()=>a.close();return n&&u(),{sync:u,unshare:d}}var ci=(e,t)=>Object.keys(t).includes(e),li=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var a,c;let i=((a=r==null?void 0:r.share)==null?void 0:a.enable)??t,u=((c=r==null?void 0:r.share)==null?void 0:c.omit)??[];!i||Object.keys(o.$state).forEach(d=>{var l;u.includes(d)||!ci(d,o.$state)||ii(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};Rr().use(li({enable:!0,initialize:!0}));const lo=s.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=rn(),o=s.ref([]);return s.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((a,c)=>{const u=t.value.store.record[a.fieldname];r[c].value=u}),o.value=r}}),(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(nr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c)},null,8,["modelValue"])):s.createCommentVNode("",!0)}});var uo;const fo=typeof window<"u",ui=e=>typeof e=="string",di=()=>{};fo&&(uo=window==null?void 0:window.navigator)!=null&&uo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function po(e){return typeof e=="function"?e():s.unref(e)}function fi(e){return e}function pi(e){return s.getCurrentScope()?(s.onScopeDispose(e),!0):!1}function kt(e){var t;const n=po(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ho=fo?window:void 0;function hi(...e){let t,n,o,r;if(ui(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=ho):[t,n,o,r]=e,!t)return di;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],c=()=>{a.forEach(l=>l()),a.length=0},i=(l,f,p,h)=>(l.addEventListener(f,p,h),()=>l.removeEventListener(f,p,h)),u=s.watch(()=>[kt(t),po(r)],([l,f])=>{c(),l&&a.push(...n.flatMap(p=>o.map(h=>i(l,p,h,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return pi(d),d}const mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},go="__vueuse_ssr_handlers__";mo[go]=mo[go]||{};function mi(e,{window:t=ho,scrollTarget:n}={}){const o=s.ref(!1),r=()=>{if(!t)return;const a=t.document,c=kt(e);if(!c)o.value=!1;else{const i=c.getBoundingClientRect();o.value=i.top<=(t.innerHeight||a.documentElement.clientHeight)&&i.left<=(t.innerWidth||a.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return s.watch(()=>kt(e),()=>r(),{immediate:!0,flush:"post"}),t&&hi(n||t,"scroll",r,{capture:!1,passive:!0}),o}var yo;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(yo||(yo={}));var gi=Object.defineProperty,wo=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,vo=(e,t,n)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vi=(e,t)=>{for(var n in t||(t={}))yi.call(t,n)&&vo(e,n,t[n]);if(wo)for(var n of wo(t))wi.call(t,n)&&vo(e,n,t[n]);return e};vi({linear:fi},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const ne=e=>{let t=mi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,_o=e=>{const t=e.target;return St(t)},St=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?St(n):n},_i=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.firstElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.firstElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?Ot(o):o},bo=e=>{const t=e.target;return Ot(t)},Ot=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?Ot(n):n},bi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.lastElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.lastElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?St(o):o},Eo=e=>{const t=e.target;return It(t)},It=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!oe(n)||!ne(n))?It(n):n},ko=e=>{const t=e.target;return Ct(t)},Ct=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!oe(n)||!ne(n))?Ct(n):n},So=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!oe(t)||!ne(t))?Ct(t):t},Oo=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!oe(t)||!ne(t))?It(t):t},Ue=["alt","control","shift","meta"],Ei={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Io={"keydown.up":e=>{const t=_o(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=bo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Eo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=ko(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=_i(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=bi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=bo(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=_o(e);t&&t.focus()}},"keydown.home":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Eo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Co(e){const t=o=>{let r=null;o.parent&&(typeof o.parent=="string"?r=document.querySelector(o.parent):o.parent instanceof Element?r=o.parent:r=o.parent.value);let a=[];if(o.selectors)if(typeof o.selectors=="string")a=r?Array.from(r.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)a.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const c of o.selectors.value)c instanceof Element?a.push(c):a.push(c.$el);else a.push(o.selectors.value);else a=Array.from(r.children).filter(c=>oe(c)&&ne(c));return a},n=o=>r=>{const a=Ei[r.key]||r.key.toLowerCase();if(Ue.includes(a))return;const c=o.handlers||Io;for(const i of Object.keys(c)){const[u,...d]=i.split(".");if(u==="keydown"&&d.includes(a)){const l=c[i],f=d.filter(h=>Ue.includes(h)),p=Ue.some(h=>{const y=h.charAt(0).toUpperCase()+h.slice(1);return r.getModifierState(y)});if(f.length>0){if(p){for(const h of Ue)if(d.includes(h)){const y=h.charAt(0).toUpperCase()+h.slice(1);r.getModifierState(y)&&l(r)}}}else p||l(r)}}};s.onMounted(()=>{for(const o of e){const r=t(o);for(const a of r)a.addEventListener("keydown",n(o))}}),s.onBeforeUnmount(()=>{for(const o of e){const r=t(o);for(const a of r)a.removeEventListener("keydown",n(o))}})}const ki=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Si={key:1},Oi=s.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},clickHandler:{}},setup(e){var t;const n=e,o=s.inject(n.tableid),r=s.ref(null);let a=s.ref(!1);const c=s.computed(()=>{const g=o.cellData(n.colIndex,n.rowIndex);if(o.columns[n.colIndex].format){const _=o.columns[n.colIndex].format;return typeof _=="function"?_(g):typeof _=="string"?Function(`"use strict";return (${_})`)()(g):g}else return g}),i=g=>{if(n.clickHandler){n.clickHandler(g);return}if(o.columns[n.colIndex].mask,o.columns[n.colIndex].modalComponent){const _=r.value.getBoundingClientRect();o.modal.visible=!0,o.modal.colIndex=n.colIndex,o.modal.rowIndex=n.rowIndex,o.modal.parent=r.value,o.modal.top=_.top+_.height,o.modal.left=_.left,o.modal.width=d.value,o.modal.component=o.columns[n.colIndex].modalComponent,o.modal.componentProps=o.columns[n.colIndex].modalComponentProps}};if(n.addNavigation){let g={...Io,"keydown.f2":i,"keydown.alt.up":i,"keydown.alt.down":i,"keydown.alt.left":i,"keydown.alt.right":i};typeof n.addNavigation=="object"&&(g={...g,...n.addNavigation}),Co([{selectors:r,handlers:g}])}const u=s.computed(()=>o.columns[n.colIndex].align||"center"),d=s.computed(()=>o.columns[n.colIndex].width||"40ch");let l="";const f=()=>{r.value&&(l=r.value.innerText)},p=()=>{r.value&&r.value.innerHTML!==l&&(l=r.value.innerText,r.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[n.colIndex].format||o.setCellData(n.rowIndex,n.colIndex,l))},h=(g,_)=>_&&g===0&&_>0?`${_}ch`:"inherit",y={textAlign:u.value,width:d.value,backgroundColor:a.value?"var(--cell-modified-color)":"inherit",fontWeight:a.value?"bold":"inherit",paddingLeft:h(n.colIndex,(t=o.display[n.rowIndex])==null?void 0:t.indent)};return(g,_)=>(s.openBlock(),s.createElementBlock("td",{ref_key:"cell",ref:r,"data-colindex":g.colIndex,"data-rowindex":g.rowIndex,"data-editable":s.unref(o).columns[g.colIndex].edit,contenteditable:s.unref(o).columns[g.colIndex].edit,tabindex:g.tabIndex,spellcheck:!1,style:y,onFocus:f,onPaste:p,onBlur:p,onInput:p,onClick:i,onMousedown:i},[s.unref(o).columns[g.colIndex].cellComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).columns[g.colIndex].cellComponent),s.mergeProps({key:0,value:c.value},s.unref(o).columns[g.colIndex].cellComponentProps),null,16,["value"])):(s.openBlock(),s.createElementBlock("span",Si,s.toDisplayString(c.value),1))],40,ki))}}),Pe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=Pe(Oi,[["__scopeId","data-v-07dfe445"]]),Ci=["tabindex"],Ni={key:0,tabIndex:-1,class:"list-index"},Pi=s.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(e){s.useCssVars(u=>({"5b18ee03":s.unref(r)}));const t=e,n=s.inject(t.tableid),o=s.ref(null),r=n.numberedRowWidth.value,a=()=>n.config.view!=="tree"?"":n.display[t.rowIndex].isRoot||n.display[t.rowIndex].isParent?n.display[t.rowIndex].childrenOpen?"-":"+":"",c=()=>n.config.view!=="tree"||n.display[t.rowIndex].isRoot||n.display[t.rowIndex].open,i=u=>{n.toggleRowExpand(u)};return t.addNavigation&&Co([{selectors:o,handlers:t.addNavigation}]),(u,d)=>s.withDirectives((s.openBlock(),s.createElementBlock("tr",{ref_key:"rowEl",ref:o,tabindex:u.tabIndex,class:"table-row"},[s.unref(n).config.view==="list"?(s.openBlock(),s.createElementBlock("td",Ni,s.toDisplayString(u.rowIndex+1),1)):s.unref(n).config.view==="tree"?(s.openBlock(),s.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:d[0]||(d[0]=l=>i(u.rowIndex))},s.toDisplayString(a()),1)):s.renderSlot(u.$slots,"indexCell",{key:2},void 0,!0),s.renderSlot(u.$slots,"default",{},void 0,!0)],8,Ci)),[[s.vShow,c()]])}}),xi=Pe(Pi,[["__scopeId","data-v-4c71a067"]]);let He;const $i=new Uint8Array(16);function Ri(){if(!He&&(He=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!He))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return He($i)}const M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function Ti(e,t=0){return M[e[t+0]]+M[e[t+1]]+M[e[t+2]]+M[e[t+3]]+"-"+M[e[t+4]]+M[e[t+5]]+"-"+M[e[t+6]]+M[e[t+7]]+"-"+M[e[t+8]]+M[e[t+9]]+"-"+M[e[t+10]]+M[e[t+11]]+M[e[t+12]]+M[e[t+13]]+M[e[t+14]]+M[e[t+15]]}const Ai=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),No={randomUUID:Ai};function Po(e,t,n){if(No.randomUUID&&!t&&!e)return No.randomUUID();e=e||{};const o=e.random||(e.rng||Ri)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=o[r];return t}return Ti(o)}class Di{constructor(t,n,o,r,a,c){this.id=t||Po(),this.rows=o,this.columns=s.reactive(n),this.config=s.reactive(r),this.table=a||s.reactive(this.createTableObject()),this.display=this.createDisplayObject(c),this.modal=s.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,a]of this.rows.entries())t[`${n}:${r}`]=a[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const a=this.rows[r];a.parent&&o.add(a.parent),n[r]={childrenOpen:!1,expanded:!1,indent:a.indent||null,isParent:o.has(r),isRoot:a.parent===null||a.parent===void 0,modified:!1,open:a.parent===null||a.parent===void 0,parent:a.parent}}return s.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return s.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Vi={key:0},Bi={class:"atable-header-row",tabindex:"-1"},Mi={key:0,id:"header-index"},Li=s.defineComponent({__name:"ATableHeader",props:{columns:{},config:{},tableid:{}},setup(e){s.useCssVars(r=>({"12d06943":s.unref(n)}));const t=s.inject(e.tableid),n=t.numberedRowWidth.value,o=r=>({minWidth:r.width||"40ch",textAlign:r.align||"center",width:t.config.fullWidth?"auto":null});return(r,a)=>r.columns.length?(s.openBlock(),s.createElementBlock("thead",Vi,[s.createElementVNode("tr",Bi,[s.unref(t).zeroColumn?(s.openBlock(),s.createElementBlock("th",Mi)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.columns,(c,i)=>(s.openBlock(),s.createElementBlock("th",{key:i,tabindex:"-1",style:s.normalizeStyle(o(c))},[s.renderSlot(r.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(c.label||String.fromCharCode(i+97).toUpperCase()),1)],!0)],4))),128))])])):s.createCommentVNode("",!0)}}),ji=Pe(Li,[["__scopeId","data-v-16e66636"]]),Ui=s.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){s.inject(e.tableid);const t=n=>{n.stopPropagation()};return(n,o)=>(s.openBlock(),s.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",onClick:t,onInput:t},[s.renderSlot(n.$slots,"default",{},void 0,!0)],544))}}),Hi=Pe(Ui,[["__scopeId","data-v-10a48b2a"]]),Fi=s.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;let r=n.modelValue?n.modelValue:n.rows,a=new Di(n.id,n.columns,r,n.config);s.provide(a.id,a),s.watch(()=>a.rows,i=>{o("update:modelValue",i)},{deep:!0});const c=i=>{var u;(u=a.modal.parent)!=null&&u.contains(i.target)||a.modal.visible&&(a.modal.visible=!1)};return window.addEventListener("click",c),window.addEventListener("keydown",i=>{if(i.key==="Escape"&&a.modal.visible){a.modal.visible=!1;const u=a.modal.parent;u&&s.nextTick().then(()=>{const d=u.dataset.rowindex,l=u.dataset.colindex,f=document.querySelectorAll(`[data-rowindex='${d}'][data-colindex='${l}']`);f&&f[0].focus()})}}),(i,u)=>(s.openBlock(),s.createElementBlock("table",{class:"atable",style:s.normalizeStyle({width:s.unref(a).config.fullWidth?"100%":"auto"})},[s.renderSlot(i.$slots,"header",{data:s.unref(a)},()=>[s.createVNode(ji,{columns:s.unref(a).columns,config:s.unref(a).config,tableid:s.unref(a).id},null,8,["columns","config","tableid"])],!0),s.createElementVNode("tbody",null,[s.renderSlot(i.$slots,"body",{data:s.unref(a)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).rows,(d,l)=>(s.openBlock(),s.createBlock(xi,{key:d.id||s.unref(Po)(),row:d,rowIndex:l,tableid:s.unref(a).id},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).columns,(f,p)=>(s.openBlock(),s.createBlock(Ii,{key:`${p}:${l}`,tableid:s.unref(a).id,col:f,spellcheck:"false",rowIndex:l,colIndex:p+(s.unref(a).zeroColumn?0:-1),component:f.cellComponent,style:s.normalizeStyle({textAlign:(f==null?void 0:f.align)||"center",minWidth:(f==null?void 0:f.width)||"40ch",width:s.unref(a).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))],!0)]),s.renderSlot(i.$slots,"footer",{data:s.unref(a)},void 0,!0),s.renderSlot(i.$slots,"modal",{data:s.unref(a)},()=>[s.withDirectives(s.createVNode(Hi,{colIndex:s.unref(a).modal.colIndex,rowIndex:s.unref(a).modal.rowIndex,tableid:s.unref(a).id,style:s.normalizeStyle({left:s.unref(a).modal.left+"px",top:s.unref(a).modal.top+"px",maxWidth:s.unref(a).modal.width+"px"})},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(a).modal.component),s.mergeProps({key:`${s.unref(a).modal.rowIndex}:${s.unref(a).modal.colIndex}`,colIndex:s.unref(a).modal.colIndex,rowIndex:s.unref(a).modal.rowIndex,tableid:s.unref(a).id},s.unref(a).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[s.vShow,s.unref(a).modal.visible]])],!0)],4))}}),Wi=Pe(Fi,[["__scopeId","data-v-55d8ba05"]]),xo=s.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=rn(),o={view:"list"};return(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(Wi),{key:0,columns:s.unref(t).schema.schema.toArray(),rows:s.unref(t).store.records,config:o},null,8,["columns","rows"])):s.createCommentVNode("",!0)}}),$o=e=>(s.pushScopeId("data-v-18bfde6e"),e=e(),s.popScopeId(),e),zi={class:"tabs"},Gi={tabindex:"0"},Qi={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},qi=[$o(()=>s.createElementVNode("g",null,[s.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114 - c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276 - c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129 - v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0 - l-56.64-0.114v150.98C359.32,398.29,355.686,401.923,351.191,401.923z M81.03,385.666h262.033V234.67 - c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863 - c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511 - c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129 - C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1))],Ki={tabindex:"0"},Ji={style:{width:"11pt"}},Yi=[$o(()=>s.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[s.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1))],Ro=Ge(s.defineComponent({__name:"SheetNav",props:{breadcrumbs:{}},setup(e){const t=e,n=s.ref([]),o=s.ref(!0),r=s.ref(!1),a=s.ref(""),c=s.ref(null),i=s.computed(()=>o.value?"unrotated":"rotated");s.onMounted(()=>{n.value=t.breadcrumbs||[]});const u=()=>{o.value=!o.value},d=async()=>{r.value=!r.value,await s.nextTick(()=>{c.value.focus()})},l=h=>{h.preventDefault(),h.stopPropagation()},f=async h=>{h.preventDefault(),h.stopPropagation(),await d()},p=()=>{};return(h,y)=>{const g=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("footer",null,[s.createElementVNode("ul",zi,[s.createElementVNode("li",{class:"hidebreadcrumbs",onClick:u,onKeydown:s.withKeys(u,["enter"])},[s.createElementVNode("a",Gi,[s.createElementVNode("div",{class:s.normalizeClass(i.value)},"×",2)])],32),s.createElementVNode("li",{class:"hometab",onClick:p,onKeydown:s.withKeys(p,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(g,{to:"/home",tabindex:"0"},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock("svg",Qi,qi))]),_:1})],36),s.createElementVNode("li",{class:"searchtab",onClick:d,onKeydown:s.withKeys(d,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createElementVNode("a",Ki,[s.createElementVNode("span",{style:s.normalizeStyle({display:r.value?"none":"block"})},[(s.openBlock(),s.createElementBlock("svg",Ji,Yi))],4),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=_=>a.value=_),ref_key:"searchinput",ref:c,style:s.normalizeStyle({display:r.value?"block":"none"}),onClick:y[1]||(y[1]=_=>l(_)),onInput:y[2]||(y[2]=_=>l(_)),onBlur:y[3]||(y[3]=_=>f(_)),onKeydown:y[4]||(y[4]=s.withKeys(_=>f(_),["enter"])),type:"text"},null,36),[[s.vModelText,a.value]])])],36),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(_,O)=>(s.openBlock(),s.createElementBlock("li",{key:O,style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(g,{tabindex:"0",to:_.to},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(_.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-18bfde6e"]]),Xi={install:e=>{e.component("ActionSet",$t),e.component("CommandPalette",Rt),e.component("Doctype",lo),e.component("Records",xo),e.component("SheetNav",Ro)}};W.ActionSet=$t,W.CommandPalette=Rt,W.Doctype=lo,W.Records=xo,W.SheetNav=Ro,W.StonecropDesktop=Xi,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=desktop.umd.cjs.map diff --git a/desktop/dist/desktop.umd.cjs.map b/desktop/dist/desktop.umd.cjs.map deleted file mode 100644 index fa93b585..00000000 --- a/desktop/dist/desktop.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"desktop.umd.cjs","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from \"vue\";\nconst Ve = { id: \"checkbox-container\" }, xe = [\"id\", \"readonly\", \"required\"], Be = { id: \"custom-checkbox\" }, Pe = [\"for\"], qe = [\"innerHTML\"], He = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n i(\"label\", Ve, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"checkbox\",\n id: n.uuid,\n class: \"checkbox\",\n readonly: n.readOnly,\n required: n.required\n }, null, 8, xe), [\n [be, t.value]\n ]),\n i(\"span\", Be, k(t.value), 1)\n ]),\n i(\"label\", {\n for: n.uuid,\n id: \"checkbox-label\"\n }, k(n.label), 9, Pe),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, qe), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), M = (e, t) => {\n const n = e.__vccOpts || e;\n for (const [o, l] of t)\n n[o] = l;\n return n;\n}, Fe = /* @__PURE__ */ M(He, [[\"__scopeId\", \"data-v-5093f1cb\"]]), Re = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), Ue = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, n) => {\n const o = we(\"ATableModal\");\n return f(), H(o, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: Ce(() => [\n Re\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar W;\nconst de = typeof window < \"u\", Qe = (e) => typeof e == \"string\", Ye = () => {\n};\nde && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction ce(e) {\n return typeof e == \"function\" ? e() : S(e);\n}\nfunction je(e) {\n return e;\n}\nfunction We(e) {\n return De() ? (Ee(e), !0) : !1;\n}\nfunction q(e) {\n var t;\n const n = ce(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst pe = de ? window : void 0;\nfunction Ne(...e) {\n let t, n, o, l;\n if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t)\n return Ye;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const s = [], a = () => {\n s.forEach((d) => d()), s.length = 0;\n }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => {\n a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return We(u), u;\n}\nconst N = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nN[z] = N[z] || {};\nfunction ze(e, { window: t = pe, scrollTarget: n } = {}) {\n const o = y(!1), l = () => {\n if (!t)\n return;\n const s = t.document, a = q(e);\n if (!a)\n o.value = !1;\n else {\n const r = a.getBoundingClientRect();\n o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return F(() => q(e), () => l(), { immediate: !0, flush: \"post\" }), t && Ne(n || t, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => {\n for (var n in t || (t = {}))\n Ke.call(t, n) && J(e, n, t[n]);\n if (K)\n for (var n of K(t))\n Je.call(t, n) && J(e, n, t[n]);\n return e;\n};\nconst Ze = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nXe({\n linear: je\n}, Ze);\nconst E = (e) => {\n let t = ze(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, A = (e) => e.tabIndex >= 0, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.previousElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? U(n) : n;\n}, et = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.firstElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.firstElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? Q(o) : o;\n}, Z = (e) => {\n const t = e.target;\n return Q(t);\n}, Q = (e) => {\n var t;\n let n;\n if (e instanceof HTMLTableCellElement) {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (n = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.nextElementSibling;\n o && (n = o);\n }\n return n && (!A(n) || !E(n)) ? Q(n) : n;\n}, tt = (e) => {\n var t;\n const n = e.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (t = n.parentElement) == null ? void 0 : t.parentElement;\n if (l) {\n const s = l.lastElementChild.children[n.cellIndex];\n s && (o = s);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const s = l.lastElementChild;\n s && (o = s);\n }\n }\n return o && (!A(o) || !E(o)) ? U(o) : o;\n}, ee = (e) => {\n const t = e.target;\n return Y(t);\n}, Y = (e) => {\n var t;\n let n;\n if (e.previousElementSibling)\n n = e.previousElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!A(n) || !E(n)) ? Y(n) : n;\n}, te = (e) => {\n const t = e.target;\n return j(t);\n}, j = (e) => {\n var t;\n let n;\n if (e.nextElementSibling)\n n = e.nextElementSibling;\n else {\n const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!A(n) || !E(n)) ? j(n) : n;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !E(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !E(t)) ? Y(t) : t;\n}, $ = [\"alt\", \"control\", \"shift\", \"meta\"], nt = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, fe = {\n \"keydown.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = te(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = et(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = tt(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = Z(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ot(e) {\n const t = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let s = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n s.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const a of o.selectors.value)\n a instanceof Element ? s.push(a) : s.push(a.$el);\n else\n s.push(o.selectors.value);\n else\n s = Array.from(l.children).filter((a) => A(a) && E(a));\n return s;\n }, n = (o) => (l) => {\n const s = nt[l.key] || l.key.toLowerCase();\n if ($.includes(s))\n return;\n const a = o.handlers || fe;\n for (const r of Object.keys(a)) {\n const [p, ...u] = r.split(\".\");\n if (p === \"keydown\" && u.includes(s)) {\n const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (g.length > 0) {\n if (b) {\n for (const m of $)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n b || d(l);\n }\n }\n };\n re(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.addEventListener(\"keydown\", n(o));\n }\n }), ke(() => {\n for (const o of e) {\n const l = t(o);\n for (const s of l)\n s.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst lt = [\"event\", \"colIndex\", \"rowIndex\", \"tableid\"], st = { colspan: \"5\" }, at = [\"onClick\"], rt = 6, I = 7, it = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n event: {},\n indent: {},\n readonly: { type: Boolean }\n },\n setup(e) {\n const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]);\n re(async () => {\n let c = n.cellData(t.colIndex, t.rowIndex);\n c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae();\n const T = document.getElementsByClassName(\"selecteddate\");\n if (T.length > 0)\n T[0].focus();\n else {\n const v = document.getElementsByClassName(\"todaysdate\");\n v.length > 0 && v[0].focus();\n }\n }), F([s, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T);\n for (let w of Array(43).keys())\n r.value.push(v + w * 864e5);\n }, u = () => {\n a.value -= 1;\n }, d = () => {\n a.value += 1;\n }, g = () => {\n s.value == 0 ? (s.value = 11, u()) : s.value -= 1;\n }, b = () => {\n s.value == 11 ? (s.value = 0, d()) : s.value += 1;\n }, m = (c) => {\n if (s.value === o.getMonth())\n return o.toDateString() === new Date(c).toDateString();\n }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => {\n l.value = new Date(r.value[T]), ve();\n }, ve = () => {\n n.setCellData(t.rowIndex, t.colIndex, l.value.getTime());\n }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return ot([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...fe,\n \"keydown.pageup\": g,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": d\n }\n }\n ]), (c, T) => c.readonly ? ue(\"\", !0) : (f(), h(\"div\", {\n key: 0,\n event: c.event,\n colIndex: c.colIndex,\n rowIndex: c.rowIndex,\n tableid: c.tableid,\n class: \"adate\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n i(\"table\", null, [\n i(\"tr\", null, [\n i(\"td\", {\n onClick: g,\n tabindex: -1\n }, \"<\"),\n i(\"th\", st, k(ge.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), h(V, null, x(rt, (v) => i(\"tr\", { key: v }, [\n (f(), h(V, null, x(I, (w) => i(\"td\", {\n key: (v - 1) * I + w,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: Ie({\n border: _(r.value[(v - 1) * I + w]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(v - 1) * I + w]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Me((ye) => he(ye, (v - 1) * I + w), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(v - 1) * I + w]),\n selecteddate: _(r.value[(v - 1) * I + w])\n })\n }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64))\n ])), 64))\n ])\n ], 8, lt));\n }\n}), ut = /* @__PURE__ */ M(it, [[\"__scopeId\", \"data-v-169f1184\"]]), dt = D({\n name: \"ADropdown\",\n props: {\n modelValue: {\n type: String,\n required: !1,\n default: \"\"\n },\n label: {\n type: String,\n required: !0\n },\n value: String,\n items: {\n type: Array,\n required: !1,\n default: () => []\n },\n isAsync: {\n type: Boolean,\n required: !1,\n default: !1\n }\n },\n emits: [\"update:modelValue\", \"filterChanged\"],\n data() {\n return {\n results: [],\n search: this.modelValue,\n isLoading: !1,\n arrowCounter: 0,\n isOpen: !1\n };\n },\n watch: {\n items: function(e, t) {\n this.isLoading = !1, this.results = e;\n }\n },\n mounted() {\n document.addEventListener(\"click\", this.handleClickOutside), this.filterResults();\n },\n destroyed() {\n document.removeEventListener(\"click\", this.handleClickOutside);\n },\n methods: {\n setResult(e) {\n this.search = e, this.closeResults();\n },\n filterResults() {\n this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);\n },\n onChange() {\n this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit(\"filterChanged\", this.search)) : this.filterResults();\n },\n handleClickOutside(e) {\n this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);\n },\n closeResults() {\n this.isOpen = !1, this.items.includes(this.search) || (this.search = \"\"), this.$emit(\"update:modelValue\", this.search);\n },\n onArrowDown() {\n this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);\n },\n onArrowUp() {\n this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);\n },\n onEnter() {\n this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;\n },\n openWithSearch() {\n this.search = \"\", this.onChange(), this.$refs.mopInput.focus();\n }\n }\n}), ct = { class: \"input-wrapper\" }, pt = {\n id: \"autocomplete-results\",\n class: \"autocomplete-results\"\n}, ft = {\n key: 0,\n class: \"loading autocomplete-result\"\n}, mt = [\"onClick\"];\nfunction ht(e, t, n, o, l, s) {\n return f(), h(\"div\", {\n class: B([\"autocomplete\", { isOpen: e.isOpen }])\n }, [\n i(\"div\", ct, [\n C(i(\"input\", {\n ref: \"mopInput\",\n type: \"text\",\n onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),\n onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),\n \"onUpdate:modelValue\": t[2] || (t[2] = (a) => e.search = a),\n onKeydown: [\n t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), [\"down\"])),\n t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), [\"up\"])),\n t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), [\"enter\"]))\n ]\n }, null, 544), [\n [R, e.search]\n ]),\n C(i(\"ul\", pt, [\n e.isLoading ? (f(), h(\"li\", ft, \"Loading results...\")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h(\"li\", {\n key: r,\n onClick: (p) => e.setResult(a),\n class: B([\"autocomplete-result\", { \"is-active\": r === e.arrowCounter }])\n }, k(a), 11, mt))), 128))\n ], 512), [\n [O, e.isOpen]\n ]),\n i(\"label\", null, k(e.label), 1)\n ])\n ], 2);\n}\nconst vt = /* @__PURE__ */ M(dt, [[\"render\", ht]]), gt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, n) => (f(), h(\"button\", {\n class: B([\"collapse-button\", t.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n}), yt = /* @__PURE__ */ M(gt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), bt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: {},\n data: {},\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const n = e, o = t, l = y(n.data || {}), s = (r) => {\n let p = {};\n for (const [u, d] of Object.entries(r))\n [\"component\", \"fieldtype\"].includes(u) || (p[u] = d), u === \"rows\" && d && d.length === 0 && (p.rows = l.value[r.fieldname]);\n return p;\n }, a = L({\n get: () => n.modelValue.map((r, p) => L({\n get() {\n return r.value;\n },\n set: (u) => {\n n.modelValue[p].value = u, o(\"update:modelValue\", n.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (r, p) => (f(), h(\"form\", null, [\n (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({\n key: d,\n schema: u,\n modelValue: a.value[d].value,\n \"onUpdate:modelValue\": (g) => a.value[d].value = g,\n data: l.value[u.fieldname],\n readonly: r.readonly\n }, s(u)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n}), me = /* @__PURE__ */ M(bt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), wt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, n = y(t.data || []);\n let o = y(!1), l = y(t.collapsible);\n const s = y(t.schema);\n function a(r) {\n r.preventDefault(), l.value && (o.value = !o.value);\n }\n return (r, p) => (f(), h(\"fieldset\", null, [\n i(\"legend\", {\n onClick: a,\n onSubmit: a\n }, [\n Se(k(r.label) + \" \", 1),\n S(l) ? (f(), H(yt, {\n key: 0,\n collapsed: S(o)\n }, null, 8, [\"collapsed\"])) : ue(\"\", !0)\n ], 32),\n Oe(r.$slots, \"default\", { collapsed: S(o) }, () => [\n C($e(me, {\n modelValue: s.value,\n \"onUpdate:modelValue\": p[0] || (p[0] = (u) => s.value = u),\n data: n.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [O, !S(o)]\n ])\n ], !0)\n ]));\n }\n}), Ct = /* @__PURE__ */ M(wt, [[\"__scopeId\", \"data-v-cad9b578\"]]), kt = [\"id\", \"disabled\", \"required\"], Dt = [\"for\"], Et = [\"innerHTML\"], At = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: /* @__PURE__ */ se({\n label: {},\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: {},\n validation: { default: () => ({ errorMessage: \" \" }) }\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n const t = ae(e, \"modelValue\");\n return (n, o) => (f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": o[0] || (o[0] = (l) => t.value = l),\n type: \"number\",\n id: n.uuid,\n disabled: n.readonly,\n required: n.required\n }, null, 8, kt), [\n [R, t.value]\n ]),\n i(\"label\", { for: n.uuid }, k(n.label), 9, Dt),\n C(i(\"p\", {\n innerHTML: n.validation.errorMessage\n }, null, 8, Et), [\n [O, n.validation.errorMessage]\n ])\n ]));\n }\n}), It = /* @__PURE__ */ M(At, [[\"__scopeId\", \"data-v-02907cd6\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction Mt(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction Tt(e) {\n var n;\n let t = e.value;\n if (t) {\n const o = Mt(t);\n if (o) {\n const l = e.instance.locale;\n t = o(l);\n }\n } else {\n const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase();\n l && le[l] && (t = le[l]);\n }\n return t;\n}\nfunction _t(e, t) {\n t || (t = \"#\");\n let n = e;\n const o = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const l of o)\n n = n.replaceAll(l, \"\");\n return n;\n}\nfunction St(e, t, n) {\n n || (n = \"#\");\n let o = t;\n for (const l of e) {\n const s = o.indexOf(n);\n if (s !== -1) {\n const a = o.substring(0, s), r = o.substring(s + 1);\n o = a + l + r;\n }\n }\n return o.slice(0, t.length);\n}\nfunction Ot(e, t) {\n const n = Tt(t);\n if (!n)\n return;\n const o = \"#\", l = e.value, s = _t(l, o);\n if (s) {\n const a = St(s, n, o);\n t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a;\n } else\n e.value = n;\n}\nconst $t = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const n = y(!1), o = ie(\"locale\", \"\");\n return { inputText: L({\n get() {\n return e.modelValue;\n },\n set(s) {\n t.emit(\"update:modelValue\", s);\n }\n }), locale: o, maskFilled: n };\n },\n directives: {\n mask: Ot\n }\n}), Lt = [\"id\", \"disabled\", \"maxlength\", \"required\"], Vt = [\"for\"], xt = [\"innerHTML\"];\nfunction Bt(e, t, n, o, l, s) {\n const a = Le(\"mask\");\n return f(), h(\"div\", null, [\n C(i(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, Lt), [\n [R, e.inputText],\n [a, e.mask]\n ]),\n i(\"label\", { for: e.uuid }, k(e.label), 9, Vt),\n C(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, xt), [\n [O, e.validation.errorMessage]\n ])\n ]);\n}\nconst Pt = /* @__PURE__ */ M($t, [[\"render\", Bt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Ht(e) {\n e.component(\"ACheckbox\", Fe), e.component(\"ACombobox\", Ue), e.component(\"ADate\", ut), e.component(\"ADropdown\", vt), e.component(\"AFieldset\", Ct), e.component(\"AForm\", me), e.component(\"ANumericInput\", It), e.component(\"ATextInput\", Pt);\n}\nexport {\n Fe as ACheckbox,\n Ue as AComboBox,\n ut as ADate,\n vt as ADropdown,\n Ct as AFieldset,\n me as AForm,\n It as ANumericInput,\n Pt as ATextInput,\n Ht as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nfunction NotImplementedError(message) {\n this.message = message || \"\";\n}\nNotImplementedError.prototype = Object.create(Error.prototype, {\n constructor: { value: NotImplementedError },\n name: { value: \"NotImplemented\" },\n stack: {\n get: function() {\n return new Error().stack;\n }\n }\n});\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.\n * @example\n * const registry = new Registry()\n * const store = useDataStore()\n * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {DoctypeMeta}\n * @see {@link DoctypeMeta}\n * @throws NotImplementedError\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * const meta = stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype);\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.getMeta('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.getMeta('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia2, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction loadStoresState(pinia2, state) {\n for (const key in state) {\n const storeState = pinia2.state.value[key];\n if (storeState) {\n Object.assign(storeState, state[key]);\n } else {\n pinia2.state.value[key] = state[key];\n }\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (typeof store.$reset !== \"function\") {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n }) : store;\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n activeAction = void 0;\n return retValue;\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;\n const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup)));\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n if (process.env.NODE_ENV !== \"production\" && typeof id !== \"string\") {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia2, hot) {\n const hasContext = hasInjectionContext();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.getMeta(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, getMeta) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.getMeta = getMeta;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\n/*!\n * vue-router v4.2.5\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n const lastToSegment = toSegments[toSegments.length - 1];\n if (lastToSegment === \"..\" || lastToSegment === \".\") {\n toSegments.push(\"\");\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener, {\n passive: true\n });\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"object\" ? props[name] : props;\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n return app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of enteringRecords) {\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router22 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router22;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true\n });\n }\n app.provide(routerKey, router22);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router22, matcher);\n }\n }\n };\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router2;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n Object.prototype\n).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction get_escaped_char(char) {\n switch (char) {\n case '\"':\n return '\\\\\"';\n case \"<\":\n return \"\\\\u003C\";\n case \"\\\\\":\n return \"\\\\\\\\\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\u2028\":\n return \"\\\\u2028\";\n case \"\\u2029\":\n return \"\\\\u2029\";\n default:\n return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n }\n}\nfunction stringify_string(str) {\n let result = \"\";\n let last_pos = 0;\n const len = str.length;\n for (let i = 0; i < len; i += 1) {\n const char = str[i];\n const replacement = get_escaped_char(char);\n if (replacement) {\n result += str.slice(last_pos, i) + replacement;\n last_pos = i + 1;\n }\n }\n return `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta);\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", registry);\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as xe, onBeforeUnmount as Ie, ref as k, watch as j, unref as r, getCurrentScope as Ee, onScopeDispose as ke, defineComponent as C, inject as O, computed as R, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as W, toDisplayString as T, Fragment as L, createElementVNode as A, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as $, renderList as N, normalizeStyle as H, createTextVNode as Ce, provide as _e, nextTick as $e, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Ae = (t) => typeof t == \"string\", Te = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : r(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return Ee() ? (ke(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Se(...t) {\n let e, n, o, a;\n if (Ae(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return Te;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], s = () => {\n l.forEach((f) => f()), l.length = 0;\n }, i = (f, c, v, h) => (f.addEventListener(c, v, h), () => f.removeEventListener(c, v, h)), d = j(() => [U(e), fe(a)], ([f, c]) => {\n s(), f && l.push(...n.flatMap((v) => o.map((h) => i(f, v, h, c))));\n }, { immediate: !0, flush: \"post\" }), p = () => {\n d(), s();\n };\n return De(p), p;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Re(t, { window: e = me, scrollTarget: n } = {}) {\n const o = k(!1), a = () => {\n if (!e)\n return;\n const l = e.document, s = U(t);\n if (!s)\n o.value = !1;\n else {\n const i = s.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || l.documentElement.clientHeight) && i.left <= (e.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => a(), { immediate: !0, flush: \"post\" }), e && Se(n || e, \"scroll\", a, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst x = (t) => {\n let e = Re(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return V(e);\n}, V = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? V(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.firstElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.firstElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const a = Array.from(o.children)[t.cellIndex];\n a && (n = a);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !x(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const a = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (a) {\n const l = a.lastElementChild.children[n.cellIndex];\n l && (o = l);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const a = n.parentElement;\n if (a) {\n const l = a.lastElementChild;\n l && (o = l);\n }\n }\n return o && (!I(o) || !x(o)) ? V(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !x(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], We = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let a = null;\n o.parent && (typeof o.parent == \"string\" ? a = document.querySelector(o.parent) : o.parent instanceof Element ? a = o.parent : a = o.parent.value);\n let l = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n l = a ? Array.from(a.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n l.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const s of o.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(o.selectors.value);\n else\n l = Array.from(a.children).filter((s) => I(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = We[a.key] || a.key.toLowerCase();\n if (D.includes(l))\n return;\n const s = o.handlers || we;\n for (const i of Object.keys(s)) {\n const [d, ...p] = i.split(\".\");\n if (d === \"keydown\" && p.includes(l)) {\n const f = s[i], c = p.filter((h) => D.includes(h)), v = D.some((h) => {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(E);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const E = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(E) && f(a);\n }\n }\n } else\n v || f(a);\n }\n }\n };\n xe(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const a = e(o);\n for (const l of a)\n l.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst Ve = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ C({\n __name: \"ACell\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {},\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: {}\n },\n setup(t) {\n var E;\n const e = t, n = O(e.tableid), o = k(null);\n let a = k(!1);\n const l = R(() => {\n const u = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(u) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(u) : u;\n } else\n return u;\n }), s = (u) => {\n if (e.clickHandler) {\n e.clickHandler(u);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = d.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let u = {\n ...we,\n \"keydown.f2\": s,\n \"keydown.alt.up\": s,\n \"keydown.alt.down\": s,\n \"keydown.alt.left\": s,\n \"keydown.alt.right\": s\n };\n typeof e.addNavigation == \"object\" && (u = {\n ...u,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: u\n }\n ]);\n }\n const i = R(() => n.columns[e.colIndex].align || \"center\"), d = R(() => n.columns[e.colIndex].width || \"40ch\");\n let p = \"\";\n const f = () => {\n o.value && (p = o.value.innerText);\n }, c = () => {\n o.value && o.value.innerHTML !== p && (p = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), a.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, p));\n }, v = (u, g) => g && u === 0 && g > 0 ? `${g}ch` : \"inherit\", h = {\n textAlign: i.value,\n width: d.value,\n backgroundColor: a.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: a.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (E = n.display[e.rowIndex]) == null ? void 0 : E.indent)\n };\n return (u, g) => (m(), b(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": u.colIndex,\n \"data-rowindex\": u.rowIndex,\n \"data-editable\": r(n).columns[u.colIndex].edit,\n contenteditable: r(n).columns[u.colIndex].edit,\n tabindex: u.tabIndex,\n spellcheck: !1,\n style: h,\n onFocus: f,\n onPaste: c,\n onBlur: c,\n onInput: c,\n onClick: s,\n onMousedown: s\n }, [\n r(n).columns[u.colIndex].cellComponent ? (m(), P(ie(r(n).columns[u.colIndex].cellComponent), W({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, T(l.value), 1))\n ], 40, Ve));\n }\n}), _ = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, a] of e)\n n[o] = a;\n return n;\n}, he = /* @__PURE__ */ _(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ C({\n __name: \"AExpansionRow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = k(null), a = k(null), l = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const s = Object.assign({}, e.addNavigation);\n s[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: s\n }\n ]);\n }\n return (s, i) => (m(), b(L, null, [\n A(\"tr\", W(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n A(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, T(l()), 1),\n y(s.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n r(n).display[e.rowIndex].expanded ? (m(), b(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: a,\n tabindex: s.tabIndex,\n class: \"expanded-row\"\n }, [\n A(\"td\", {\n tabIndex: -1,\n colspan: r(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n y(s.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n}), Je = /* @__PURE__ */ _(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ C({\n __name: \"ARow\",\n props: {\n row: {},\n rowIndex: {},\n tableid: {},\n tabIndex: { default: -1 },\n addNavigation: {}\n },\n setup(t) {\n de((d) => ({\n \"5b18ee03\": r(a)\n }));\n const e = t, n = O(e.tableid), o = k(null), a = n.numberedRowWidth.value, l = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", s = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (d) => {\n n.toggleRowExpand(d);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (d, p) => ce((m(), b(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: d.tabIndex,\n class: \"table-row\"\n }, [\n r(n).config.view === \"list\" ? (m(), b(\"td\", Ye, T(d.rowIndex + 1), 1)) : r(n).config.view === \"tree\" ? (m(), b(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: p[0] || (p[0] = (f) => i(d.rowIndex))\n }, T(l()), 1)) : y(d.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n y(d.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, s()]\n ]);\n }\n}), be = /* @__PURE__ */ _(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet S;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!S && (S = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return S(Ke);\n}\nconst w = [];\nfor (let t = 0; t < 256; ++t)\n w.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return w[t[e + 0]] + w[t[e + 1]] + w[t[e + 2]] + w[t[e + 3]] + \"-\" + w[t[e + 4]] + w[t[e + 5]] + \"-\" + w[t[e + 6]] + w[t[e + 7]] + \"-\" + w[t[e + 8]] + w[t[e + 9]] + \"-\" + w[t[e + 10]] + w[t[e + 11]] + w[t[e + 12]] + w[t[e + 13]] + w[t[e + 14]] + w[t[e + 15]];\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let a = 0; a < 16; ++a)\n e[n + a] = o[a];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, a, l, s) {\n this.id = e || ge(), this.rows = o, this.columns = $(n), this.config = $(a), this.table = l || $(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = $({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [a, l] of this.rows.entries())\n e[`${n}:${a}`] = l[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let a = this.rows.length - 1; a >= 0; a--) {\n const l = this.rows[a];\n l.parent && o.add(l.parent), n[a] = {\n childrenOpen: !1,\n expanded: !1,\n indent: l.indent || null,\n isParent: o.has(a),\n isRoot: l.parent === null || l.parent === void 0,\n modified: !1,\n open: l.parent === null || l.parent === void 0,\n parent: l.parent\n };\n }\n return $(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return R(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const a = this.columns[n];\n return this.rows[e][a.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ C({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"12d06943\": r(o)\n }));\n const n = O(t.tableid), o = n.numberedRowWidth.value, a = (l) => ({\n minWidth: l.width || \"40ch\",\n textAlign: l.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (l, s) => l.columns.length ? (m(), b(\"thead\", lt, [\n A(\"tr\", at, [\n r(n).zeroColumn ? (m(), b(\"th\", rt)) : M(\"\", !0),\n (m(!0), b(L, null, N(l.columns, (i, d) => (m(), b(\"th\", {\n key: d,\n tabindex: \"-1\",\n style: H(a(i))\n }, [\n y(l.$slots, \"default\", {}, () => [\n Ce(T(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n}), ve = /* @__PURE__ */ _(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ C({\n __name: \"ATableModal\",\n props: {\n colIndex: {},\n rowIndex: {},\n tableid: {}\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, a) => (m(), b(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n y(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n}), ye = /* @__PURE__ */ _(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ C({\n __name: \"ATable\",\n props: {\n id: {},\n modelValue: {},\n columns: {},\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: {}\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t, o = e;\n let a = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, a, n.config);\n _e(l.id, l), j(\n () => l.rows,\n (i) => {\n o(\"update:modelValue\", i);\n },\n { deep: !0 }\n );\n const s = (i) => {\n var d;\n (d = l.modal.parent) != null && d.contains(i.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", s), window.addEventListener(\"keydown\", (i) => {\n if (i.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const d = l.modal.parent;\n d && $e().then(() => {\n const p = d.dataset.rowindex, f = d.dataset.colindex, c = document.querySelectorAll(`[data-rowindex='${p}'][data-colindex='${f}']`);\n c && c[0].focus();\n });\n }\n }), (i, d) => (m(), b(\"table\", {\n class: \"atable\",\n style: H({ width: r(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n y(i.$slots, \"header\", { data: r(l) }, () => [\n z(ve, {\n columns: r(l).columns,\n config: r(l).config,\n tableid: r(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n A(\"tbody\", null, [\n y(i.$slots, \"body\", { data: r(l) }, () => [\n (m(!0), b(L, null, N(r(l).rows, (p, f) => (m(), P(be, {\n key: p.id || r(ge)(),\n row: p,\n rowIndex: f,\n tableid: r(l).id\n }, {\n default: G(() => [\n (m(!0), b(L, null, N(r(l).columns, (c, v) => (m(), P(he, {\n key: `${v}:${f}`,\n tableid: r(l).id,\n col: c,\n spellcheck: \"false\",\n rowIndex: f,\n colIndex: v + (r(l).zeroColumn ? 0 : -1),\n component: c.cellComponent,\n style: H({\n textAlign: (c == null ? void 0 : c.align) || \"center\",\n minWidth: (c == null ? void 0 : c.width) || \"40ch\",\n width: r(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n y(i.$slots, \"footer\", { data: r(l) }, void 0, !0),\n y(i.$slots, \"modal\", { data: r(l) }, () => [\n ce(z(ye, {\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id,\n style: H({\n left: r(l).modal.left + \"px\",\n top: r(l).modal.top + \"px\",\n maxWidth: r(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (m(), P(ie(r(l).modal.component), W({\n key: `${r(l).modal.rowIndex}:${r(l).modal.colIndex}`,\n colIndex: r(l).modal.colIndex,\n rowIndex: r(l).modal.rowIndex,\n tableid: r(l).id\n }, r(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, r(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n}), ct = /* @__PURE__ */ _(dt, [[\"__scopeId\", \"data-v-55d8ba05\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", ve), t.component(\"ATableModal\", ye);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n ve as ATableHeader,\n ye as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["props","__props","_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","M","l","W","je","N","z","G","Ge","K","Ke","Je","J","Xe","D","bt","y","s","r","p","u","d","a","L","f","h","V","x","H","Te","_e","g","me","le","Mt","Tt","n","t","_t","St","Ot","ie","NotImplementedError","message","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now$1","ApiProxy","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","o","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","storeState","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","isBrowser","isESModule","assign","applyToParams","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","v","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLink","defineComponent","slots","link","elClass","getLinkClass","h$1","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","onVnodeUnmounted","vnode","info","slot","slotContent","RouterView","parentName","parentSubTreeType","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","resolve2","scrollBehavior","started","router22","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","get_escaped_char","stringify_string","str","last_pos","replacement","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","_a2","newSchema","fieldValue","pe","Ae","fe","Oe","De","Ee","ke","U","Se","c","j","X","Y","Re","Z","Pe","He","Le","ee","Me","I","te","Ue","B","ne","oe","Q","F","ae","We","we","q","E","xe","Ie","Ve","Be","Qe","C","O","R","P","T","_","he","Ye","Ze","de","ce","ue","be","S","et","w","tt","nt","se","ge","ot","$","lt","at","rt","st","A","Ce","ve","it","ye","dt","$e","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":"kzCA6EA,MAAMA,EAAQC,EAIRC,EAAYC,MAAkB,CAAA,CAAE,EAChCC,EAASD,MAAI,EAAK,EAClBE,EAAUF,MAAoB,IAAI,EAClCG,EAAQH,MAAI,EAAK,EACjBI,EAAeJ,MAAI,EAAK,EAE9BK,EAAAA,UAAU,IAAM,CACfN,EAAU,MAAQF,EAAM,SACTS,GAAA,CACf,EAED,MAAMA,EAAiB,IAAM,CACnB,QAAAC,KAAWR,EAAU,MACzBQ,EAAQ,cAAgB,aAC3BA,EAAQ,KAAO,GAEjB,EAGKC,EAAU,IAAM,CACrBL,EAAM,MAAQ,GACND,EAAA,MAAQ,WAAW,IAAM,CAC5BC,EAAM,QACTF,EAAO,MAAQ,KAEd,GAAG,CAAA,EAGDQ,EAAe,IAAM,CAC1BN,EAAM,MAAQ,GACdC,EAAa,MAAQ,GACrB,aAAaF,EAAQ,KAAK,EAC1BD,EAAO,MAAQ,EAAA,EAGVS,EAAkBC,GAAkB,CACzC,MAAMC,EAAe,CAACb,EAAU,MAAMY,CAAK,EAAE,KAC9BL,IACLP,EAAA,MAAMY,CAAK,EAAE,KAAOC,CAAA,qiDCtHbC,EAAA,qFCwCdC,GAAI,CAAC,EAAG,IAAM,CAChB,MAAM,EAAI,EAAE,WAAa,EACzB,SAAW,C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,QAAU+K,GAAa,CAClBA,EAAA,UAAU,YAAaq1B,EAAS,EAChCr1B,EAAA,UAAU,iBAAkBs1B,EAAc,EAC1Ct1B,EAAA,UAAU,UAAWu1B,EAAO,EAC5Bv1B,EAAA,UAAU,UAAWw1B,EAAO,EAC5Bx1B,EAAA,UAAU,WAAYy1B,EAAQ,CACnC,CACD"} \ No newline at end of file diff --git a/desktop/dist/style.css b/desktop/dist/style.css deleted file mode 100644 index 9722a74a..00000000 --- a/desktop/dist/style.css +++ /dev/null @@ -1 +0,0 @@ -#chevron[data-v-b7fdfbec]{position:relative;transform:rotate(90deg)}.leftBar[data-v-b7fdfbec],.rightBar[data-v-b7fdfbec]{transition-duration:.225s;transition-property:transform}.leftBar[data-v-b7fdfbec],.action-set.collapse.hovered-and-closed:hover .leftBar[data-v-b7fdfbec]{transform-origin:33.4% 50%;transform:rotate(90deg)}.rightBar[data-v-b7fdfbec],.action-set.collapse.hovered-and-closed:hover .rightBar[data-v-b7fdfbec]{transform-origin:67% 50%;transform:rotate(-90deg)}.rightBar[data-v-b7fdfbec]{position:absolute;top:0;left:0}.action-set.collapse:hover .leftBar[data-v-b7fdfbec],.action-set.collapse:hover .rightBar[data-v-b7fdfbec]{transform:rotate(0)}.action-set[data-v-b7fdfbec]{position:fixed;top:10px;right:10px;padding:20px;box-shadow:0 1px 2px #1927340d,0 0 4px #1927341a;border-radius:10px;display:flex;flex-direction:row-reverse;background-color:#fff;overflow:hidden}.action-menu-icon[data-v-b7fdfbec]{position:absolute;top:6px;right:8px}.action-menu-icon svg[data-v-b7fdfbec]{fill:#333}.action-set.collapse[data-v-b7fdfbec],.action-set.collapse.hovered-and-closed[data-v-b7fdfbec]:hover{max-width:25px;overflow:hidden;-webkit-transition:max-width .5s ease-in-out;-moz-transition:max-width .5s ease-in-out;-o-transition:max-width .5s ease-in-out;transition:max-width .5s ease-in-out}.action-set.collapse .action-element[data-v-b7fdfbec],.action-set.collapse.hovered-and-closed:hover .action-element[data-v-b7fdfbec]{opacity:0;-webkit-transition:opacity .25s ease-in-out;-moz-transition:opacity .25s ease-in-out;-o-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out;transition-delay:0s}.action-set.collapse[data-v-b7fdfbec]:hover{max-width:500px}.action-set.collapse.open-set[data-v-b7fdfbec]:hover{overflow:visible!important}.action-set.collapse.hovered-and-closed:hover .action-element[data-v-b7fdfbec]{opacity:0!important}.action-set.collapse:hover .action-element[data-v-b7fdfbec]{opacity:100!important}.action-element[data-v-b7fdfbec]{margin-left:5px;margin-right:5px}button.button-default[data-v-b7fdfbec]{background-color:#fff;padding:5px 12px;border-radius:3px;box-shadow:#0000000d 0 .5px,#00000014 0 0 0 1px,#0000000d 0 2px 4px;border:none;cursor:pointer;white-space:nowrap}button.button-default[data-v-b7fdfbec]:hover{background-color:#f2f2f2}.dropdown-container[data-v-b7fdfbec]{position:relative}.dropdown[data-v-b7fdfbec]{position:absolute;top:5px;right:0;min-width:200px;box-shadow:0 .5rem 1rem #0000002e;border-radius:10px;background-color:#fff;padding:10px}button.dropdown-item[data-v-b7fdfbec]{width:100%;padding:8px 5px;text-align:left;border:none;background-color:#fff;cursor:pointer;border-radius:5px}button.dropdown-item[data-v-b7fdfbec]:hover{background-color:#f2f2f2}footer[data-v-18bfde6e]{position:fixed;bottom:0;width:100%;background-color:transparent;height:2rem;z-index:100;text-align:left;font-size:100%;display:flex;justify-content:right;padding-bottom:.2rem}ul[data-v-18bfde6e]{display:flex;flex-direction:row-reverse}.tabs li[data-v-18bfde6e]{float:left;list-style-type:none;position:relative;margin-left:-1px}.tabs a[data-v-18bfde6e]{float:left;padding:1ch 4ch 4ch;text-decoration:none;color:#000;background:#aaa;outline:2px solid inherit;outline-offset:-2px;-webkit-border-top-left-radius:15px;-webkit-border-top-right-radius:15px;-moz-border-radius-topleft:15px;-moz-border-radius-topright:15px;border-top-left-radius:15px;border-top-right-radius:15px;border:1px solid #ccc}.tabs .router-link-active[data-v-18bfde6e]{z-index:3}.router-link-active[data-v-18bfde6e]{background:#827553;color:#000;box-shadow:#999}.tabs li[data-v-18bfde6e]:before,.tabs li[data-v-18bfde6e]:after,.tabs li a[data-v-18bfde6e]:before,.tabs li a[data-v-18bfde6e]:after{position:absolute;bottom:0}.tabs li[data-v-18bfde6e]:last-child:after,.tabs li:last-child a[data-v-18bfde6e]:after,.tabs li[data-v-18bfde6e]:first-child:before,.tabs li:first-child a[data-v-18bfde6e]:before,.tabs .router-link-active[data-v-18bfde6e]:after,.tabs .router-link-active[data-v-18bfde6e]:before,.tabs .router-link-active a[data-v-18bfde6e]:after,.tabs .router-link-active a[data-v-18bfde6e]:before{content:""}.tabs .router-link-active[data-v-18bfde6e]:before,.tabs .router-link-active[data-v-18bfde6e]:after{background:transparent;z-index:1}.tabs li[data-v-18bfde6e]:before,.tabs li[data-v-18bfde6e]:after{background:transparent;width:10px;height:10px}.tabs li[data-v-18bfde6e]:before{left:-10px}.tabs li[data-v-18bfde6e]:after{right:-10px}.tabs li a[data-v-18bfde6e]:after,.tabs li a[data-v-18bfde6e]:before{width:20px;height:20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;background:transparent;z-index:2}.tabs .router-link-active a[data-v-18bfde6e]:after,.tabs .router-link-active a[data-v-18bfde6e]:before{background:transparent}.tabs li:first-child.router-link-active a[data-v-18bfde6e]:before,.tabs li:last-child.router-link-active a[data-v-18bfde6e]:after{background:transparent}.tabs li a[data-v-18bfde6e]:before{left:-20px}.tabs li a[data-v-18bfde6e]:after{right:-20px}.hidebreadcrumbs a[data-v-18bfde6e]{width:1ch;min-width:calc(66px - 4ch);background-color:#fff;padding-left:2ch;padding-right:2ch;padding-top:3px;font-size:150%;text-align:center}.rotated[data-v-18bfde6e]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s}.unrotated[data-v-18bfde6e]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}li[data-v-18bfde6e]:active,li[data-v-18bfde6e]:hover,li[data-v-18bfde6e]:focus,li>a[data-v-18bfde6e]:active,li>a[data-v-18bfde6e]:hover,li>a[data-v-18bfde6e]:focus{z-index:3}a[data-v-18bfde6e]:active,a[data-v-18bfde6e]:hover,a[data-v-18bfde6e]:focus{outline:2px solid black;z-index:3}.hometab a[data-v-18bfde6e]{width:1ch;min-width:calc(66px - 4ch);background-color:#fff;padding-left:2ch;padding-right:2ch;padding-top:6px;text-align:center}.hometab svg[data-v-18bfde6e]{height:14pt;width:14pt}.searchtab a[data-v-18bfde6e]{min-width:calc(66px - 4ch);background-color:#fff;padding-left:2ch;padding-right:2ch;padding-top:11px;font-size:150%;align-items:center}.searchtab svg[data-v-18bfde6e]{padding-left:.25ch}.searchtab input[data-v-18bfde6e]{margin-top:-4px;outline:none;border:none;border-bottom:1.5px solid black;background-color:transparent;text-align:right;font-size:11pt} diff --git a/desktop/package.json b/desktop/package.json index 02b3ed50..688c4a87 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,9 +1,21 @@ { "name": "@stonecrop/desktop", - "version": "0.2.2", - "description": "desktop specific components for Stonecrop UI", + "version": "0.2.5", + "description": "Desktop-specific components for Stonecrop UI", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "desktop" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/desktop.js", @@ -13,10 +25,11 @@ }, "main": "dist/desktop.js", "module": "dist/desktop.js", + "umd": "dist/desktop.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.vue" + "src/*" ], "scripts": { "build": "vite build", @@ -47,8 +60,10 @@ "vite": "^5.2.9", "vue-router": "^4" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/desktop.umd.cjs" + } } diff --git a/examples/package.json b/examples/package.json index 7a54631a..1342c715 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,6 +1,6 @@ { "name": "@stonecrop/examples", - "version": "0.2.2", + "version": "0.2.5", "private": true, "description": "Example App(s) for the Stonecrop framework", "license": "MIT", diff --git a/graphql_client/dist/graphql-client.js b/graphql_client/dist/graphql-client.js deleted file mode 100644 index 8f1cc9b8..00000000 --- a/graphql_client/dist/graphql-client.js +++ /dev/null @@ -1,3075 +0,0 @@ -function Le(e, t) { - for (var n = 0; n < t.length; n++) { - const r = t[n]; - if (typeof r != "string" && !Array.isArray(r)) { - for (const i in r) - if (i !== "default" && !(i in e)) { - const s = Object.getOwnPropertyDescriptor(r, i); - s && Object.defineProperty(e, i, s.get ? s : { - enumerable: !0, - get: () => r[i] - }); - } - } - } - return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" })); -} -const he = JSON, Fe = (e) => e.toUpperCase(), Pe = (e) => { - const t = {}; - return e.forEach((n, r) => { - t[r] = n; - }), t; -}, Be = (e, t, n) => e.document ? e : { - document: e, - variables: t, - requestHeaders: n, - signal: void 0 -}, Me = (e, t, n) => e.query ? e : { - query: e, - variables: t, - requestHeaders: n, - signal: void 0 -}, Ue = (e, t) => e.documents ? e : { - documents: e, - requestHeaders: t, - signal: void 0 -}, Ve = (e, t, ...n) => { - const [r, i] = n; - return e.document ? e : { - url: e, - document: t, - variables: r, - requestHeaders: i, - signal: void 0 - }; -}; -function Q(e, t) { - if (!!!e) - throw new Error(t); -} -function je(e) { - return typeof e == "object" && e !== null; -} -function qe(e, t) { - if (!!!e) - throw new Error( - t ?? "Unexpected invariant triggered." - ); -} -const $e = /\r\n|[\n\r]/g; -function ae(e, t) { - let n = 0, r = 1; - for (const i of e.body.matchAll($e)) { - if (typeof i.index == "number" || qe(!1), i.index >= t) - break; - n = i.index + i[0].length, r += 1; - } - return { - line: r, - column: t + 1 - n - }; -} -function Ge(e) { - return xe( - e.source, - ae(e.source, e.start) - ); -} -function xe(e, t) { - const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, c = t.line + s, u = t.line === 1 ? n : 0, p = t.column + u, d = `${e.name}:${c}:${p} -`, y = r.split(/\r\n|[\n\r]/g), m = y[i]; - if (m.length > 120) { - const T = Math.floor(p / 80), A = p % 80, E = []; - for (let I = 0; I < m.length; I += 80) - E.push(m.slice(I, I + 80)); - return d + fe([ - [`${c} |`, E[0]], - ...E.slice(1, T + 1).map((I) => ["|", I]), - ["|", "^".padStart(A)], - ["|", E[T + 1]] - ]); - } - return d + fe([ - // Lines specified like this: ["prefix", "string"], - [`${c - 1} |`, y[i - 1]], - [`${c} |`, m], - ["|", "^".padStart(p)], - [`${c + 1} |`, y[i + 1]] - ]); -} -function fe(e) { - const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length)); - return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(` -`); -} -function He(e) { - const t = e[0]; - return t == null || "kind" in t || "length" in t ? { - nodes: t, - source: e[1], - positions: e[2], - path: e[3], - originalError: e[4], - extensions: e[5] - } : t; -} -class pe extends Error { - /** - * An array of `{ line, column }` locations within the source GraphQL document - * which correspond to this error. - * - * Errors during validation often contain multiple locations, for example to - * point out two things with the same name. Errors during execution include a - * single location, the field which produced the error. - * - * Enumerable, and appears in the result of JSON.stringify(). - */ - /** - * An array describing the JSON-path into the execution response which - * corresponds to this error. Only included for errors during execution. - * - * Enumerable, and appears in the result of JSON.stringify(). - */ - /** - * An array of GraphQL AST Nodes corresponding to this error. - */ - /** - * The source GraphQL document for the first location of this error. - * - * Note that if this Error represents more than one node, the source may not - * represent nodes after the first node. - */ - /** - * An array of character offsets within the source GraphQL document - * which correspond to this error. - */ - /** - * The original error thrown from a field resolver during execution. - */ - /** - * Extension fields to add to the formatted error. - */ - /** - * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. - */ - constructor(t, ...n) { - var r, i, s; - const { nodes: c, source: u, positions: p, path: d, originalError: y, extensions: m } = He(n); - super(t), this.name = "GraphQLError", this.path = d ?? void 0, this.originalError = y ?? void 0, this.nodes = ye( - Array.isArray(c) ? c : c ? [c] : void 0 - ); - const T = ye( - (r = this.nodes) === null || r === void 0 ? void 0 : r.map((E) => E.loc).filter((E) => E != null) - ); - this.source = u ?? (T == null || (i = T[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (T == null ? void 0 : T.map((E) => E.start)), this.locations = p && u ? p.map((E) => ae(u, E)) : T == null ? void 0 : T.map((E) => ae(E.source, E.start)); - const A = je( - y == null ? void 0 : y.extensions - ) ? y == null ? void 0 : y.extensions : void 0; - this.extensions = (s = m ?? A) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, { - message: { - writable: !0, - enumerable: !0 - }, - name: { - enumerable: !1 - }, - nodes: { - enumerable: !1 - }, - source: { - enumerable: !1 - }, - positions: { - enumerable: !1 - }, - originalError: { - enumerable: !1 - } - }), y != null && y.stack ? Object.defineProperty(this, "stack", { - value: y.stack, - writable: !0, - configurable: !0 - }) : Error.captureStackTrace ? Error.captureStackTrace(this, pe) : Object.defineProperty(this, "stack", { - value: Error().stack, - writable: !0, - configurable: !0 - }); - } - get [Symbol.toStringTag]() { - return "GraphQLError"; - } - toString() { - let t = this.message; - if (this.nodes) - for (const n of this.nodes) - n.loc && (t += ` - -` + Ge(n.loc)); - else if (this.source && this.locations) - for (const n of this.locations) - t += ` - -` + xe(this.source, n); - return t; - } - toJSON() { - const t = { - message: this.message - }; - return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t; - } -} -function ye(e) { - return e === void 0 || e.length === 0 ? void 0 : e; -} -function O(e, t, n) { - return new pe(`Syntax Error: ${n}`, { - source: e, - positions: [t] - }); -} -class Ye { - /** - * The character offset at which this Node begins. - */ - /** - * The character offset at which this Node ends. - */ - /** - * The Token at which this Node begins. - */ - /** - * The Token at which this Node ends. - */ - /** - * The Source document the AST represents. - */ - constructor(t, n, r) { - this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r; - } - get [Symbol.toStringTag]() { - return "Location"; - } - toJSON() { - return { - start: this.start, - end: this.end - }; - } -} -class Ae { - /** - * The kind of Token. - */ - /** - * The character offset at which this Node begins. - */ - /** - * The character offset at which this Node ends. - */ - /** - * The 1-indexed line number on which this Token appears. - */ - /** - * The 1-indexed column number at which this Token begins. - */ - /** - * For non-punctuation tokens, represents the interpreted value of the token. - * - * Note: is undefined for punctuation tokens, but typed as string for - * convenience in the parser. - */ - /** - * Tokens exist as nodes in a double-linked-list amongst all tokens - * including ignored tokens. is always the first node and - * the last. - */ - constructor(t, n, r, i, s, c) { - this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = c, this.prev = null, this.next = null; - } - get [Symbol.toStringTag]() { - return "Token"; - } - toJSON() { - return { - kind: this.kind, - value: this.value, - line: this.line, - column: this.column - }; - } -} -const Ie = { - Name: [], - Document: ["definitions"], - OperationDefinition: [ - "name", - "variableDefinitions", - "directives", - "selectionSet" - ], - VariableDefinition: ["variable", "type", "defaultValue", "directives"], - Variable: ["name"], - SelectionSet: ["selections"], - Field: ["alias", "name", "arguments", "directives", "selectionSet"], - Argument: ["name", "value"], - FragmentSpread: ["name", "directives"], - InlineFragment: ["typeCondition", "directives", "selectionSet"], - FragmentDefinition: [ - "name", - // Note: fragment variable definitions are deprecated and will removed in v17.0.0 - "variableDefinitions", - "typeCondition", - "directives", - "selectionSet" - ], - IntValue: [], - FloatValue: [], - StringValue: [], - BooleanValue: [], - NullValue: [], - EnumValue: [], - ListValue: ["values"], - ObjectValue: ["fields"], - ObjectField: ["name", "value"], - Directive: ["name", "arguments"], - NamedType: ["name"], - ListType: ["type"], - NonNullType: ["type"], - SchemaDefinition: ["description", "directives", "operationTypes"], - OperationTypeDefinition: ["type"], - ScalarTypeDefinition: ["description", "name", "directives"], - ObjectTypeDefinition: [ - "description", - "name", - "interfaces", - "directives", - "fields" - ], - FieldDefinition: ["description", "name", "arguments", "type", "directives"], - InputValueDefinition: [ - "description", - "name", - "type", - "defaultValue", - "directives" - ], - InterfaceTypeDefinition: [ - "description", - "name", - "interfaces", - "directives", - "fields" - ], - UnionTypeDefinition: ["description", "name", "directives", "types"], - EnumTypeDefinition: ["description", "name", "directives", "values"], - EnumValueDefinition: ["description", "name", "directives"], - InputObjectTypeDefinition: ["description", "name", "directives", "fields"], - DirectiveDefinition: ["description", "name", "arguments", "locations"], - SchemaExtension: ["directives", "operationTypes"], - ScalarTypeExtension: ["name", "directives"], - ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], - InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], - UnionTypeExtension: ["name", "directives", "types"], - EnumTypeExtension: ["name", "directives", "values"], - InputObjectTypeExtension: ["name", "directives", "fields"] -}, ze = new Set(Object.keys(Ie)); -function Ee(e) { - const t = e == null ? void 0 : e.kind; - return typeof t == "string" && ze.has(t); -} -var M; -(function(e) { - e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription"; -})(M || (M = {})); -var ce; -(function(e) { - e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION"; -})(ce || (ce = {})); -var f; -(function(e) { - e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension"; -})(f || (f = {})); -function ue(e) { - return e === 9 || e === 32; -} -function $(e) { - return e >= 48 && e <= 57; -} -function ge(e) { - return e >= 97 && e <= 122 || // A-Z - e >= 65 && e <= 90; -} -function Oe(e) { - return ge(e) || e === 95; -} -function Je(e) { - return ge(e) || $(e) || e === 95; -} -function Qe(e) { - var t; - let n = Number.MAX_SAFE_INTEGER, r = null, i = -1; - for (let c = 0; c < e.length; ++c) { - var s; - const u = e[c], p = Xe(u); - p !== u.length && (r = (s = r) !== null && s !== void 0 ? s : c, i = c, c !== 0 && p < n && (n = p)); - } - return e.map((c, u) => u === 0 ? c : c.slice(n)).slice( - (t = r) !== null && t !== void 0 ? t : 0, - i + 1 - ); -} -function Xe(e) { - let t = 0; - for (; t < e.length && ue(e.charCodeAt(t)); ) - ++t; - return t; -} -function We(e, t) { - const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((A) => A.length === 0 || ue(A.charCodeAt(0))), c = n.endsWith('\\"""'), u = e.endsWith('"') && !c, p = e.endsWith("\\"), d = u || p, y = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability - (!i || e.length > 70 || d || s || c); - let m = ""; - const T = i && ue(e.charCodeAt(0)); - return (y && !T || s) && (m += ` -`), m += n, (y || d) && (m += ` -`), '"""' + m + '"""'; -} -var a; -(function(e) { - e.SOF = "", e.EOF = "", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment"; -})(a || (a = {})); -class Ze { - /** - * The previously focused non-ignored token. - */ - /** - * The currently focused non-ignored token. - */ - /** - * The (1-indexed) line containing the current token. - */ - /** - * The character offset at which the current line begins. - */ - constructor(t) { - const n = new Ae(a.SOF, 0, 0, 0, 0); - this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0; - } - get [Symbol.toStringTag]() { - return "Lexer"; - } - /** - * Advances the token stream to the next non-ignored token. - */ - advance() { - return this.lastToken = this.token, this.token = this.lookahead(); - } - /** - * Looks ahead and returns the next non-ignored token, but does not change - * the state of Lexer. - */ - lookahead() { - let t = this.token; - if (t.kind !== a.EOF) - do - if (t.next) - t = t.next; - else { - const n = et(this, t.end); - t.next = n, n.prev = t, t = n; - } - while (t.kind === a.COMMENT); - return t; - } -} -function Ke(e) { - return e === a.BANG || e === a.DOLLAR || e === a.AMP || e === a.PAREN_L || e === a.PAREN_R || e === a.SPREAD || e === a.COLON || e === a.EQUALS || e === a.AT || e === a.BRACKET_L || e === a.BRACKET_R || e === a.BRACE_L || e === a.PIPE || e === a.BRACE_R; -} -function U(e) { - return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111; -} -function K(e, t) { - return _e(e.charCodeAt(t)) && be(e.charCodeAt(t + 1)); -} -function _e(e) { - return e >= 55296 && e <= 56319; -} -function be(e) { - return e >= 56320 && e <= 57343; -} -function F(e, t) { - const n = e.source.body.codePointAt(t); - if (n === void 0) - return a.EOF; - if (n >= 32 && n <= 126) { - const r = String.fromCodePoint(n); - return r === '"' ? `'"'` : `"${r}"`; - } - return "U+" + n.toString(16).toUpperCase().padStart(4, "0"); -} -function g(e, t, n, r, i) { - const s = e.line, c = 1 + n - e.lineStart; - return new Ae(t, n, r, s, c, i); -} -function et(e, t) { - const n = e.source.body, r = n.length; - let i = t; - for (; i < r; ) { - const s = n.charCodeAt(i); - switch (s) { - case 65279: - case 9: - case 32: - case 44: - ++i; - continue; - case 10: - ++i, ++e.line, e.lineStart = i; - continue; - case 13: - n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i; - continue; - case 35: - return tt(e, i); - case 33: - return g(e, a.BANG, i, i + 1); - case 36: - return g(e, a.DOLLAR, i, i + 1); - case 38: - return g(e, a.AMP, i, i + 1); - case 40: - return g(e, a.PAREN_L, i, i + 1); - case 41: - return g(e, a.PAREN_R, i, i + 1); - case 46: - if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46) - return g(e, a.SPREAD, i, i + 3); - break; - case 58: - return g(e, a.COLON, i, i + 1); - case 61: - return g(e, a.EQUALS, i, i + 1); - case 64: - return g(e, a.AT, i, i + 1); - case 91: - return g(e, a.BRACKET_L, i, i + 1); - case 93: - return g(e, a.BRACKET_R, i, i + 1); - case 123: - return g(e, a.BRACE_L, i, i + 1); - case 124: - return g(e, a.PIPE, i, i + 1); - case 125: - return g(e, a.BRACE_R, i, i + 1); - case 34: - return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? at(e, i) : it(e, i); - } - if ($(s) || s === 45) - return nt(e, i, s); - if (Oe(s)) - return ct(e, i); - throw O( - e.source, - i, - s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : U(s) || K(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.` - ); - } - return g(e, a.EOF, r, r); -} -function tt(e, t) { - const n = e.source.body, r = n.length; - let i = t + 1; - for (; i < r; ) { - const s = n.charCodeAt(i); - if (s === 10 || s === 13) - break; - if (U(s)) - ++i; - else if (K(n, i)) - i += 2; - else - break; - } - return g( - e, - a.COMMENT, - t, - i, - n.slice(t + 1, i) - ); -} -function nt(e, t, n) { - const r = e.source.body; - let i = t, s = n, c = !1; - if (s === 45 && (s = r.charCodeAt(++i)), s === 48) { - if (s = r.charCodeAt(++i), $(s)) - throw O( - e.source, - i, - `Invalid number, unexpected digit after 0: ${F( - e, - i - )}.` - ); - } else - i = ie(e, i, s), s = r.charCodeAt(i); - if (s === 46 && (c = !0, s = r.charCodeAt(++i), i = ie(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (c = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ie(e, i, s), s = r.charCodeAt(i)), s === 46 || Oe(s)) - throw O( - e.source, - i, - `Invalid number, expected digit but got: ${F( - e, - i - )}.` - ); - return g( - e, - c ? a.FLOAT : a.INT, - t, - i, - r.slice(t, i) - ); -} -function ie(e, t, n) { - if (!$(n)) - throw O( - e.source, - t, - `Invalid number, expected digit but got: ${F( - e, - t - )}.` - ); - const r = e.source.body; - let i = t + 1; - for (; $(r.charCodeAt(i)); ) - ++i; - return i; -} -function it(e, t) { - const n = e.source.body, r = n.length; - let i = t + 1, s = i, c = ""; - for (; i < r; ) { - const u = n.charCodeAt(i); - if (u === 34) - return c += n.slice(s, i), g(e, a.STRING, t, i + 1, c); - if (u === 92) { - c += n.slice(s, i); - const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? rt(e, i) : st(e, i) : ot(e, i); - c += p.value, i += p.size, s = i; - continue; - } - if (u === 10 || u === 13) - break; - if (U(u)) - ++i; - else if (K(n, i)) - i += 2; - else - throw O( - e.source, - i, - `Invalid character within String: ${F( - e, - i - )}.` - ); - } - throw O(e.source, i, "Unterminated string."); -} -function rt(e, t) { - const n = e.source.body; - let r = 0, i = 3; - for (; i < 12; ) { - const s = n.charCodeAt(t + i++); - if (s === 125) { - if (i < 5 || !U(r)) - break; - return { - value: String.fromCodePoint(r), - size: i - }; - } - if (r = r << 4 | j(s), r < 0) - break; - } - throw O( - e.source, - t, - `Invalid Unicode escape sequence: "${n.slice( - t, - t + i - )}".` - ); -} -function st(e, t) { - const n = e.source.body, r = me(n, t + 2); - if (U(r)) - return { - value: String.fromCodePoint(r), - size: 6 - }; - if (_e(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) { - const i = me(n, t + 8); - if (be(i)) - return { - value: String.fromCodePoint(r, i), - size: 12 - }; - } - throw O( - e.source, - t, - `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".` - ); -} -function me(e, t) { - return j(e.charCodeAt(t)) << 12 | j(e.charCodeAt(t + 1)) << 8 | j(e.charCodeAt(t + 2)) << 4 | j(e.charCodeAt(t + 3)); -} -function j(e) { - return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1; -} -function ot(e, t) { - const n = e.source.body; - switch (n.charCodeAt(t + 1)) { - case 34: - return { - value: '"', - size: 2 - }; - case 92: - return { - value: "\\", - size: 2 - }; - case 47: - return { - value: "/", - size: 2 - }; - case 98: - return { - value: "\b", - size: 2 - }; - case 102: - return { - value: "\f", - size: 2 - }; - case 110: - return { - value: ` -`, - size: 2 - }; - case 114: - return { - value: "\r", - size: 2 - }; - case 116: - return { - value: " ", - size: 2 - }; - } - throw O( - e.source, - t, - `Invalid character escape sequence: "${n.slice( - t, - t + 2 - )}".` - ); -} -function at(e, t) { - const n = e.source.body, r = n.length; - let i = e.lineStart, s = t + 3, c = s, u = ""; - const p = []; - for (; s < r; ) { - const d = n.charCodeAt(s); - if (d === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) { - u += n.slice(c, s), p.push(u); - const y = g( - e, - a.BLOCK_STRING, - t, - s + 3, - // Return a string of the lines joined with U+000A. - Qe(p).join(` -`) - ); - return e.line += p.length - 1, e.lineStart = i, y; - } - if (d === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) { - u += n.slice(c, s), c = s + 1, s += 4; - continue; - } - if (d === 10 || d === 13) { - u += n.slice(c, s), p.push(u), d === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", c = s, i = s; - continue; - } - if (U(d)) - ++s; - else if (K(n, s)) - s += 2; - else - throw O( - e.source, - s, - `Invalid character within String: ${F( - e, - s - )}.` - ); - } - throw O(e.source, s, "Unterminated string."); -} -function ct(e, t) { - const n = e.source.body, r = n.length; - let i = t + 1; - for (; i < r; ) { - const s = n.charCodeAt(i); - if (Je(s)) - ++i; - else - break; - } - return g( - e, - a.NAME, - t, - i, - n.slice(t, i) - ); -} -const ut = 10, De = 2; -function de(e) { - return ee(e, []); -} -function ee(e, t) { - switch (typeof e) { - case "string": - return JSON.stringify(e); - case "function": - return e.name ? `[function ${e.name}]` : "[function]"; - case "object": - return lt(e, t); - default: - return String(e); - } -} -function lt(e, t) { - if (e === null) - return "null"; - if (t.includes(e)) - return "[Circular]"; - const n = [...t, e]; - if (ht(e)) { - const r = e.toJSON(); - if (r !== e) - return typeof r == "string" ? r : ee(r, n); - } else if (Array.isArray(e)) - return dt(e, n); - return pt(e, n); -} -function ht(e) { - return typeof e.toJSON == "function"; -} -function pt(e, t) { - const n = Object.entries(e); - return n.length === 0 ? "{}" : t.length > De ? "[" + ft(e) + "]" : "{ " + n.map( - ([i, s]) => i + ": " + ee(s, t) - ).join(", ") + " }"; -} -function dt(e, t) { - if (e.length === 0) - return "[]"; - if (t.length > De) - return "[Array]"; - const n = Math.min(ut, e.length), r = e.length - n, i = []; - for (let s = 0; s < n; ++s) - i.push(ee(e[s], t)); - return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]"; -} -function ft(e) { - const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, ""); - if (t === "Object" && typeof e.constructor == "function") { - const n = e.constructor.name; - if (typeof n == "string" && n !== "") - return n; - } - return t; -} -const yt = ( - /* c8 ignore next 6 */ - // FIXME: https://github.com/graphql/graphql-js/issues/2317 - // eslint-disable-next-line no-undef - process.env.NODE_ENV === "production" ? function(t, n) { - return t instanceof n; - } : function(t, n) { - if (t instanceof n) - return !0; - if (typeof t == "object" && t !== null) { - var r; - const i = n.prototype[Symbol.toStringTag], s = ( - // We still need to support constructor's name to detect conflicts with older versions of this library. - Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name - ); - if (i === s) { - const c = de(t); - throw new Error(`Cannot use ${i} "${c}" from another module or realm. - -Ensure that there is only one instance of "graphql" in the node_modules -directory. If different versions of "graphql" are the dependencies of other -relied on modules, use "resolutions" to ensure only one version is installed. - -https://yarnpkg.com/en/docs/selective-version-resolutions - -Duplicate "graphql" modules cannot be used at the same time since different -versions may have different capabilities and behavior. The data from one -version used in the function from another could produce confusing and -spurious results.`); - } - } - return !1; - } -); -class Se { - constructor(t, n = "GraphQL request", r = { - line: 1, - column: 1 - }) { - typeof t == "string" || Q(!1, `Body must be a string. Received: ${de(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || Q( - !1, - "line in locationOffset is 1-indexed and must be positive." - ), this.locationOffset.column > 0 || Q( - !1, - "column in locationOffset is 1-indexed and must be positive." - ); - } - get [Symbol.toStringTag]() { - return "Source"; - } -} -function Et(e) { - return yt(e, Se); -} -function mt(e, t) { - return new Tt(e, t).parseDocument(); -} -class Tt { - constructor(t, n = {}) { - const r = Et(t) ? t : new Se(t); - this._lexer = new Ze(r), this._options = n, this._tokenCounter = 0; - } - /** - * Converts a name lex token into a name parse node. - */ - parseName() { - const t = this.expectToken(a.NAME); - return this.node(t, { - kind: f.NAME, - value: t.value - }); - } - // Implements the parsing rules in the Document section. - /** - * Document : Definition+ - */ - parseDocument() { - return this.node(this._lexer.token, { - kind: f.DOCUMENT, - definitions: this.many( - a.SOF, - this.parseDefinition, - a.EOF - ) - }); - } - /** - * Definition : - * - ExecutableDefinition - * - TypeSystemDefinition - * - TypeSystemExtension - * - * ExecutableDefinition : - * - OperationDefinition - * - FragmentDefinition - * - * TypeSystemDefinition : - * - SchemaDefinition - * - TypeDefinition - * - DirectiveDefinition - * - * TypeDefinition : - * - ScalarTypeDefinition - * - ObjectTypeDefinition - * - InterfaceTypeDefinition - * - UnionTypeDefinition - * - EnumTypeDefinition - * - InputObjectTypeDefinition - */ - parseDefinition() { - if (this.peek(a.BRACE_L)) - return this.parseOperationDefinition(); - const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token; - if (n.kind === a.NAME) { - switch (n.value) { - case "schema": - return this.parseSchemaDefinition(); - case "scalar": - return this.parseScalarTypeDefinition(); - case "type": - return this.parseObjectTypeDefinition(); - case "interface": - return this.parseInterfaceTypeDefinition(); - case "union": - return this.parseUnionTypeDefinition(); - case "enum": - return this.parseEnumTypeDefinition(); - case "input": - return this.parseInputObjectTypeDefinition(); - case "directive": - return this.parseDirectiveDefinition(); - } - if (t) - throw O( - this._lexer.source, - this._lexer.token.start, - "Unexpected description, descriptions are supported only on type definitions." - ); - switch (n.value) { - case "query": - case "mutation": - case "subscription": - return this.parseOperationDefinition(); - case "fragment": - return this.parseFragmentDefinition(); - case "extend": - return this.parseTypeSystemExtension(); - } - } - throw this.unexpected(n); - } - // Implements the parsing rules in the Operations section. - /** - * OperationDefinition : - * - SelectionSet - * - OperationType Name? VariableDefinitions? Directives? SelectionSet - */ - parseOperationDefinition() { - const t = this._lexer.token; - if (this.peek(a.BRACE_L)) - return this.node(t, { - kind: f.OPERATION_DEFINITION, - operation: M.QUERY, - name: void 0, - variableDefinitions: [], - directives: [], - selectionSet: this.parseSelectionSet() - }); - const n = this.parseOperationType(); - let r; - return this.peek(a.NAME) && (r = this.parseName()), this.node(t, { - kind: f.OPERATION_DEFINITION, - operation: n, - name: r, - variableDefinitions: this.parseVariableDefinitions(), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }); - } - /** - * OperationType : one of query mutation subscription - */ - parseOperationType() { - const t = this.expectToken(a.NAME); - switch (t.value) { - case "query": - return M.QUERY; - case "mutation": - return M.MUTATION; - case "subscription": - return M.SUBSCRIPTION; - } - throw this.unexpected(t); - } - /** - * VariableDefinitions : ( VariableDefinition+ ) - */ - parseVariableDefinitions() { - return this.optionalMany( - a.PAREN_L, - this.parseVariableDefinition, - a.PAREN_R - ); - } - /** - * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? - */ - parseVariableDefinition() { - return this.node(this._lexer.token, { - kind: f.VARIABLE_DEFINITION, - variable: this.parseVariable(), - type: (this.expectToken(a.COLON), this.parseTypeReference()), - defaultValue: this.expectOptionalToken(a.EQUALS) ? this.parseConstValueLiteral() : void 0, - directives: this.parseConstDirectives() - }); - } - /** - * Variable : $ Name - */ - parseVariable() { - const t = this._lexer.token; - return this.expectToken(a.DOLLAR), this.node(t, { - kind: f.VARIABLE, - name: this.parseName() - }); - } - /** - * ``` - * SelectionSet : { Selection+ } - * ``` - */ - parseSelectionSet() { - return this.node(this._lexer.token, { - kind: f.SELECTION_SET, - selections: this.many( - a.BRACE_L, - this.parseSelection, - a.BRACE_R - ) - }); - } - /** - * Selection : - * - Field - * - FragmentSpread - * - InlineFragment - */ - parseSelection() { - return this.peek(a.SPREAD) ? this.parseFragment() : this.parseField(); - } - /** - * Field : Alias? Name Arguments? Directives? SelectionSet? - * - * Alias : Name : - */ - parseField() { - const t = this._lexer.token, n = this.parseName(); - let r, i; - return this.expectOptionalToken(a.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, { - kind: f.FIELD, - alias: r, - name: i, - arguments: this.parseArguments(!1), - directives: this.parseDirectives(!1), - selectionSet: this.peek(a.BRACE_L) ? this.parseSelectionSet() : void 0 - }); - } - /** - * Arguments[Const] : ( Argument[?Const]+ ) - */ - parseArguments(t) { - const n = t ? this.parseConstArgument : this.parseArgument; - return this.optionalMany(a.PAREN_L, n, a.PAREN_R); - } - /** - * Argument[Const] : Name : Value[?Const] - */ - parseArgument(t = !1) { - const n = this._lexer.token, r = this.parseName(); - return this.expectToken(a.COLON), this.node(n, { - kind: f.ARGUMENT, - name: r, - value: this.parseValueLiteral(t) - }); - } - parseConstArgument() { - return this.parseArgument(!0); - } - // Implements the parsing rules in the Fragments section. - /** - * Corresponds to both FragmentSpread and InlineFragment in the spec. - * - * FragmentSpread : ... FragmentName Directives? - * - * InlineFragment : ... TypeCondition? Directives? SelectionSet - */ - parseFragment() { - const t = this._lexer.token; - this.expectToken(a.SPREAD); - const n = this.expectOptionalKeyword("on"); - return !n && this.peek(a.NAME) ? this.node(t, { - kind: f.FRAGMENT_SPREAD, - name: this.parseFragmentName(), - directives: this.parseDirectives(!1) - }) : this.node(t, { - kind: f.INLINE_FRAGMENT, - typeCondition: n ? this.parseNamedType() : void 0, - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }); - } - /** - * FragmentDefinition : - * - fragment FragmentName on TypeCondition Directives? SelectionSet - * - * TypeCondition : NamedType - */ - parseFragmentDefinition() { - const t = this._lexer.token; - return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, { - kind: f.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - variableDefinitions: this.parseVariableDefinitions(), - typeCondition: (this.expectKeyword("on"), this.parseNamedType()), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) : this.node(t, { - kind: f.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - typeCondition: (this.expectKeyword("on"), this.parseNamedType()), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }); - } - /** - * FragmentName : Name but not `on` - */ - parseFragmentName() { - if (this._lexer.token.value === "on") - throw this.unexpected(); - return this.parseName(); - } - // Implements the parsing rules in the Values section. - /** - * Value[Const] : - * - [~Const] Variable - * - IntValue - * - FloatValue - * - StringValue - * - BooleanValue - * - NullValue - * - EnumValue - * - ListValue[?Const] - * - ObjectValue[?Const] - * - * BooleanValue : one of `true` `false` - * - * NullValue : `null` - * - * EnumValue : Name but not `true`, `false` or `null` - */ - parseValueLiteral(t) { - const n = this._lexer.token; - switch (n.kind) { - case a.BRACKET_L: - return this.parseList(t); - case a.BRACE_L: - return this.parseObject(t); - case a.INT: - return this.advanceLexer(), this.node(n, { - kind: f.INT, - value: n.value - }); - case a.FLOAT: - return this.advanceLexer(), this.node(n, { - kind: f.FLOAT, - value: n.value - }); - case a.STRING: - case a.BLOCK_STRING: - return this.parseStringLiteral(); - case a.NAME: - switch (this.advanceLexer(), n.value) { - case "true": - return this.node(n, { - kind: f.BOOLEAN, - value: !0 - }); - case "false": - return this.node(n, { - kind: f.BOOLEAN, - value: !1 - }); - case "null": - return this.node(n, { - kind: f.NULL - }); - default: - return this.node(n, { - kind: f.ENUM, - value: n.value - }); - } - case a.DOLLAR: - if (t) - if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) { - const r = this._lexer.token.value; - throw O( - this._lexer.source, - n.start, - `Unexpected variable "$${r}" in constant value.` - ); - } else - throw this.unexpected(n); - return this.parseVariable(); - default: - throw this.unexpected(); - } - } - parseConstValueLiteral() { - return this.parseValueLiteral(!0); - } - parseStringLiteral() { - const t = this._lexer.token; - return this.advanceLexer(), this.node(t, { - kind: f.STRING, - value: t.value, - block: t.kind === a.BLOCK_STRING - }); - } - /** - * ListValue[Const] : - * - [ ] - * - [ Value[?Const]+ ] - */ - parseList(t) { - const n = () => this.parseValueLiteral(t); - return this.node(this._lexer.token, { - kind: f.LIST, - values: this.any(a.BRACKET_L, n, a.BRACKET_R) - }); - } - /** - * ``` - * ObjectValue[Const] : - * - { } - * - { ObjectField[?Const]+ } - * ``` - */ - parseObject(t) { - const n = () => this.parseObjectField(t); - return this.node(this._lexer.token, { - kind: f.OBJECT, - fields: this.any(a.BRACE_L, n, a.BRACE_R) - }); - } - /** - * ObjectField[Const] : Name : Value[?Const] - */ - parseObjectField(t) { - const n = this._lexer.token, r = this.parseName(); - return this.expectToken(a.COLON), this.node(n, { - kind: f.OBJECT_FIELD, - name: r, - value: this.parseValueLiteral(t) - }); - } - // Implements the parsing rules in the Directives section. - /** - * Directives[Const] : Directive[?Const]+ - */ - parseDirectives(t) { - const n = []; - for (; this.peek(a.AT); ) - n.push(this.parseDirective(t)); - return n; - } - parseConstDirectives() { - return this.parseDirectives(!0); - } - /** - * ``` - * Directive[Const] : @ Name Arguments[?Const]? - * ``` - */ - parseDirective(t) { - const n = this._lexer.token; - return this.expectToken(a.AT), this.node(n, { - kind: f.DIRECTIVE, - name: this.parseName(), - arguments: this.parseArguments(t) - }); - } - // Implements the parsing rules in the Types section. - /** - * Type : - * - NamedType - * - ListType - * - NonNullType - */ - parseTypeReference() { - const t = this._lexer.token; - let n; - if (this.expectOptionalToken(a.BRACKET_L)) { - const r = this.parseTypeReference(); - this.expectToken(a.BRACKET_R), n = this.node(t, { - kind: f.LIST_TYPE, - type: r - }); - } else - n = this.parseNamedType(); - return this.expectOptionalToken(a.BANG) ? this.node(t, { - kind: f.NON_NULL_TYPE, - type: n - }) : n; - } - /** - * NamedType : Name - */ - parseNamedType() { - return this.node(this._lexer.token, { - kind: f.NAMED_TYPE, - name: this.parseName() - }); - } - // Implements the parsing rules in the Type Definition section. - peekDescription() { - return this.peek(a.STRING) || this.peek(a.BLOCK_STRING); - } - /** - * Description : StringValue - */ - parseDescription() { - if (this.peekDescription()) - return this.parseStringLiteral(); - } - /** - * ``` - * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } - * ``` - */ - parseSchemaDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("schema"); - const r = this.parseConstDirectives(), i = this.many( - a.BRACE_L, - this.parseOperationTypeDefinition, - a.BRACE_R - ); - return this.node(t, { - kind: f.SCHEMA_DEFINITION, - description: n, - directives: r, - operationTypes: i - }); - } - /** - * OperationTypeDefinition : OperationType : NamedType - */ - parseOperationTypeDefinition() { - const t = this._lexer.token, n = this.parseOperationType(); - this.expectToken(a.COLON); - const r = this.parseNamedType(); - return this.node(t, { - kind: f.OPERATION_TYPE_DEFINITION, - operation: n, - type: r - }); - } - /** - * ScalarTypeDefinition : Description? scalar Name Directives[Const]? - */ - parseScalarTypeDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("scalar"); - const r = this.parseName(), i = this.parseConstDirectives(); - return this.node(t, { - kind: f.SCALAR_TYPE_DEFINITION, - description: n, - name: r, - directives: i - }); - } - /** - * ObjectTypeDefinition : - * Description? - * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? - */ - parseObjectTypeDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("type"); - const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), c = this.parseFieldsDefinition(); - return this.node(t, { - kind: f.OBJECT_TYPE_DEFINITION, - description: n, - name: r, - interfaces: i, - directives: s, - fields: c - }); - } - /** - * ImplementsInterfaces : - * - implements `&`? NamedType - * - ImplementsInterfaces & NamedType - */ - parseImplementsInterfaces() { - return this.expectOptionalKeyword("implements") ? this.delimitedMany(a.AMP, this.parseNamedType) : []; - } - /** - * ``` - * FieldsDefinition : { FieldDefinition+ } - * ``` - */ - parseFieldsDefinition() { - return this.optionalMany( - a.BRACE_L, - this.parseFieldDefinition, - a.BRACE_R - ); - } - /** - * FieldDefinition : - * - Description? Name ArgumentsDefinition? : Type Directives[Const]? - */ - parseFieldDefinition() { - const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs(); - this.expectToken(a.COLON); - const s = this.parseTypeReference(), c = this.parseConstDirectives(); - return this.node(t, { - kind: f.FIELD_DEFINITION, - description: n, - name: r, - arguments: i, - type: s, - directives: c - }); - } - /** - * ArgumentsDefinition : ( InputValueDefinition+ ) - */ - parseArgumentDefs() { - return this.optionalMany( - a.PAREN_L, - this.parseInputValueDef, - a.PAREN_R - ); - } - /** - * InputValueDefinition : - * - Description? Name : Type DefaultValue? Directives[Const]? - */ - parseInputValueDef() { - const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(); - this.expectToken(a.COLON); - const i = this.parseTypeReference(); - let s; - this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral()); - const c = this.parseConstDirectives(); - return this.node(t, { - kind: f.INPUT_VALUE_DEFINITION, - description: n, - name: r, - type: i, - defaultValue: s, - directives: c - }); - } - /** - * InterfaceTypeDefinition : - * - Description? interface Name Directives[Const]? FieldsDefinition? - */ - parseInterfaceTypeDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("interface"); - const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), c = this.parseFieldsDefinition(); - return this.node(t, { - kind: f.INTERFACE_TYPE_DEFINITION, - description: n, - name: r, - interfaces: i, - directives: s, - fields: c - }); - } - /** - * UnionTypeDefinition : - * - Description? union Name Directives[Const]? UnionMemberTypes? - */ - parseUnionTypeDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("union"); - const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes(); - return this.node(t, { - kind: f.UNION_TYPE_DEFINITION, - description: n, - name: r, - directives: i, - types: s - }); - } - /** - * UnionMemberTypes : - * - = `|`? NamedType - * - UnionMemberTypes | NamedType - */ - parseUnionMemberTypes() { - return this.expectOptionalToken(a.EQUALS) ? this.delimitedMany(a.PIPE, this.parseNamedType) : []; - } - /** - * EnumTypeDefinition : - * - Description? enum Name Directives[Const]? EnumValuesDefinition? - */ - parseEnumTypeDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("enum"); - const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition(); - return this.node(t, { - kind: f.ENUM_TYPE_DEFINITION, - description: n, - name: r, - directives: i, - values: s - }); - } - /** - * ``` - * EnumValuesDefinition : { EnumValueDefinition+ } - * ``` - */ - parseEnumValuesDefinition() { - return this.optionalMany( - a.BRACE_L, - this.parseEnumValueDefinition, - a.BRACE_R - ); - } - /** - * EnumValueDefinition : Description? EnumValue Directives[Const]? - */ - parseEnumValueDefinition() { - const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives(); - return this.node(t, { - kind: f.ENUM_VALUE_DEFINITION, - description: n, - name: r, - directives: i - }); - } - /** - * EnumValue : Name but not `true`, `false` or `null` - */ - parseEnumValueName() { - if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") - throw O( - this._lexer.source, - this._lexer.token.start, - `${J( - this._lexer.token - )} is reserved and cannot be used for an enum value.` - ); - return this.parseName(); - } - /** - * InputObjectTypeDefinition : - * - Description? input Name Directives[Const]? InputFieldsDefinition? - */ - parseInputObjectTypeDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("input"); - const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition(); - return this.node(t, { - kind: f.INPUT_OBJECT_TYPE_DEFINITION, - description: n, - name: r, - directives: i, - fields: s - }); - } - /** - * ``` - * InputFieldsDefinition : { InputValueDefinition+ } - * ``` - */ - parseInputFieldsDefinition() { - return this.optionalMany( - a.BRACE_L, - this.parseInputValueDef, - a.BRACE_R - ); - } - /** - * TypeSystemExtension : - * - SchemaExtension - * - TypeExtension - * - * TypeExtension : - * - ScalarTypeExtension - * - ObjectTypeExtension - * - InterfaceTypeExtension - * - UnionTypeExtension - * - EnumTypeExtension - * - InputObjectTypeDefinition - */ - parseTypeSystemExtension() { - const t = this._lexer.lookahead(); - if (t.kind === a.NAME) - switch (t.value) { - case "schema": - return this.parseSchemaExtension(); - case "scalar": - return this.parseScalarTypeExtension(); - case "type": - return this.parseObjectTypeExtension(); - case "interface": - return this.parseInterfaceTypeExtension(); - case "union": - return this.parseUnionTypeExtension(); - case "enum": - return this.parseEnumTypeExtension(); - case "input": - return this.parseInputObjectTypeExtension(); - } - throw this.unexpected(t); - } - /** - * ``` - * SchemaExtension : - * - extend schema Directives[Const]? { OperationTypeDefinition+ } - * - extend schema Directives[Const] - * ``` - */ - parseSchemaExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("schema"); - const n = this.parseConstDirectives(), r = this.optionalMany( - a.BRACE_L, - this.parseOperationTypeDefinition, - a.BRACE_R - ); - if (n.length === 0 && r.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.SCHEMA_EXTENSION, - directives: n, - operationTypes: r - }); - } - /** - * ScalarTypeExtension : - * - extend scalar Name Directives[Const] - */ - parseScalarTypeExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("scalar"); - const n = this.parseName(), r = this.parseConstDirectives(); - if (r.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.SCALAR_TYPE_EXTENSION, - name: n, - directives: r - }); - } - /** - * ObjectTypeExtension : - * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition - * - extend type Name ImplementsInterfaces? Directives[Const] - * - extend type Name ImplementsInterfaces - */ - parseObjectTypeExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("type"); - const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition(); - if (r.length === 0 && i.length === 0 && s.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.OBJECT_TYPE_EXTENSION, - name: n, - interfaces: r, - directives: i, - fields: s - }); - } - /** - * InterfaceTypeExtension : - * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition - * - extend interface Name ImplementsInterfaces? Directives[Const] - * - extend interface Name ImplementsInterfaces - */ - parseInterfaceTypeExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("interface"); - const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition(); - if (r.length === 0 && i.length === 0 && s.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.INTERFACE_TYPE_EXTENSION, - name: n, - interfaces: r, - directives: i, - fields: s - }); - } - /** - * UnionTypeExtension : - * - extend union Name Directives[Const]? UnionMemberTypes - * - extend union Name Directives[Const] - */ - parseUnionTypeExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("union"); - const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes(); - if (r.length === 0 && i.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.UNION_TYPE_EXTENSION, - name: n, - directives: r, - types: i - }); - } - /** - * EnumTypeExtension : - * - extend enum Name Directives[Const]? EnumValuesDefinition - * - extend enum Name Directives[Const] - */ - parseEnumTypeExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("enum"); - const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition(); - if (r.length === 0 && i.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.ENUM_TYPE_EXTENSION, - name: n, - directives: r, - values: i - }); - } - /** - * InputObjectTypeExtension : - * - extend input Name Directives[Const]? InputFieldsDefinition - * - extend input Name Directives[Const] - */ - parseInputObjectTypeExtension() { - const t = this._lexer.token; - this.expectKeyword("extend"), this.expectKeyword("input"); - const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition(); - if (r.length === 0 && i.length === 0) - throw this.unexpected(); - return this.node(t, { - kind: f.INPUT_OBJECT_TYPE_EXTENSION, - name: n, - directives: r, - fields: i - }); - } - /** - * ``` - * DirectiveDefinition : - * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations - * ``` - */ - parseDirectiveDefinition() { - const t = this._lexer.token, n = this.parseDescription(); - this.expectKeyword("directive"), this.expectToken(a.AT); - const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable"); - this.expectKeyword("on"); - const c = this.parseDirectiveLocations(); - return this.node(t, { - kind: f.DIRECTIVE_DEFINITION, - description: n, - name: r, - arguments: i, - repeatable: s, - locations: c - }); - } - /** - * DirectiveLocations : - * - `|`? DirectiveLocation - * - DirectiveLocations | DirectiveLocation - */ - parseDirectiveLocations() { - return this.delimitedMany(a.PIPE, this.parseDirectiveLocation); - } - /* - * DirectiveLocation : - * - ExecutableDirectiveLocation - * - TypeSystemDirectiveLocation - * - * ExecutableDirectiveLocation : one of - * `QUERY` - * `MUTATION` - * `SUBSCRIPTION` - * `FIELD` - * `FRAGMENT_DEFINITION` - * `FRAGMENT_SPREAD` - * `INLINE_FRAGMENT` - * - * TypeSystemDirectiveLocation : one of - * `SCHEMA` - * `SCALAR` - * `OBJECT` - * `FIELD_DEFINITION` - * `ARGUMENT_DEFINITION` - * `INTERFACE` - * `UNION` - * `ENUM` - * `ENUM_VALUE` - * `INPUT_OBJECT` - * `INPUT_FIELD_DEFINITION` - */ - parseDirectiveLocation() { - const t = this._lexer.token, n = this.parseName(); - if (Object.prototype.hasOwnProperty.call(ce, n.value)) - return n; - throw this.unexpected(t); - } - // Core parsing utility functions - /** - * Returns a node that, if configured to do so, sets a "loc" field as a - * location object, used to identify the place in the source that created a - * given parsed object. - */ - node(t, n) { - return this._options.noLocation !== !0 && (n.loc = new Ye( - t, - this._lexer.lastToken, - this._lexer.source - )), n; - } - /** - * Determines if the next token is of a given kind - */ - peek(t) { - return this._lexer.token.kind === t; - } - /** - * If the next token is of the given kind, return that token after advancing the lexer. - * Otherwise, do not change the parser state and throw an error. - */ - expectToken(t) { - const n = this._lexer.token; - if (n.kind === t) - return this.advanceLexer(), n; - throw O( - this._lexer.source, - n.start, - `Expected ${Ce(t)}, found ${J(n)}.` - ); - } - /** - * If the next token is of the given kind, return "true" after advancing the lexer. - * Otherwise, do not change the parser state and return "false". - */ - expectOptionalToken(t) { - return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1; - } - /** - * If the next token is a given keyword, advance the lexer. - * Otherwise, do not change the parser state and throw an error. - */ - expectKeyword(t) { - const n = this._lexer.token; - if (n.kind === a.NAME && n.value === t) - this.advanceLexer(); - else - throw O( - this._lexer.source, - n.start, - `Expected "${t}", found ${J(n)}.` - ); - } - /** - * If the next token is a given keyword, return "true" after advancing the lexer. - * Otherwise, do not change the parser state and return "false". - */ - expectOptionalKeyword(t) { - const n = this._lexer.token; - return n.kind === a.NAME && n.value === t ? (this.advanceLexer(), !0) : !1; - } - /** - * Helper function for creating an error when an unexpected lexed token is encountered. - */ - unexpected(t) { - const n = t ?? this._lexer.token; - return O( - this._lexer.source, - n.start, - `Unexpected ${J(n)}.` - ); - } - /** - * Returns a possibly empty list of parse nodes, determined by the parseFn. - * This list begins with a lex token of openKind and ends with a lex token of closeKind. - * Advances the parser to the next lex token after the closing token. - */ - any(t, n, r) { - this.expectToken(t); - const i = []; - for (; !this.expectOptionalToken(r); ) - i.push(n.call(this)); - return i; - } - /** - * Returns a list of parse nodes, determined by the parseFn. - * It can be empty only if open token is missing otherwise it will always return non-empty list - * that begins with a lex token of openKind and ends with a lex token of closeKind. - * Advances the parser to the next lex token after the closing token. - */ - optionalMany(t, n, r) { - if (this.expectOptionalToken(t)) { - const i = []; - do - i.push(n.call(this)); - while (!this.expectOptionalToken(r)); - return i; - } - return []; - } - /** - * Returns a non-empty list of parse nodes, determined by the parseFn. - * This list begins with a lex token of openKind and ends with a lex token of closeKind. - * Advances the parser to the next lex token after the closing token. - */ - many(t, n, r) { - this.expectToken(t); - const i = []; - do - i.push(n.call(this)); - while (!this.expectOptionalToken(r)); - return i; - } - /** - * Returns a non-empty list of parse nodes, determined by the parseFn. - * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. - * Advances the parser to the next lex token after last item in the list. - */ - delimitedMany(t, n) { - this.expectOptionalToken(t); - const r = []; - do - r.push(n.call(this)); - while (this.expectOptionalToken(t)); - return r; - } - advanceLexer() { - const { maxTokens: t } = this._options, n = this._lexer.advance(); - if (t !== void 0 && n.kind !== a.EOF && (++this._tokenCounter, this._tokenCounter > t)) - throw O( - this._lexer.source, - n.start, - `Document contains more that ${t} tokens. Parsing aborted.` - ); - } -} -function J(e) { - const t = e.value; - return Ce(e.kind) + (t != null ? ` "${t}"` : ""); -} -function Ce(e) { - return Ke(e) ? `"${e}"` : e; -} -function Nt(e) { - return `"${e.replace(vt, xt)}"`; -} -const vt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; -function xt(e) { - return At[e.charCodeAt(0)]; -} -const At = [ - "\\u0000", - "\\u0001", - "\\u0002", - "\\u0003", - "\\u0004", - "\\u0005", - "\\u0006", - "\\u0007", - "\\b", - "\\t", - "\\n", - "\\u000B", - "\\f", - "\\r", - "\\u000E", - "\\u000F", - "\\u0010", - "\\u0011", - "\\u0012", - "\\u0013", - "\\u0014", - "\\u0015", - "\\u0016", - "\\u0017", - "\\u0018", - "\\u0019", - "\\u001A", - "\\u001B", - "\\u001C", - "\\u001D", - "\\u001E", - "\\u001F", - "", - "", - '\\"', - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - // 2F - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - // 3F - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - // 4F - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\\\\", - "", - "", - "", - // 5F - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - // 6F - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\\u007F", - "\\u0080", - "\\u0081", - "\\u0082", - "\\u0083", - "\\u0084", - "\\u0085", - "\\u0086", - "\\u0087", - "\\u0088", - "\\u0089", - "\\u008A", - "\\u008B", - "\\u008C", - "\\u008D", - "\\u008E", - "\\u008F", - "\\u0090", - "\\u0091", - "\\u0092", - "\\u0093", - "\\u0094", - "\\u0095", - "\\u0096", - "\\u0097", - "\\u0098", - "\\u0099", - "\\u009A", - "\\u009B", - "\\u009C", - "\\u009D", - "\\u009E", - "\\u009F" -], It = Object.freeze({}); -function gt(e, t, n = Ie) { - const r = /* @__PURE__ */ new Map(); - for (const S of Object.values(f)) - r.set(S, Ot(t, S)); - let i, s = Array.isArray(e), c = [e], u = -1, p = [], d = e, y, m; - const T = [], A = []; - do { - u++; - const S = u === c.length, G = S && p.length !== 0; - if (S) { - if (y = A.length === 0 ? void 0 : T[T.length - 1], d = m, m = A.pop(), G) - if (s) { - d = d.slice(); - let C = 0; - for (const [P, H] of p) { - const Y = P - C; - H === null ? (d.splice(Y, 1), C++) : d[Y] = H; - } - } else { - d = Object.defineProperties( - {}, - Object.getOwnPropertyDescriptors(d) - ); - for (const [C, P] of p) - d[C] = P; - } - u = i.index, c = i.keys, p = i.edits, s = i.inArray, i = i.prev; - } else if (m) { - if (y = s ? u : c[u], d = m[y], d == null) - continue; - T.push(y); - } - let k; - if (!Array.isArray(d)) { - var E, I; - Ee(d) || Q(!1, `Invalid AST Node: ${de(d)}.`); - const C = S ? (E = r.get(d.kind)) === null || E === void 0 ? void 0 : E.leave : (I = r.get(d.kind)) === null || I === void 0 ? void 0 : I.enter; - if (k = C == null ? void 0 : C.call(t, d, y, m, T, A), k === It) - break; - if (k === !1) { - if (!S) { - T.pop(); - continue; - } - } else if (k !== void 0 && (p.push([y, k]), !S)) - if (Ee(k)) - d = k; - else { - T.pop(); - continue; - } - } - if (k === void 0 && G && p.push([y, d]), S) - T.pop(); - else { - var D; - i = { - inArray: s, - index: u, - keys: c, - edits: p, - prev: i - }, s = Array.isArray(d), c = s ? d : (D = n[d.kind]) !== null && D !== void 0 ? D : [], u = -1, p = [], m && A.push(m), m = d; - } - } while (i !== void 0); - return p.length !== 0 ? p[p.length - 1][1] : e; -} -function Ot(e, t) { - const n = e[t]; - return typeof n == "object" ? n : typeof n == "function" ? { - enter: n, - leave: void 0 - } : { - enter: e.enter, - leave: e.leave - }; -} -function _t(e) { - return gt(e, Dt); -} -const bt = 80, Dt = { - Name: { - leave: (e) => e.value - }, - Variable: { - leave: (e) => "$" + e.name - }, - // Document - Document: { - leave: (e) => h(e.definitions, ` - -`) - }, - OperationDefinition: { - leave(e) { - const t = v("(", h(e.variableDefinitions, ", "), ")"), n = h( - [ - e.operation, - h([e.name, t]), - h(e.directives, " ") - ], - " " - ); - return (n === "query" ? "" : n + " ") + e.selectionSet; - } - }, - VariableDefinition: { - leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", h(r, " ")) - }, - SelectionSet: { - leave: ({ selections: e }) => w(e) - }, - Field: { - leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) { - const s = v("", e, ": ") + t; - let c = s + v("(", h(n, ", "), ")"); - return c.length > bt && (c = s + v(`( -`, X(h(n, ` -`)), ` -)`)), h([c, h(r, " "), i], " "); - } - }, - Argument: { - leave: ({ name: e, value: t }) => e + ": " + t - }, - // Fragments - FragmentSpread: { - leave: ({ name: e, directives: t }) => "..." + e + v(" ", h(t, " ")) - }, - InlineFragment: { - leave: ({ typeCondition: e, directives: t, selectionSet: n }) => h( - [ - "...", - v("on ", e), - h(t, " "), - n - ], - " " - ) - }, - FragmentDefinition: { - leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => ( - // or removed in the future. - `fragment ${e}${v("(", h(n, ", "), ")")} on ${t} ${v("", h(r, " "), " ")}` + i - ) - }, - // Value - IntValue: { - leave: ({ value: e }) => e - }, - FloatValue: { - leave: ({ value: e }) => e - }, - StringValue: { - leave: ({ value: e, block: t }) => t ? We(e) : Nt(e) - }, - BooleanValue: { - leave: ({ value: e }) => e ? "true" : "false" - }, - NullValue: { - leave: () => "null" - }, - EnumValue: { - leave: ({ value: e }) => e - }, - ListValue: { - leave: ({ values: e }) => "[" + h(e, ", ") + "]" - }, - ObjectValue: { - leave: ({ fields: e }) => "{" + h(e, ", ") + "}" - }, - ObjectField: { - leave: ({ name: e, value: t }) => e + ": " + t - }, - // Directive - Directive: { - leave: ({ name: e, arguments: t }) => "@" + e + v("(", h(t, ", "), ")") - }, - // Type - NamedType: { - leave: ({ name: e }) => e - }, - ListType: { - leave: ({ type: e }) => "[" + e + "]" - }, - NonNullType: { - leave: ({ type: e }) => e + "!" - }, - // Type System Definitions - SchemaDefinition: { - leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, ` -`) + h(["schema", h(t, " "), w(n)], " ") - }, - OperationTypeDefinition: { - leave: ({ operation: e, type: t }) => e + ": " + t - }, - ScalarTypeDefinition: { - leave: ({ description: e, name: t, directives: n }) => v("", e, ` -`) + h(["scalar", t, h(n, " ")], " ") - }, - ObjectTypeDefinition: { - leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, ` -`) + h( - [ - "type", - t, - v("implements ", h(n, " & ")), - h(r, " "), - w(i) - ], - " " - ) - }, - FieldDefinition: { - leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => v("", e, ` -`) + t + (Te(n) ? v(`( -`, X(h(n, ` -`)), ` -)`) : v("(", h(n, ", "), ")")) + ": " + r + v(" ", h(i, " ")) - }, - InputValueDefinition: { - leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => v("", e, ` -`) + h( - [t + ": " + n, v("= ", r), h(i, " ")], - " " - ) - }, - InterfaceTypeDefinition: { - leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, ` -`) + h( - [ - "interface", - t, - v("implements ", h(n, " & ")), - h(r, " "), - w(i) - ], - " " - ) - }, - UnionTypeDefinition: { - leave: ({ description: e, name: t, directives: n, types: r }) => v("", e, ` -`) + h( - ["union", t, h(n, " "), v("= ", h(r, " | "))], - " " - ) - }, - EnumTypeDefinition: { - leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, ` -`) + h(["enum", t, h(n, " "), w(r)], " ") - }, - EnumValueDefinition: { - leave: ({ description: e, name: t, directives: n }) => v("", e, ` -`) + h([t, h(n, " ")], " ") - }, - InputObjectTypeDefinition: { - leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, ` -`) + h(["input", t, h(n, " "), w(r)], " ") - }, - DirectiveDefinition: { - leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, ` -`) + "directive @" + t + (Te(n) ? v(`( -`, X(h(n, ` -`)), ` -)`) : v("(", h(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + h(i, " | ") - }, - SchemaExtension: { - leave: ({ directives: e, operationTypes: t }) => h( - ["extend schema", h(e, " "), w(t)], - " " - ) - }, - ScalarTypeExtension: { - leave: ({ name: e, directives: t }) => h(["extend scalar", e, h(t, " ")], " ") - }, - ObjectTypeExtension: { - leave: ({ name: e, interfaces: t, directives: n, fields: r }) => h( - [ - "extend type", - e, - v("implements ", h(t, " & ")), - h(n, " "), - w(r) - ], - " " - ) - }, - InterfaceTypeExtension: { - leave: ({ name: e, interfaces: t, directives: n, fields: r }) => h( - [ - "extend interface", - e, - v("implements ", h(t, " & ")), - h(n, " "), - w(r) - ], - " " - ) - }, - UnionTypeExtension: { - leave: ({ name: e, directives: t, types: n }) => h( - [ - "extend union", - e, - h(t, " "), - v("= ", h(n, " | ")) - ], - " " - ) - }, - EnumTypeExtension: { - leave: ({ name: e, directives: t, values: n }) => h(["extend enum", e, h(t, " "), w(n)], " ") - }, - InputObjectTypeExtension: { - leave: ({ name: e, directives: t, fields: n }) => h(["extend input", e, h(t, " "), w(n)], " ") - } -}; -function h(e, t = "") { - var n; - return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : ""; -} -function w(e) { - return v(`{ -`, X(h(e, ` -`)), ` -}`); -} -function v(e, t, n = "") { - return t != null && t !== "" ? e + t + n : ""; -} -function X(e) { - return v(" ", e.replace(/\n/g, ` - `)); -} -function Te(e) { - var t; - return (t = e == null ? void 0 : e.some((n) => n.includes(` -`))) !== null && t !== void 0 ? t : !1; -} -const Ne = (e) => { - var r, i; - let t; - const n = e.definitions.filter((s) => s.kind === "OperationDefinition"); - return n.length === 1 && (t = (i = (r = n[0]) == null ? void 0 : r.name) == null ? void 0 : i.value), t; -}, re = (e) => { - if (typeof e == "string") { - let n; - try { - const r = mt(e); - n = Ne(r); - } catch { - } - return { query: e, operationName: n }; - } - const t = Ne(e); - return { query: _t(e), operationName: t }; -}; -class q extends Error { - constructor(t, n) { - const r = `${q.extractMessage(t)}: ${JSON.stringify({ - response: t, - request: n - })}`; - super(r), Object.setPrototypeOf(this, q.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, q); - } - static extractMessage(t) { - var n, r; - return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`; - } -} -var St = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function Ct(e) { - return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; -} -var le = { exports: {} }; -(function(e, t) { - var n = typeof self < "u" ? self : St, r = function() { - function s() { - this.fetch = !1, this.DOMException = n.DOMException; - } - return s.prototype = n, new s(); - }(); - (function(s) { - (function(c) { - var u = { - searchParams: "URLSearchParams" in s, - iterable: "Symbol" in s && "iterator" in Symbol, - blob: "FileReader" in s && "Blob" in s && function() { - try { - return new Blob(), !0; - } catch { - return !1; - } - }(), - formData: "FormData" in s, - arrayBuffer: "ArrayBuffer" in s - }; - function p(o) { - return o && DataView.prototype.isPrototypeOf(o); - } - if (u.arrayBuffer) - var d = [ - "[object Int8Array]", - "[object Uint8Array]", - "[object Uint8ClampedArray]", - "[object Int16Array]", - "[object Uint16Array]", - "[object Int32Array]", - "[object Uint32Array]", - "[object Float32Array]", - "[object Float64Array]" - ], y = ArrayBuffer.isView || function(o) { - return o && d.indexOf(Object.prototype.toString.call(o)) > -1; - }; - function m(o) { - if (typeof o != "string" && (o = String(o)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o)) - throw new TypeError("Invalid character in header field name"); - return o.toLowerCase(); - } - function T(o) { - return typeof o != "string" && (o = String(o)), o; - } - function A(o) { - var l = { - next: function() { - var N = o.shift(); - return { done: N === void 0, value: N }; - } - }; - return u.iterable && (l[Symbol.iterator] = function() { - return l; - }), l; - } - function E(o) { - this.map = {}, o instanceof E ? o.forEach(function(l, N) { - this.append(N, l); - }, this) : Array.isArray(o) ? o.forEach(function(l) { - this.append(l[0], l[1]); - }, this) : o && Object.getOwnPropertyNames(o).forEach(function(l) { - this.append(l, o[l]); - }, this); - } - E.prototype.append = function(o, l) { - o = m(o), l = T(l); - var N = this.map[o]; - this.map[o] = N ? N + ", " + l : l; - }, E.prototype.delete = function(o) { - delete this.map[m(o)]; - }, E.prototype.get = function(o) { - return o = m(o), this.has(o) ? this.map[o] : null; - }, E.prototype.has = function(o) { - return this.map.hasOwnProperty(m(o)); - }, E.prototype.set = function(o, l) { - this.map[m(o)] = T(l); - }, E.prototype.forEach = function(o, l) { - for (var N in this.map) - this.map.hasOwnProperty(N) && o.call(l, this.map[N], N, this); - }, E.prototype.keys = function() { - var o = []; - return this.forEach(function(l, N) { - o.push(N); - }), A(o); - }, E.prototype.values = function() { - var o = []; - return this.forEach(function(l) { - o.push(l); - }), A(o); - }, E.prototype.entries = function() { - var o = []; - return this.forEach(function(l, N) { - o.push([N, l]); - }), A(o); - }, u.iterable && (E.prototype[Symbol.iterator] = E.prototype.entries); - function I(o) { - if (o.bodyUsed) - return Promise.reject(new TypeError("Already read")); - o.bodyUsed = !0; - } - function D(o) { - return new Promise(function(l, N) { - o.onload = function() { - l(o.result); - }, o.onerror = function() { - N(o.error); - }; - }); - } - function S(o) { - var l = new FileReader(), N = D(l); - return l.readAsArrayBuffer(o), N; - } - function G(o) { - var l = new FileReader(), N = D(l); - return l.readAsText(o), N; - } - function k(o) { - for (var l = new Uint8Array(o), N = new Array(l.length), b = 0; b < l.length; b++) - N[b] = String.fromCharCode(l[b]); - return N.join(""); - } - function C(o) { - if (o.slice) - return o.slice(0); - var l = new Uint8Array(o.byteLength); - return l.set(new Uint8Array(o)), l.buffer; - } - function P() { - return this.bodyUsed = !1, this._initBody = function(o) { - this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : u.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : u.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : u.arrayBuffer && u.blob && p(o) ? (this._bodyArrayBuffer = C(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || y(o)) ? this._bodyArrayBuffer = C(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); - }, u.blob && (this.blob = function() { - var o = I(this); - if (o) - return o; - if (this._bodyBlob) - return Promise.resolve(this._bodyBlob); - if (this._bodyArrayBuffer) - return Promise.resolve(new Blob([this._bodyArrayBuffer])); - if (this._bodyFormData) - throw new Error("could not read FormData body as blob"); - return Promise.resolve(new Blob([this._bodyText])); - }, this.arrayBuffer = function() { - return this._bodyArrayBuffer ? I(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(S); - }), this.text = function() { - var o = I(this); - if (o) - return o; - if (this._bodyBlob) - return G(this._bodyBlob); - if (this._bodyArrayBuffer) - return Promise.resolve(k(this._bodyArrayBuffer)); - if (this._bodyFormData) - throw new Error("could not read FormData body as text"); - return Promise.resolve(this._bodyText); - }, u.formData && (this.formData = function() { - return this.text().then(we); - }), this.json = function() { - return this.text().then(JSON.parse); - }, this; - } - var H = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; - function Y(o) { - var l = o.toUpperCase(); - return H.indexOf(l) > -1 ? l : o; - } - function L(o, l) { - l = l || {}; - var N = l.body; - if (o instanceof L) { - if (o.bodyUsed) - throw new TypeError("Already read"); - this.url = o.url, this.credentials = o.credentials, l.headers || (this.headers = new E(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !N && o._bodyInit != null && (N = o._bodyInit, o.bodyUsed = !0); - } else - this.url = String(o); - if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new E(l.headers)), this.method = Y(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && N) - throw new TypeError("Body not allowed for GET or HEAD requests"); - this._initBody(N); - } - L.prototype.clone = function() { - return new L(this, { body: this._bodyInit }); - }; - function we(o) { - var l = new FormData(); - return o.trim().split("&").forEach(function(N) { - if (N) { - var b = N.split("="), _ = b.shift().replace(/\+/g, " "), x = b.join("=").replace(/\+/g, " "); - l.append(decodeURIComponent(_), decodeURIComponent(x)); - } - }), l; - } - function ke(o) { - var l = new E(), N = o.replace(/\r?\n[\t ]+/g, " "); - return N.split(/\r?\n/).forEach(function(b) { - var _ = b.split(":"), x = _.shift().trim(); - if (x) { - var z = _.join(":").trim(); - l.append(x, z); - } - }), l; - } - P.call(L.prototype); - function R(o, l) { - l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new E(l.headers), this.url = l.url || "", this._initBody(o); - } - P.call(R.prototype), R.prototype.clone = function() { - return new R(this._bodyInit, { - status: this.status, - statusText: this.statusText, - headers: new E(this.headers), - url: this.url - }); - }, R.error = function() { - var o = new R(null, { status: 0, statusText: "" }); - return o.type = "error", o; - }; - var Re = [301, 302, 303, 307, 308]; - R.redirect = function(o, l) { - if (Re.indexOf(l) === -1) - throw new RangeError("Invalid status code"); - return new R(null, { status: l, headers: { location: o } }); - }, c.DOMException = s.DOMException; - try { - new c.DOMException(); - } catch { - c.DOMException = function(l, N) { - this.message = l, this.name = N; - var b = Error(l); - this.stack = b.stack; - }, c.DOMException.prototype = Object.create(Error.prototype), c.DOMException.prototype.constructor = c.DOMException; - } - function te(o, l) { - return new Promise(function(N, b) { - var _ = new L(o, l); - if (_.signal && _.signal.aborted) - return b(new c.DOMException("Aborted", "AbortError")); - var x = new XMLHttpRequest(); - function z() { - x.abort(); - } - x.onload = function() { - var V = { - status: x.status, - statusText: x.statusText, - headers: ke(x.getAllResponseHeaders() || "") - }; - V.url = "responseURL" in x ? x.responseURL : V.headers.get("X-Request-URL"); - var ne = "response" in x ? x.response : x.responseText; - N(new R(ne, V)); - }, x.onerror = function() { - b(new TypeError("Network request failed")); - }, x.ontimeout = function() { - b(new TypeError("Network request failed")); - }, x.onabort = function() { - b(new c.DOMException("Aborted", "AbortError")); - }, x.open(_.method, _.url, !0), _.credentials === "include" ? x.withCredentials = !0 : _.credentials === "omit" && (x.withCredentials = !1), "responseType" in x && u.blob && (x.responseType = "blob"), _.headers.forEach(function(V, ne) { - x.setRequestHeader(ne, V); - }), _.signal && (_.signal.addEventListener("abort", z), x.onreadystatechange = function() { - x.readyState === 4 && _.signal.removeEventListener("abort", z); - }), x.send(typeof _._bodyInit > "u" ? null : _._bodyInit); - }); - } - return te.polyfill = !0, s.fetch || (s.fetch = te, s.Headers = E, s.Request = L, s.Response = R), c.Headers = E, c.Request = L, c.Response = R, c.fetch = te, Object.defineProperty(c, "__esModule", { value: !0 }), c; - })({}); - })(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill; - var i = r; - t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t; -})(le, le.exports); -var Z = le.exports; -const W = /* @__PURE__ */ Ct(Z), wt = /* @__PURE__ */ Le({ - __proto__: null, - default: W -}, [Z]), B = (e) => { - let t = {}; - return e && (typeof Headers < "u" && e instanceof Headers || wt && Z.Headers && e instanceof Z.Headers ? t = Pe(e) : Array.isArray(e) ? e.forEach(([n, r]) => { - n && r !== void 0 && (t[n] = r); - }) : t = e), t; -}, ve = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), kt = (e) => { - if (!Array.isArray(e.query)) { - const r = e, i = [`query=${encodeURIComponent(ve(r.query))}`]; - return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&"); - } - if (typeof e.variables < "u" && !Array.isArray(e.variables)) - throw new Error("Cannot create query with given variable type, array expected"); - const t = e, n = e.query.reduce((r, i, s) => (r.push({ - query: ve(i), - variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0 - }), r), []); - return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`; -}, Rt = (e) => async (t) => { - const { url: n, query: r, variables: i, operationName: s, fetch: c, fetchOptions: u, middleware: p } = t, d = { ...t.headers }; - let y = "", m; - e === "POST" ? (m = Pt(r, i, s, u.jsonSerializer), typeof m == "string" && (d["Content-Type"] = "application/json")) : y = kt({ - query: r, - variables: i, - operationName: s, - jsonSerializer: u.jsonSerializer ?? he - }); - const T = { - method: e, - headers: d, - body: m, - ...u - }; - let A = n, E = T; - if (p) { - const I = await Promise.resolve(p({ ...T, url: n, operationName: s, variables: i })), { url: D, ...S } = I; - A = D, E = S; - } - return y && (A = `${A}?${y}`), await c(A, E); -}; -class Lt { - constructor(t, n = {}) { - this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => { - const [i, s, c] = r, u = Me(i, s, c), { headers: p, fetch: d = W, method: y = "POST", requestMiddleware: m, responseMiddleware: T, ...A } = this.requestConfig, { url: E } = this; - u.signal !== void 0 && (A.signal = u.signal); - const { operationName: I } = re(u.query); - return se({ - url: E, - query: u.query, - variables: u.variables, - headers: { - ...B(oe(p)), - ...B(u.requestHeaders) - }, - operationName: I, - fetch: d, - method: y, - fetchOptions: A, - middleware: m - }).then((D) => (T && T(D), D)).catch((D) => { - throw T && T(D), D; - }); - }; - } - async request(t, ...n) { - const [r, i] = n, s = Be(t, r, i), { headers: c, fetch: u = W, method: p = "POST", requestMiddleware: d, responseMiddleware: y, ...m } = this.requestConfig, { url: T } = this; - s.signal !== void 0 && (m.signal = s.signal); - const { query: A, operationName: E } = re(s.document); - return se({ - url: T, - query: A, - variables: s.variables, - headers: { - ...B(oe(c)), - ...B(s.requestHeaders) - }, - operationName: E, - fetch: u, - method: p, - fetchOptions: m, - middleware: d - }).then((I) => (y && y(I), I.data)).catch((I) => { - throw y && y(I), I; - }); - } - // prettier-ignore - batchRequests(t, n) { - const r = Ue(t, n), { headers: i, ...s } = this.requestConfig; - r.signal !== void 0 && (s.signal = r.signal); - const c = r.documents.map(({ document: p }) => re(p).query), u = r.documents.map(({ variables: p }) => p); - return se({ - url: this.url, - query: c, - // @ts-expect-error TODO reconcile batch variables into system. - variables: u, - headers: { - ...B(oe(i)), - ...B(r.requestHeaders) - }, - operationName: void 0, - fetch: this.requestConfig.fetch ?? W, - method: this.requestConfig.method || "POST", - fetchOptions: s, - middleware: this.requestConfig.requestMiddleware - }).then((p) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(p), p.data)).catch((p) => { - throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(p), p; - }); - } - setHeaders(t) { - return this.requestConfig.headers = t, this; - } - /** - * Attach a header to the client. All subsequent requests will have this header. - */ - setHeader(t, n) { - const { headers: r } = this.requestConfig; - return r ? r[t] = n : this.requestConfig.headers = { [t]: n }, this; - } - /** - * Change the client endpoint. All subsequent requests will send to this endpoint. - */ - setEndpoint(t) { - return this.url = t, this; - } -} -const se = async (e) => { - const { query: t, variables: n, fetchOptions: r } = e, i = Rt(Fe(e.method ?? "post")), s = Array.isArray(e.query), c = await i(e), u = await Bt(c, r.jsonSerializer ?? he), p = Array.isArray(u) ? !u.some(({ data: y }) => !y) : !!u.data, d = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore"; - if (c.ok && d && p) { - const { errors: y, ...m } = (Array.isArray(u), u), T = r.errorPolicy === "ignore" ? m : u; - return { - ...s ? { data: T } : T, - headers: c.headers, - status: c.status - }; - } else { - const y = typeof u == "string" ? { - error: u - } : u; - throw new q( - // @ts-expect-error TODO - { ...y, status: c.status, headers: c.headers }, - { query: t, variables: n } - ); - } -}; -async function Ft(e, t, ...n) { - const r = Ve(e, t, ...n); - return new Lt(r.url).request({ - ...r - }); -} -const Pt = (e, t, n, r) => { - const i = r ?? he; - if (!Array.isArray(e)) - return i.stringify({ query: e, variables: t, operationName: n }); - if (typeof t < "u" && !Array.isArray(t)) - throw new Error("Cannot create request body with given variable type, array expected"); - const s = e.reduce((c, u, p) => (c.push({ query: u, variables: t ? t[p] : void 0 }), c), []); - return i.stringify(s); -}, Bt = async (e, t) => { - let n; - return e.headers.forEach((r, i) => { - i.toLowerCase() === "content-type" && (n = r); - }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text(); -}, oe = (e) => typeof e == "function" ? e() : e, Mt = (e, ...t) => e.reduce((n, r, i) => `${n}${r}${i in t ? String(t[i]) : ""}`, ""), Ut = { - getMeta: Mt` - query getDoctype($doctype: String!) { - getMeta(doctype: $doctype) { - id - name - workflow - schema - actions - } - } - ` -}, Vt = { - getMeta: async (e, t) => await Ft(t || "/graphql", Ut.getMeta, { doctype: e }) -}; -export { - Vt as methods -}; -//# sourceMappingURL=graphql-client.js.map diff --git a/graphql_client/dist/graphql-client.js.map b/graphql_client/dist/graphql-client.js.map deleted file mode 100644 index 94446a5e..00000000 --- a/graphql_client/dist/graphql-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"graphql-client.js","sources":["../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/defaultJsonSerializer.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/helpers.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/parseArgs.js","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/devAssert.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/isObjectLike.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/invariant.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/location.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printLocation.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/GraphQLError.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/syntaxError.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/ast.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/directiveLocation.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/kinds.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/characterClasses.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/blockString.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/tokenKind.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/lexer.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/inspect.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/instanceOf.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/source.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/parser.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printString.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/visitor.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printer.mjs","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/resolveRequestDocument.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/types.js","../../common/temp/node_modules/.pnpm/cross-fetch@3.1.8/node_modules/cross-fetch/dist/browser-ponyfill.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/index.js","../src/queries.ts","../src/index.ts"],"sourcesContent":["export const defaultJsonSerializer = JSON;\n//# sourceMappingURL=defaultJsonSerializer.js.map","export const uppercase = (str) => str.toUpperCase();\n/**\n * Convert Headers instance into regular object\n */\nexport const HeadersInstanceToPlainObject = (headers) => {\n const o = {};\n headers.forEach((v, k) => {\n o[k] = v;\n });\n return o;\n};\n//# sourceMappingURL=helpers.js.map","export const parseRequestArgs = (documentOrOptions, variables, requestHeaders) => {\n return documentOrOptions.document\n ? documentOrOptions\n : {\n document: documentOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRawRequestArgs = (queryOrOptions, variables, requestHeaders) => {\n return queryOrOptions.query\n ? queryOrOptions\n : {\n query: queryOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseBatchRequestArgs = (documentsOrOptions, requestHeaders) => {\n return documentsOrOptions.documents\n ? documentsOrOptions\n : {\n documents: documentsOrOptions,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRequestExtendedArgs = (urlOrOptions, document, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return urlOrOptions.document\n ? urlOrOptions\n : {\n url: urlOrOptions,\n document: document,\n variables,\n requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRawRequestExtendedArgs = (urlOrOptions, query, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return urlOrOptions.query\n ? urlOrOptions\n : {\n url: urlOrOptions,\n query: query,\n variables,\n requestHeaders,\n signal: undefined,\n };\n};\n//# sourceMappingURL=parseArgs.js.map","export function devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","export function invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n","import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nexport function printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","import { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\n /**\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n","import { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. is always the first node and \n * the last.\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n","/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nexport function isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // \n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '';\n TokenKind['EOF'] = '';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport class Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // \n\n case 0x0009: // \\t\n\n case 0x0020: // \n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { inspect } from './inspect.mjs';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nexport const instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production'\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = inspect(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n devAssert(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n devAssert(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n const parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nexport function parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n constructor(source, options = {}) {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n this._tokenCounter = 0;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(TokenKind.NAME);\n return this.node(token, {\n kind: Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: Kind.DOCUMENT,\n definitions: this.many(\n TokenKind.SOF,\n this.parseDefinition,\n TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are supported only on type definitions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation: OperationTypeNode.QUERY,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return OperationTypeNode.QUERY;\n\n case 'mutation':\n return OperationTypeNode.MUTATION;\n\n case 'subscription':\n return OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseVariableDefinition,\n TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return this.node(start, {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: Kind.SELECTION_SET,\n selections: this.many(\n TokenKind.BRACE_L,\n this.parseSelection,\n TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return this.node(start, {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.INT,\n value: token.value,\n });\n\n case TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.FLOAT,\n value: token.value,\n });\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: Kind.ENUM,\n value: token.value,\n });\n }\n\n case TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return this.node(start, {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return this.node(start, {\n kind: Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseFieldDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseInputValueDef,\n TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS)\n ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseInputValueDef,\n TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (maxTokens !== undefined && token.kind !== TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n","/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nexport function printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isNode, QueryDocumentKeys } from './ast.mjs';\nimport { Kind } from './kinds.mjs';\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport const BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nexport function visit(root, visitor, visitorKeys = QueryDocumentKeys) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(Kind)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = Object.defineProperties(\n {},\n Object.getOwnPropertyDescriptors(node),\n );\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if (isNode(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nexport function visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nexport function getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === 'object') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === 'function') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n","import { printBlockString } from './blockString.mjs';\nimport { printString } from './printString.mjs';\nimport { visit } from './visitor.mjs';\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n return visit(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix = join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives }) =>\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: (\n { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n ) =>\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString ? printBlockString(value) : printString(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n","import { parse, print } from 'graphql';\n/**\n * helpers\n */\nconst extractOperationName = (document) => {\n let operationName = undefined;\n const operationDefinitions = document.definitions.filter((definition) => definition.kind === `OperationDefinition`);\n if (operationDefinitions.length === 1) {\n operationName = operationDefinitions[0]?.name?.value;\n }\n return operationName;\n};\nexport const resolveRequestDocument = (document) => {\n if (typeof document === `string`) {\n let operationName = undefined;\n try {\n const parsedDocument = parse(document);\n operationName = extractOperationName(parsedDocument);\n }\n catch (err) {\n // Failed parsing the document, the operationName will be undefined\n }\n return { query: document, operationName };\n }\n const operationName = extractOperationName(document);\n return { query: print(document), operationName };\n};\n//# sourceMappingURL=resolveRequestDocument.js.map","export class ClientError extends Error {\n constructor(response, request) {\n const message = `${ClientError.extractMessage(response)}: ${JSON.stringify({\n response,\n request,\n })}`;\n super(message);\n Object.setPrototypeOf(this, ClientError.prototype);\n this.response = response;\n this.request = request;\n // this is needed as Safari doesn't support .captureStackTrace\n if (typeof Error.captureStackTrace === `function`) {\n Error.captureStackTrace(this, ClientError);\n }\n }\n static extractMessage(response) {\n return response.errors?.[0]?.message ?? `GraphQL Error (Code: ${response.status})`;\n }\n}\n//# sourceMappingURL=types.js.map","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","import { defaultJsonSerializer } from './defaultJsonSerializer.js';\nimport { HeadersInstanceToPlainObject, uppercase } from './helpers.js';\nimport { parseBatchRequestArgs, parseRawRequestArgs, parseRawRequestExtendedArgs, parseRequestArgs, parseRequestExtendedArgs, } from './parseArgs.js';\nimport { resolveRequestDocument } from './resolveRequestDocument.js';\nimport { ClientError, } from './types.js';\nimport crossFetch, * as CrossFetch from 'cross-fetch';\nexport { ClientError, };\n/**\n * Convert the given headers configuration into a plain object.\n */\nconst resolveHeaders = (headers) => {\n let oHeaders = {};\n if (headers) {\n if ((typeof Headers !== `undefined` && headers instanceof Headers) ||\n (CrossFetch && CrossFetch.Headers && headers instanceof CrossFetch.Headers)) {\n oHeaders = HeadersInstanceToPlainObject(headers);\n }\n else if (Array.isArray(headers)) {\n headers.forEach(([name, value]) => {\n if (name && value !== undefined) {\n oHeaders[name] = value;\n }\n });\n }\n else {\n oHeaders = headers;\n }\n }\n return oHeaders;\n};\n/**\n * Clean a GraphQL document to send it via a GET query\n */\nconst cleanQuery = (str) => str.replace(/([\\s,]|#[^\\n\\r]+)+/g, ` `).trim();\n/**\n * Create query string for GraphQL request\n */\nconst buildRequestConfig = (params) => {\n if (!Array.isArray(params.query)) {\n const params_ = params;\n const search = [`query=${encodeURIComponent(cleanQuery(params_.query))}`];\n if (params.variables) {\n search.push(`variables=${encodeURIComponent(params_.jsonSerializer.stringify(params_.variables))}`);\n }\n if (params_.operationName) {\n search.push(`operationName=${encodeURIComponent(params_.operationName)}`);\n }\n return search.join(`&`);\n }\n if (typeof params.variables !== `undefined` && !Array.isArray(params.variables)) {\n throw new Error(`Cannot create query with given variable type, array expected`);\n }\n // Batch support\n const params_ = params;\n const payload = params.query.reduce((acc, currentQuery, index) => {\n acc.push({\n query: cleanQuery(currentQuery),\n variables: params_.variables ? params_.jsonSerializer.stringify(params_.variables[index]) : undefined,\n });\n return acc;\n }, []);\n return `query=${encodeURIComponent(params_.jsonSerializer.stringify(payload))}`;\n};\nconst createHttpMethodFetcher = (method) => async (params) => {\n const { url, query, variables, operationName, fetch, fetchOptions, middleware } = params;\n const headers = { ...params.headers };\n let queryParams = ``;\n let body = undefined;\n if (method === `POST`) {\n body = createRequestBody(query, variables, operationName, fetchOptions.jsonSerializer);\n if (typeof body === `string`) {\n // @ts-expect-error todo\n headers[`Content-Type`] = `application/json`;\n }\n }\n else {\n // @ts-expect-error todo needs ADT for TS to understand the different states\n queryParams = buildRequestConfig({\n query,\n variables,\n operationName,\n jsonSerializer: fetchOptions.jsonSerializer ?? defaultJsonSerializer,\n });\n }\n const init = {\n method,\n headers,\n body,\n ...fetchOptions,\n };\n let urlResolved = url;\n let initResolved = init;\n if (middleware) {\n const result = await Promise.resolve(middleware({ ...init, url, operationName, variables }));\n const { url: urlNew, ...initNew } = result;\n urlResolved = urlNew;\n initResolved = initNew;\n }\n if (queryParams) {\n urlResolved = `${urlResolved}?${queryParams}`;\n }\n return await fetch(urlResolved, initResolved);\n};\n/**\n * GraphQL Client.\n */\nexport class GraphQLClient {\n constructor(url, requestConfig = {}) {\n this.url = url;\n this.requestConfig = requestConfig;\n /**\n * Send a GraphQL query to the server.\n */\n this.rawRequest = async (...args) => {\n const [queryOrOptions, variables, requestHeaders] = args;\n const rawRequestOptions = parseRawRequestArgs(queryOrOptions, variables, requestHeaders);\n const { headers, fetch = crossFetch, method = `POST`, requestMiddleware, responseMiddleware, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (rawRequestOptions.signal !== undefined) {\n fetchOptions.signal = rawRequestOptions.signal;\n }\n const { operationName } = resolveRequestDocument(rawRequestOptions.query);\n return makeRequest({\n url,\n query: rawRequestOptions.query,\n variables: rawRequestOptions.variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(rawRequestOptions.requestHeaders),\n },\n operationName,\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n })\n .then((response) => {\n if (responseMiddleware) {\n responseMiddleware(response);\n }\n return response;\n })\n .catch((error) => {\n if (responseMiddleware) {\n responseMiddleware(error);\n }\n throw error;\n });\n };\n }\n async request(documentOrOptions, ...variablesAndRequestHeaders) {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n const requestOptions = parseRequestArgs(documentOrOptions, variables, requestHeaders);\n const { headers, fetch = crossFetch, method = `POST`, requestMiddleware, responseMiddleware, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (requestOptions.signal !== undefined) {\n fetchOptions.signal = requestOptions.signal;\n }\n const { query, operationName } = resolveRequestDocument(requestOptions.document);\n return makeRequest({\n url,\n query,\n variables: requestOptions.variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(requestOptions.requestHeaders),\n },\n operationName,\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n })\n .then((response) => {\n if (responseMiddleware) {\n responseMiddleware(response);\n }\n return response.data;\n })\n .catch((error) => {\n if (responseMiddleware) {\n responseMiddleware(error);\n }\n throw error;\n });\n }\n // prettier-ignore\n batchRequests(documentsOrOptions, requestHeaders) {\n const batchRequestOptions = parseBatchRequestArgs(documentsOrOptions, requestHeaders);\n const { headers, ...fetchOptions } = this.requestConfig;\n if (batchRequestOptions.signal !== undefined) {\n fetchOptions.signal = batchRequestOptions.signal;\n }\n const queries = batchRequestOptions.documents.map(({ document }) => resolveRequestDocument(document).query);\n const variables = batchRequestOptions.documents.map(({ variables }) => variables);\n return makeRequest({\n url: this.url,\n query: queries,\n // @ts-expect-error TODO reconcile batch variables into system.\n variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(batchRequestOptions.requestHeaders),\n },\n operationName: undefined,\n fetch: this.requestConfig.fetch ?? crossFetch,\n method: this.requestConfig.method || `POST`,\n fetchOptions,\n middleware: this.requestConfig.requestMiddleware,\n })\n .then((response) => {\n if (this.requestConfig.responseMiddleware) {\n this.requestConfig.responseMiddleware(response);\n }\n return response.data;\n })\n .catch((error) => {\n if (this.requestConfig.responseMiddleware) {\n this.requestConfig.responseMiddleware(error);\n }\n throw error;\n });\n }\n setHeaders(headers) {\n this.requestConfig.headers = headers;\n return this;\n }\n /**\n * Attach a header to the client. All subsequent requests will have this header.\n */\n setHeader(key, value) {\n const { headers } = this.requestConfig;\n if (headers) {\n // todo what if headers is in nested array form... ?\n //@ts-expect-error todo\n headers[key] = value;\n }\n else {\n this.requestConfig.headers = { [key]: value };\n }\n return this;\n }\n /**\n * Change the client endpoint. All subsequent requests will send to this endpoint.\n */\n setEndpoint(value) {\n this.url = value;\n return this;\n }\n}\nconst makeRequest = async (params) => {\n const { query, variables, fetchOptions } = params;\n const fetcher = createHttpMethodFetcher(uppercase(params.method ?? `post`));\n const isBatchingQuery = Array.isArray(params.query);\n const response = await fetcher(params);\n const result = await getResult(response, fetchOptions.jsonSerializer ?? defaultJsonSerializer);\n const successfullyReceivedData = Array.isArray(result)\n ? !result.some(({ data }) => !data)\n : Boolean(result.data);\n const successfullyPassedErrorPolicy = Array.isArray(result) ||\n !result.errors ||\n (Array.isArray(result.errors) && !result.errors.length) ||\n fetchOptions.errorPolicy === `all` ||\n fetchOptions.errorPolicy === `ignore`;\n if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {\n // @ts-expect-error TODO fixme\n const { errors: _, ...rest } = Array.isArray(result) ? result : result;\n const data = fetchOptions.errorPolicy === `ignore` ? rest : result;\n const dataEnvelope = isBatchingQuery ? { data } : data;\n // @ts-expect-error TODO\n return {\n ...dataEnvelope,\n headers: response.headers,\n status: response.status,\n };\n }\n else {\n const errorResult = typeof result === `string`\n ? {\n error: result,\n }\n : result;\n throw new ClientError(\n // @ts-expect-error TODO\n { ...errorResult, status: response.status, headers: response.headers }, { query, variables });\n }\n};\n/**\n * Send a GraphQL Query to the GraphQL server for execution.\n */\nexport const rawRequest = async (...args) => {\n const [urlOrOptions, query, ...variablesAndRequestHeaders] = args;\n const requestOptions = parseRawRequestExtendedArgs(urlOrOptions, query, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.rawRequest({\n ...requestOptions,\n });\n};\n// prettier-ignore\n// eslint-disable-next-line\nexport async function request(urlOrOptions, document, ...variablesAndRequestHeaders) {\n const requestOptions = parseRequestExtendedArgs(urlOrOptions, document, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.request({\n ...requestOptions,\n });\n}\n/**\n * Send a batch of GraphQL Document to the GraphQL server for execution.\n *\n * @example\n *\n * ```ts\n * // You can pass a raw string\n *\n * await batchRequests('https://foo.bar/graphql', [\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * },\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * }])\n *\n * // You can also pass a GraphQL DocumentNode as query. Convenient if you\n * // are using graphql-tag package.\n *\n * import gql from 'graphql-tag'\n *\n * await batchRequests('https://foo.bar/graphql', [{ query: gql`...` }])\n * ```\n */\nexport const batchRequests = async (...args) => {\n const params = parseBatchRequestsArgsExtended(args);\n const client = new GraphQLClient(params.url);\n return client.batchRequests(params);\n};\nconst parseBatchRequestsArgsExtended = (args) => {\n if (args.length === 1) {\n return args[0];\n }\n else {\n return {\n url: args[0],\n documents: args[1],\n requestHeaders: args[2],\n signal: undefined,\n };\n }\n};\nconst createRequestBody = (query, variables, operationName, jsonSerializer) => {\n const jsonSerializer_ = jsonSerializer ?? defaultJsonSerializer;\n if (!Array.isArray(query)) {\n return jsonSerializer_.stringify({ query, variables, operationName });\n }\n if (typeof variables !== `undefined` && !Array.isArray(variables)) {\n throw new Error(`Cannot create request body with given variable type, array expected`);\n }\n // Batch support\n const payload = query.reduce((acc, currentQuery, index) => {\n acc.push({ query: currentQuery, variables: variables ? variables[index] : undefined });\n return acc;\n }, []);\n return jsonSerializer_.stringify(payload);\n};\nconst getResult = async (response, jsonSerializer) => {\n let contentType;\n response.headers.forEach((value, key) => {\n if (key.toLowerCase() === `content-type`) {\n contentType = value;\n }\n });\n if (contentType &&\n (contentType.toLowerCase().startsWith(`application/json`) ||\n contentType.toLowerCase().startsWith(`application/graphql+json`) ||\n contentType.toLowerCase().startsWith(`application/graphql-response+json`))) {\n return jsonSerializer.parse(await response.text());\n }\n else {\n return response.text();\n }\n};\nconst callOrIdentity = (value) => {\n return typeof value === `function` ? value() : value;\n};\n/**\n * Convenience passthrough template tag to get the benefits of tooling for the gql template tag. This does not actually parse the input into a GraphQL DocumentNode like graphql-tag package does. It just returns the string with any variables given interpolated. Can save you a bit of performance and having to install another package.\n *\n * @example\n * ```\n * import { gql } from 'graphql-request'\n *\n * await request('https://foo.bar/graphql', gql`...`)\n * ```\n *\n * @remarks\n *\n * Several tools in the Node GraphQL ecosystem are hardcoded to specially treat any template tag named \"gql\". For example see this prettier issue: https://github.com/prettier/prettier/issues/4360. Using this template tag has no runtime effect beyond variable interpolation.\n */\nexport const gql = (chunks, ...variables) => {\n return chunks.reduce((acc, chunk, index) => `${acc}${chunk}${index in variables ? String(variables[index]) : ``}`, ``);\n};\nexport { GraphQLWebSocketClient } from './graphql-ws.js';\nexport { resolveRequestDocument } from './resolveRequestDocument.js';\nexport default request;\n//# sourceMappingURL=index.js.map","import { gql } from 'graphql-request'\n\nconst queries = {\n\tgetMeta: gql`\n\t\tquery getDoctype($doctype: String!) {\n\t\t\tgetMeta(doctype: $doctype) {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t\tworkflow\n\t\t\t\tschema\n\t\t\t\tactions\n\t\t\t}\n\t\t}\n\t`,\n}\n\nexport { queries }\n","import { request } from 'graphql-request'\n\nimport { queries } from './queries'\n\nexport const methods = {\n\tgetMeta: async (doctype: string, url?: string) => {\n\t\tconst data: any = await request(url || '/graphql', queries.getMeta, { doctype })\n\t\treturn data\n\t},\n}\n"],"names":["defaultJsonSerializer","uppercase","str","HeadersInstanceToPlainObject","headers","o","v","k","parseRequestArgs","documentOrOptions","variables","requestHeaders","parseRawRequestArgs","queryOrOptions","parseBatchRequestArgs","documentsOrOptions","parseRequestExtendedArgs","urlOrOptions","document","variablesAndRequestHeaders","devAssert","condition","message","isObjectLike","value","invariant","LineRegExp","getLocation","source","position","lastLineStart","line","match","printLocation","location","printSourceLocation","sourceLocation","firstLineColumnOffset","body","lineIndex","lineOffset","lineNum","columnOffset","columnNum","locationStr","lines","locationLine","subLineIndex","subLineColumnNum","subLines","i","printPrefixedLines","subLine","existingLines","_","padLen","prefix","toNormalizedOptions","args","firstArg","GraphQLError","rawArgs","_this$nodes","_nodeLocations$","_ref","nodes","positions","path","originalError","extensions","undefinedIfEmpty","nodeLocations","node","loc","pos","originalExtensions","output","formattedError","array","syntaxError","description","Location","startToken","endToken","Token","kind","start","end","column","QueryDocumentKeys","kindValues","isNode","maybeNode","maybeKind","OperationTypeNode","DirectiveLocation","Kind","isWhiteSpace","code","isDigit","isLetter","isNameStart","isNameContinue","dedentBlockStringLines","_firstNonEmptyLine2","commonIndent","firstNonEmptyLine","lastNonEmptyLine","_firstNonEmptyLine","indent","leadingWhitespace","printBlockString","options","escapedValue","isSingleLine","forceLeadingNewLine","hasTrailingTripleQuotes","hasTrailingQuote","hasTrailingSlash","forceTrailingNewline","printAsMultipleLines","result","skipLeadingNewLine","TokenKind","Lexer","startOfFileToken","token","nextToken","readNextToken","isPunctuatorTokenKind","isUnicodeScalarValue","isSupplementaryCodePoint","isLeadingSurrogate","isTrailingSurrogate","printCodePointAt","lexer","char","createToken","col","bodyLength","readComment","readBlockString","readString","readNumber","readName","firstCode","isFloat","readDigits","chunkStart","escape","readEscapedUnicodeVariableWidth","readEscapedUnicodeFixedWidth","readEscapedCharacter","point","size","readHexDigit","read16BitHexCode","trailingCode","lineStart","currentLine","blockLines","MAX_ARRAY_LENGTH","MAX_RECURSIVE_DEPTH","inspect","formatValue","seenValues","formatObjectValue","previouslySeenValues","isJSONable","jsonValue","formatArray","formatObject","object","entries","getObjectTag","key","len","remaining","items","tag","name","instanceOf","constructor","_value$constructor","className","valueClassName","stringifiedValue","Source","locationOffset","isSource","parse","Parser","sourceObj","hasDescription","keywordToken","operation","operationToken","nameOrAlias","alias","isConst","item","hasTypeCondition","varName","directives","type","innerType","operationTypes","interfaces","fields","defaultValue","types","values","getTokenDesc","repeatable","locations","getTokenKindDesc","atToken","openKind","parseFn","closeKind","delimiterKind","maxTokens","printString","escapedRegExp","escapedReplacer","escapeSequences","BREAK","visit","root","visitor","visitorKeys","enterLeaveMap","getEnterLeaveForKind","stack","inArray","keys","index","edits","parent","ancestors","isLeaving","isEdited","editOffset","editKey","editValue","arrayKey","_enterLeaveMap$get","_enterLeaveMap$get2","visitFn","_node$kind","kindVisitor","print","ast","printDocASTReducer","MAX_LINE_LENGTH","join","varDefs","wrap","variable","selections","block","selectionSet","argsLine","typeCondition","variableDefinitions","isBlockString","hasMultilineItems","maybeArray","separator","_maybeArray$filter$jo","x","maybeString","_maybeArray$some","extractOperationName","operationName","operationDefinitions","definition","_b","_a","resolveRequestDocument","parsedDocument","ClientError","response","request","global","this","__self__","F","self","exports","support","isDataView","obj","viewClasses","isArrayBufferView","normalizeName","normalizeValue","iteratorFor","iterator","Headers","header","oldValue","callback","thisArg","consumed","fileReaderReady","reader","resolve","reject","readBlobAsArrayBuffer","blob","promise","readBlobAsText","readArrayBufferAsText","buf","view","chars","bufferClone","Body","rejected","decode","methods","normalizeMethod","method","upcased","Request","input","form","bytes","split","parseHeaders","rawHeaders","preProcessedHeaders","parts","Response","bodyInit","redirectStatuses","url","status","error","fetch","init","xhr","abortXhr","ctx","module","resolveHeaders","oHeaders","CrossFetch","CrossFetch.Headers","cleanQuery","buildRequestConfig","params","params_","search","payload","acc","currentQuery","createHttpMethodFetcher","query","fetchOptions","middleware","queryParams","createRequestBody","urlResolved","initResolved","urlNew","initNew","GraphQLClient","requestConfig","rawRequestOptions","crossFetch","requestMiddleware","responseMiddleware","makeRequest","callOrIdentity","requestOptions","batchRequestOptions","queries","fetcher","isBatchingQuery","getResult","successfullyReceivedData","data","successfullyPassedErrorPolicy","rest","errorResult","jsonSerializer","jsonSerializer_","contentType","gql","chunks","chunk","doctype"],"mappings":";;;;;;;;;;;;;;;;AAAO,MAAMA,KAAwB,MCAxBC,KAAY,CAACC,MAAQA,EAAI,YAAW,GAIpCC,KAA+B,CAACC,MAAY;AACrD,QAAMC,IAAI,CAAA;AACV,SAAAD,EAAQ,QAAQ,CAACE,GAAGC,MAAM;AACtB,IAAAF,EAAEE,CAAC,IAAID;AAAA,EACf,CAAK,GACMD;AACX,GCVaG,KAAmB,CAACC,GAAmBC,GAAWC,MACpDF,EAAkB,WACnBA,IACA;AAAA,EACE,UAAUA;AA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ACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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,EAAE,OAAOC,GAAc,WAAW3V,IAAYA,EAAUkO,CAAK,IAAI,OAAW,CAAA,GAC9EwH,IACR,CAAE,CAAA;AACL,SAAOgC,EAAgB,UAAUjC,CAAO;AAC5C,GACM0B,KAAY,OAAOnG,GAAUyG,MAAmB;AAClD,MAAIE;AAMJ,SALA3G,EAAS,QAAQ,QAAQ,CAAClQ,GAAOuJ,MAAQ;AACrC,IAAIA,EAAI,kBAAkB,mBACtBsN,IAAc7W;AAAA,EAE1B,CAAK,GACG6W,MACCA,EAAY,YAAa,EAAC,WAAW,kBAAkB,KACpDA,EAAY,YAAa,EAAC,WAAW,0BAA0B,KAC/DA,EAAY,YAAW,EAAG,WAAW,mCAAmC,KACrEF,EAAe,MAAM,MAAMzG,EAAS,KAAM,CAAA,IAG1CA,EAAS;AAExB,GACM6F,KAAiB,CAAC/V,MACb,OAAOA,KAAU,aAAaA,EAAK,IAAKA,GAgBtC8W,KAAM,CAACC,MAAW7X,MACpB6X,EAAO,OAAO,CAACnC,GAAKoC,GAAO5J,MAAU,GAAGwH,CAAG,GAAGoC,CAAK,GAAG5J,KAASlO,IAAY,OAAOA,EAAUkO,CAAK,CAAC,IAAI,EAAE,IAAI,EAAE,GCvZnH8I,KAAU;AAAA,EACf,SAASY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWV,GCVarE,KAAU;AAAA,EACtB,SAAS,OAAOwE,GAAiBxD,MACd,MAAMtD,GAAQsD,KAAO,YAAYyC,GAAQ,SAAS,EAAE,SAAAe,EAAA,CAAS;AAGjF;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]} \ No newline at end of file diff --git a/graphql_client/dist/graphql-client.umd.cjs b/graphql_client/dist/graphql-client.umd.cjs deleted file mode 100644 index 0fd83ced..00000000 --- a/graphql_client/dist/graphql-client.umd.cjs +++ /dev/null @@ -1,60 +0,0 @@ -(function(P,V){typeof exports=="object"&&typeof module<"u"?V(exports):typeof define=="function"&&define.amd?define(["exports"],V):(P=typeof globalThis<"u"?globalThis:P||self,V(P["@stonecrop/graphql-client"]={}))})(this,function(P){"use strict";function V(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const ie=JSON,Re=e=>e.toUpperCase(),Le=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Fe=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Pe=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},Be=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Me=(e,t,...n)=>{const[r,i]=n;return e.document?e:{url:e,document:t,variables:r,requestHeaders:i,signal:void 0}};function Y(e,t){if(!!!e)throw new Error(t)}function Ue(e){return typeof e=="object"&&e!==null}function je(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Ve=/\r\n|[\n\r]/g;function re(e,t){let n=0,r=1;for(const i of e.body.matchAll(Ve)){if(typeof i.index=="number"||je(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function qe(e){return Ee(e.source,re(e.source,e.start))}function Ee(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,c=t.line+s,u=t.line===1?n:0,p=t.column+u,d=`${e.name}:${c}:${p} -`,y=r.split(/\r\n|[\n\r]/g),m=y[i];if(m.length>120){const T=Math.floor(p/80),A=p%80,E=[];for(let I=0;I["|",I]),["|","^".padStart(A)],["|",E[T+1]]])}return d+me([[`${c-1} |`,y[i-1]],[`${c} |`,m],["|","^".padStart(p)],[`${c+1} |`,y[i+1]]])}function me(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}function $e(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class se extends Error{constructor(t,...n){var r,i,s;const{nodes:c,source:u,positions:p,path:d,originalError:y,extensions:m}=$e(n);super(t),this.name="GraphQLError",this.path=d??void 0,this.originalError=y??void 0,this.nodes=Te(Array.isArray(c)?c:c?[c]:void 0);const T=Te((r=this.nodes)===null||r===void 0?void 0:r.map(E=>E.loc).filter(E=>E!=null));this.source=u??(T==null||(i=T[0])===null||i===void 0?void 0:i.source),this.positions=p??(T==null?void 0:T.map(E=>E.start)),this.locations=p&&u?p.map(E=>re(u,E)):T==null?void 0:T.map(E=>re(E.source,E.start));const A=Ue(y==null?void 0:y.extensions)?y==null?void 0:y.extensions:void 0;this.extensions=(s=m??A)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),y!=null&&y.stack?Object.defineProperty(this,"stack",{value:y.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,se):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=` - -`+qe(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=` - -`+Ee(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Te(e){return e===void 0||e.length===0?void 0:e}function O(e,t,n){return new se(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Ge{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Ne{constructor(t,n,r,i,s,c){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=c,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const ve={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},He=new Set(Object.keys(ve));function xe(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&He.has(t)}var B;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(B||(B={}));var oe;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(oe||(oe={}));var f;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(f||(f={}));function ae(e){return e===9||e===32}function q(e){return e>=48&&e<=57}function Ae(e){return e>=97&&e<=122||e>=65&&e<=90}function Ie(e){return Ae(e)||e===95}function Ye(e){return Ae(e)||q(e)||e===95}function ze(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let c=0;cu===0?c:c.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Je(e){let t=0;for(;t1&&r.slice(1).every(A=>A.length===0||ae(A.charCodeAt(0))),c=n.endsWith('\\"""'),u=e.endsWith('"')&&!c,p=e.endsWith("\\"),d=u||p,y=!(t!=null&&t.minimize)&&(!i||e.length>70||d||s||c);let m="";const T=i&&ae(e.charCodeAt(0));return(y&&!T||s)&&(m+=` -`),m+=n,(y||d)&&(m+=` -`),'"""'+m+'"""'}var a;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(a||(a={}));class Xe{constructor(t){const n=new Ne(a.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==a.EOF)do if(t.next)t=t.next;else{const n=Ze(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===a.COMMENT);return t}}function We(e){return e===a.BANG||e===a.DOLLAR||e===a.AMP||e===a.PAREN_L||e===a.PAREN_R||e===a.SPREAD||e===a.COLON||e===a.EQUALS||e===a.AT||e===a.BRACKET_L||e===a.BRACKET_R||e===a.BRACE_L||e===a.PIPE||e===a.BRACE_R}function M(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function z(e,t){return ge(e.charCodeAt(t))&&Oe(e.charCodeAt(t+1))}function ge(e){return e>=55296&&e<=56319}function Oe(e){return e>=56320&&e<=57343}function L(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return a.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function g(e,t,n,r,i){const s=e.line,c=1+n-e.lineStart;return new Ne(t,n,r,s,c,i)}function Ze(e,t){const n=e.source.body,r=n.length;let i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function rt(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw O(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function st(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,c=s,u="";const p=[];for(;s_e?"["+pt(e)+"]":"{ "+n.map(([i,s])=>i+": "+J(s,t)).join(", ")+" }"}function ht(e,t){if(e.length===0)return"[]";if(t.length>_e)return"[Array]";const n=Math.min(at,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function pt(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const dt=process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){const c=ue(t);throw new Error(`Cannot use ${i} "${c}" from another module or realm. - -Ensure that there is only one instance of "graphql" in the node_modules -directory. If different versions of "graphql" are the dependencies of other -relied on modules, use "resolutions" to ensure only one version is installed. - -https://yarnpkg.com/en/docs/selective-version-resolutions - -Duplicate "graphql" modules cannot be used at the same time since different -versions may have different capabilities and behavior. The data from one -version used in the function from another could produce confusing and -spurious results.`)}}return!1};class De{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Y(!1,`Body must be a string. Received: ${ue(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Y(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Y(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function ft(e){return dt(e,De)}function yt(e,t){return new Et(e,t).parseDocument()}class Et{constructor(t,n={}){const r=ft(t)?t:new De(t);this._lexer=new Xe(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(a.NAME);return this.node(t,{kind:f.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:f.DOCUMENT,definitions:this.many(a.SOF,this.parseDefinition,a.EOF)})}parseDefinition(){if(this.peek(a.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===a.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw O(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(a.BRACE_L))return this.node(t,{kind:f.OPERATION_DEFINITION,operation:B.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(a.NAME)&&(r=this.parseName()),this.node(t,{kind:f.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(a.NAME);switch(t.value){case"query":return B.QUERY;case"mutation":return B.MUTATION;case"subscription":return B.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(a.PAREN_L,this.parseVariableDefinition,a.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:f.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(a.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(a.DOLLAR),this.node(t,{kind:f.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:f.SELECTION_SET,selections:this.many(a.BRACE_L,this.parseSelection,a.BRACE_R)})}parseSelection(){return this.peek(a.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(a.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:f.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(a.PAREN_L,n,a.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(a.COLON),this.node(n,{kind:f.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(a.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(a.NAME)?this.node(t,{kind:f.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:f.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:f.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:f.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case a.BRACKET_L:return this.parseList(t);case a.BRACE_L:return this.parseObject(t);case a.INT:return this.advanceLexer(),this.node(n,{kind:f.INT,value:n.value});case a.FLOAT:return this.advanceLexer(),this.node(n,{kind:f.FLOAT,value:n.value});case a.STRING:case a.BLOCK_STRING:return this.parseStringLiteral();case a.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:f.BOOLEAN,value:!0});case"false":return this.node(n,{kind:f.BOOLEAN,value:!1});case"null":return this.node(n,{kind:f.NULL});default:return this.node(n,{kind:f.ENUM,value:n.value})}case a.DOLLAR:if(t)if(this.expectToken(a.DOLLAR),this._lexer.token.kind===a.NAME){const r=this._lexer.token.value;throw O(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:f.STRING,value:t.value,block:t.kind===a.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:f.LIST,values:this.any(a.BRACKET_L,n,a.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:f.OBJECT,fields:this.any(a.BRACE_L,n,a.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(a.COLON),this.node(n,{kind:f.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(a.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(a.AT),this.node(n,{kind:f.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(a.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(a.BRACKET_R),n=this.node(t,{kind:f.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(t,{kind:f.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:f.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(a.STRING)||this.peek(a.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);return this.node(t,{kind:f.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(a.COLON);const r=this.parseNamedType();return this.node(t,{kind:f.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:f.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:f.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:c})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(a.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseFieldDefinition,a.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(a.COLON);const s=this.parseTypeReference(),c=this.parseConstDirectives();return this.node(t,{kind:f.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:c})}parseArgumentDefs(){return this.optionalMany(a.PAREN_L,this.parseInputValueDef,a.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(a.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(a.EQUALS)&&(s=this.parseConstValueLiteral());const c=this.parseConstDirectives();return this.node(t,{kind:f.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:c})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:f.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:c})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:f.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(a.EQUALS)?this.delimitedMany(a.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:f.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(a.BRACE_L,this.parseEnumValueDefinition,a.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:f.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw O(this._lexer.source,this._lexer.token.start,`${Q(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:f.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseInputValueDef,a.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===a.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:f.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:f.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:f.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:f.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:f.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:f.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:f.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(a.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const c=this.parseDirectiveLocations();return this.node(t,{kind:f.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:c})}parseDirectiveLocations(){return this.delimitedMany(a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(oe,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Ge(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw O(this._lexer.source,n.start,`Expected ${Se(t)}, found ${Q(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===a.NAME&&n.value===t)this.advanceLexer();else throw O(this._lexer.source,n.start,`Expected "${t}", found ${Q(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===a.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return O(this._lexer.source,n.start,`Unexpected ${Q(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==a.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw O(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Q(e){const t=e.value;return Se(e.kind)+(t!=null?` "${t}"`:"")}function Se(e){return We(e)?`"${e}"`:e}function mt(e){return`"${e.replace(Tt,Nt)}"`}const Tt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Nt(e){return vt[e.charCodeAt(0)]}const vt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],xt=Object.freeze({});function At(e,t,n=ve){const r=new Map;for(const S of Object.values(f))r.set(S,It(t,S));let i,s=Array.isArray(e),c=[e],u=-1,p=[],d=e,y,m;const T=[],A=[];do{u++;const S=u===c.length,K=S&&p.length!==0;if(S){if(y=A.length===0?void 0:T[T.length-1],d=m,m=A.pop(),K)if(s){d=d.slice();let w=0;for(const[j,ee]of p){const te=j-w;ee===null?(d.splice(te,1),w++):d[te]=ee}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[w,j]of p)d[w]=j}u=i.index,c=i.keys,p=i.edits,s=i.inArray,i=i.prev}else if(m){if(y=s?u:c[u],d=m[y],d==null)continue;T.push(y)}let k;if(!Array.isArray(d)){var E,I;xe(d)||Y(!1,`Invalid AST Node: ${ue(d)}.`);const w=S?(E=r.get(d.kind))===null||E===void 0?void 0:E.leave:(I=r.get(d.kind))===null||I===void 0?void 0:I.enter;if(k=w==null?void 0:w.call(t,d,y,m,T,A),k===xt)break;if(k===!1){if(!S){T.pop();continue}}else if(k!==void 0&&(p.push([y,k]),!S))if(xe(k))d=k;else{T.pop();continue}}if(k===void 0&&K&&p.push([y,d]),S)T.pop();else{var D;i={inArray:s,index:u,keys:c,edits:p,prev:i},s=Array.isArray(d),c=s?d:(D=n[d.kind])!==null&&D!==void 0?D:[],u=-1,p=[],m&&A.push(m),m=d}}while(i!==void 0);return p.length!==0?p[p.length-1][1]:e}function It(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function gt(e){return At(e,bt)}const Ot=80,bt={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>h(e.definitions,` - -`)},OperationDefinition:{leave(e){const t=v("(",h(e.variableDefinitions,", "),")"),n=h([e.operation,h([e.name,t]),h(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+v(" = ",n)+v(" ",h(r," "))},SelectionSet:{leave:({selections:e})=>C(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=v("",e,": ")+t;let c=s+v("(",h(n,", "),")");return c.length>Ot&&(c=s+v(`( -`,X(h(n,` -`)),` -)`)),h([c,h(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+v(" ",h(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>h(["...",v("on ",e),h(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${v("(",h(n,", "),")")} on ${t} ${v("",h(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Qe(e):mt(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+h(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+h(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+v("(",h(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>v("",e,` -`)+h(["schema",h(t," "),C(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>v("",e,` -`)+h(["scalar",t,h(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>v("",e,` -`)+h(["type",t,v("implements ",h(n," & ")),h(r," "),C(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>v("",e,` -`)+t+(Ce(n)?v(`( -`,X(h(n,` -`)),` -)`):v("(",h(n,", "),")"))+": "+r+v(" ",h(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>v("",e,` -`)+h([t+": "+n,v("= ",r),h(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>v("",e,` -`)+h(["interface",t,v("implements ",h(n," & ")),h(r," "),C(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>v("",e,` -`)+h(["union",t,h(n," "),v("= ",h(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>v("",e,` -`)+h(["enum",t,h(n," "),C(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>v("",e,` -`)+h([t,h(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>v("",e,` -`)+h(["input",t,h(n," "),C(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>v("",e,` -`)+"directive @"+t+(Ce(n)?v(`( -`,X(h(n,` -`)),` -)`):v("(",h(n,", "),")"))+(r?" repeatable":"")+" on "+h(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>h(["extend schema",h(e," "),C(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>h(["extend scalar",e,h(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>h(["extend type",e,v("implements ",h(t," & ")),h(n," "),C(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>h(["extend interface",e,v("implements ",h(t," & ")),h(n," "),C(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>h(["extend union",e,h(t," "),v("= ",h(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>h(["extend enum",e,h(t," "),C(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>h(["extend input",e,h(t," "),C(n)]," ")}};function h(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function C(e){return v(`{ -`,X(h(e,` -`)),` -}`)}function v(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function X(e){return v(" ",e.replace(/\n/g,` - `))}function Ce(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}const we=e=>{var r,i;let t;const n=e.definitions.filter(s=>s.kind==="OperationDefinition");return n.length===1&&(t=(i=(r=n[0])==null?void 0:r.name)==null?void 0:i.value),t},le=e=>{if(typeof e=="string"){let n;try{const r=yt(e);n=we(r)}catch{}return{query:e,operationName:n}}const t=we(e);return{query:gt(e),operationName:t}};class G extends Error{constructor(t,n){const r=`${G.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,G.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,G)}static extractMessage(t){var n,r;return((r=(n=t.errors)==null?void 0:n[0])==null?void 0:r.message)??`GraphQL Error (Code: ${t.status})`}}var _t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var he={exports:{}};(function(e,t){var n=typeof self<"u"?self:_t,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(c){var u={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function p(o){return o&&DataView.prototype.isPrototypeOf(o)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],y=ArrayBuffer.isView||function(o){return o&&d.indexOf(Object.prototype.toString.call(o))>-1};function m(o){if(typeof o!="string"&&(o=String(o)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))throw new TypeError("Invalid character in header field name");return o.toLowerCase()}function T(o){return typeof o!="string"&&(o=String(o)),o}function A(o){var l={next:function(){var N=o.shift();return{done:N===void 0,value:N}}};return u.iterable&&(l[Symbol.iterator]=function(){return l}),l}function E(o){this.map={},o instanceof E?o.forEach(function(l,N){this.append(N,l)},this):Array.isArray(o)?o.forEach(function(l){this.append(l[0],l[1])},this):o&&Object.getOwnPropertyNames(o).forEach(function(l){this.append(l,o[l])},this)}E.prototype.append=function(o,l){o=m(o),l=T(l);var N=this.map[o];this.map[o]=N?N+", "+l:l},E.prototype.delete=function(o){delete this.map[m(o)]},E.prototype.get=function(o){return o=m(o),this.has(o)?this.map[o]:null},E.prototype.has=function(o){return this.map.hasOwnProperty(m(o))},E.prototype.set=function(o,l){this.map[m(o)]=T(l)},E.prototype.forEach=function(o,l){for(var N in this.map)this.map.hasOwnProperty(N)&&o.call(l,this.map[N],N,this)},E.prototype.keys=function(){var o=[];return this.forEach(function(l,N){o.push(N)}),A(o)},E.prototype.values=function(){var o=[];return this.forEach(function(l){o.push(l)}),A(o)},E.prototype.entries=function(){var o=[];return this.forEach(function(l,N){o.push([N,l])}),A(o)},u.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function I(o){if(o.bodyUsed)return Promise.reject(new TypeError("Already read"));o.bodyUsed=!0}function D(o){return new Promise(function(l,N){o.onload=function(){l(o.result)},o.onerror=function(){N(o.error)}})}function S(o){var l=new FileReader,N=D(l);return l.readAsArrayBuffer(o),N}function K(o){var l=new FileReader,N=D(l);return l.readAsText(o),N}function k(o){for(var l=new Uint8Array(o),N=new Array(l.length),_=0;_-1?l:o}function F(o,l){l=l||{};var N=l.body;if(o instanceof F){if(o.bodyUsed)throw new TypeError("Already read");this.url=o.url,this.credentials=o.credentials,l.headers||(this.headers=new E(o.headers)),this.method=o.method,this.mode=o.mode,this.signal=o.signal,!N&&o._bodyInit!=null&&(N=o._bodyInit,o.bodyUsed=!0)}else this.url=String(o);if(this.credentials=l.credentials||this.credentials||"same-origin",(l.headers||!this.headers)&&(this.headers=new E(l.headers)),this.method=te(l.method||this.method||"GET"),this.mode=l.mode||this.mode||null,this.signal=l.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&N)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(N)}F.prototype.clone=function(){return new F(this,{body:this._bodyInit})};function Mt(o){var l=new FormData;return o.trim().split("&").forEach(function(N){if(N){var _=N.split("="),b=_.shift().replace(/\+/g," "),x=_.join("=").replace(/\+/g," ");l.append(decodeURIComponent(b),decodeURIComponent(x))}}),l}function Ut(o){var l=new E,N=o.replace(/\r?\n[\t ]+/g," ");return N.split(/\r?\n/).forEach(function(_){var b=_.split(":"),x=b.shift().trim();if(x){var ne=b.join(":").trim();l.append(x,ne)}}),l}j.call(F.prototype);function R(o,l){l||(l={}),this.type="default",this.status=l.status===void 0?200:l.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in l?l.statusText:"OK",this.headers=new E(l.headers),this.url=l.url||"",this._initBody(o)}j.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},R.error=function(){var o=new R(null,{status:0,statusText:""});return o.type="error",o};var jt=[301,302,303,307,308];R.redirect=function(o,l){if(jt.indexOf(l)===-1)throw new RangeError("Invalid status code");return new R(null,{status:l,headers:{location:o}})},c.DOMException=s.DOMException;try{new c.DOMException}catch{c.DOMException=function(l,N){this.message=l,this.name=N;var _=Error(l);this.stack=_.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function fe(o,l){return new Promise(function(N,_){var b=new F(o,l);if(b.signal&&b.signal.aborted)return _(new c.DOMException("Aborted","AbortError"));var x=new XMLHttpRequest;function ne(){x.abort()}x.onload=function(){var H={status:x.status,statusText:x.statusText,headers:Ut(x.getAllResponseHeaders()||"")};H.url="responseURL"in x?x.responseURL:H.headers.get("X-Request-URL");var ye="response"in x?x.response:x.responseText;N(new R(ye,H))},x.onerror=function(){_(new TypeError("Network request failed"))},x.ontimeout=function(){_(new TypeError("Network request failed"))},x.onabort=function(){_(new c.DOMException("Aborted","AbortError"))},x.open(b.method,b.url,!0),b.credentials==="include"?x.withCredentials=!0:b.credentials==="omit"&&(x.withCredentials=!1),"responseType"in x&&u.blob&&(x.responseType="blob"),b.headers.forEach(function(H,ye){x.setRequestHeader(ye,H)}),b.signal&&(b.signal.addEventListener("abort",ne),x.onreadystatechange=function(){x.readyState===4&&b.signal.removeEventListener("abort",ne)}),x.send(typeof b._bodyInit>"u"?null:b._bodyInit)})}return fe.polyfill=!0,s.fetch||(s.fetch=fe,s.Headers=E,s.Request=F,s.Response=R),c.Headers=E,c.Request=F,c.Response=R,c.fetch=fe,Object.defineProperty(c,"__esModule",{value:!0}),c})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(he,he.exports);var W=he.exports;const Z=Dt(W),St=V({__proto__:null,default:Z},[W]),U=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||St&&W.Headers&&e instanceof W.Headers?t=Le(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):t=e),t},ke=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Ct=e=>{if(!Array.isArray(e.query)){const r=e,i=[`query=${encodeURIComponent(ke(r.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce((r,i,s)=>(r.push({query:ke(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),r),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},wt=e=>async t=>{const{url:n,query:r,variables:i,operationName:s,fetch:c,fetchOptions:u,middleware:p}=t,d={...t.headers};let y="",m;e==="POST"?(m=Lt(r,i,s,u.jsonSerializer),typeof m=="string"&&(d["Content-Type"]="application/json")):y=Ct({query:r,variables:i,operationName:s,jsonSerializer:u.jsonSerializer??ie});const T={method:e,headers:d,body:m,...u};let A=n,E=T;if(p){const I=await Promise.resolve(p({...T,url:n,operationName:s,variables:i})),{url:D,...S}=I;A=D,E=S}return y&&(A=`${A}?${y}`),await c(A,E)};class kt{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=async(...r)=>{const[i,s,c]=r,u=Pe(i,s,c),{headers:p,fetch:d=Z,method:y="POST",requestMiddleware:m,responseMiddleware:T,...A}=this.requestConfig,{url:E}=this;u.signal!==void 0&&(A.signal=u.signal);const{operationName:I}=le(u.query);return pe({url:E,query:u.query,variables:u.variables,headers:{...U(de(p)),...U(u.requestHeaders)},operationName:I,fetch:d,method:y,fetchOptions:A,middleware:m}).then(D=>(T&&T(D),D)).catch(D=>{throw T&&T(D),D})}}async request(t,...n){const[r,i]=n,s=Fe(t,r,i),{headers:c,fetch:u=Z,method:p="POST",requestMiddleware:d,responseMiddleware:y,...m}=this.requestConfig,{url:T}=this;s.signal!==void 0&&(m.signal=s.signal);const{query:A,operationName:E}=le(s.document);return pe({url:T,query:A,variables:s.variables,headers:{...U(de(c)),...U(s.requestHeaders)},operationName:E,fetch:u,method:p,fetchOptions:m,middleware:d}).then(I=>(y&&y(I),I.data)).catch(I=>{throw y&&y(I),I})}batchRequests(t,n){const r=Be(t,n),{headers:i,...s}=this.requestConfig;r.signal!==void 0&&(s.signal=r.signal);const c=r.documents.map(({document:p})=>le(p).query),u=r.documents.map(({variables:p})=>p);return pe({url:this.url,query:c,variables:u,headers:{...U(de(i)),...U(r.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??Z,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(p=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p.data)).catch(p=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:r}=this.requestConfig;return r?r[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}}const pe=async e=>{const{query:t,variables:n,fetchOptions:r}=e,i=wt(Re(e.method??"post")),s=Array.isArray(e.query),c=await i(e),u=await Ft(c,r.jsonSerializer??ie),p=Array.isArray(u)?!u.some(({data:y})=>!y):!!u.data,d=Array.isArray(u)||!u.errors||Array.isArray(u.errors)&&!u.errors.length||r.errorPolicy==="all"||r.errorPolicy==="ignore";if(c.ok&&d&&p){const{errors:y,...m}=(Array.isArray(u),u),T=r.errorPolicy==="ignore"?m:u;return{...s?{data:T}:T,headers:c.headers,status:c.status}}else{const y=typeof u=="string"?{error:u}:u;throw new G({...y,status:c.status,headers:c.headers},{query:t,variables:n})}};async function Rt(e,t,...n){const r=Me(e,t,...n);return new kt(r.url).request({...r})}const Lt=(e,t,n,r)=>{const i=r??ie;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:n});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((c,u,p)=>(c.push({query:u,variables:t?t[p]:void 0}),c),[]);return i.stringify(s)},Ft=async(e,t)=>{let n;return e.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},de=e=>typeof e=="function"?e():e,Pt={getMeta:((e,...t)=>e.reduce((n,r,i)=>`${n}${r}${i in t?String(t[i]):""}`,""))` - query getDoctype($doctype: String!) { - getMeta(doctype: $doctype) { - id - name - workflow - schema - actions - } - } - `},Bt={getMeta:async(e,t)=>await Rt(t||"/graphql",Pt.getMeta,{doctype:e})};P.methods=Bt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=graphql-client.umd.cjs.map diff --git a/graphql_client/dist/graphql-client.umd.cjs.map b/graphql_client/dist/graphql-client.umd.cjs.map deleted file mode 100644 index 4cdf1334..00000000 --- a/graphql_client/dist/graphql-client.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"graphql-client.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/defaultJsonSerializer.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/helpers.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/parseArgs.js","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/devAssert.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/isObjectLike.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/invariant.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/location.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printLocation.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/GraphQLError.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/syntaxError.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/ast.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/directiveLocation.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/kinds.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/characterClasses.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/blockString.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/tokenKind.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/lexer.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/inspect.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/instanceOf.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/source.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/parser.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printString.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/visitor.mjs","../../common/temp/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printer.mjs","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/resolveRequestDocument.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/types.js","../../common/temp/node_modules/.pnpm/cross-fetch@3.1.8/node_modules/cross-fetch/dist/browser-ponyfill.js","../../common/temp/node_modules/.pnpm/graphql-request@6.0.0_graphql@16.6.0/node_modules/graphql-request/build/esm/index.js","../src/queries.ts","../src/index.ts"],"sourcesContent":["export const defaultJsonSerializer = JSON;\n//# sourceMappingURL=defaultJsonSerializer.js.map","export const uppercase = (str) => str.toUpperCase();\n/**\n * Convert Headers instance into regular object\n */\nexport const HeadersInstanceToPlainObject = (headers) => {\n const o = {};\n headers.forEach((v, k) => {\n o[k] = v;\n });\n return o;\n};\n//# sourceMappingURL=helpers.js.map","export const parseRequestArgs = (documentOrOptions, variables, requestHeaders) => {\n return documentOrOptions.document\n ? documentOrOptions\n : {\n document: documentOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRawRequestArgs = (queryOrOptions, variables, requestHeaders) => {\n return queryOrOptions.query\n ? queryOrOptions\n : {\n query: queryOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseBatchRequestArgs = (documentsOrOptions, requestHeaders) => {\n return documentsOrOptions.documents\n ? documentsOrOptions\n : {\n documents: documentsOrOptions,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRequestExtendedArgs = (urlOrOptions, document, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return urlOrOptions.document\n ? urlOrOptions\n : {\n url: urlOrOptions,\n document: document,\n variables,\n requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRawRequestExtendedArgs = (urlOrOptions, query, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return urlOrOptions.query\n ? urlOrOptions\n : {\n url: urlOrOptions,\n query: query,\n variables,\n requestHeaders,\n signal: undefined,\n };\n};\n//# sourceMappingURL=parseArgs.js.map","export function devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","export function invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n","import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nexport function printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","import { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\n /**\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n","import { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. is always the first node and \n * the last.\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n","/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nexport function isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // \n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '';\n TokenKind['EOF'] = '';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport class Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // \n\n case 0x0009: // \\t\n\n case 0x0020: // \n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { inspect } from './inspect.mjs';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nexport const instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production'\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = inspect(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n devAssert(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n devAssert(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n const parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nexport function parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n constructor(source, options = {}) {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n this._tokenCounter = 0;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(TokenKind.NAME);\n return this.node(token, {\n kind: Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: Kind.DOCUMENT,\n definitions: this.many(\n TokenKind.SOF,\n this.parseDefinition,\n TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are supported only on type definitions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation: OperationTypeNode.QUERY,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return OperationTypeNode.QUERY;\n\n case 'mutation':\n return OperationTypeNode.MUTATION;\n\n case 'subscription':\n return OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseVariableDefinition,\n TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return this.node(start, {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: Kind.SELECTION_SET,\n selections: this.many(\n TokenKind.BRACE_L,\n this.parseSelection,\n TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return this.node(start, {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.INT,\n value: token.value,\n });\n\n case TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.FLOAT,\n value: token.value,\n });\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: Kind.ENUM,\n value: token.value,\n });\n }\n\n case TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return this.node(start, {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return this.node(start, {\n kind: Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseFieldDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseInputValueDef,\n TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS)\n ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseInputValueDef,\n TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (maxTokens !== undefined && token.kind !== TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n","/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nexport function printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isNode, QueryDocumentKeys } from './ast.mjs';\nimport { Kind } from './kinds.mjs';\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport const BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nexport function visit(root, visitor, visitorKeys = QueryDocumentKeys) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(Kind)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = Object.defineProperties(\n {},\n Object.getOwnPropertyDescriptors(node),\n );\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if (isNode(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nexport function visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nexport function getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === 'object') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === 'function') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n","import { printBlockString } from './blockString.mjs';\nimport { printString } from './printString.mjs';\nimport { visit } from './visitor.mjs';\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n return visit(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix = join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives }) =>\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: (\n { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n ) =>\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString ? printBlockString(value) : printString(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n","import { parse, print } from 'graphql';\n/**\n * helpers\n */\nconst extractOperationName = (document) => {\n let operationName = undefined;\n const operationDefinitions = document.definitions.filter((definition) => definition.kind === `OperationDefinition`);\n if (operationDefinitions.length === 1) {\n operationName = operationDefinitions[0]?.name?.value;\n }\n return operationName;\n};\nexport const resolveRequestDocument = (document) => {\n if (typeof document === `string`) {\n let operationName = undefined;\n try {\n const parsedDocument = parse(document);\n operationName = extractOperationName(parsedDocument);\n }\n catch (err) {\n // Failed parsing the document, the operationName will be undefined\n }\n return { query: document, operationName };\n }\n const operationName = extractOperationName(document);\n return { query: print(document), operationName };\n};\n//# sourceMappingURL=resolveRequestDocument.js.map","export class ClientError extends Error {\n constructor(response, request) {\n const message = `${ClientError.extractMessage(response)}: ${JSON.stringify({\n response,\n request,\n })}`;\n super(message);\n Object.setPrototypeOf(this, ClientError.prototype);\n this.response = response;\n this.request = request;\n // this is needed as Safari doesn't support .captureStackTrace\n if (typeof Error.captureStackTrace === `function`) {\n Error.captureStackTrace(this, ClientError);\n }\n }\n static extractMessage(response) {\n return response.errors?.[0]?.message ?? `GraphQL Error (Code: ${response.status})`;\n }\n}\n//# sourceMappingURL=types.js.map","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","import { defaultJsonSerializer } from './defaultJsonSerializer.js';\nimport { HeadersInstanceToPlainObject, uppercase } from './helpers.js';\nimport { parseBatchRequestArgs, parseRawRequestArgs, parseRawRequestExtendedArgs, parseRequestArgs, parseRequestExtendedArgs, } from './parseArgs.js';\nimport { resolveRequestDocument } from './resolveRequestDocument.js';\nimport { ClientError, } from './types.js';\nimport crossFetch, * as CrossFetch from 'cross-fetch';\nexport { ClientError, };\n/**\n * Convert the given headers configuration into a plain object.\n */\nconst resolveHeaders = (headers) => {\n let oHeaders = {};\n if (headers) {\n if ((typeof Headers !== `undefined` && headers instanceof Headers) ||\n (CrossFetch && CrossFetch.Headers && headers instanceof CrossFetch.Headers)) {\n oHeaders = HeadersInstanceToPlainObject(headers);\n }\n else if (Array.isArray(headers)) {\n headers.forEach(([name, value]) => {\n if (name && value !== undefined) {\n oHeaders[name] = value;\n }\n });\n }\n else {\n oHeaders = headers;\n }\n }\n return oHeaders;\n};\n/**\n * Clean a GraphQL document to send it via a GET query\n */\nconst cleanQuery = (str) => str.replace(/([\\s,]|#[^\\n\\r]+)+/g, ` `).trim();\n/**\n * Create query string for GraphQL request\n */\nconst buildRequestConfig = (params) => {\n if (!Array.isArray(params.query)) {\n const params_ = params;\n const search = [`query=${encodeURIComponent(cleanQuery(params_.query))}`];\n if (params.variables) {\n search.push(`variables=${encodeURIComponent(params_.jsonSerializer.stringify(params_.variables))}`);\n }\n if (params_.operationName) {\n search.push(`operationName=${encodeURIComponent(params_.operationName)}`);\n }\n return search.join(`&`);\n }\n if (typeof params.variables !== `undefined` && !Array.isArray(params.variables)) {\n throw new Error(`Cannot create query with given variable type, array expected`);\n }\n // Batch support\n const params_ = params;\n const payload = params.query.reduce((acc, currentQuery, index) => {\n acc.push({\n query: cleanQuery(currentQuery),\n variables: params_.variables ? params_.jsonSerializer.stringify(params_.variables[index]) : undefined,\n });\n return acc;\n }, []);\n return `query=${encodeURIComponent(params_.jsonSerializer.stringify(payload))}`;\n};\nconst createHttpMethodFetcher = (method) => async (params) => {\n const { url, query, variables, operationName, fetch, fetchOptions, middleware } = params;\n const headers = { ...params.headers };\n let queryParams = ``;\n let body = undefined;\n if (method === `POST`) {\n body = createRequestBody(query, variables, operationName, fetchOptions.jsonSerializer);\n if (typeof body === `string`) {\n // @ts-expect-error todo\n headers[`Content-Type`] = `application/json`;\n }\n }\n else {\n // @ts-expect-error todo needs ADT for TS to understand the different states\n queryParams = buildRequestConfig({\n query,\n variables,\n operationName,\n jsonSerializer: fetchOptions.jsonSerializer ?? defaultJsonSerializer,\n });\n }\n const init = {\n method,\n headers,\n body,\n ...fetchOptions,\n };\n let urlResolved = url;\n let initResolved = init;\n if (middleware) {\n const result = await Promise.resolve(middleware({ ...init, url, operationName, variables }));\n const { url: urlNew, ...initNew } = result;\n urlResolved = urlNew;\n initResolved = initNew;\n }\n if (queryParams) {\n urlResolved = `${urlResolved}?${queryParams}`;\n }\n return await fetch(urlResolved, initResolved);\n};\n/**\n * GraphQL Client.\n */\nexport class GraphQLClient {\n constructor(url, requestConfig = {}) {\n this.url = url;\n this.requestConfig = requestConfig;\n /**\n * Send a GraphQL query to the server.\n */\n this.rawRequest = async (...args) => {\n const [queryOrOptions, variables, requestHeaders] = args;\n const rawRequestOptions = parseRawRequestArgs(queryOrOptions, variables, requestHeaders);\n const { headers, fetch = crossFetch, method = `POST`, requestMiddleware, responseMiddleware, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (rawRequestOptions.signal !== undefined) {\n fetchOptions.signal = rawRequestOptions.signal;\n }\n const { operationName } = resolveRequestDocument(rawRequestOptions.query);\n return makeRequest({\n url,\n query: rawRequestOptions.query,\n variables: rawRequestOptions.variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(rawRequestOptions.requestHeaders),\n },\n operationName,\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n })\n .then((response) => {\n if (responseMiddleware) {\n responseMiddleware(response);\n }\n return response;\n })\n .catch((error) => {\n if (responseMiddleware) {\n responseMiddleware(error);\n }\n throw error;\n });\n };\n }\n async request(documentOrOptions, ...variablesAndRequestHeaders) {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n const requestOptions = parseRequestArgs(documentOrOptions, variables, requestHeaders);\n const { headers, fetch = crossFetch, method = `POST`, requestMiddleware, responseMiddleware, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (requestOptions.signal !== undefined) {\n fetchOptions.signal = requestOptions.signal;\n }\n const { query, operationName } = resolveRequestDocument(requestOptions.document);\n return makeRequest({\n url,\n query,\n variables: requestOptions.variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(requestOptions.requestHeaders),\n },\n operationName,\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n })\n .then((response) => {\n if (responseMiddleware) {\n responseMiddleware(response);\n }\n return response.data;\n })\n .catch((error) => {\n if (responseMiddleware) {\n responseMiddleware(error);\n }\n throw error;\n });\n }\n // prettier-ignore\n batchRequests(documentsOrOptions, requestHeaders) {\n const batchRequestOptions = parseBatchRequestArgs(documentsOrOptions, requestHeaders);\n const { headers, ...fetchOptions } = this.requestConfig;\n if (batchRequestOptions.signal !== undefined) {\n fetchOptions.signal = batchRequestOptions.signal;\n }\n const queries = batchRequestOptions.documents.map(({ document }) => resolveRequestDocument(document).query);\n const variables = batchRequestOptions.documents.map(({ variables }) => variables);\n return makeRequest({\n url: this.url,\n query: queries,\n // @ts-expect-error TODO reconcile batch variables into system.\n variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(batchRequestOptions.requestHeaders),\n },\n operationName: undefined,\n fetch: this.requestConfig.fetch ?? crossFetch,\n method: this.requestConfig.method || `POST`,\n fetchOptions,\n middleware: this.requestConfig.requestMiddleware,\n })\n .then((response) => {\n if (this.requestConfig.responseMiddleware) {\n this.requestConfig.responseMiddleware(response);\n }\n return response.data;\n })\n .catch((error) => {\n if (this.requestConfig.responseMiddleware) {\n this.requestConfig.responseMiddleware(error);\n }\n throw error;\n });\n }\n setHeaders(headers) {\n this.requestConfig.headers = headers;\n return this;\n }\n /**\n * Attach a header to the client. All subsequent requests will have this header.\n */\n setHeader(key, value) {\n const { headers } = this.requestConfig;\n if (headers) {\n // todo what if headers is in nested array form... ?\n //@ts-expect-error todo\n headers[key] = value;\n }\n else {\n this.requestConfig.headers = { [key]: value };\n }\n return this;\n }\n /**\n * Change the client endpoint. All subsequent requests will send to this endpoint.\n */\n setEndpoint(value) {\n this.url = value;\n return this;\n }\n}\nconst makeRequest = async (params) => {\n const { query, variables, fetchOptions } = params;\n const fetcher = createHttpMethodFetcher(uppercase(params.method ?? `post`));\n const isBatchingQuery = Array.isArray(params.query);\n const response = await fetcher(params);\n const result = await getResult(response, fetchOptions.jsonSerializer ?? defaultJsonSerializer);\n const successfullyReceivedData = Array.isArray(result)\n ? !result.some(({ data }) => !data)\n : Boolean(result.data);\n const successfullyPassedErrorPolicy = Array.isArray(result) ||\n !result.errors ||\n (Array.isArray(result.errors) && !result.errors.length) ||\n fetchOptions.errorPolicy === `all` ||\n fetchOptions.errorPolicy === `ignore`;\n if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {\n // @ts-expect-error TODO fixme\n const { errors: _, ...rest } = Array.isArray(result) ? result : result;\n const data = fetchOptions.errorPolicy === `ignore` ? rest : result;\n const dataEnvelope = isBatchingQuery ? { data } : data;\n // @ts-expect-error TODO\n return {\n ...dataEnvelope,\n headers: response.headers,\n status: response.status,\n };\n }\n else {\n const errorResult = typeof result === `string`\n ? {\n error: result,\n }\n : result;\n throw new ClientError(\n // @ts-expect-error TODO\n { ...errorResult, status: response.status, headers: response.headers }, { query, variables });\n }\n};\n/**\n * Send a GraphQL Query to the GraphQL server for execution.\n */\nexport const rawRequest = async (...args) => {\n const [urlOrOptions, query, ...variablesAndRequestHeaders] = args;\n const requestOptions = parseRawRequestExtendedArgs(urlOrOptions, query, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.rawRequest({\n ...requestOptions,\n });\n};\n// prettier-ignore\n// eslint-disable-next-line\nexport async function request(urlOrOptions, document, ...variablesAndRequestHeaders) {\n const requestOptions = parseRequestExtendedArgs(urlOrOptions, document, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.request({\n ...requestOptions,\n });\n}\n/**\n * Send a batch of GraphQL Document to the GraphQL server for execution.\n *\n * @example\n *\n * ```ts\n * // You can pass a raw string\n *\n * await batchRequests('https://foo.bar/graphql', [\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * },\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * }])\n *\n * // You can also pass a GraphQL DocumentNode as query. Convenient if you\n * // are using graphql-tag package.\n *\n * import gql from 'graphql-tag'\n *\n * await batchRequests('https://foo.bar/graphql', [{ query: gql`...` }])\n * ```\n */\nexport const batchRequests = async (...args) => {\n const params = parseBatchRequestsArgsExtended(args);\n const client = new GraphQLClient(params.url);\n return client.batchRequests(params);\n};\nconst parseBatchRequestsArgsExtended = (args) => {\n if (args.length === 1) {\n return args[0];\n }\n else {\n return {\n url: args[0],\n documents: args[1],\n requestHeaders: args[2],\n signal: undefined,\n };\n }\n};\nconst createRequestBody = (query, variables, operationName, jsonSerializer) => {\n const jsonSerializer_ = jsonSerializer ?? defaultJsonSerializer;\n if (!Array.isArray(query)) {\n return jsonSerializer_.stringify({ query, variables, operationName });\n }\n if (typeof variables !== `undefined` && !Array.isArray(variables)) {\n throw new Error(`Cannot create request body with given variable type, array expected`);\n }\n // Batch support\n const payload = query.reduce((acc, currentQuery, index) => {\n acc.push({ query: currentQuery, variables: variables ? variables[index] : undefined });\n return acc;\n }, []);\n return jsonSerializer_.stringify(payload);\n};\nconst getResult = async (response, jsonSerializer) => {\n let contentType;\n response.headers.forEach((value, key) => {\n if (key.toLowerCase() === `content-type`) {\n contentType = value;\n }\n });\n if (contentType &&\n (contentType.toLowerCase().startsWith(`application/json`) ||\n contentType.toLowerCase().startsWith(`application/graphql+json`) ||\n contentType.toLowerCase().startsWith(`application/graphql-response+json`))) {\n return jsonSerializer.parse(await response.text());\n }\n else {\n return response.text();\n }\n};\nconst callOrIdentity = (value) => {\n return typeof value === `function` ? value() : value;\n};\n/**\n * Convenience passthrough template tag to get the benefits of tooling for the gql template tag. This does not actually parse the input into a GraphQL DocumentNode like graphql-tag package does. It just returns the string with any variables given interpolated. Can save you a bit of performance and having to install another package.\n *\n * @example\n * ```\n * import { gql } from 'graphql-request'\n *\n * await request('https://foo.bar/graphql', gql`...`)\n * ```\n *\n * @remarks\n *\n * Several tools in the Node GraphQL ecosystem are hardcoded to specially treat any template tag named \"gql\". For example see this prettier issue: https://github.com/prettier/prettier/issues/4360. Using this template tag has no runtime effect beyond variable interpolation.\n */\nexport const gql = (chunks, ...variables) => {\n return chunks.reduce((acc, chunk, index) => `${acc}${chunk}${index in variables ? String(variables[index]) : ``}`, ``);\n};\nexport { GraphQLWebSocketClient } from './graphql-ws.js';\nexport { resolveRequestDocument } from './resolveRequestDocument.js';\nexport default request;\n//# sourceMappingURL=index.js.map","import { gql } from 'graphql-request'\n\nconst queries = {\n\tgetMeta: gql`\n\t\tquery getDoctype($doctype: String!) {\n\t\t\tgetMeta(doctype: $doctype) {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t\tworkflow\n\t\t\t\tschema\n\t\t\t\tactions\n\t\t\t}\n\t\t}\n\t`,\n}\n\nexport { queries }\n","import { request } from 'graphql-request'\n\nimport { queries } from './queries'\n\nexport const methods = {\n\tgetMeta: async (doctype: string, url?: string) => {\n\t\tconst data: any = await request(url || '/graphql', queries.getMeta, { doctype })\n\t\treturn data\n\t},\n}\n"],"names":["defaultJsonSerializer","uppercase","str","HeadersInstanceToPlainObject","headers","o","v","k","parseRequestArgs","documentOrOptions","variables","requestHeaders","parseRawRequestArgs","queryOrOptions","parseBatchRequestArgs","documentsOrOptions","parseRequestExtendedArgs","urlOrOptions","document","variablesAndRequestHeaders","devAssert","condition","message","isObjectLike","value","invariant","LineRegExp","getLocation","source","position","lastLineStart","line","match","printLocation","location","printSourceLocation","sourceLocation","firstLineColumnOffset","body","lineIndex","lineOffset","lineNum","columnOffset","columnNum","locationStr","lines","locationLine","subLineIndex","subLineColumnNum","subLines","i","printPrefixedLines","subLine","existingLines","_","padLen","prefix","toNormalizedOptions","args","firstArg","GraphQLError","rawArgs","_this$nodes","_nodeLocations$","_ref","nodes","positions","path","originalError","extensions","undefinedIfEmpty","nodeLocations","node","loc","pos","originalExtensions","output","formattedError","array","syntaxError","description","Location","startToken","endToken","Token","kind","start","end","column","QueryDocumentKeys","kindValues","isNode","maybeNode","maybeKind","OperationTypeNode","DirectiveLocation","Kind","isWhiteSpace","code","isDigit","isLetter","isNameStart","isNameContinue","dedentBlockStringLines","_firstNonEmptyLine2","commonIndent","firstNonEmptyLine","lastNonEmptyLine","_firstNonEmptyLine","indent","leadingWhitespace","printBlockString","options","escapedValue","isSingleLine","forceLeadingNewLine","hasTrailingTripleQuotes","hasTrailingQuote","hasTrailingSlash","forceTrailingNewline","printAsMultipleLines","result","skipLeadingNewLine","TokenKind","Lexer","startOfFileToken","token","nextToken","readNextToken","isPunctuatorTokenKind","isUnicodeScalarValue","isSupplementaryCodePoint","isLeadingSurrogate","isTrailingSurrogate","printCodePointAt","lexer","char","createToken","col","bodyLength","readComment","readBlockString","readString","readNumber","readName","firstCode","isFloat","readDigits","chunkStart","escape","readEscapedUnicodeVariableWidth","readEscapedUnicodeFixedWidth","readEscapedCharacter","point","size","readHexDigit","read16BitHexCode","trailingCode","lineStart","currentLine","blockLines","MAX_ARRAY_LENGTH","MAX_RECURSIVE_DEPTH","inspect","formatValue","seenValues","formatObjectValue","previouslySeenValues","isJSONable","jsonValue","formatArray","formatObject","object","entries","getObjectTag","key","len","remaining","items","tag","name","instanceOf","constructor","_value$constructor","className","valueClassName","stringifiedValue","Source","locationOffset","isSource","parse","Parser","sourceObj","hasDescription","keywordToken","operation","operationToken","nameOrAlias","alias","isConst","item","hasTypeCondition","varName","directives","type","innerType","operationTypes","interfaces","fields","defaultValue","types","values","getTokenDesc","repeatable","locations","getTokenKindDesc","atToken","openKind","parseFn","closeKind","delimiterKind","maxTokens","printString","escapedRegExp","escapedReplacer","escapeSequences","BREAK","visit","root","visitor","visitorKeys","enterLeaveMap","getEnterLeaveForKind","stack","inArray","keys","index","edits","parent","ancestors","isLeaving","isEdited","editOffset","editKey","editValue","arrayKey","_enterLeaveMap$get","_enterLeaveMap$get2","visitFn","_node$kind","kindVisitor","print","ast","printDocASTReducer","MAX_LINE_LENGTH","join","varDefs","wrap","variable","selections","block","selectionSet","argsLine","typeCondition","variableDefinitions","isBlockString","hasMultilineItems","maybeArray","separator","_maybeArray$filter$jo","x","maybeString","_maybeArray$some","extractOperationName","operationName","operationDefinitions","definition","_b","_a","resolveRequestDocument","parsedDocument","ClientError","response","request","global","this","__self__","F","self","exports","support","isDataView","obj","viewClasses","isArrayBufferView","normalizeName","normalizeValue","iteratorFor","iterator","Headers","header","oldValue","callback","thisArg","consumed","fileReaderReady","reader","resolve","reject","readBlobAsArrayBuffer","blob","promise","readBlobAsText","readArrayBufferAsText","buf","view","chars","bufferClone","Body","rejected","decode","methods","normalizeMethod","method","upcased","Request","input","form","bytes","split","parseHeaders","rawHeaders","preProcessedHeaders","parts","Response","bodyInit","redirectStatuses","url","status","error","fetch","init","xhr","abortXhr","ctx","module","resolveHeaders","oHeaders","CrossFetch","CrossFetch.Headers","cleanQuery","buildRequestConfig","params","params_","search","payload","acc","currentQuery","createHttpMethodFetcher","query","fetchOptions","middleware","queryParams","createRequestBody","urlResolved","initResolved","urlNew","initNew","GraphQLClient","requestConfig","rawRequestOptions","crossFetch","requestMiddleware","responseMiddleware","makeRequest","callOrIdentity","requestOptions","batchRequestOptions","queries","fetcher","isBatchingQuery","getResult","successfullyReceivedData","data","successfullyPassedErrorPolicy","rest","errorResult","jsonSerializer","jsonSerializer_","contentType","chunks","chunk","doctype"],"mappings":"0kBAAO,MAAMA,GAAwB,KCAxBC,GAAaC,GAAQA,EAAI,YAAW,EAIpCC,GAAgCC,GAAY,CACrD,MAAMC,EAAI,CAAA,EACV,OAAAD,EAAQ,QAAQ,CAACE,EAAGC,IAAM,CACtBF,EAAEE,CAAC,EAAID,CACf,CAAK,EACMD,CACX,ECVaG,GAAmB,CAACC,EAAmBC,EAAWC,IACpDF,EAAkB,SACnBA,EACA,CACE,SAAUA,EACV,UAAWC,EACX,eAAgBC,EAChB,OAAQ,MACpB,EAEaC,GAAsB,CAACC,EAAgBH,EAAWC,IACpDE,EAAe,MAChBA,EACA,CACE,MAAOA,EACP,UAAWH,EACX,eAAgBC,EAChB,OAAQ,MACpB,EAEaG,GAAwB,CAACC,EAAoBJ,IAC/CI,EAAmB,UACpBA,EACA,CACE,UAAWA,EACX,eAAgBJ,EAChB,OAAQ,MACpB,EAEaK,GAA2B,CAACC,EAAcC,KAAaC,IAA+B,CAC/F,KAAM,CAACT,EAAWC,CAAc,EAAIQ,EACpC,OAAOF,EAAa,SACdA,EACA,CACE,IAAKA,EACL,SAAUC,EACV,UAAAR,EACA,eAAAC,EACA,OAAQ,MACpB,CACA,ECxCO,SAASS,EAAUC,EAAWC,EAAS,CAG5C,GAAI,CAFqB,EAAQD,EAG/B,MAAM,IAAI,MA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ACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,OACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SACF,ECtKaC,GAAQ,OAAO,OAAO,CAAA,CAAE,EAgF9B,SAASC,GAAMC,EAAMC,EAASC,EAAc7I,GAAmB,CACpE,MAAM8I,EAAgB,IAAI,IAE1B,UAAWlJ,KAAQ,OAAO,OAAOW,CAAI,EACnCuI,EAAc,IAAIlJ,EAAMmJ,GAAqBH,EAAShJ,CAAI,CAAC,EAI7D,IAAIoJ,EACAC,EAAU,MAAM,QAAQN,CAAI,EAC5BO,EAAO,CAACP,CAAI,EACZQ,EAAQ,GACRC,EAAQ,CAAA,EACRrK,EAAO4J,EACPrD,EACA+D,EACJ,MAAM3K,EAAO,CAAA,EACP4K,EAAY,CAAA,EAGlB,EAAG,CACDH,IACA,MAAMI,EAAYJ,IAAUD,EAAK,OAC3BM,EAAWD,GAAaH,EAAM,SAAW,EAE/C,GAAIG,EAAW,CAKb,GAJAjE,EAAMgE,EAAU,SAAW,EAAI,OAAY5K,EAAKA,EAAK,OAAS,CAAC,EAC/DK,EAAOsK,EACPA,EAASC,EAAU,MAEfE,EACF,GAAIP,EAAS,CACXlK,EAAOA,EAAK,QACZ,IAAI0K,EAAa,EAEjB,SAAW,CAACC,EAASC,EAAS,IAAKP,EAAO,CACxC,MAAMQ,GAAWF,EAA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A,EAAY,YAAW,EAAG,WAAW,mCAAmC,GACrEF,EAAe,MAAM,MAAMzG,EAAS,KAAM,CAAA,EAG1CA,EAAS,MAExB,EACM6F,GAAkB/V,GACb,OAAOA,GAAU,WAAaA,EAAK,EAAKA,ECtY7CkW,GAAU,CACf,SDqZkB,CAACY,KAAW5X,IACpB4X,EAAO,OAAO,CAAClC,EAAKmC,EAAO3J,IAAU,GAAGwH,CAAG,GAAGmC,CAAK,GAAG3J,KAASlO,EAAY,OAAOA,EAAUkO,CAAK,CAAC,EAAI,EAAE,GAAI,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EC3YzH,ECVaqF,GAAU,CACtB,QAAS,MAAOuE,EAAiBvD,IACd,MAAMtD,GAAQsD,GAAO,WAAYyC,GAAQ,QAAS,CAAE,QAAAc,CAAA,CAAS,CAGjF","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]} \ No newline at end of file diff --git a/graphql_client/package.json b/graphql_client/package.json index 399d08ea..5b8a25e5 100644 --- a/graphql_client/package.json +++ b/graphql_client/package.json @@ -1,8 +1,20 @@ { "name": "@stonecrop/graphql-client", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "graphql_client" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/graphql-client.js", @@ -11,10 +23,11 @@ }, "main": "dist/graphql-client.js", "module": "dist/graphql-client.js", + "umd": "dist/graphql-client.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.ts" + "src/*" ], "scripts": { "build": "vite build", @@ -45,8 +58,10 @@ "vue": "^3.4.23", "vue-router": "^4" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/graphql-client.umd.cjs" + } } diff --git a/node_editor/dist/node-editor.js b/node_editor/dist/node-editor.js deleted file mode 100644 index 479bdf3f..00000000 --- a/node_editor/dist/node-editor.js +++ /dev/null @@ -1,6987 +0,0 @@ -import { defineComponent as fe, toRef as O, ref as ee, computed as q, openBlock as te, createElementBlock as ie, unref as k, normalizeClass as Ke, renderSlot as xe, provide as lt, onMounted as Ve, onBeforeUnmount as jn, watch as ce, h as ue, createBlock as _e, Teleport as bi, getCurrentScope as ia, inject as ut, useSlots as wi, onUnmounted as xi, createVNode as ke, withCtx as Pe, Fragment as Ne, renderList as st, onScopeDispose as Rt, getCurrentInstance as tn, onBeforeMount as _i, nextTick as Re, effectScope as Ei, watchEffect as uo, createElementVNode as de, toDisplayString as ct, createCommentVNode as ge, markRaw as nt, reactive as Si, toRefs as Ni, normalizeStyle as Le, readonly as ki, isRef as Ci, customRef as Mi, resolveDynamicComponent as ra, normalizeProps as Pi, mergeProps as Ht, resolveComponent as la, createTextVNode as ua, withDirectives as sa, withKeys as ca, vModelText as da, withModifiers as Ii } from "vue"; -var so; -const Zn = typeof window < "u", $i = (e) => typeof e < "u", Ti = (e) => typeof e == "boolean", Ye = (e) => typeof e == "function", Be = (e) => typeof e == "number", Ae = (e) => typeof e == "string", Oi = () => { -}; -Zn && (so = window == null ? void 0 : window.navigator) != null && so.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function le(e) { - return typeof e == "function" ? e() : k(e); -} -function Di(e, t) { - function n(...o) { - return new Promise((a, i) => { - Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(a).catch(i); - }); - } - return n; -} -const va = (e) => e(); -function Bi(e = va) { - const t = ee(!0); - function n() { - t.value = !1; - } - function o() { - t.value = !0; - } - const a = (...i) => { - t.value && e(...i); - }; - return { isActive: ki(t), pause: n, resume: o, eventFilter: a }; -} -function co(e, t = !1, n = "Timeout") { - return new Promise((o, a) => { - setTimeout(t ? () => a(n) : o, e); - }); -} -function Ai(e) { - return e; -} -function _n(e, t) { - let n, o, a; - const i = ee(!0), r = () => { - i.value = !0, a(); - }; - ce(e, r, { flush: "sync" }); - const l = Ye(t) ? t : t.get, u = Ye(t) ? void 0 : t.set, s = Mi((c, d) => (o = c, a = d, { - get() { - return i.value && (n = l(), i.value = !1), o(), n; - }, - set(h) { - u == null || u(h); - } - })); - return Object.isExtensible(s) && (s.trigger = r), s; -} -function Ct(e) { - return ia() ? (Rt(e), !0) : !1; -} -function zi(e, t = !0) { - tn() ? Ve(e) : t ? e() : Re(e); -} -function Dn(e, t = !1) { - function n(d, { flush: h = "sync", deep: b = !1, timeout: m, throwOnTimeout: w } = {}) { - let E = null; - const _ = [new Promise((P) => { - E = ce(e, (G) => { - d(G) !== t && (E == null || E(), P(G)); - }, { - flush: h, - deep: b, - immediate: !0 - }); - })]; - return m != null && _.push(co(m, w).then(() => le(e)).finally(() => E == null ? void 0 : E())), Promise.race(_); - } - function o(d, h) { - if (!Ci(d)) - return n((G) => G === d, h); - const { flush: b = "sync", deep: m = !1, timeout: w, throwOnTimeout: E } = h ?? {}; - let _ = null; - const P = [new Promise((G) => { - _ = ce([e, d], ([y, I]) => { - t !== (y === I) && (_ == null || _(), G(y)); - }, { - flush: b, - deep: m, - immediate: !0 - }); - })]; - return w != null && P.push(co(w, E).then(() => le(e)).finally(() => (_ == null || _(), le(e)))), Promise.race(P); - } - function a(d) { - return n((h) => !!h, d); - } - function i(d) { - return o(null, d); - } - function r(d) { - return o(void 0, d); - } - function l(d) { - return n(Number.isNaN, d); - } - function u(d, h) { - return n((b) => { - const m = Array.from(b); - return m.includes(d) || m.includes(le(d)); - }, h); - } - function s(d) { - return c(1, d); - } - function c(d = 1, h) { - let b = -1; - return n(() => (b += 1, b >= d), h); - } - return Array.isArray(le(e)) ? { - toMatch: n, - toContains: u, - changed: s, - changedTimes: c, - get not() { - return Dn(e, !t); - } - } : { - toMatch: n, - toBe: o, - toBeTruthy: a, - toBeNull: i, - toBeNaN: l, - toBeUndefined: r, - changed: s, - changedTimes: c, - get not() { - return Dn(e, !t); - } - }; -} -function be(e) { - return Dn(e); -} -var vo = Object.getOwnPropertySymbols, Ri = Object.prototype.hasOwnProperty, Vi = Object.prototype.propertyIsEnumerable, Li = (e, t) => { - var n = {}; - for (var o in e) - Ri.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]); - if (e != null && vo) - for (var o of vo(e)) - t.indexOf(o) < 0 && Vi.call(e, o) && (n[o] = e[o]); - return n; -}; -function Yi(e, t, n = {}) { - const o = n, { - eventFilter: a = va - } = o, i = Li(o, [ - "eventFilter" - ]); - return ce(e, Di(a, t), i); -} -var Xi = Object.defineProperty, Gi = Object.defineProperties, Hi = Object.getOwnPropertyDescriptors, Ft = Object.getOwnPropertySymbols, ha = Object.prototype.hasOwnProperty, fa = Object.prototype.propertyIsEnumerable, ho = (e, t, n) => t in e ? Xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Fi = (e, t) => { - for (var n in t || (t = {})) - ha.call(t, n) && ho(e, n, t[n]); - if (Ft) - for (var n of Ft(t)) - fa.call(t, n) && ho(e, n, t[n]); - return e; -}, Ui = (e, t) => Gi(e, Hi(t)), ji = (e, t) => { - var n = {}; - for (var o in e) - ha.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]); - if (e != null && Ft) - for (var o of Ft(e)) - t.indexOf(o) < 0 && fa.call(e, o) && (n[o] = e[o]); - return n; -}; -function Je(e, t, n = {}) { - const o = n, { - eventFilter: a - } = o, i = ji(o, [ - "eventFilter" - ]), { eventFilter: r, pause: l, resume: u, isActive: s } = Bi(a); - return { stop: Yi(e, t, Ui(Fi({}, i), { - eventFilter: r - })), pause: l, resume: u, isActive: s }; -} -function ga(e) { - var t; - const n = le(e); - return (t = n == null ? void 0 : n.$el) != null ? t : n; -} -const Kn = Zn ? window : void 0; -function Wn(...e) { - let t, n, o, a; - if (Ae(e[0]) || Array.isArray(e[0]) ? ([n, o, a] = e, t = Kn) : [t, n, o, a] = e, !t) - return Oi; - Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]); - const i = [], r = () => { - i.forEach((c) => c()), i.length = 0; - }, l = (c, d, h, b) => (c.addEventListener(d, h, b), () => c.removeEventListener(d, h, b)), u = ce(() => [ga(t), le(a)], ([c, d]) => { - r(), c && i.push(...n.flatMap((h) => o.map((b) => l(c, h, b, d)))); - }, { immediate: !0, flush: "post" }), s = () => { - u(), r(); - }; - return Ct(s), s; -} -const Zi = (e) => typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0; -function fo(...e) { - let t, n, o = {}; - e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]); - const { target: a = Kn, eventName: i = "keydown", passive: r = !1 } = o, l = Zi(t); - return Wn(a, i, (u) => { - l(u) && n(u); - }, r); -} -function Ki(e, t = !1) { - const n = ee(), o = () => n.value = !!e(); - return o(), zi(o, t), n; -} -function Wi(e) { - return JSON.parse(JSON.stringify(e)); -} -const go = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, po = "__vueuse_ssr_handlers__"; -go[po] = go[po] || {}; -var mo = Object.getOwnPropertySymbols, qi = Object.prototype.hasOwnProperty, Qi = Object.prototype.propertyIsEnumerable, Ji = (e, t) => { - var n = {}; - for (var o in e) - qi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]); - if (e != null && mo) - for (var o of mo(e)) - t.indexOf(o) < 0 && Qi.call(e, o) && (n[o] = e[o]); - return n; -}; -function er(e, t, n = {}) { - const o = n, { window: a = Kn } = o, i = Ji(o, ["window"]); - let r; - const l = Ki(() => a && "ResizeObserver" in a), u = () => { - r && (r.disconnect(), r = void 0); - }, s = ce(() => ga(e), (d) => { - u(), l.value && a && d && (r = new ResizeObserver(t), r.observe(d, i)); - }, { immediate: !0, flush: "post" }), c = () => { - u(), s(); - }; - return Ct(c), { - isSupported: l, - stop: c - }; -} -var yo; -(function(e) { - e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; -})(yo || (yo = {})); -var tr = Object.defineProperty, bo = Object.getOwnPropertySymbols, nr = Object.prototype.hasOwnProperty, or = Object.prototype.propertyIsEnumerable, wo = (e, t, n) => t in e ? tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ar = (e, t) => { - for (var n in t || (t = {})) - nr.call(t, n) && wo(e, n, t[n]); - if (bo) - for (var n of bo(t)) - or.call(t, n) && wo(e, n, t[n]); - return e; -}; -const ir = { - 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] -}; -ar({ - linear: Ai -}, ir); -function wt(e, t, n, o = {}) { - var a, i, r; - const { - clone: l = !1, - passive: u = !1, - eventName: s, - deep: c = !1, - defaultValue: d - } = o, h = tn(), b = n || (h == null ? void 0 : h.emit) || ((a = h == null ? void 0 : h.$emit) == null ? void 0 : a.bind(h)) || ((r = (i = h == null ? void 0 : h.proxy) == null ? void 0 : i.$emit) == null ? void 0 : r.bind(h == null ? void 0 : h.proxy)); - let m = s; - t || (t = "modelValue"), m = s || m || `update:${t.toString()}`; - const w = (_) => l ? Ye(l) ? l(_) : Wi(_) : _, E = () => $i(e[t]) ? w(e[t]) : d; - if (u) { - const _ = E(), P = ee(_); - return ce(() => e[t], (G) => P.value = w(G)), ce(P, (G) => { - (G !== e[t] || c) && b(m, G); - }, { deep: c }), P; - } else - return q({ - get() { - return E(); - }, - set(_) { - b(m, _); - } - }); -} -function H(e = () => { -}) { - const t = ee(/* @__PURE__ */ new Set()); - e && t.value.add(e); - const n = (o) => { - t.value.delete(o); - }; - return { - on: (o) => { - t.value.has(e) && t.value.delete(e), t.value.add(o); - const a = () => n(o); - return Ct(a), { - off: a - }; - }, - off: n, - trigger: (o) => Promise.all(Array.from(t.value).map((a) => a(o))), - fns: t - }; -} -const rr = ["production", "prod"]; -function pa(e, ...t) { - rr.includes(process.env.NODE_ENV || "") || console.warn(`[Vue Flow]: ${e}`, ...t); -} -function lr() { - return { - edgesChange: H(), - nodesChange: H(), - nodeDoubleClick: H(), - nodeClick: H(), - nodeMouseEnter: H(), - nodeMouseMove: H(), - nodeMouseLeave: H(), - nodeContextMenu: H(), - nodeDragStart: H(), - nodeDrag: H(), - nodeDragStop: H(), - nodesInitialized: H(), - miniMapNodeClick: H(), - miniMapNodeDoubleClick: H(), - miniMapNodeMouseEnter: H(), - miniMapNodeMouseMove: H(), - miniMapNodeMouseLeave: H(), - connect: H(), - connectStart: H(), - connectEnd: H(), - clickConnectStart: H(), - clickConnectEnd: H(), - paneReady: H(), - move: H(), - moveStart: H(), - moveEnd: H(), - selectionDragStart: H(), - selectionDrag: H(), - selectionDragStop: H(), - selectionContextMenu: H(), - selectionStart: H(), - selectionEnd: H(), - viewportChangeStart: H(), - viewportChange: H(), - viewportChangeEnd: H(), - paneScroll: H(), - paneClick: H(), - paneContextMenu: H(), - paneMouseEnter: H(), - paneMouseMove: H(), - paneMouseLeave: H(), - edgeContextMenu: H(), - edgeMouseEnter: H(), - edgeMouseMove: H(), - edgeMouseLeave: H(), - edgeDoubleClick: H(), - edgeClick: H(), - edgeUpdateStart: H(), - edgeUpdate: H(), - edgeUpdateEnd: H(), - updateNodeInternals: H(), - error: H((e) => pa(e.message)) - }; -} -function ur(e, t) { - _i(() => { - for (const [n, o] of Object.entries(t.value)) { - const a = (i) => { - e(n, i); - }; - o.on(a), Ct(() => { - o.off(a); - }); - } - }); -} -var pe = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = "MISSING_VIEWPORT_DIMENSIONS", e.NODE_NOT_FOUND = "NODE_NOT_FOUND", e.NODE_MISSING_PARENT = "NODE_MISSING_PARENT", e.NODE_TYPE_MISSING = "NODE_TYPE_MISSING", e.NODE_EXTENT_INVALID = "NODE_EXTENT_INVALID", e.EDGE_INVALID = "EDGE_INVALID", e.EDGE_NOT_FOUND = "EDGE_NOT_FOUND", e.EDGE_SOURCE_MISSING = "EDGE_SOURCE_MISSING", e.EDGE_TARGET_MISSING = "EDGE_TARGET_MISSING", e.EDGE_TYPE_MISSING = "EDGE_TYPE_MISSING", e.EDGE_SOURCE_TARGET_SAME = "EDGE_SOURCE_TARGET_SAME", e.EDGE_SOURCE_TARGET_MISSING = "EDGE_SOURCE_TARGET_MISSING", e.EDGE_ORPHANED = "EDGE_ORPHANED", e))(pe || {}); -const xo = { - MISSING_VIEWPORT_DIMENSIONS: () => "The Vue Flow parent container needs a width and a height to render the graph", - NODE_NOT_FOUND: (e) => `Node not found -Node: ${e}`, - NODE_MISSING_PARENT: (e, t) => `Node is missing a parent -Node: ${e} -Parent: ${t}`, - NODE_TYPE_MISSING: (e) => `Node type is missing -Type: ${e}`, - NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent -Node: ${e}`, - EDGE_INVALID: (e) => `An edge needs a source and a target -Edge: ${e}`, - EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing -Edge: ${e} -Source: ${t}`, - EDGE_TARGET_MISSING: (e, t) => `Edge target is missing -Edge: ${e} -Target: ${t}`, - EDGE_TYPE_MISSING: (e) => `Edge type is missing -Type: ${e}`, - EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same -Edge: ${e} -Source: ${t} -Target: ${n}`, - EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing -Edge: ${e} -Source: ${t} -Target: ${n}`, - EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed -Edge: ${e}`, - EDGE_NOT_FOUND: (e) => `Edge not found -Edge: ${e}` -}; -class me extends Error { - constructor(t, ...n) { - var o; - super((o = xo[t]) == null ? void 0 : o.call(xo, ...n)), this.code = t; - } -} -const qn = () => typeof window < "u" ? window : { chrome: !1 }; -function _o(e) { - return { - ...e.computedPosition || { x: 0, y: 0 }, - width: e.dimensions.width || 0, - height: e.dimensions.height || 0 - }; -} -function Bn(e, t) { - const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y)); - return Math.ceil(n * o); -} -function nn(e) { - return { - width: e.offsetWidth, - height: e.offsetHeight - }; -} -function We(e, t = 0, n = 1) { - return Math.min(Math.max(e, t), n); -} -function ma(e, t) { - return { - x: We(e.x, t[0][0], t[1][0]), - y: We(e.y, t[0][1], t[1][1]) - }; -} -function Eo(e) { - const t = e.getRootNode(), n = qn(); - return "elementFromPoint" in t ? t : n.document; -} -function dt(e) { - return e && "id" in e && "source" in e && "target" in e; -} -function sr(e) { - return dt(e) && "sourceNode" in e && "targetNode" in e; -} -function Vt(e) { - return e && "id" in e && !dt(e); -} -function et(e) { - return Vt(e) && "computedPosition" in e; -} -function cr(e) { - return !!e.width && !!e.height && !!e.x && !!e.y; -} -function dr(e, t = {}) { - let n = t; - return et(e) || (n = { - type: e.type ?? t.type ?? "default", - dimensions: nt({ - width: 0, - height: 0 - }), - handleBounds: { - source: [], - target: [] - }, - computedPosition: nt({ - z: 0, - ...e.position - }), - draggable: void 0, - selectable: void 0, - connectable: void 0, - focusable: void 0, - selected: !1, - dragging: !1, - resizing: !1, - initialized: !1, - ...t, - data: se(e.data) ? e.data : {}, - events: nt(se(e.events) ? e.events : {}) - }), Object.assign({}, n, e, { id: e.id.toString() }); -} -function ya(e, t = {}) { - const n = se(e.events) ? e.events : t.events && se(t.events) ? t.events : {}, o = se(e.data) ? e.data : t.data && se(t.data) ? t.data : {}; - return t = sr(e) ? t : { - ...t, - sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle, - targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle, - type: e.type ?? t.type ?? "default", - source: e.source.toString() || t.source, - target: e.target.toString() || t.target, - updatable: e.updatable ?? t.updatable, - selectable: e.selectable ?? t.selectable, - focusable: e.focusable ?? t.focusable, - data: o, - events: nt(n), - label: (e.label && !Ae(e.label) ? nt(e.label) : e.label) || t.label, - interactionWidth: e.interactionWidth || t.interactionWidth - }, Object.assign({}, t, e, { id: e.id.toString() }); -} -function ba({ source: e, sourceHandle: t, target: n, targetHandle: o }) { - return `vueflow__edge-${e}${t ?? ""}-${n}${o ?? ""}`; -} -function vr(e, t) { - return t.some( - (n) => dt(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle) - ); -} -function hr({ x: e, y: t }, { x: n, y: o, zoom: a }) { - return { - x: e * a + n, - y: t * a + o - }; -} -function wa({ x: e, y: t }, { x: n, y: o, zoom: a }, i, [r, l]) { - const u = { - x: (e - n) / a, - y: (t - o) / a - }; - return i ? { - x: r * Math.round(u.x / r), - y: l * Math.round(u.y / l) - } : u; -} -function fr(e, t) { - return { - x: Math.min(e.x, t.x), - y: Math.min(e.y, t.y), - x2: Math.max(e.x2, t.x2), - y2: Math.max(e.y2, t.y2) - }; -} -function xa({ x: e, y: t, width: n, height: o }) { - return { - x: e, - y: t, - x2: e + n, - y2: t + o - }; -} -function gr({ x: e, y: t, x2: n, y2: o }) { - return { - x: e, - y: t, - width: n - e, - height: o - t - }; -} -function _a(e) { - const t = e.reduce( - (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: a = { width: 0, height: 0 } } = {}) => fr( - n, - xa({ - ...o, - ...a - }) - ), - { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 } - ); - return gr(t); -} -function Ea(e, t, { x: n, y: o, zoom: a } = { x: 0, y: 0, zoom: 1 }, i = !1, r = !1) { - const l = { - x: (t.x - n) / a, - y: (t.y - o) / a, - width: t.width / a, - height: t.height / a - }; - return e.filter((u) => { - const { computedPosition: s = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: d } = u; - if (r && !d) - return !1; - const h = { ...s, width: c.width || 0, height: c.height || 0 }, b = Bn(l, h), m = typeof c.width > "u" || typeof c.height > "u" || c.width === 0 || c.height === 0, w = i && b > 0, E = c.width * c.height; - return m || w || b >= E; - }); -} -function on(e, t) { - const n = e.map((o) => Ae(o) ? o : o.id); - return t.filter((o) => n.includes(o.source) || n.includes(o.target)); -} -function So(e, t, n, o, a, i = 0.1, r = { x: 0, y: 0 }) { - const l = t / (e.width * (1 + i)), u = n / (e.height * (1 + i)), s = Math.min(l, u), c = We(s, o, a), d = e.x + e.width / 2, h = e.y + e.height / 2, b = t / 2 - d * c + (r.x ?? 0), m = n / 2 - h * c + (r.y ?? 0); - return { x: b, y: m, zoom: c }; -} -function pr(e, t) { - return { - x: t.x + e.x, - y: t.y + e.y, - z: (e.z > t.z ? e.z : t.z) + 1 - }; -} -function Sa(e, t) { - if (!e.parentNode) - return !1; - const n = t(e.parentNode); - return n ? n.selected ? !0 : Sa(n, t) : !1; -} -function Ue(e, t) { - return typeof e > "u" ? "" : typeof e == "string" ? e : `${t ? `${t}__` : ""}${Object.keys(e).sort().map((n) => `${n}=${e[n]}`).join("&")}`; -} -function se(e) { - return typeof k(e) < "u"; -} -function mr(e, t, n) { - if (!e.source || !e.target) - return n(new me(pe.EDGE_INVALID, e.id)), !1; - let o; - return dt(e) ? o = e : o = { - ...e, - id: ba(e) - }, o = ya(o), vr(o, t) ? !1 : o; -} -function yr(e, t, n, o, a, i) { - if (!t.source || !t.target) - return i(new me(pe.EDGE_INVALID, e.id)), !1; - const r = o(e.id); - if (!r) - return i(new me(pe.EDGE_NOT_FOUND, e.id)), !1; - const { id: l, ...u } = e, s = { - ...u, - id: a ? ba(t) : l, - source: t.source, - target: t.target, - sourceHandle: t.sourceHandle, - targetHandle: t.targetHandle - }; - return n.splice(n.indexOf(r), 1, s), s; -} -function No(e, t, n, o) { - const a = {}, i = e.map((l) => { - const u = dr(l, { - ...n(l.id), - parentNode: l.parentNode - }); - return l.parentNode && (a[l.parentNode] = !0), u; - }), r = [...i, ...t]; - return i.forEach((l) => { - const u = r.find((s) => s.id === l.parentNode); - l.parentNode && !u && o(new me(pe.NODE_MISSING_PARENT, l.id, l.parentNode)), (l.parentNode || a[l.id]) && (a[l.id] && (l.isParent = !0), u && (u.isParent = !0)); - }), i; -} -var Z = /* @__PURE__ */ ((e) => (e.Left = "left", e.Top = "top", e.Right = "right", e.Bottom = "bottom", e))(Z || {}), Qn = /* @__PURE__ */ ((e) => (e.Partial = "partial", e.Full = "full", e))(Qn || {}), Fe = /* @__PURE__ */ ((e) => (e.Bezier = "default", e.SimpleBezier = "simple-bezier", e.Straight = "straight", e.Step = "step", e.SmoothStep = "smoothstep", e))(Fe || {}), qe = /* @__PURE__ */ ((e) => (e.Strict = "strict", e.Loose = "loose", e))(qe || {}), An = /* @__PURE__ */ ((e) => (e.Arrow = "arrow", e.ArrowClosed = "arrowclosed", e))(An || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = "free", e.Vertical = "vertical", e.Horizontal = "horizontal", e))(Ut || {}); -const ko = Symbol("vueFlow"), Na = Symbol("nodeId"), ka = Symbol("nodeRef"), br = Symbol("edgeId"), wr = Symbol("edgeRef"), an = Symbol("slots"); -function xr(e) { - const t = e ?? ut(Na, ""), n = ut(ka, null), { findNode: o, edges: a, emits: i } = ve(), r = o(t); - return r || i.error(new me(pe.NODE_NOT_FOUND, t)), { - id: t, - nodeEl: n, - node: r, - parentNode: q(() => o(r.parentNode)), - connectedEdges: q(() => on([r], a.value)) - }; -} -function Jn(e) { - return "clientX" in e; -} -function ot(e, t) { - var n, o; - const a = Jn(e), i = a ? e.clientX : (n = e.touches) == null ? void 0 : n[0].clientX, r = a ? e.clientY : (o = e.touches) == null ? void 0 : o[0].clientY; - return { - x: i - ((t == null ? void 0 : t.left) ?? 0), - y: r - ((t == null ? void 0 : t.top) ?? 0) - }; -} -function jt(e, t, n) { - const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, a = ((n == null ? void 0 : n.y) ?? 0) + t.y, i = (n == null ? void 0 : n.width) ?? t.width, r = (n == null ? void 0 : n.height) ?? t.height; - switch (e) { - case Z.Top: - return { - x: o + i / 2, - y: a - }; - case Z.Right: - return { - x: o + i, - y: a + r / 2 - }; - case Z.Bottom: - return { - x: o + i / 2, - y: a + r - }; - case Z.Left: - return { - x: o, - y: a + r / 2 - }; - } -} -function Co(e = [], t) { - return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null; -} -function _r(e, t, n, o, a, i) { - const r = jt( - n, - { - ...e.dimensions, - ...e.computedPosition - }, - t - ), l = jt( - i, - { - ...o.dimensions, - ...o.computedPosition - }, - a - ); - return { - sourceX: r.x, - sourceY: r.y, - targetX: l.x, - targetY: l.y - }; -} -function Er({ - sourcePos: e, - targetPos: t, - sourceWidth: n, - sourceHeight: o, - targetWidth: a, - targetHeight: i, - width: r, - height: l, - viewport: u -}) { - const s = { - x: Math.min(e.x, t.x), - y: Math.min(e.y, t.y), - x2: Math.max(e.x + n, t.x + a), - y2: Math.max(e.y + o, t.y + i) - }; - s.x === s.x2 && (s.x2 += 1), s.y === s.y2 && (s.y2 += 1); - const c = xa({ - x: (0 - u.x) / u.zoom, - y: (0 - u.y) / u.zoom, - width: r / u.zoom, - height: l / u.zoom - }), d = Math.max(0, Math.min(c.x2, s.x2) - Math.max(c.x, s.x)), h = Math.max(0, Math.min(c.y2, s.y2) - Math.max(c.y, s.y)); - return Math.ceil(d * h) > 0; -} -function Sr(e, t, n = !1) { - let o = -1; - const a = e.reduce((i, r) => { - const l = Be(r.zIndex); - let u = l ? r.zIndex : 0; - const s = t(r.source), c = t(r.target); - return !s || !c || (n && (u = l ? r.zIndex : Math.max(s.computedPosition.z || 0, c.computedPosition.z || 0)), i[u] ? i[u].push(r) : i[u] = [r], o = u > o ? u : o), i; - }, {}); - return Object.entries(Object.keys(a).length ? a : { 0: [] }).map(([i, r]) => { - const l = +i; - return { - edges: r, - level: l, - isMaxLevel: l === o - }; - }); -} -function En(e) { - e == null || e.classList.remove("valid", "connecting", "vue-flow__handle-valid", "vue-flow__handle-connecting"); -} -function Mo(e, t, n, o) { - return (t[n] || []).reduce((a, i) => (`${e.id}-${i.id}-${n}` !== o && a.push({ - id: i.id || null, - type: n, - nodeId: e.id, - ...jt( - i.position, - { - ...e.dimensions, - ...e.computedPosition - }, - i - ) - }), a), []); -} -function Nr(e, t, n) { - let o = null, a = 1 / 0; - return n.forEach((i) => { - const r = Math.sqrt((i.x - e.x) ** 2 + (i.y - e.y) ** 2); - r <= t && r < a && (a = r, o = i); - }), o; -} -function Po(e, t, n, o, a, i, r, l, u, s) { - const c = i === "target", d = l.querySelector(`.vue-flow__handle[data-id="${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}"]`), { x: h, y: b } = ot(e), m = l.elementFromPoint(h, b), w = m != null && m.classList.contains("vue-flow__handle") ? m : d, E = { - handleDomNode: w, - isValid: !1, - connection: { source: "", target: "", sourceHandle: null, targetHandle: null }, - endHandle: null - }; - if (w) { - const _ = Ca(void 0, w), P = w.getAttribute("data-nodeid"), G = w.getAttribute("data-handleid"), y = w.classList.contains("connectable"), I = w.classList.contains("connectableend"), z = { - source: c ? P : o, - sourceHandle: c ? G : a, - target: c ? o : P, - targetHandle: c ? a : G - }; - E.connection = z, y && I && (n === qe.Strict ? c && _ === "source" || !c && _ === "target" : P !== o || G !== a) && (E.endHandle = { - nodeId: P, - handleId: G, - type: _ - }, E.isValid = r(z, { - edges: u, - sourceNode: s(z.source), - targetNode: s(z.target) - })); - } - return E; -} -function kr({ nodes: e, nodeId: t, handleId: n, handleType: o }) { - return e.reduce((a, i) => { - const { handleBounds: r } = i; - let l = [], u = []; - return r && (l = Mo(i, r, "source", `${t}-${n}-${o}`), u = Mo(i, r, "target", `${t}-${n}-${o}`)), a.push(...l, ...u), a; - }, []); -} -function Ca(e, t) { - return e || (t != null && t.classList.contains("target") ? "target" : t != null && t.classList.contains("source") ? "source" : null); -} -function Cr(e, t) { - let n = null; - return t ? n = "valid" : e && !t && (n = "invalid"), n; -} -function Io(e, t, n) { - return e < t ? We(Math.abs(e - t), 1, 50) / 50 : e > n ? -We(Math.abs(e - n), 1, 50) / 50 : 0; -} -function Ma(e, t) { - const n = Io(e.x, 35, t.width - 35) * 20, o = Io(e.y, 35, t.height - 35) * 20; - return [n, o]; -} -function $t() { - return !0; -} -function Pa({ - handleId: e, - nodeId: t, - type: n, - isValidConnection: o, - edgeUpdaterType: a, - onEdgeUpdate: i, - onEdgeUpdateEnd: r -}) { - const l = q(() => le(n) === "target"), { - vueFlowRef: u, - connectionMode: s, - connectionRadius: c, - connectOnClick: d, - connectionClickStartHandle: h, - nodesConnectable: b, - autoPanOnConnect: m, - findNode: w, - panBy: E, - getNodes: _, - startConnection: P, - updateConnection: G, - endConnection: y, - emits: I, - viewport: z, - edges: f, - isValidConnection: x - } = ve(); - let N = null, C = !1, T = null; - function J(p) { - var R; - const S = Jn(p), B = Eo(p.target); - if (S && p.button === 0 || !S) { - let F = function(Q) { - D = ot(Q, g), V = Nr( - wa(D, z.value, !1, [1, 1]), - c.value, - Y - ), L || (W(), L = !0); - const oe = Po( - Q, - V, - s.value, - le(t), - le(e), - l.value ? "target" : "source", - U, - B, - f.value, - w - ); - if (N = oe.connection, C = oe.isValid, T = oe.handleDomNode, G( - V && C ? hr( - { - x: V.x, - y: V.y - }, - z.value - ) : D, - oe.endHandle, - Cr(!!V, C) - ), !V && !C && !T) - return En($); - N && N.source !== N.target && T && (En($), $ = T, T.classList.add("connecting", "vue-flow__handle-connecting"), T.classList.toggle("valid", C), T.classList.toggle("vue-flow__handle-valid", C)); - }, j = function(Q) { - (V || T) && N && C && (i ? i(Q, N) : I.connect(N)), I.connectEnd(Q), a && (r == null || r(Q)), En($), cancelAnimationFrame(K), y(Q), L = !1, C = !1, N = null, T = null, B.removeEventListener("mousemove", F), B.removeEventListener("mouseup", j), B.removeEventListener("touchmove", F), B.removeEventListener("touchend", j); - }; - const A = w(le(t)); - let U = o || x.value || $t; - !U && A && (U = (l ? A.isValidSourcePos : A.isValidTargetPos) || $t); - let V, K = 0; - const { x: ne, y: re } = ot(p), M = B == null ? void 0 : B.elementFromPoint(ne, re), v = Ca(le(a), M), g = (R = u.value) == null ? void 0 : R.getBoundingClientRect(); - if (!g || !v) - return; - let $, D = ot(p, g), L = !1; - const Y = kr({ - nodes: _.value, - nodeId: le(t), - handleId: le(e), - handleType: v - }), W = () => { - if (!m) - return; - const [Q, oe] = Ma(D, g); - E({ x: Q, y: oe }), K = requestAnimationFrame(W); - }; - P( - { - nodeId: le(t), - handleId: le(e), - type: v - }, - { - x: ne - g.left, - y: re - g.top - }, - p - ), I.connectStart({ event: p, nodeId: le(t), handleId: le(e), handleType: v }), B.addEventListener("mousemove", F), B.addEventListener("mouseup", j), B.addEventListener("touchmove", F), B.addEventListener("touchend", j); - } - } - function ae(p) { - if (d.value) - if (!h.value) - I.clickConnectStart({ event: p, nodeId: le(t), handleId: le(e) }), P( - { nodeId: le(t), type: le(n), handleId: le(e) }, - void 0, - p, - !0 - ); - else { - let R = o || x.value || $t; - const S = w(le(t)); - if (!R && S && (R = (l ? S.isValidSourcePos : S.isValidTargetPos) || $t), S && (typeof S.connectable > "u" ? b.value : S.connectable) === !1) - return; - const B = Eo(p.target), { connection: F, isValid: j } = Po( - p, - { - nodeId: le(t), - id: le(e), - type: le(n) - }, - s.value, - h.value.nodeId, - h.value.handleId || null, - h.value.type, - R, - B, - f.value, - w - ), A = F.source === F.target; - j && !A && I.connect(F), I.clickConnectEnd(p), y(p, !0); - } - } - return { - handlePointerDown: J, - handleClick: ae - }; -} -function Mr(e, t) { - const n = {}; - for (const o in e) - t.includes(o) || Object.defineProperty(n, o, { - enumerable: !0, - get: () => e[o] - }); - return n; -} -const Pr = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], Ir = { - name: "Handle", - compatConfig: { MODE: 3 } -}, vt = /* @__PURE__ */ fe({ - ...Ir, - props: { - id: null, - type: null, - position: { default: Z.Top }, - isValidConnection: { type: Function }, - connectable: { type: [Boolean, String, Function], default: void 0 }, - connectableStart: { type: Boolean, default: !0 }, - connectableEnd: { type: Boolean, default: !0 } - }, - setup(e) { - const t = Mr(e, ["position", "connectable", "connectableStart", "connectableEnd", "id", "isValidConnection"]), n = O(t, "type", "source"), { - connectionStartHandle: o, - connectionClickStartHandle: a, - connectionEndHandle: i, - vueFlowRef: r, - nodesConnectable: l, - noDragClassName: u, - noPanClassName: s - } = ve(), { id: c, node: d, nodeEl: h, connectedEdges: b } = xr(), m = ee(), w = q(() => e.id ?? `${c}__handle-${e.position}`), E = q(() => typeof e.connectableStart < "u" ? e.connectableStart : !0), _ = q(() => typeof e.connectableEnd < "u" ? e.connectableEnd : !0), { handlePointerDown: P, handleClick: G } = Pa({ - nodeId: c, - handleId: w, - isValidConnection: e.isValidConnection, - type: n - }), y = q(() => Ae(e.connectable) && e.connectable === "single" ? !b.value.some((N) => { - const C = N[`${n.value}Handle`]; - return N[n.value] !== c ? !1 : C ? C === w.value : !0; - }) : Ye(e.connectable) ? e.connectable(d, b.value) : se(e.connectable) ? e.connectable : l.value), I = q( - () => { - var N, C, T, J, ae, p; - return ((N = o.value) == null ? void 0 : N.nodeId) === c && ((C = o.value) == null ? void 0 : C.handleId) === w.value && ((T = o.value) == null ? void 0 : T.type) === n.value || ((J = i.value) == null ? void 0 : J.nodeId) === c && ((ae = i.value) == null ? void 0 : ae.handleId) === w.value && ((p = i.value) == null ? void 0 : p.type) === n.value; - } - ), z = q( - () => { - var N, C, T; - return ((N = a.value) == null ? void 0 : N.nodeId) === c && ((C = a.value) == null ? void 0 : C.handleId) === w.value && ((T = a.value) == null ? void 0 : T.type) === n.value; - } - ); - be(() => d.initialized).toBe(!0, { flush: "post" }).then(() => { - var N; - const C = (N = d.handleBounds[n.value]) == null ? void 0 : N.find((B) => B.id === w.value); - if (!r.value || C) - return; - const T = r.value.querySelector(".vue-flow__transformationpane"); - if (!h || !m.value || !T || !w.value) - return; - const J = h.value.getBoundingClientRect(), ae = m.value.getBoundingClientRect(), p = window.getComputedStyle(T), { m22: R } = new window.DOMMatrixReadOnly(p.transform), S = { - id: w.value, - position: e.position, - x: (ae.left - J.left) / R, - y: (ae.top - J.top) / R, - ...nn(m.value) - }; - d.handleBounds[n.value] = [...d.handleBounds[n.value] ?? [], S]; - }); - function f(N) { - const C = Jn(N); - y.value && E.value && (C && N.button === 0 || !C) && P(N); - } - function x(N) { - !c || !a.value && !E.value || y.value && G(N); - } - return (N, C) => (te(), ie("div", { - ref_key: "handle", - ref: m, - "data-id": `${k(c)}-${k(w)}-${k(n)}`, - "data-handleid": k(w), - "data-nodeid": k(c), - "data-handlepos": e.position, - class: Ke(["vue-flow__handle", [ - `vue-flow__handle-${e.position}`, - `vue-flow__handle-${k(w)}`, - k(u), - k(s), - k(n), - { - connectable: k(y), - connecting: k(z), - connectablestart: k(E), - connectableend: k(_), - connectionindicator: k(y) && (k(E) && !k(I) || k(_) && k(I)) - } - ]]), - onMousedown: f, - onTouchstartPassive: f, - onClick: x - }, [ - xe(N.$slots, "default", { id: e.id }) - ], 42, Pr)); - } -}), rn = function({ - sourcePosition: e = Z.Bottom, - targetPosition: t = Z.Top, - label: n, - connectable: o = !0, - isValidTargetPos: a, - isValidSourcePos: i -}) { - return [ - ue(vt, { type: "target", position: t, connectable: o, isValidConnection: a }), - typeof n != "string" && n ? ue(n) : ue("div", { innerHTML: n }), - ue(vt, { type: "source", position: e, connectable: o, isValidConnection: i }) - ]; -}; -rn.props = ["sourcePosition", "targetPosition", "label", "isValidTargetPos", "isValidSourcePos", "connectable"]; -rn.inheritAttrs = !1; -rn.compatConfig = { MODE: 3 }; -const $r = rn, ln = function({ - sourcePosition: e = Z.Bottom, - label: t, - connectable: n = !0, - isValidSourcePos: o -}) { - return [ - typeof t != "string" && t ? ue(t) : ue("div", { innerHTML: t }), - ue(vt, { type: "source", position: e, connectable: n, isValidConnection: o }) - ]; -}; -ln.props = ["sourcePosition", "label", "isValidSourcePos", "connectable"]; -ln.inheritAttrs = !1; -ln.compatConfig = { MODE: 3 }; -const Tr = ln, un = function({ - targetPosition: e = Z.Top, - label: t, - connectable: n = !0, - isValidTargetPos: o -}) { - return [ - ue(vt, { type: "target", position: e, connectable: n, isValidConnection: o }), - typeof t != "string" && t ? ue(t) : ue("div", { innerHTML: t }) - ]; -}; -un.props = ["targetPosition", "label", "isValidTargetPos", "connectable"]; -un.inheritAttrs = !1; -un.compatConfig = { MODE: 3 }; -const Or = un; -function $o(e, t, n) { - let o = e; - do { - if (o && o.matches(t)) - return !0; - if (o === n) - return !1; - o = o.parentElement; - } while (o); - return !1; -} -function Dr(e, t, n, o, a) { - return e.filter( - (i) => (i.selected || i.id === a) && (!i.parentNode || !Sa(i, o)) && (i.draggable || t && typeof i.draggable > "u") - ).map( - (i) => { - var r, l; - return nt({ - id: i.id, - position: i.position || { x: 0, y: 0 }, - distance: { - x: n.x - ((r = i.computedPosition) == null ? void 0 : r.x) || 0, - y: n.y - ((l = i.computedPosition) == null ? void 0 : l.y) || 0 - }, - from: i.computedPosition, - extent: i.extent, - parentNode: i.parentNode, - dimensions: i.dimensions - }); - } - ); -} -function Sn({ - id: e, - dragItems: t, - findNode: n -}) { - const o = t.reduce((a, i) => { - const r = n(i.id); - return r && a.push(r), a; - }, []); - return [e ? o.find((a) => a.id === e) : o[0], o]; -} -function Ia(e) { - if (Array.isArray(e)) - switch (e.length) { - case 1: - return [e[0], e[0], e[0], e[0]]; - case 2: - return [e[0], e[1], e[0], e[1]]; - case 3: - return [e[0], e[1], e[2], e[1]]; - case 4: - return e; - default: - return [0, 0, 0, 0]; - } - return [e, e, e, e]; -} -function Br(e, t, n) { - const [o, a, i, r] = typeof e != "string" ? Ia(e.padding) : [0, 0, 0, 0]; - return n && Be(n.computedPosition.x) && Be(n.computedPosition.y) && Be(n.dimensions.width) && Be(n.dimensions.height) ? [ - [n.computedPosition.x + r, n.computedPosition.y + o], - [ - n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - a, - n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - i - ] - ] : !1; -} -function Ar(e, t, n, o) { - let a = e.extent || n; - if (a === "parent" || !Array.isArray(a) && (a == null ? void 0 : a.range) === "parent") - if (e.parentNode && o && e.dimensions.width && e.dimensions.height) { - const i = Br(a, e, o); - i && (a = i); - } else - t(new me(pe.NODE_EXTENT_INVALID, e.id)), a = n; - else if (Array.isArray(a)) { - const i = (o == null ? void 0 : o.computedPosition.x) || 0, r = (o == null ? void 0 : o.computedPosition.y) || 0; - a = [ - [a[0][0] + i, a[0][1] + r], - [a[1][0] + i, a[1][1] + r] - ]; - } else if (a != null && a.range && Array.isArray(a.range)) { - const [i, r, l, u] = Ia(a.padding), s = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0; - a = [ - [a.range[0][0] + s + u, a.range[0][1] + c + i], - [a.range[1][0] + s - r, a.range[1][1] + c - l] - ]; - } - return a; -} -function eo(e, t, n, o, a) { - const i = Ar(e, n, o, a), r = ma(t, i); - return { - position: { - x: r.x - ((a == null ? void 0 : a.computedPosition.x) || 0), - y: r.y - ((a == null ? void 0 : a.computedPosition.y) || 0) - }, - computedPosition: r - }; -} -function $a() { - const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: a, snapToGrid: i, nodesDraggable: r, emits: l } = ve(); - return (u, s = !1) => { - const c = i.value ? a.value[0] : 5, d = i.value ? a.value[1] : 5, h = s ? 4 : 1, b = u.x * c * h, m = u.y * d * h, w = e.value.filter((E) => E.draggable || r && typeof E.draggable > "u").map((E) => { - const _ = { x: E.computedPosition.x + b, y: E.computedPosition.y + m }, { computedPosition: P } = eo( - E, - _, - l.error, - t.value, - E.parentNode ? o(E.parentNode) : void 0 - ); - return { - id: E.id, - position: P, - from: E.position, - distance: { x: u.x, y: u.y }, - dimensions: E.dimensions - }; - }); - n(w, !0, !1); - }; -} -function zr() { - return { - doubleClick: H(), - click: H(), - mouseEnter: H(), - mouseMove: H(), - mouseLeave: H(), - contextMenu: H(), - dragStart: H(), - drag: H(), - dragStop: H() - }; -} -function Rr(e, t) { - const n = zr(); - return n.doubleClick.on((o) => { - var a, i; - t.nodeDoubleClick(o), (i = (a = e.events) == null ? void 0 : a.doubleClick) == null || i.call(a, o); - }), n.click.on((o) => { - var a, i; - t.nodeClick(o), (i = (a = e.events) == null ? void 0 : a.click) == null || i.call(a, o); - }), n.mouseEnter.on((o) => { - var a, i; - t.nodeMouseEnter(o), (i = (a = e.events) == null ? void 0 : a.mouseEnter) == null || i.call(a, o); - }), n.mouseMove.on((o) => { - var a, i; - t.nodeMouseMove(o), (i = (a = e.events) == null ? void 0 : a.mouseMove) == null || i.call(a, o); - }), n.mouseLeave.on((o) => { - var a, i; - t.nodeMouseLeave(o), (i = (a = e.events) == null ? void 0 : a.mouseLeave) == null || i.call(a, o); - }), n.contextMenu.on((o) => { - var a, i; - t.nodeContextMenu(o), (i = (a = e.events) == null ? void 0 : a.contextMenu) == null || i.call(a, o); - }), n.dragStart.on((o) => { - var a, i; - t.nodeDragStart(o), (i = (a = e.events) == null ? void 0 : a.dragStart) == null || i.call(a, o); - }), n.drag.on((o) => { - var a, i; - t.nodeDrag(o), (i = (a = e.events) == null ? void 0 : a.drag) == null || i.call(a, o); - }), n.dragStop.on((o) => { - var a, i; - t.nodeDragStop(o), (i = (a = e.events) == null ? void 0 : a.dragStop) == null || i.call(a, o); - }), Object.entries(n).reduce( - (o, [a, i]) => (o.emit[a] = i.trigger, o.on[a] = i.on, o), - { emit: {}, on: {} } - ); -} -function Vr() { - const { viewport: e, snapGrid: t, snapToGrid: n } = ve(); - return ({ sourceEvent: o }) => { - const a = o.touches ? o.touches[0].clientX : o.clientX, i = o.touches ? o.touches[0].clientY : o.clientY, r = { - x: (a - e.value.x) / e.value.zoom, - y: (i - e.value.y) / e.value.zoom - }; - return { - xSnapped: n.value ? t.value[0] * Math.round(r.x / t.value[0]) : r.x, - ySnapped: n.value ? t.value[1] * Math.round(r.y / t.value[1]) : r.y, - ...r - }; - }; -} -function To(e, t, n) { - const o = t.querySelectorAll(`.vue-flow__handle${e}`); - if (!o || !o.length) - return; - const a = Array.from(o), i = t.getBoundingClientRect(); - return a.map((r) => { - const l = r.getBoundingClientRect(); - return { - id: r.getAttribute("data-handleid"), - position: r.getAttribute("data-handlepos"), - x: (l.left - i.left) / n, - y: (l.top - i.top) / n, - ...nn(r) - }; - }); -} -function zn(e, t, n, o, a, i = !1, r) { - a.value = !1, e.selected ? (i || e.selected && t) && (o([e]), Re(r.blur)) : n([e]); -} -var Lr = { value: () => { -} }; -function sn() { - for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) { - if (!(o = arguments[e] + "") || o in n || /[\s.]/.test(o)) - throw new Error("illegal type: " + o); - n[o] = []; - } - return new Lt(n); -} -function Lt(e) { - this._ = e; -} -function Yr(e, t) { - return e.trim().split(/^|\s+/).map(function(n) { - var o = "", a = n.indexOf("."); - if (a >= 0 && (o = n.slice(a + 1), n = n.slice(0, a)), n && !t.hasOwnProperty(n)) - throw new Error("unknown type: " + n); - return { type: n, name: o }; - }); -} -Lt.prototype = sn.prototype = { - constructor: Lt, - on: function(e, t) { - var n = this._, o = Yr(e + "", n), a, i = -1, r = o.length; - if (arguments.length < 2) { - for (; ++i < r; ) - if ((a = (e = o[i]).type) && (a = Xr(n[a], e.name))) - return a; - return; - } - if (t != null && typeof t != "function") - throw new Error("invalid callback: " + t); - for (; ++i < r; ) - if (a = (e = o[i]).type) - n[a] = Oo(n[a], e.name, t); - else if (t == null) - for (a in n) - n[a] = Oo(n[a], e.name, null); - return this; - }, - copy: function() { - var e = {}, t = this._; - for (var n in t) - e[n] = t[n].slice(); - return new Lt(e); - }, - call: function(e, t) { - if ((a = arguments.length - 2) > 0) - for (var n = new Array(a), o = 0, a, i; o < a; ++o) - n[o] = arguments[o + 2]; - if (!this._.hasOwnProperty(e)) - throw new Error("unknown type: " + e); - for (i = this._[e], o = 0, a = i.length; o < a; ++o) - i[o].value.apply(t, n); - }, - apply: function(e, t, n) { - if (!this._.hasOwnProperty(e)) - throw new Error("unknown type: " + e); - for (var o = this._[e], a = 0, i = o.length; a < i; ++a) - o[a].value.apply(t, n); - } -}; -function Xr(e, t) { - for (var n = 0, o = e.length, a; n < o; ++n) - if ((a = e[n]).name === t) - return a.value; -} -function Oo(e, t, n) { - for (var o = 0, a = e.length; o < a; ++o) - if (e[o].name === t) { - e[o] = Lr, e = e.slice(0, o).concat(e.slice(o + 1)); - break; - } - return n != null && e.push({ name: t, value: n }), e; -} -var Rn = "http://www.w3.org/1999/xhtml"; -const Do = { - svg: "http://www.w3.org/2000/svg", - xhtml: Rn, - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" -}; -function cn(e) { - var t = e += "", n = t.indexOf(":"); - return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Do.hasOwnProperty(t) ? { space: Do[t], local: e } : e; -} -function Gr(e) { - return function() { - var t = this.ownerDocument, n = this.namespaceURI; - return n === Rn && t.documentElement.namespaceURI === Rn ? t.createElement(e) : t.createElementNS(n, e); - }; -} -function Hr(e) { - return function() { - return this.ownerDocument.createElementNS(e.space, e.local); - }; -} -function Ta(e) { - var t = cn(e); - return (t.local ? Hr : Gr)(t); -} -function Fr() { -} -function to(e) { - return e == null ? Fr : function() { - return this.querySelector(e); - }; -} -function Ur(e) { - typeof e != "function" && (e = to(e)); - for (var t = this._groups, n = t.length, o = new Array(n), a = 0; a < n; ++a) - for (var i = t[a], r = i.length, l = o[a] = new Array(r), u, s, c = 0; c < r; ++c) - (u = i[c]) && (s = e.call(u, u.__data__, c, i)) && ("__data__" in u && (s.__data__ = u.__data__), l[c] = s); - return new we(o, this._parents); -} -function jr(e) { - return e == null ? [] : Array.isArray(e) ? e : Array.from(e); -} -function Zr() { - return []; -} -function Oa(e) { - return e == null ? Zr : function() { - return this.querySelectorAll(e); - }; -} -function Kr(e) { - return function() { - return jr(e.apply(this, arguments)); - }; -} -function Wr(e) { - typeof e == "function" ? e = Kr(e) : e = Oa(e); - for (var t = this._groups, n = t.length, o = [], a = [], i = 0; i < n; ++i) - for (var r = t[i], l = r.length, u, s = 0; s < l; ++s) - (u = r[s]) && (o.push(e.call(u, u.__data__, s, r)), a.push(u)); - return new we(o, a); -} -function Da(e) { - return function() { - return this.matches(e); - }; -} -function Ba(e) { - return function(t) { - return t.matches(e); - }; -} -var qr = Array.prototype.find; -function Qr(e) { - return function() { - return qr.call(this.children, e); - }; -} -function Jr() { - return this.firstElementChild; -} -function el(e) { - return this.select(e == null ? Jr : Qr(typeof e == "function" ? e : Ba(e))); -} -var tl = Array.prototype.filter; -function nl() { - return Array.from(this.children); -} -function ol(e) { - return function() { - return tl.call(this.children, e); - }; -} -function al(e) { - return this.selectAll(e == null ? nl : ol(typeof e == "function" ? e : Ba(e))); -} -function il(e) { - typeof e != "function" && (e = Da(e)); - for (var t = this._groups, n = t.length, o = new Array(n), a = 0; a < n; ++a) - for (var i = t[a], r = i.length, l = o[a] = [], u, s = 0; s < r; ++s) - (u = i[s]) && e.call(u, u.__data__, s, i) && l.push(u); - return new we(o, this._parents); -} -function Aa(e) { - return new Array(e.length); -} -function rl() { - return new we(this._enter || this._groups.map(Aa), this._parents); -} -function Zt(e, t) { - this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t; -} -Zt.prototype = { - constructor: Zt, - appendChild: function(e) { - return this._parent.insertBefore(e, this._next); - }, - insertBefore: function(e, t) { - return this._parent.insertBefore(e, t); - }, - querySelector: function(e) { - return this._parent.querySelector(e); - }, - querySelectorAll: function(e) { - return this._parent.querySelectorAll(e); - } -}; -function ll(e) { - return function() { - return e; - }; -} -function ul(e, t, n, o, a, i) { - for (var r = 0, l, u = t.length, s = i.length; r < s; ++r) - (l = t[r]) ? (l.__data__ = i[r], o[r] = l) : n[r] = new Zt(e, i[r]); - for (; r < u; ++r) - (l = t[r]) && (a[r] = l); -} -function sl(e, t, n, o, a, i, r) { - var l, u, s = /* @__PURE__ */ new Map(), c = t.length, d = i.length, h = new Array(c), b; - for (l = 0; l < c; ++l) - (u = t[l]) && (h[l] = b = r.call(u, u.__data__, l, t) + "", s.has(b) ? a[l] = u : s.set(b, u)); - for (l = 0; l < d; ++l) - b = r.call(e, i[l], l, i) + "", (u = s.get(b)) ? (o[l] = u, u.__data__ = i[l], s.delete(b)) : n[l] = new Zt(e, i[l]); - for (l = 0; l < c; ++l) - (u = t[l]) && s.get(h[l]) === u && (a[l] = u); -} -function cl(e) { - return e.__data__; -} -function dl(e, t) { - if (!arguments.length) - return Array.from(this, cl); - var n = t ? sl : ul, o = this._parents, a = this._groups; - typeof e != "function" && (e = ll(e)); - for (var i = a.length, r = new Array(i), l = new Array(i), u = new Array(i), s = 0; s < i; ++s) { - var c = o[s], d = a[s], h = d.length, b = vl(e.call(c, c && c.__data__, s, o)), m = b.length, w = l[s] = new Array(m), E = r[s] = new Array(m), _ = u[s] = new Array(h); - n(c, d, w, E, _, b, t); - for (var P = 0, G = 0, y, I; P < m; ++P) - if (y = w[P]) { - for (P >= G && (G = P + 1); !(I = E[G]) && ++G < m; ) - ; - y._next = I || null; - } - } - return r = new we(r, o), r._enter = l, r._exit = u, r; -} -function vl(e) { - return typeof e == "object" && "length" in e ? e : Array.from(e); -} -function hl() { - return new we(this._exit || this._groups.map(Aa), this._parents); -} -function fl(e, t, n) { - var o = this.enter(), a = this, i = this.exit(); - return typeof e == "function" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + ""), t != null && (a = t(a), a && (a = a.selection())), n == null ? i.remove() : n(i), o && a ? o.merge(a).order() : a; -} -function gl(e) { - for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, a = n.length, i = o.length, r = Math.min(a, i), l = new Array(a), u = 0; u < r; ++u) - for (var s = n[u], c = o[u], d = s.length, h = l[u] = new Array(d), b, m = 0; m < d; ++m) - (b = s[m] || c[m]) && (h[m] = b); - for (; u < a; ++u) - l[u] = n[u]; - return new we(l, this._parents); -} -function pl() { - for (var e = this._groups, t = -1, n = e.length; ++t < n; ) - for (var o = e[t], a = o.length - 1, i = o[a], r; --a >= 0; ) - (r = o[a]) && (i && r.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(r, i), i = r); - return this; -} -function ml(e) { - e || (e = yl); - function t(d, h) { - return d && h ? e(d.__data__, h.__data__) : !d - !h; - } - for (var n = this._groups, o = n.length, a = new Array(o), i = 0; i < o; ++i) { - for (var r = n[i], l = r.length, u = a[i] = new Array(l), s, c = 0; c < l; ++c) - (s = r[c]) && (u[c] = s); - u.sort(t); - } - return new we(a, this._parents).order(); -} -function yl(e, t) { - return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN; -} -function bl() { - var e = arguments[0]; - return arguments[0] = this, e.apply(null, arguments), this; -} -function wl() { - return Array.from(this); -} -function xl() { - for (var e = this._groups, t = 0, n = e.length; t < n; ++t) - for (var o = e[t], a = 0, i = o.length; a < i; ++a) { - var r = o[a]; - if (r) - return r; - } - return null; -} -function _l() { - let e = 0; - for (const t of this) - ++e; - return e; -} -function El() { - return !this.node(); -} -function Sl(e) { - for (var t = this._groups, n = 0, o = t.length; n < o; ++n) - for (var a = t[n], i = 0, r = a.length, l; i < r; ++i) - (l = a[i]) && e.call(l, l.__data__, i, a); - return this; -} -function Nl(e) { - return function() { - this.removeAttribute(e); - }; -} -function kl(e) { - return function() { - this.removeAttributeNS(e.space, e.local); - }; -} -function Cl(e, t) { - return function() { - this.setAttribute(e, t); - }; -} -function Ml(e, t) { - return function() { - this.setAttributeNS(e.space, e.local, t); - }; -} -function Pl(e, t) { - return function() { - var n = t.apply(this, arguments); - n == null ? this.removeAttribute(e) : this.setAttribute(e, n); - }; -} -function Il(e, t) { - return function() { - var n = t.apply(this, arguments); - n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n); - }; -} -function $l(e, t) { - var n = cn(e); - if (arguments.length < 2) { - var o = this.node(); - return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n); - } - return this.each((t == null ? n.local ? kl : Nl : typeof t == "function" ? n.local ? Il : Pl : n.local ? Ml : Cl)(n, t)); -} -function za(e) { - return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView; -} -function Tl(e) { - return function() { - this.style.removeProperty(e); - }; -} -function Ol(e, t, n) { - return function() { - this.style.setProperty(e, t, n); - }; -} -function Dl(e, t, n) { - return function() { - var o = t.apply(this, arguments); - o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n); - }; -} -function Bl(e, t, n) { - return arguments.length > 1 ? this.each((t == null ? Tl : typeof t == "function" ? Dl : Ol)(e, t, n ?? "")) : ht(this.node(), e); -} -function ht(e, t) { - return e.style.getPropertyValue(t) || za(e).getComputedStyle(e, null).getPropertyValue(t); -} -function Al(e) { - return function() { - delete this[e]; - }; -} -function zl(e, t) { - return function() { - this[e] = t; - }; -} -function Rl(e, t) { - return function() { - var n = t.apply(this, arguments); - n == null ? delete this[e] : this[e] = n; - }; -} -function Vl(e, t) { - return arguments.length > 1 ? this.each((t == null ? Al : typeof t == "function" ? Rl : zl)(e, t)) : this.node()[e]; -} -function Ra(e) { - return e.trim().split(/^|\s+/); -} -function no(e) { - return e.classList || new Va(e); -} -function Va(e) { - this._node = e, this._names = Ra(e.getAttribute("class") || ""); -} -Va.prototype = { - add: function(e) { - var t = this._names.indexOf(e); - t < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" "))); - }, - remove: function(e) { - var t = this._names.indexOf(e); - t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" "))); - }, - contains: function(e) { - return this._names.indexOf(e) >= 0; - } -}; -function La(e, t) { - for (var n = no(e), o = -1, a = t.length; ++o < a; ) - n.add(t[o]); -} -function Ya(e, t) { - for (var n = no(e), o = -1, a = t.length; ++o < a; ) - n.remove(t[o]); -} -function Ll(e) { - return function() { - La(this, e); - }; -} -function Yl(e) { - return function() { - Ya(this, e); - }; -} -function Xl(e, t) { - return function() { - (t.apply(this, arguments) ? La : Ya)(this, e); - }; -} -function Gl(e, t) { - var n = Ra(e + ""); - if (arguments.length < 2) { - for (var o = no(this.node()), a = -1, i = n.length; ++a < i; ) - if (!o.contains(n[a])) - return !1; - return !0; - } - return this.each((typeof t == "function" ? Xl : t ? Ll : Yl)(n, t)); -} -function Hl() { - this.textContent = ""; -} -function Fl(e) { - return function() { - this.textContent = e; - }; -} -function Ul(e) { - return function() { - var t = e.apply(this, arguments); - this.textContent = t ?? ""; - }; -} -function jl(e) { - return arguments.length ? this.each(e == null ? Hl : (typeof e == "function" ? Ul : Fl)(e)) : this.node().textContent; -} -function Zl() { - this.innerHTML = ""; -} -function Kl(e) { - return function() { - this.innerHTML = e; - }; -} -function Wl(e) { - return function() { - var t = e.apply(this, arguments); - this.innerHTML = t ?? ""; - }; -} -function ql(e) { - return arguments.length ? this.each(e == null ? Zl : (typeof e == "function" ? Wl : Kl)(e)) : this.node().innerHTML; -} -function Ql() { - this.nextSibling && this.parentNode.appendChild(this); -} -function Jl() { - return this.each(Ql); -} -function eu() { - this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild); -} -function tu() { - return this.each(eu); -} -function nu(e) { - var t = typeof e == "function" ? e : Ta(e); - return this.select(function() { - return this.appendChild(t.apply(this, arguments)); - }); -} -function ou() { - return null; -} -function au(e, t) { - var n = typeof e == "function" ? e : Ta(e), o = t == null ? ou : typeof t == "function" ? t : to(t); - return this.select(function() { - return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null); - }); -} -function iu() { - var e = this.parentNode; - e && e.removeChild(this); -} -function ru() { - return this.each(iu); -} -function lu() { - var e = this.cloneNode(!1), t = this.parentNode; - return t ? t.insertBefore(e, this.nextSibling) : e; -} -function uu() { - var e = this.cloneNode(!0), t = this.parentNode; - return t ? t.insertBefore(e, this.nextSibling) : e; -} -function su(e) { - return this.select(e ? uu : lu); -} -function cu(e) { - return arguments.length ? this.property("__data__", e) : this.node().__data__; -} -function du(e) { - return function(t) { - e.call(this, t, this.__data__); - }; -} -function vu(e) { - return e.trim().split(/^|\s+/).map(function(t) { - var n = "", o = t.indexOf("."); - return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n }; - }); -} -function hu(e) { - return function() { - var t = this.__on; - if (t) { - for (var n = 0, o = -1, a = t.length, i; n < a; ++n) - i = t[n], (!e.type || i.type === e.type) && i.name === e.name ? this.removeEventListener(i.type, i.listener, i.options) : t[++o] = i; - ++o ? t.length = o : delete this.__on; - } - }; -} -function fu(e, t, n) { - return function() { - var o = this.__on, a, i = du(t); - if (o) { - for (var r = 0, l = o.length; r < l; ++r) - if ((a = o[r]).type === e.type && a.name === e.name) { - this.removeEventListener(a.type, a.listener, a.options), this.addEventListener(a.type, a.listener = i, a.options = n), a.value = t; - return; - } - } - this.addEventListener(e.type, i, n), a = { type: e.type, name: e.name, value: t, listener: i, options: n }, o ? o.push(a) : this.__on = [a]; - }; -} -function gu(e, t, n) { - var o = vu(e + ""), a, i = o.length, r; - if (arguments.length < 2) { - var l = this.node().__on; - if (l) { - for (var u = 0, s = l.length, c; u < s; ++u) - for (a = 0, c = l[u]; a < i; ++a) - if ((r = o[a]).type === c.type && r.name === c.name) - return c.value; - } - return; - } - for (l = t ? fu : hu, a = 0; a < i; ++a) - this.each(l(o[a], t, n)); - return this; -} -function Xa(e, t, n) { - var o = za(e), a = o.CustomEvent; - typeof a == "function" ? a = new a(t, n) : (a = o.document.createEvent("Event"), n ? (a.initEvent(t, n.bubbles, n.cancelable), a.detail = n.detail) : a.initEvent(t, !1, !1)), e.dispatchEvent(a); -} -function pu(e, t) { - return function() { - return Xa(this, e, t); - }; -} -function mu(e, t) { - return function() { - return Xa(this, e, t.apply(this, arguments)); - }; -} -function yu(e, t) { - return this.each((typeof t == "function" ? mu : pu)(e, t)); -} -function* bu() { - for (var e = this._groups, t = 0, n = e.length; t < n; ++t) - for (var o = e[t], a = 0, i = o.length, r; a < i; ++a) - (r = o[a]) && (yield r); -} -var Ga = [null]; -function we(e, t) { - this._groups = e, this._parents = t; -} -function Mt() { - return new we([[document.documentElement]], Ga); -} -function wu() { - return this; -} -we.prototype = Mt.prototype = { - constructor: we, - select: Ur, - selectAll: Wr, - selectChild: el, - selectChildren: al, - filter: il, - data: dl, - enter: rl, - exit: hl, - join: fl, - merge: gl, - selection: wu, - order: pl, - sort: ml, - call: bl, - nodes: wl, - node: xl, - size: _l, - empty: El, - each: Sl, - attr: $l, - style: Bl, - property: Vl, - classed: Gl, - text: jl, - html: ql, - raise: Jl, - lower: tu, - append: nu, - insert: au, - remove: ru, - clone: su, - datum: cu, - on: gu, - dispatch: yu, - [Symbol.iterator]: bu -}; -function Ee(e) { - return typeof e == "string" ? new we([[document.querySelector(e)]], [document.documentElement]) : new we([[e]], Ga); -} -function xu(e) { - let t; - for (; t = e.sourceEvent; ) - e = t; - return e; -} -function Me(e, t) { - if (e = xu(e), t === void 0 && (t = e.currentTarget), t) { - var n = t.ownerSVGElement || t; - if (n.createSVGPoint) { - var o = n.createSVGPoint(); - return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y]; - } - if (t.getBoundingClientRect) { - var a = t.getBoundingClientRect(); - return [e.clientX - a.left - t.clientLeft, e.clientY - a.top - t.clientTop]; - } - } - return [e.pageX, e.pageY]; -} -const _u = { passive: !1 }, _t = { capture: !0, passive: !1 }; -function Nn(e) { - e.stopImmediatePropagation(); -} -function at(e) { - e.preventDefault(), e.stopImmediatePropagation(); -} -function Ha(e) { - var t = e.document.documentElement, n = Ee(e).on("dragstart.drag", at, _t); - "onselectstart" in t ? n.on("selectstart.drag", at, _t) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none"); -} -function Fa(e, t) { - var n = e.document.documentElement, o = Ee(e).on("dragstart.drag", null); - t && (o.on("click.drag", at, _t), setTimeout(function() { - o.on("click.drag", null); - }, 0)), "onselectstart" in n ? o.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect); -} -const Tt = (e) => () => e; -function Vn(e, { - sourceEvent: t, - subject: n, - target: o, - identifier: a, - active: i, - x: r, - y: l, - dx: u, - dy: s, - dispatch: c -}) { - Object.defineProperties(this, { - type: { value: e, enumerable: !0, configurable: !0 }, - sourceEvent: { value: t, enumerable: !0, configurable: !0 }, - subject: { value: n, enumerable: !0, configurable: !0 }, - target: { value: o, enumerable: !0, configurable: !0 }, - identifier: { value: a, enumerable: !0, configurable: !0 }, - active: { value: i, enumerable: !0, configurable: !0 }, - x: { value: r, enumerable: !0, configurable: !0 }, - y: { value: l, enumerable: !0, configurable: !0 }, - dx: { value: u, enumerable: !0, configurable: !0 }, - dy: { value: s, enumerable: !0, configurable: !0 }, - _: { value: c } - }); -} -Vn.prototype.on = function() { - var e = this._.on.apply(this._, arguments); - return e === this._ ? this : e; -}; -function Eu(e) { - return !e.ctrlKey && !e.button; -} -function Su() { - return this.parentNode; -} -function Nu(e, t) { - return t ?? { x: e.x, y: e.y }; -} -function ku() { - return navigator.maxTouchPoints || "ontouchstart" in this; -} -function Cu() { - var e = Eu, t = Su, n = Nu, o = ku, a = {}, i = sn("start", "drag", "end"), r = 0, l, u, s, c, d = 0; - function h(y) { - y.on("mousedown.drag", b).filter(o).on("touchstart.drag", E).on("touchmove.drag", _, _u).on("touchend.drag touchcancel.drag", P).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - function b(y, I) { - if (!(c || !e.call(this, y, I))) { - var z = G(this, t.call(this, y, I), y, I, "mouse"); - z && (Ee(y.view).on("mousemove.drag", m, _t).on("mouseup.drag", w, _t), Ha(y.view), Nn(y), s = !1, l = y.clientX, u = y.clientY, z("start", y)); - } - } - function m(y) { - if (at(y), !s) { - var I = y.clientX - l, z = y.clientY - u; - s = I * I + z * z > d; - } - a.mouse("drag", y); - } - function w(y) { - Ee(y.view).on("mousemove.drag mouseup.drag", null), Fa(y.view, s), at(y), a.mouse("end", y); - } - function E(y, I) { - if (e.call(this, y, I)) { - var z = y.changedTouches, f = t.call(this, y, I), x = z.length, N, C; - for (N = 0; N < x; ++N) - (C = G(this, f, y, I, z[N].identifier, z[N])) && (Nn(y), C("start", y, z[N])); - } - } - function _(y) { - var I = y.changedTouches, z = I.length, f, x; - for (f = 0; f < z; ++f) - (x = a[I[f].identifier]) && (at(y), x("drag", y, I[f])); - } - function P(y) { - var I = y.changedTouches, z = I.length, f, x; - for (c && clearTimeout(c), c = setTimeout(function() { - c = null; - }, 500), f = 0; f < z; ++f) - (x = a[I[f].identifier]) && (Nn(y), x("end", y, I[f])); - } - function G(y, I, z, f, x, N) { - var C = i.copy(), T = Me(N || z, I), J, ae, p; - if ((p = n.call(y, new Vn("beforestart", { - sourceEvent: z, - target: h, - identifier: x, - active: r, - x: T[0], - y: T[1], - dx: 0, - dy: 0, - dispatch: C - }), f)) != null) - return J = p.x - T[0] || 0, ae = p.y - T[1] || 0, function R(S, B, F) { - var j = T, A; - switch (S) { - case "start": - a[x] = R, A = r++; - break; - case "end": - delete a[x], --r; - case "drag": - T = Me(F || B, I), A = r; - break; - } - C.call( - S, - y, - new Vn(S, { - sourceEvent: B, - subject: p, - target: h, - identifier: x, - active: A, - x: T[0] + J, - y: T[1] + ae, - dx: T[0] - j[0], - dy: T[1] - j[1], - dispatch: C - }), - f - ); - }; - } - return h.filter = function(y) { - return arguments.length ? (e = typeof y == "function" ? y : Tt(!!y), h) : e; - }, h.container = function(y) { - return arguments.length ? (t = typeof y == "function" ? y : Tt(y), h) : t; - }, h.subject = function(y) { - return arguments.length ? (n = typeof y == "function" ? y : Tt(y), h) : n; - }, h.touchable = function(y) { - return arguments.length ? (o = typeof y == "function" ? y : Tt(!!y), h) : o; - }, h.on = function() { - var y = i.on.apply(i, arguments); - return y === i ? h : y; - }, h.clickDistance = function(y) { - return arguments.length ? (d = (y = +y) * y, h) : Math.sqrt(d); - }, h; -} -function Ua(e) { - const t = ve(), n = O(t, "vueFlowRef"), o = O(t, "snapToGrid"), a = O(t, "snapGrid"), i = O(t, "noDragClassName"), r = O(t, "nodes"), l = O(t, "nodeExtent"), u = O(t, "viewport"), s = O(t, "autoPanOnNodeDrag"), c = O(t, "nodesDraggable"), d = O(t, "panBy"), h = O(t, "findNode"), b = O(t, "multiSelectionActive"), m = O(t, "nodesSelectionActive"), w = O(t, "selectNodesOnDrag"), E = O(t, "removeSelectedElements"), _ = O(t, "addSelectedNodes"), P = O(t, "updateNodePositions"), G = O(t, "emits"), { onStart: y, onDrag: I, onStop: z, el: f, disabled: x, id: N, selectable: C } = e, T = ee(!1); - let J = ee([]), ae = ee(), p = ee(null), R = ee({ x: void 0, y: void 0 }), S = ee({ x: 0, y: 0 }), B = ee(null), F = ee(0), j = ee(!1); - const A = Vr(), U = ({ x: K, y: ne }) => { - R.value = { x: K, y: ne }; - let re = !1; - if (J.value = J.value.map((M) => { - const v = { x: K - M.distance.x, y: ne - M.distance.y }; - o.value && (v.x = a.value[0] * Math.round(v.x / a.value[0]), v.y = a.value[1] * Math.round(v.y / a.value[1])); - const { computedPosition: g } = eo( - M, - v, - G.value.error, - l.value, - M.parentNode ? h.value(M.parentNode) : void 0 - ); - return re = re || M.position.x !== g.x || M.position.y !== g.y, M.position = g, M; - }), !!re && (P.value(J.value, !0, !0), T.value = !0, B.value)) { - const [M, v] = Sn({ - id: N, - dragItems: J.value, - findNode: h.value - }); - I({ event: B.value, node: M, nodes: v }); - } - }, V = () => { - if (!p.value) - return; - const [K, ne] = Ma(S.value, p.value); - if (K !== 0 || ne !== 0) { - const re = { - x: (R.value.x ?? 0) - K / u.value.zoom, - y: (R.value.y ?? 0) - ne / u.value.zoom - }; - d.value({ x: K, y: ne }) && U(re); - } - F.value = requestAnimationFrame(V); - }; - return ce([() => le(x), f], ([K, ne]) => { - if (ne) { - const re = Ee(ne); - if (K) - re.on(".drag", null); - else { - const M = h.value(N); - ae.value = Cu().on("start", (v) => { - var g; - !w.value && !b.value && M && (M.selected || E.value()), M && le(C) && w.value && zn( - M, - b.value, - _.value, - E.value, - m, - !1, - ne - ); - const $ = A(v); - if (R.value = $, J.value = Dr(r.value, c.value, $, h.value, N), J.value.length) { - const [D, L] = Sn({ - id: N, - dragItems: J.value, - findNode: h.value - }); - y({ event: v.sourceEvent, node: D, nodes: L }); - } - p.value = ((g = n.value) == null ? void 0 : g.getBoundingClientRect()) || null, S.value = ot(v.sourceEvent, p.value); - }).on("drag", (v) => { - const g = A(v); - !j.value && s.value && (j.value = !0, V()), (R.value.x !== g.xSnapped || R.value.y !== g.ySnapped) && J.value.length && (B.value = v.sourceEvent, S.value = ot(v.sourceEvent, p.value), U(g)); - }).on("end", (v) => { - if (T.value = !1, j.value = !1, cancelAnimationFrame(F.value), J.value.length) { - P.value(J.value, !1, !1); - const [g, $] = Sn({ - id: N, - dragItems: J.value, - findNode: h.value - }); - z({ event: v.sourceEvent, node: g, nodes: $ }); - } - }).filter((v) => { - const g = v.target; - return !v.button && (!i.value || !$o(g, `.${i.value}`, ne) && (!(M != null && M.dragHandle) || $o(g, M.dragHandle, ne))); - }), re.call(ae.value); - } - } - }), T; -} -const ja = "vue-flow__node-desc", Za = "vue-flow__edge-desc", Mu = "vue-flow__aria-live", Ka = ["Enter", " ", "Escape"], it = { - ArrowUp: { x: 0, y: -1 }, - ArrowDown: { x: 0, y: 1 }, - ArrowLeft: { x: -1, y: 0 }, - ArrowRight: { x: 1, y: 0 } -}; -function Ln(e) { - var t, n; - const o = ((n = (t = e.composedPath) == null ? void 0 : t.call(e)) == null ? void 0 : n[0]) || e.target, a = Ye(o.hasAttribute) ? o.hasAttribute("contenteditable") : !1, i = Ye(o.closest) ? o.closest(".nokey") : null; - return ["INPUT", "SELECT", "TEXTAREA"].includes(o == null ? void 0 : o.nodeName) || a || !!i; -} -function Pu(e) { - return e.ctrlKey || e.metaKey || e.shiftKey; -} -function Iu(e, t) { - return (n) => e.some((o) => { - const a = o.split("+").map((i) => i.trim().toLowerCase()); - return a.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), a.every((i) => t.has(i))); - }); -} -const xt = (e, t) => { - const n = qn(), o = ee(le(e) === !0), a = ee(!1), i = ee(/* @__PURE__ */ new Set()); - return ce(o, () => { - t == null || t(o.value); - }), ce( - () => le(e), - (r) => { - if (n && typeof n.addEventListener < "u" && Wn(n, "blur", () => { - o.value = !1; - }), Ti(r)) { - o.value = r; - return; - } - Array.isArray(r) && (r = Iu(r, i.value)), r && (fo( - r, - (l) => { - a.value = Pu(l), !(!a.value && Ln(l)) && (l.preventDefault(), o.value = !0); - }, - { eventName: "keydown" } - ), fo( - r, - (l) => { - if (o.value) { - if (!a.value && Ln(l)) - return; - a.value = !1, i.value.clear(), o.value = !1; - } - }, - { eventName: "keyup" } - )); - }, - { - immediate: !0 - } - ), o; -}, $u = fe({ - name: "Node", - compatConfig: { MODE: 3 }, - props: ["name", "type", "id", "draggable", "selectable", "focusable", "connectable", "node", "resizeObserver"], - setup(e) { - lt(Na, e.id); - const t = ve(), n = O(t, "id"), o = O(t, "edges"), a = O(t, "noPanClassName"), i = O(t, "selectNodesOnDrag"), r = O(t, "nodesSelectionActive"), l = O(t, "multiSelectionActive"), u = O(t, "emits"), s = O(t, "findNode"), c = O(t, "removeSelectedNodes"), d = O(t, "addSelectedNodes"), h = O(t, "updateNodeDimensions"), b = O(t, "onUpdateNodeInternals"), m = O(t, "getIntersectingNodes"), w = O(t, "getNodeTypes"), E = O(t, "nodeExtent"), _ = O(t, "elevateNodesOnSelect"), P = O(t, "disableKeyboardA11y"), G = O(t, "ariaLiveMessage"), y = O(t, "snapToGrid"), I = O(t, "snapGrid"), z = $a(), f = wt(e, "node"), x = q(() => s.value(f.value.parentNode)), N = q(() => on([f.value], o.value)), C = ee(); - lt(ka, C); - const { emit: T, on: J } = Rr(f.value, u.value), ae = Ua({ - id: e.id, - el: C, - disabled: () => !e.draggable, - selectable: () => e.selectable, - onStart(M) { - T.dragStart({ ...M, intersections: m.value(f.value) }); - }, - onDrag(M) { - T.drag({ ...M, intersections: m.value(f.value) }); - }, - onStop(M) { - T.dragStop({ ...M, intersections: m.value(f.value) }); - } - }), p = q(() => f.value.class instanceof Function ? f.value.class(f.value) : f.value.class), R = q(() => { - const M = (f.value.style instanceof Function ? f.value.style(f.value) : f.value.style) || {}, v = f.value.width instanceof Function ? f.value.width(f.value) : f.value.width, g = f.value.height instanceof Function ? f.value.height(f.value) : f.value.height; - return v && (M.width = typeof v == "string" ? v : `${v}px`), g && (M.height = typeof g == "string" ? g : `${g}px`), M; - }), S = () => Number(f.value.zIndex ?? R.value.zIndex ?? 0); - return b.value((M) => { - M.includes(e.id) && F(); - }), Ve(() => { - e.resizeObserver.observe(C.value); - }), jn(() => { - e.resizeObserver.unobserve(C.value); - }), ce( - [() => f.value.type, () => f.value.sourcePosition, () => f.value.targetPosition], - () => { - h.value([{ id: e.id, nodeElement: C.value, forceUpdate: !0 }]); - }, - { flush: "pre" } - ), ce( - [ - () => f.value.position.x, - () => f.value.position.y, - () => { - var M; - return (M = x.value) == null ? void 0 : M.computedPosition.x; - }, - () => { - var M; - return (M = x.value) == null ? void 0 : M.computedPosition.y; - }, - () => { - var M; - return (M = x.value) == null ? void 0 : M.computedPosition.z; - }, - () => S(), - () => f.value.selected, - () => f.value.dimensions.height, - () => f.value.dimensions.width, - () => { - var M; - return (M = x.value) == null ? void 0 : M.dimensions.height; - }, - () => { - var M; - return (M = x.value) == null ? void 0 : M.dimensions.width; - } - ], - ([M, v, g, $, D, L]) => { - const Y = { - x: M, - y: v, - z: L + (_.value && f.value.selected ? 1e3 : 0) - }; - Be(g) && Be($) ? f.value.computedPosition = pr({ x: g, y: $, z: D }, Y) : f.value.computedPosition = Y; - }, - { flush: "pre", immediate: !0 } - ), ce([() => f.value.extent, () => E.value], ([M, v], [g, $]) => { - (M !== g || v !== $) && B(); - }), f.value.extent === "parent" || typeof f.value.extent == "object" && "range" in f.value.extent && f.value.extent.range === "parent" ? be(() => f.value.initialized).toBe(!0).then(B) : B(), () => ue( - "div", - { - ref: C, - "data-id": f.value.id, - class: [ - "vue-flow__node", - `vue-flow__node-${e.type === !1 ? "default" : e.name}`, - { - [a.value]: e.draggable, - dragging: ae == null ? void 0 : ae.value, - selected: f.value.selected, - selectable: e.selectable - }, - p.value - ], - style: { - zIndex: f.value.computedPosition.z ?? S(), - transform: `translate(${f.value.computedPosition.x}px,${f.value.computedPosition.y}px)`, - pointerEvents: e.selectable || e.draggable ? "all" : "none", - visibility: f.value.initialized ? "visible" : "hidden", - ...R.value - }, - tabIndex: e.focusable ? 0 : void 0, - role: e.focusable ? "button" : void 0, - "aria-describedby": P.value ? void 0 : `${ja}-${n.value}`, - "aria-label": f.value.ariaLabel, - onMouseenter: j, - onMousemove: A, - onMouseleave: U, - onContextmenu: V, - onClick: ne, - onDblclick: K, - onKeydown: re - }, - [ - ue(e.type === !1 ? w.value.default : e.type, { - id: f.value.id, - type: f.value.type, - data: f.value.data, - events: { ...f.value.events, ...J }, - selected: !!f.value.selected, - resizing: !!f.value.resizing, - dragging: ae.value, - connectable: e.connectable, - position: f.value.position, - dimensions: f.value.dimensions, - isValidTargetPos: f.value.isValidTargetPos, - isValidSourcePos: f.value.isValidSourcePos, - parent: f.value.parentNode, - zIndex: f.value.computedPosition.z, - targetPosition: f.value.targetPosition, - sourcePosition: f.value.sourcePosition, - label: f.value.label, - dragHandle: f.value.dragHandle, - onUpdateNodeInternals: F - }) - ] - ); - function B() { - const M = f.value.computedPosition; - y.value && (M.x = I.value[0] * Math.round(M.x / I.value[0]), M.y = I.value[1] * Math.round(M.y / I.value[1])); - const { computedPosition: v, position: g } = eo(f.value, M, u.value.error, E.value, x.value); - (f.value.computedPosition.x !== v.x || f.value.computedPosition.y !== v.y) && (f.value.computedPosition = { ...f.value.computedPosition, ...v }), (f.value.position.x !== g.x || f.value.position.y !== g.y) && (f.value.position = g); - } - function F() { - C.value && h.value([{ id: e.id, nodeElement: C.value, forceUpdate: !0 }]); - } - function j(M) { - ae != null && ae.value || T.mouseEnter({ event: M, node: f.value, connectedEdges: N.value }); - } - function A(M) { - ae != null && ae.value || T.mouseMove({ event: M, node: f.value, connectedEdges: N.value }); - } - function U(M) { - ae != null && ae.value || T.mouseLeave({ event: M, node: f.value, connectedEdges: N.value }); - } - function V(M) { - return T.contextMenu({ event: M, node: f.value, connectedEdges: N.value }); - } - function K(M) { - return T.doubleClick({ event: M, node: f.value, connectedEdges: N.value }); - } - function ne(M) { - e.selectable && (!i.value || !e.draggable) && zn( - f.value, - l.value, - d.value, - c.value, - r, - !1, - C.value - ), T.click({ event: M, node: f.value, connectedEdges: N.value }); - } - function re(M) { - var v; - if (!Ln(M)) - if (Ka.includes(M.key) && e.selectable) { - const g = M.key === "Escape"; - g && ((v = C.value) == null || v.blur()), zn( - f.value, - l.value, - d.value, - c.value, - r, - g, - C.value - ); - } else - !P.value && e.draggable && f.value.selected && it[M.key] && (G.value = `Moved selected node ${M.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~f.value.position.x}, y: ${~~f.value.position.y}`, z( - { - x: it[M.key].x, - y: it[M.key].y - }, - M.shiftKey - )); - } - } -}), Tu = $u, Ou = ["transform"], Du = ["width", "height", "x", "y", "rx", "ry"], Bu = ["y"], Au = { - name: "EdgeText", - compatConfig: { MODE: 3 } -}, zu = /* @__PURE__ */ fe({ - ...Au, - props: { - x: null, - y: null, - label: null, - labelStyle: { default: {} }, - labelShowBg: { type: Boolean, default: !0 }, - labelBgStyle: { default: {} }, - labelBgPadding: { default: [2, 4] }, - labelBgBorderRadius: { default: 2 } - }, - setup(e) { - let t = ee({ x: 0, y: 0, width: 0, height: 0 }); - const n = ee(null), o = q(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`); - Ve(a), ce([() => e.x, () => e.y, n, () => e.label], a); - function a() { - if (!n.value) - return; - const i = n.value.getBBox(); - (i.width !== t.value.width || i.height !== t.value.height) && (t.value = i); - } - return (i, r) => (te(), ie("g", { - transform: k(o), - class: "vue-flow__edge-textwrapper" - }, [ - e.labelShowBg ? (te(), ie("rect", { - key: 0, - class: "vue-flow__edge-textbg", - width: `${k(t).width + 2 * e.labelBgPadding[0]}px`, - height: `${k(t).height + 2 * e.labelBgPadding[1]}px`, - x: -e.labelBgPadding[0], - y: -e.labelBgPadding[1], - style: Le(e.labelBgStyle), - rx: e.labelBgBorderRadius, - ry: e.labelBgBorderRadius - }, null, 12, Du)) : ge("", !0), - de("text", Ht(i.$attrs, { - ref_key: "el", - ref: n, - class: "vue-flow__edge-text", - y: k(t).height / 2, - dy: "0.3em", - style: e.labelStyle - }), [ - xe(i.$slots, "default", {}, () => [ - k(Ae)(e.label) ? (te(), ie(Ne, { key: 1 }, [ - ua(ct(e.label), 1) - ], 64)) : (te(), _e(ra(e.label), { key: 0 })) - ]) - ], 16, Bu) - ], 8, Ou)); - } -}), dn = function({ - path: e, - label: t, - labelX: n, - labelY: o, - labelBgBorderRadius: a, - labelBgPadding: i, - labelBgStyle: r, - labelShowBg: l = !0, - labelStyle: u, - markerStart: s, - markerEnd: c, - interactionWidth: d = 20 -}, { attrs: h }) { - return [ - ue("path", { - style: h.style, - class: ["vue-flow__edge-path", h.class].join(" "), - d: e, - "marker-end": c, - "marker-start": s - }), - d ? ue("path", { - d: e, - fill: "none", - "stroke-opacity": 0, - "stroke-width": d - }) : null, - t && Be(n) && Be(o) ? ue(zu, { - x: n, - y: o, - label: t, - labelStyle: u, - labelShowBg: l, - labelBgStyle: r, - labelBgPadding: i, - labelBgBorderRadius: a - }) : null - ]; -}; -dn.props = [ - "path", - "labelX", - "labelY", - "label", - "labelBgBorderRadius", - "labelBgPadding", - "labelBgStyle", - "labelShowBg", - "labelStyle", - "markerStart", - "markerEnd", - "interactionWidth" -]; -dn.inheritAttrs = !1; -dn.compatConfig = { MODE: 3 }; -const vn = dn; -function Wa({ - sourceX: e, - sourceY: t, - targetX: n, - targetY: o -}) { - const a = Math.abs(n - e) / 2, i = n < e ? n + a : n - a, r = Math.abs(o - t) / 2, l = o < t ? o + r : o - r; - return [i, l, a, r]; -} -function qa({ - sourceX: e, - sourceY: t, - targetX: n, - targetY: o, - sourceControlX: a, - sourceControlY: i, - targetControlX: r, - targetControlY: l -}) { - const u = e * 0.125 + a * 0.375 + r * 0.375 + n * 0.125, s = t * 0.125 + i * 0.375 + l * 0.375 + o * 0.125, c = Math.abs(u - e), d = Math.abs(s - t); - return [u, s, c, d]; -} -function Ot(e, t) { - return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e); -} -function Bo({ pos: e, x1: t, y1: n, x2: o, y2: a, c: i }) { - let r, l; - switch (e) { - case Z.Left: - r = t - Ot(t - o, i), l = n; - break; - case Z.Right: - r = t + Ot(o - t, i), l = n; - break; - case Z.Top: - r = t, l = n - Ot(n - a, i); - break; - case Z.Bottom: - r = t, l = n + Ot(a - n, i); - break; - } - return [r, l]; -} -function Kt({ - sourceX: e, - sourceY: t, - sourcePosition: n = Z.Bottom, - targetX: o, - targetY: a, - targetPosition: i = Z.Top, - curvature: r = 0.25 -}) { - const [l, u] = Bo({ - pos: n, - x1: e, - y1: t, - x2: o, - y2: a, - c: r - }), [s, c] = Bo({ - pos: i, - x1: o, - y1: a, - x2: e, - y2: t, - c: r - }), [d, h, b, m] = qa({ - sourceX: e, - sourceY: t, - targetX: o, - targetY: a, - sourceControlX: l, - sourceControlY: u, - targetControlX: s, - targetControlY: c - }); - return [ - `M${e},${t} C${l},${u} ${s},${c} ${o},${a}`, - d, - h, - b, - m - ]; -} -const hn = function({ sourcePosition: e = Z.Bottom, targetPosition: t = Z.Top, ...n }, { attrs: o }) { - const [a, i, r] = Kt({ - sourcePosition: e, - targetPosition: t, - ...n - }); - return ue(vn, { - path: a, - labelX: i, - labelY: r, - ...n, - ...o - }); -}; -hn.props = [ - "sourcePosition", - "targetPosition", - "label", - "labelStyle", - "labelShowBg", - "labelBgStyle", - "labelBgPadding", - "labelBgBorderRadius", - "sourceY", - "sourceX", - "targetX", - "targetY", - "curvature", - "markerEnd", - "markerStart", - "interactionWidth" -]; -hn.inheritAttrs = !1; -hn.compatConfig = { MODE: 3 }; -const Ru = hn; -function Ao({ pos: e, x1: t, y1: n, x2: o, y2: a }) { - let i, r; - switch (e) { - case Z.Left: - case Z.Right: - i = 0.5 * (t + o), r = n; - break; - case Z.Top: - case Z.Bottom: - i = t, r = 0.5 * (n + a); - break; - } - return [i, r]; -} -function Qa({ - sourceX: e, - sourceY: t, - sourcePosition: n = Z.Bottom, - targetX: o, - targetY: a, - targetPosition: i = Z.Top -}) { - const [r, l] = Ao({ - pos: n, - x1: e, - y1: t, - x2: o, - y2: a - }), [u, s] = Ao({ - pos: i, - x1: o, - y1: a, - x2: e, - y2: t - }), [c, d, h, b] = qa({ - sourceX: e, - sourceY: t, - targetX: o, - targetY: a, - sourceControlX: r, - sourceControlY: l, - targetControlX: u, - targetControlY: s - }); - return [ - `M${e},${t} C${r},${l} ${u},${s} ${o},${a}`, - c, - d, - h, - b - ]; -} -const fn = function({ sourcePosition: e = Z.Bottom, targetPosition: t = Z.Top, ...n }, { attrs: o }) { - const [a, i, r] = Qa({ - sourcePosition: e, - targetPosition: t, - ...n - }); - return ue(vn, { - path: a, - labelX: i, - labelY: r, - ...n, - ...o - }); -}; -fn.props = [ - "sourcePosition", - "targetPosition", - "label", - "labelStyle", - "labelShowBg", - "labelBgStyle", - "labelBgPadding", - "labelBgBorderRadius", - "sourceY", - "sourceX", - "targetX", - "targetY", - "markerEnd", - "markerStart", - "interactionWidth" -]; -fn.inheritAttrs = !1; -fn.compatConfig = { MODE: 3 }; -const Vu = fn, zo = { - [Z.Left]: { x: -1, y: 0 }, - [Z.Right]: { x: 1, y: 0 }, - [Z.Top]: { x: 0, y: -1 }, - [Z.Bottom]: { x: 0, y: 1 } -}; -function Lu({ - source: e, - sourcePosition: t = Z.Bottom, - target: n -}) { - return t === Z.Left || t === Z.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 }; -} -function Ro(e, t) { - return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2); -} -function Yu({ - source: e, - sourcePosition: t = Z.Bottom, - target: n, - targetPosition: o = Z.Top, - center: a, - offset: i -}) { - const r = zo[t], l = zo[o], u = { x: e.x + r.x * i, y: e.y + r.y * i }, s = { x: n.x + l.x * i, y: n.y + l.y * i }, c = Lu({ - source: u, - sourcePosition: t, - target: s - }), d = c.x !== 0 ? "x" : "y", h = c[d]; - let b, m, w; - const [E, _, P, G] = Wa({ - sourceX: e.x, - sourceY: e.y, - targetX: n.x, - targetY: n.y - }); - if (r[d] * l[d] === -1) { - m = a.x || E, w = a.y || _; - const y = [ - { x: m, y: u.y }, - { x: m, y: s.y } - ], I = [ - { x: u.x, y: w }, - { x: s.x, y: w } - ]; - r[d] === h ? b = d === "x" ? y : I : b = d === "x" ? I : y; - } else { - const y = [{ x: u.x, y: s.y }], I = [{ x: s.x, y: u.y }]; - if (d === "x" ? b = r.x === h ? I : y : b = r.y === h ? y : I, t !== o) { - const z = d === "x" ? "y" : "x", f = r[d] === l[z], x = u[z] > s[z], N = u[z] < s[z]; - (r[d] === 1 && (!f && x || f && N) || r[d] !== 1 && (!f && N || f && x)) && (b = d === "x" ? y : I); - } - m = b[0].x, w = b[0].y; - } - return [[e, u, ...b, s, n], m, w, P, G]; -} -function Xu(e, t, n, o) { - const a = Math.min(Ro(e, t) / 2, Ro(t, n) / 2, o), { x: i, y: r } = t; - if (e.x === i && i === n.x || e.y === r && r === n.y) - return `L${i} ${r}`; - if (e.y === r) { - const s = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1; - return `L ${i + a * s},${r}Q ${i},${r} ${i},${r + a * c}`; - } - const l = e.x < n.x ? 1 : -1, u = e.y < n.y ? -1 : 1; - return `L ${i},${r + a * u}Q ${i},${r} ${i + a * l},${r}`; -} -function Yn({ - sourceX: e, - sourceY: t, - sourcePosition: n = Z.Bottom, - targetX: o, - targetY: a, - targetPosition: i = Z.Top, - borderRadius: r = 5, - centerX: l, - centerY: u, - offset: s = 20 -}) { - const [c, d, h, b, m] = Yu({ - source: { x: e, y: t }, - sourcePosition: n, - target: { x: o, y: a }, - targetPosition: i, - center: { x: l, y: u }, - offset: s - }); - return [c.reduce((w, E, _) => { - let P; - return _ > 0 && _ < c.length - 1 ? P = Xu(c[_ - 1], E, c[_ + 1], r) : P = `${_ === 0 ? "M" : "L"}${E.x} ${E.y}`, w += P, w; - }, ""), d, h, b, m]; -} -const gn = function({ sourcePosition: e = Z.Bottom, targetPosition: t = Z.Top, ...n }, { attrs: o }) { - const [a, i, r] = Yn({ - sourcePosition: e, - targetPosition: t, - ...n - }); - return ue(vn, { - path: a, - labelX: i, - labelY: r, - ...n, - ...o - }); -}; -gn.props = [ - "sourcePosition", - "targetPosition", - "label", - "labelStyle", - "labelShowBg", - "labelBgStyle", - "labelBgPadding", - "labelBgBorderRadius", - "sourceY", - "sourceX", - "targetX", - "targetY", - "borderRadius", - "markerEnd", - "markerStart", - "interactionWidth", - "offset" -]; -gn.inheritAttrs = !1; -gn.compatConfig = { MODE: 3 }; -const Ja = gn, pn = function(e, { attrs: t }) { - return ue(Ja, { ...e, ...t, borderRadius: 0 }); -}; -pn.props = [ - "sourcePosition", - "targetPosition", - "label", - "labelStyle", - "labelShowBg", - "labelBgStyle", - "labelBgPadding", - "labelBgBorderRadius", - "sourceY", - "sourceX", - "targetX", - "targetY", - "markerEnd", - "markerStart", - "interactionWidth" -]; -pn.inheritAttrs = !1; -pn.compatConfig = { MODE: 3 }; -const Gu = pn; -function ei({ - sourceX: e, - sourceY: t, - targetX: n, - targetY: o -}) { - const [a, i, r, l] = Wa({ - sourceX: e, - sourceY: t, - targetX: n, - targetY: o - }); - return [`M ${e},${t}L ${n},${o}`, a, i, r, l]; -} -const mn = function(e, { attrs: t }) { - const [n, o, a] = ei(e); - return ue(vn, { - path: n, - labelX: o, - labelY: a, - ...e, - ...t - }); -}; -mn.props = [ - "label", - "labelStyle", - "labelShowBg", - "labelBgStyle", - "labelBgPadding", - "labelBgBorderRadius", - "sourceY", - "sourceX", - "targetX", - "targetY", - "markerEnd", - "markerStart", - "interactionWidth" -]; -mn.inheritAttrs = !1; -mn.compatConfig = { MODE: 3 }; -const Hu = mn; -function Fu(e, t, n) { - return n === Z.Left ? e - t : n === Z.Right ? e + t : e; -} -function Uu(e, t, n) { - return n === Z.Top ? e - t : n === Z.Bottom ? e + t : e; -} -const oo = function({ - radius: e = 10, - centerX: t = 0, - centerY: n = 0, - position: o = Z.Top, - type: a -}) { - return ue("circle", { - class: `vue-flow__edgeupdater vue-flow__edgeupdater-${a}`, - cx: Fu(t, e, o), - cy: Uu(n, e, o), - r: e, - stroke: "transparent", - fill: "transparent" - }); -}; -oo.props = ["radius", "centerX", "centerY", "position", "type"]; -oo.compatConfig = { MODE: 3 }; -const Vo = oo; -function ju() { - return { - doubleClick: H(), - click: H(), - mouseEnter: H(), - mouseMove: H(), - mouseLeave: H(), - contextMenu: H(), - updateStart: H(), - update: H(), - updateEnd: H() - }; -} -function Zu(e, t) { - const n = ju(); - return n.doubleClick.on((o) => { - var a, i; - t.edgeDoubleClick(o), (i = (a = e.events) == null ? void 0 : a.doubleClick) == null || i.call(a, o); - }), n.click.on((o) => { - var a, i; - t.edgeClick(o), (i = (a = e.events) == null ? void 0 : a.click) == null || i.call(a, o); - }), n.mouseEnter.on((o) => { - var a, i; - t.edgeMouseEnter(o), (i = (a = e.events) == null ? void 0 : a.mouseEnter) == null || i.call(a, o); - }), n.mouseMove.on((o) => { - var a, i; - t.edgeMouseMove(o), (i = (a = e.events) == null ? void 0 : a.mouseMove) == null || i.call(a, o); - }), n.mouseLeave.on((o) => { - var a, i; - t.edgeMouseLeave(o), (i = (a = e.events) == null ? void 0 : a.mouseLeave) == null || i.call(a, o); - }), n.contextMenu.on((o) => { - var a, i; - t.edgeContextMenu(o), (i = (a = e.events) == null ? void 0 : a.contextMenu) == null || i.call(a, o); - }), n.updateStart.on((o) => { - var a, i; - t.edgeUpdateStart(o), (i = (a = e.events) == null ? void 0 : a.updateStart) == null || i.call(a, o); - }), n.update.on((o) => { - var a, i; - t.edgeUpdate(o), (i = (a = e.events) == null ? void 0 : a.update) == null || i.call(a, o); - }), n.updateEnd.on((o) => { - var a, i; - t.edgeUpdateEnd(o), (i = (a = e.events) == null ? void 0 : a.updateEnd) == null || i.call(a, o); - }), Object.entries(n).reduce( - (o, [a, i]) => (o.emit[a] = i.trigger, o.on[a] = i.on, o), - { emit: {}, on: {} } - ); -} -const Ku = fe({ - name: "Edge", - compatConfig: { MODE: 3 }, - props: ["name", "type", "id", "updatable", "selectable", "focusable", "edge"], - setup(e) { - const { - id: t, - addSelectedEdges: n, - connectionMode: o, - edgeUpdaterRadius: a, - emits: i, - nodesSelectionActive: r, - noPanClassName: l, - getEdgeTypes: u, - removeSelectedEdges: s, - findEdge: c, - findNode: d, - isValidConnection: h - } = ve(), b = Zu(e.edge, i), m = wt(e, "edge"); - let w = ee(!1), E = ee(!1); - const _ = ee(""), P = ee(null), G = ee("source"), y = ee(); - lt(br, e.id), lt(wr, y); - const I = q(() => m.value.class instanceof Function ? m.value.class(m.value) : m.value.class), z = q(() => m.value.style instanceof Function ? m.value.style(m.value) : m.value.style), { handlePointerDown: f } = Pa({ - nodeId: _, - handleId: P, - type: G, - isValidConnection: h.value, - edgeUpdaterType: G, - onEdgeUpdate: C, - onEdgeUpdateEnd: T - }); - return () => { - const V = d(m.value.source), K = d(m.value.target); - if (!V || !K || !m.value) - return null; - let ne; - o.value === qe.Strict ? ne = V.handleBounds.source : ne = [...V.handleBounds.source || [], ...V.handleBounds.target || []]; - const re = Co(ne, m.value.sourceHandle); - let M; - o.value === qe.Strict ? M = K.handleBounds.target : M = [...K.handleBounds.target || [], ...K.handleBounds.source || []]; - const v = Co(M, m.value.targetHandle), g = re ? re.position : Z.Bottom, $ = v ? v.position : Z.Top, { sourceX: D, sourceY: L, targetY: Y, targetX: W } = _r( - V, - re, - g, - K, - v, - $ - ); - return m.value.sourceX = D, m.value.sourceY = L, m.value.targetX = W, m.value.targetY = Y, ue( - "g", - { - ref: y, - key: e.id, - "data-id": e.id, - class: [ - "vue-flow__edge", - `vue-flow__edge-${e.type === !1 ? "default" : e.name}`, - l.value, - I.value, - { - updating: w.value, - selected: m.value.selected, - animated: m.value.animated, - inactive: !e.selectable - } - ], - onClick: ae, - onContextmenu: p, - onDblclick: R, - onMouseenter: S, - onMousemove: B, - onMouseleave: F, - onKeyDown: e.focusable ? U : void 0, - tabIndex: e.focusable ? 0 : void 0, - "aria-label": m.value.ariaLabel === null ? void 0 : m.value.ariaLabel || `Edge from ${m.value.source} to ${m.value.target}`, - "aria-describedby": e.focusable ? `${Za}-${t}` : void 0, - role: e.focusable ? "button" : void 0 - }, - [ - E.value ? null : ue(e.type === !1 ? u.value.default : e.type, { - id: e.id, - sourceNode: V, - targetNode: K, - source: m.value.source, - target: m.value.target, - type: m.value.type, - updatable: e.updatable, - selected: m.value.selected, - animated: m.value.animated, - label: m.value.label, - labelStyle: m.value.labelStyle, - labelShowBg: m.value.labelShowBg, - labelBgStyle: m.value.labelBgStyle, - labelBgPadding: m.value.labelBgPadding, - labelBgBorderRadius: m.value.labelBgBorderRadius, - data: m.value.data, - events: { ...m.value.events, ...b.on }, - style: z.value, - markerStart: `url(#${Ue(m.value.markerStart, t)})`, - markerEnd: `url(#${Ue(m.value.markerEnd, t)})`, - sourcePosition: g, - targetPosition: $, - sourceX: D, - sourceY: L, - targetX: W, - targetY: Y, - sourceHandleId: m.value.sourceHandle, - targetHandleId: m.value.targetHandle, - interactionWidth: m.value.interactionWidth - }), - [ - e.updatable === "source" || e.updatable === !0 ? [ - ue( - "g", - { - onMousedown: j, - onMouseenter: x, - onMouseout: N - }, - ue(Vo, { - position: g, - centerX: D, - centerY: L, - radius: a.value, - type: "source", - "data-type": "source" - }) - ) - ] : null, - e.updatable === "target" || e.updatable === !0 ? [ - ue( - "g", - { - onMousedown: A, - onMouseenter: x, - onMouseout: N - }, - ue(Vo, { - position: $, - centerX: W, - centerY: Y, - radius: a.value, - type: "target", - "data-type": "target" - }) - ) - ] : null - ] - ] - ); - }; - function x() { - w.value = !0; - } - function N() { - w.value = !1; - } - function C(V, K) { - b.emit.update({ event: V, edge: m.value, connection: K }); - } - function T(V) { - b.emit.updateEnd({ event: V, edge: m.value }), E.value = !1; - } - function J(V, K) { - V.button === 0 && (E.value = !0, _.value = K ? m.value.target : m.value.source, P.value = (K ? m.value.targetHandle : m.value.sourceHandle) ?? "", G.value = K ? "target" : "source", b.emit.updateStart({ event: V, edge: m.value }), f(V)); - } - function ae(V) { - const K = { event: V, edge: m.value }; - e.selectable && (r.value = !1, n([m.value])), b.emit.click(K); - } - function p(V) { - b.emit.contextMenu({ event: V, edge: m.value }); - } - function R(V) { - b.emit.doubleClick({ event: V, edge: m.value }); - } - function S(V) { - b.emit.mouseEnter({ event: V, edge: m.value }); - } - function B(V) { - b.emit.mouseMove({ event: V, edge: m.value }); - } - function F(V) { - b.emit.mouseLeave({ event: V, edge: m.value }); - } - function j(V) { - J(V, !0); - } - function A(V) { - J(V, !1); - } - function U(V) { - var K; - Ka.includes(V.key) && e.selectable && (V.key === "Escape" ? ((K = y.value) == null || K.blur(), s([c(e.id)])) : n([c(e.id)])); - } - } -}), Wu = Ku, qu = { - height: "0", - width: "0" -}, Qu = { - name: "EdgeLabelRenderer", - compatConfig: { MODE: 3 } -}, Ju = /* @__PURE__ */ fe({ - ...Qu, - setup(e) { - const { viewportRef: t } = ve(), n = q(() => { - var o; - return (o = t.value) == null ? void 0 : o.getElementsByClassName("vue-flow__edge-labels")[0]; - }); - return (o, a) => (te(), ie("svg", null, [ - (te(), ie("foreignObject", qu, [ - (te(), _e(bi, { - to: k(n), - disabled: !k(n) - }, [ - xe(o.$slots, "default") - ], 8, ["to", "disabled"])) - ])) - ])); - } -}), es = { class: "vue-flow__connection" }, ts = ["d", "marker-end", "marker-start"], ns = { - name: "ConnectionLine", - compatConfig: { MODE: 3 } -}, os = /* @__PURE__ */ fe({ - ...ns, - props: { - sourceNode: null - }, - setup(e) { - var t; - const n = ve(), o = O(n, "connectionMode"), a = O(n, "connectionStartHandle"), i = O(n, "connectionEndHandle"), r = O(n, "connectionPosition"), l = O(n, "connectionLineType"), u = O(n, "connectionLineStyle"), s = O(n, "connectionLineOptions"), c = O(n, "connectionStatus"), d = O(n, "viewport"), h = O(n, "findNode"), b = { - [Z.Left]: Z.Right, - [Z.Right]: Z.Left, - [Z.Top]: Z.Bottom, - [Z.Bottom]: Z.Top - }, m = (t = ut(an)) == null ? void 0 : t["connection-line"], w = q(() => a.value.handleId), E = q(() => a.value.type), _ = q(() => { - var C; - return ((C = i.value) == null ? void 0 : C.handleId) && h.value(i.value.nodeId) || null; - }), P = q( - () => { - var C, T; - return (o.value === qe.Strict ? (C = e.sourceNode.handleBounds[E.value]) == null ? void 0 : C.find((J) => J.id === w.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((J) => J.id === w.value)) || ((T = e.sourceNode.handleBounds[E.value ?? "source"]) == null ? void 0 : T[0]); - } - ), G = q(() => { - var C, T, J; - return _.value && ((C = i.value) == null ? void 0 : C.handleId) && ((o.value === qe.Strict ? (T = _.value.handleBounds[E.value === "source" ? "target" : "source"]) == null ? void 0 : T.find( - (ae) => { - var p; - return ae.id === ((p = i.value) == null ? void 0 : p.handleId); - } - ) : [..._.value.handleBounds.source || [], ..._.value.handleBounds.target || []].find( - (ae) => { - var p; - return ae.id === ((p = i.value) == null ? void 0 : p.handleId); - } - )) || ((J = _.value.handleBounds[E.value ?? "target"]) == null ? void 0 : J[0])) || null; - }), y = q(() => { - var C; - return (C = P.value) == null ? void 0 : C.position; - }), I = q(() => P.value ? jt( - y.value || Z.Top, - { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition }, - P.value - ) : { - x: e.sourceNode.dimensions.width / 2, - y: e.sourceNode.dimensions.height / 2 - }), z = q(() => y.value ? b[y.value] : void 0), f = q(() => (r.value.x - d.value.x) / d.value.zoom), x = q(() => (r.value.y - d.value.y) / d.value.zoom), N = q(() => { - let C; - const T = { - sourceX: I.value.x, - sourceY: I.value.y, - sourcePosition: y.value, - targetX: f.value, - targetY: x.value, - targetPosition: z.value - }; - switch (l.value ?? s.value.type) { - case Fe.Bezier: - [C] = Kt(T); - break; - case Fe.Step: - [C] = Yn({ - ...T, - borderRadius: 0 - }); - break; - case Fe.SmoothStep: - [C] = Yn(T); - break; - case Fe.SimpleBezier: - [C] = Qa(T); - break; - case Fe.Straight: - [C] = ei(T); - break; - default: - [C] = Kt(T); - break; - } - return C; - }); - return (C, T) => { - var J; - return te(), ie("g", es, [ - k(m) ? (te(), _e(ra(k(m)), Pi(Ht({ key: 0 }, { - sourceX: k(I).x, - sourceY: k(I).y, - sourcePosition: (J = k(P)) == null ? void 0 : J.position, - targetX: k(f), - targetY: k(x), - targetPosition: k(z), - sourceNode: e.sourceNode, - sourceHandle: k(P), - targetNode: k(_), - targetHandle: k(G), - markerEnd: `url(#${k(Ue)(k(s).markerEnd)})`, - markerStart: `url(#${k(Ue)(k(s).markerStart)})`, - connectionStatus: k(c) - })), null, 16)) : (te(), ie("path", { - key: 1, - d: k(N), - class: Ke(["vue-flow__connection-path", [k(s).class, k(c)]]), - style: Le(k(u) || k(s).style || {}), - "marker-end": `url(#${k(Ue)(k(s).markerEnd)})`, - "marker-start": `url(#${k(Ue)(k(s).markerStart)})` - }, null, 14, ts)) - ]); - }; - } -}), as = ["tabIndex"], is = { - name: "NodesSelection", - compatConfig: { MODE: 3 } -}, rs = /* @__PURE__ */ fe({ - ...is, - setup(e) { - const t = ve(), n = O(t, "emits"), o = O(t, "viewport"), a = O(t, "getSelectedNodes"), i = O(t, "noPanClassName"), r = O(t, "disableKeyboardA11y"), l = O(t, "userSelectionActive"), u = $a(), s = ee(), c = Ua({ - el: s, - onStart(w) { - n.value.selectionDragStart(w); - }, - onDrag(w) { - n.value.selectionDrag(w); - }, - onStop(w) { - n.value.selectionDragStop(w); - } - }); - Ve(() => { - var w; - r.value || (w = s.value) == null || w.focus({ preventScroll: !0 }); - }); - const d = q(() => _a(a.value)), h = q(() => ({ - width: `${d.value.width}px`, - height: `${d.value.height}px`, - top: `${d.value.y}px`, - left: `${d.value.x}px` - })); - function b(w) { - n.value.selectionContextMenu({ event: w, nodes: a.value }); - } - function m(w) { - r.value || it[w.key] && u( - { - x: it[w.key].x, - y: it[w.key].y - }, - w.shiftKey - ); - } - return (w, E) => !k(l) && k(d).width && k(d).height ? (te(), ie("div", { - key: 0, - class: Ke(["vue-flow__nodesselection vue-flow__container", k(i)]), - style: Le({ transform: `translate(${k(o).x}px,${k(o).y}px) scale(${k(o).zoom})` }) - }, [ - de("div", { - ref_key: "el", - ref: s, - class: Ke([{ dragging: k(c) }, "vue-flow__nodesselection-rect"]), - style: Le(k(h)), - tabIndex: k(r) ? void 0 : -1, - onContextmenu: b, - onKeydown: m - }, null, 46, as) - ], 6)) : ge("", !0); - } -}), ls = { - name: "UserSelection", - compatConfig: { MODE: 3 } -}, us = /* @__PURE__ */ fe({ - ...ls, - setup(e) { - const { userSelectionRect: t } = ve(); - return (n, o) => { - var a, i, r, l; - return te(), ie("div", { - class: "vue-flow__selection vue-flow__container", - style: Le({ - width: `${(a = k(t)) == null ? void 0 : a.width}px`, - height: `${(i = k(t)) == null ? void 0 : i.height}px`, - transform: `translate(${(r = k(t)) == null ? void 0 : r.x}px, ${(l = k(t)) == null ? void 0 : l.y}px)` - }) - }, null, 4); - }; - } -}), ss = { - input: Tr, - default: $r, - output: Or -}, cs = { - default: Ru, - straight: Hu, - step: Gu, - smoothstep: Ja, - simplebezier: Vu -}; -function ds() { - return { - vueFlowRef: null, - viewportRef: null, - nodes: [], - edges: [], - nodeTypes: {}, - edgeTypes: {}, - initialized: !1, - dimensions: { - width: 0, - height: 0 - }, - viewport: { x: 0, y: 0, zoom: 1 }, - d3Zoom: null, - d3Selection: null, - d3ZoomHandler: null, - minZoom: 0.5, - maxZoom: 2, - translateExtent: [ - [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY], - [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY] - ], - nodeExtent: [ - [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY], - [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY] - ], - selectionMode: Qn.Full, - paneDragging: !1, - preventScrolling: !0, - zoomOnScroll: !0, - zoomOnPinch: !0, - zoomOnDoubleClick: !0, - panOnScroll: !1, - panOnScrollSpeed: 0.5, - panOnScrollMode: Ut.Free, - panOnDrag: !0, - edgeUpdaterRadius: 10, - onlyRenderVisibleElements: !1, - defaultViewport: { x: 0, y: 0, zoom: 1 }, - nodesSelectionActive: !1, - userSelectionActive: !1, - userSelectionRect: null, - defaultMarkerColor: "#b1b1b7", - connectionLineStyle: {}, - connectionLineType: null, - connectionLineOptions: { - type: Fe.Bezier, - style: {} - }, - connectionMode: qe.Loose, - connectionStartHandle: null, - connectionEndHandle: null, - connectionClickStartHandle: null, - connectionPosition: { x: NaN, y: NaN }, - connectionRadius: 20, - connectOnClick: !0, - connectionStatus: null, - isValidConnection: null, - snapGrid: [15, 15], - snapToGrid: !1, - edgesUpdatable: !1, - edgesFocusable: !0, - nodesFocusable: !0, - nodesConnectable: !0, - nodesDraggable: !0, - elementsSelectable: !0, - selectNodesOnDrag: !0, - multiSelectionActive: !1, - selectionKeyCode: "Shift", - multiSelectionKeyCode: "Meta", - zoomActivationKeyCode: "Meta", - deleteKeyCode: "Backspace", - panActivationKeyCode: "Space", - hooks: lr(), - applyDefault: !0, - autoConnect: !1, - fitViewOnInit: !1, - noDragClassName: "nodrag", - noWheelClassName: "nowheel", - noPanClassName: "nopan", - defaultEdgeOptions: void 0, - elevateEdgesOnSelect: !1, - elevateNodesOnSelect: !0, - autoPanOnNodeDrag: !0, - autoPanOnConnect: !0, - disableKeyboardA11y: !1, - ariaLiveMessage: "", - __experimentalFeatures: { - nestedFlow: !1 - } - }; -} -function ti(e) { - const t = ds(); - return e && Object.keys(e).forEach((n) => { - const o = e[n]; - se(o) && (t[n] = o); - }), t; -} -function vs(e, t, n) { - const o = q(() => (w) => e.nodes && !t.value.length ? e.nodes.find((E) => E.id === w) : e.nodes[t.value.indexOf(w)]), a = q(() => (w) => e.edges && !n.value.length ? e.edges.find((E) => E.id === w) : e.edges[n.value.indexOf(w)]), i = q(() => { - var w; - const E = { - ...cs, - ...e.edgeTypes - }, _ = Object.keys(E); - return (w = e.edges) == null || w.forEach((P) => P.type && !_.includes(P.type) && (E[P.type] = P.type)), E; - }), r = q(() => { - var w; - const E = { - ...ss, - ...e.nodeTypes - }, _ = Object.keys(E); - return (w = e.nodes) == null || w.forEach((P) => P.type && !_.includes(P.type) && (E[P.type] = P.type)), E; - }), l = q(() => { - const w = e.nodes.filter((E) => !E.hidden); - return e.onlyRenderVisibleElements ? w && Ea( - w, - { - x: 0, - y: 0, - width: e.dimensions.width, - height: e.dimensions.height - }, - e.viewport, - !0 - ) : w ?? []; - }), u = (w, E, _) => { - if (E = E ?? o.value(w.source), _ = _ ?? o.value(w.target), !E || !_) { - e.hooks.error.trigger(new me(pe.EDGE_ORPHANED, w.id)); - return; - } - return !w.hidden && !_.hidden && !E.hidden; - }, s = q(() => e.onlyRenderVisibleElements ? e.edges.filter((w) => { - const E = o.value(w.source), _ = o.value(w.target); - return u(w, E, _) && Er({ - sourcePos: E.computedPosition || { x: 0, y: 0 }, - targetPos: _.computedPosition || { x: 0, y: 0 }, - sourceWidth: E.dimensions.width, - sourceHeight: E.dimensions.height, - targetWidth: _.dimensions.width, - targetHeight: _.dimensions.height, - width: e.dimensions.width, - height: e.dimensions.height, - viewport: e.viewport - }); - }) : e.edges.filter((w) => u(w))), c = q(() => [...l.value, ...s.value]), d = q(() => e.nodes.filter((w) => w.selected)), h = q(() => e.edges.filter((w) => w.selected)), b = q(() => [ - ...d.value ?? [], - ...h.value ?? [] - ]), m = q( - () => l.value.filter((w) => w.initialized && w.handleBounds !== void 0) - ); - return { - getNode: o, - getEdge: a, - getElements: c, - getEdgeTypes: i, - getNodeTypes: r, - getEdges: s, - getNodes: l, - getSelectedElements: b, - getSelectedNodes: d, - getSelectedEdges: h, - getNodesInitialized: m - }; -} -function ao(e, t, n) { - e.prototype = t.prototype = n, n.constructor = e; -} -function ni(e, t) { - var n = Object.create(e.prototype); - for (var o in t) - n[o] = t[o]; - return n; -} -function Pt() { -} -var Et = 0.7, Wt = 1 / Et, rt = "\\s*([+-]?\\d+)\\s*", St = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Ie = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", hs = /^#([0-9a-f]{3,8})$/, fs = new RegExp(`^rgb\\(${rt},${rt},${rt}\\)$`), gs = new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`), ps = new RegExp(`^rgba\\(${rt},${rt},${rt},${St}\\)$`), ms = new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${St}\\)$`), ys = new RegExp(`^hsl\\(${St},${Ie},${Ie}\\)$`), bs = new RegExp(`^hsla\\(${St},${Ie},${Ie},${St}\\)$`), Lo = { - aliceblue: 15792383, - antiquewhite: 16444375, - aqua: 65535, - aquamarine: 8388564, - azure: 15794175, - beige: 16119260, - bisque: 16770244, - black: 0, - blanchedalmond: 16772045, - blue: 255, - blueviolet: 9055202, - brown: 10824234, - burlywood: 14596231, - cadetblue: 6266528, - chartreuse: 8388352, - chocolate: 13789470, - coral: 16744272, - cornflowerblue: 6591981, - cornsilk: 16775388, - crimson: 14423100, - cyan: 65535, - darkblue: 139, - darkcyan: 35723, - darkgoldenrod: 12092939, - darkgray: 11119017, - darkgreen: 25600, - darkgrey: 11119017, - darkkhaki: 12433259, - darkmagenta: 9109643, - darkolivegreen: 5597999, - darkorange: 16747520, - darkorchid: 10040012, - darkred: 9109504, - darksalmon: 15308410, - darkseagreen: 9419919, - darkslateblue: 4734347, - darkslategray: 3100495, - darkslategrey: 3100495, - darkturquoise: 52945, - darkviolet: 9699539, - deeppink: 16716947, - deepskyblue: 49151, - dimgray: 6908265, - dimgrey: 6908265, - dodgerblue: 2003199, - firebrick: 11674146, - floralwhite: 16775920, - forestgreen: 2263842, - fuchsia: 16711935, - gainsboro: 14474460, - ghostwhite: 16316671, - gold: 16766720, - goldenrod: 14329120, - gray: 8421504, - green: 32768, - greenyellow: 11403055, - grey: 8421504, - honeydew: 15794160, - hotpink: 16738740, - indianred: 13458524, - indigo: 4915330, - ivory: 16777200, - khaki: 15787660, - lavender: 15132410, - lavenderblush: 16773365, - lawngreen: 8190976, - lemonchiffon: 16775885, - lightblue: 11393254, - lightcoral: 15761536, - lightcyan: 14745599, - lightgoldenrodyellow: 16448210, - lightgray: 13882323, - lightgreen: 9498256, - lightgrey: 13882323, - lightpink: 16758465, - lightsalmon: 16752762, - lightseagreen: 2142890, - lightskyblue: 8900346, - lightslategray: 7833753, - lightslategrey: 7833753, - lightsteelblue: 11584734, - lightyellow: 16777184, - lime: 65280, - limegreen: 3329330, - linen: 16445670, - magenta: 16711935, - maroon: 8388608, - mediumaquamarine: 6737322, - mediumblue: 205, - mediumorchid: 12211667, - mediumpurple: 9662683, - mediumseagreen: 3978097, - mediumslateblue: 8087790, - mediumspringgreen: 64154, - mediumturquoise: 4772300, - mediumvioletred: 13047173, - midnightblue: 1644912, - mintcream: 16121850, - mistyrose: 16770273, - moccasin: 16770229, - navajowhite: 16768685, - navy: 128, - oldlace: 16643558, - olive: 8421376, - olivedrab: 7048739, - orange: 16753920, - orangered: 16729344, - orchid: 14315734, - palegoldenrod: 15657130, - palegreen: 10025880, - paleturquoise: 11529966, - palevioletred: 14381203, - papayawhip: 16773077, - peachpuff: 16767673, - peru: 13468991, - pink: 16761035, - plum: 14524637, - powderblue: 11591910, - purple: 8388736, - rebeccapurple: 6697881, - red: 16711680, - rosybrown: 12357519, - royalblue: 4286945, - saddlebrown: 9127187, - salmon: 16416882, - sandybrown: 16032864, - seagreen: 3050327, - seashell: 16774638, - sienna: 10506797, - silver: 12632256, - skyblue: 8900331, - slateblue: 6970061, - slategray: 7372944, - slategrey: 7372944, - snow: 16775930, - springgreen: 65407, - steelblue: 4620980, - tan: 13808780, - teal: 32896, - thistle: 14204888, - tomato: 16737095, - turquoise: 4251856, - violet: 15631086, - wheat: 16113331, - white: 16777215, - whitesmoke: 16119285, - yellow: 16776960, - yellowgreen: 10145074 -}; -ao(Pt, Nt, { - copy(e) { - return Object.assign(new this.constructor(), this, e); - }, - displayable() { - return this.rgb().displayable(); - }, - hex: Yo, - // Deprecated! Use color.formatHex. - formatHex: Yo, - formatHex8: ws, - formatHsl: xs, - formatRgb: Xo, - toString: Xo -}); -function Yo() { - return this.rgb().formatHex(); -} -function ws() { - return this.rgb().formatHex8(); -} -function xs() { - return oi(this).formatHsl(); -} -function Xo() { - return this.rgb().formatRgb(); -} -function Nt(e) { - var t, n; - return e = (e + "").trim().toLowerCase(), (t = hs.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Go(t) : n === 3 ? new ye(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Dt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Dt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fs.exec(e)) ? new ye(t[1], t[2], t[3], 1) : (t = gs.exec(e)) ? new ye(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = ps.exec(e)) ? Dt(t[1], t[2], t[3], t[4]) : (t = ms.exec(e)) ? Dt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = ys.exec(e)) ? Uo(t[1], t[2] / 100, t[3] / 100, 1) : (t = bs.exec(e)) ? Uo(t[1], t[2] / 100, t[3] / 100, t[4]) : Lo.hasOwnProperty(e) ? Go(Lo[e]) : e === "transparent" ? new ye(NaN, NaN, NaN, 0) : null; -} -function Go(e) { - return new ye(e >> 16 & 255, e >> 8 & 255, e & 255, 1); -} -function Dt(e, t, n, o) { - return o <= 0 && (e = t = n = NaN), new ye(e, t, n, o); -} -function _s(e) { - return e instanceof Pt || (e = Nt(e)), e ? (e = e.rgb(), new ye(e.r, e.g, e.b, e.opacity)) : new ye(); -} -function Xn(e, t, n, o) { - return arguments.length === 1 ? _s(e) : new ye(e, t, n, o ?? 1); -} -function ye(e, t, n, o) { - this.r = +e, this.g = +t, this.b = +n, this.opacity = +o; -} -ao(ye, Xn, ni(Pt, { - brighter(e) { - return e = e == null ? Wt : Math.pow(Wt, e), new ye(this.r * e, this.g * e, this.b * e, this.opacity); - }, - darker(e) { - return e = e == null ? Et : Math.pow(Et, e), new ye(this.r * e, this.g * e, this.b * e, this.opacity); - }, - rgb() { - return this; - }, - clamp() { - return new ye(Ze(this.r), Ze(this.g), Ze(this.b), qt(this.opacity)); - }, - displayable() { - return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1; - }, - hex: Ho, - // Deprecated! Use color.formatHex. - formatHex: Ho, - formatHex8: Es, - formatRgb: Fo, - toString: Fo -})); -function Ho() { - return `#${je(this.r)}${je(this.g)}${je(this.b)}`; -} -function Es() { - return `#${je(this.r)}${je(this.g)}${je(this.b)}${je((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; -} -function Fo() { - const e = qt(this.opacity); - return `${e === 1 ? "rgb(" : "rgba("}${Ze(this.r)}, ${Ze(this.g)}, ${Ze(this.b)}${e === 1 ? ")" : `, ${e})`}`; -} -function qt(e) { - return isNaN(e) ? 1 : Math.max(0, Math.min(1, e)); -} -function Ze(e) { - return Math.max(0, Math.min(255, Math.round(e) || 0)); -} -function je(e) { - return e = Ze(e), (e < 16 ? "0" : "") + e.toString(16); -} -function Uo(e, t, n, o) { - return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new Se(e, t, n, o); -} -function oi(e) { - if (e instanceof Se) - return new Se(e.h, e.s, e.l, e.opacity); - if (e instanceof Pt || (e = Nt(e)), !e) - return new Se(); - if (e instanceof Se) - return e; - e = e.rgb(); - var t = e.r / 255, n = e.g / 255, o = e.b / 255, a = Math.min(t, n, o), i = Math.max(t, n, o), r = NaN, l = i - a, u = (i + a) / 2; - return l ? (t === i ? r = (n - o) / l + (n < o) * 6 : n === i ? r = (o - t) / l + 2 : r = (t - n) / l + 4, l /= u < 0.5 ? i + a : 2 - i - a, r *= 60) : l = u > 0 && u < 1 ? 0 : r, new Se(r, l, u, e.opacity); -} -function Ss(e, t, n, o) { - return arguments.length === 1 ? oi(e) : new Se(e, t, n, o ?? 1); -} -function Se(e, t, n, o) { - this.h = +e, this.s = +t, this.l = +n, this.opacity = +o; -} -ao(Se, Ss, ni(Pt, { - brighter(e) { - return e = e == null ? Wt : Math.pow(Wt, e), new Se(this.h, this.s, this.l * e, this.opacity); - }, - darker(e) { - return e = e == null ? Et : Math.pow(Et, e), new Se(this.h, this.s, this.l * e, this.opacity); - }, - rgb() { - var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, a = 2 * n - o; - return new ye( - kn(e >= 240 ? e - 240 : e + 120, a, o), - kn(e, a, o), - kn(e < 120 ? e + 240 : e - 120, a, o), - this.opacity - ); - }, - clamp() { - return new Se(jo(this.h), Bt(this.s), Bt(this.l), qt(this.opacity)); - }, - displayable() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1; - }, - formatHsl() { - const e = qt(this.opacity); - return `${e === 1 ? "hsl(" : "hsla("}${jo(this.h)}, ${Bt(this.s) * 100}%, ${Bt(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`; - } -})); -function jo(e) { - return e = (e || 0) % 360, e < 0 ? e + 360 : e; -} -function Bt(e) { - return Math.max(0, Math.min(1, e || 0)); -} -function kn(e, t, n) { - return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255; -} -const ai = (e) => () => e; -function Ns(e, t) { - return function(n) { - return e + n * t; - }; -} -function ks(e, t, n) { - return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) { - return Math.pow(e + o * t, n); - }; -} -function Cs(e) { - return (e = +e) == 1 ? ii : function(t, n) { - return n - t ? ks(t, n, e) : ai(isNaN(t) ? n : t); - }; -} -function ii(e, t) { - var n = t - e; - return n ? Ns(e, n) : ai(isNaN(e) ? t : e); -} -const Zo = function e(t) { - var n = Cs(t); - function o(a, i) { - var r = n((a = Xn(a)).r, (i = Xn(i)).r), l = n(a.g, i.g), u = n(a.b, i.b), s = ii(a.opacity, i.opacity); - return function(c) { - return a.r = r(c), a.g = l(c), a.b = u(c), a.opacity = s(c), a + ""; - }; - } - return o.gamma = e, o; -}(1); -function Ge(e, t) { - return e = +e, t = +t, function(n) { - return e * (1 - n) + t * n; - }; -} -var Gn = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Cn = new RegExp(Gn.source, "g"); -function Ms(e) { - return function() { - return e; - }; -} -function Ps(e) { - return function(t) { - return e(t) + ""; - }; -} -function Is(e, t) { - var n = Gn.lastIndex = Cn.lastIndex = 0, o, a, i, r = -1, l = [], u = []; - for (e = e + "", t = t + ""; (o = Gn.exec(e)) && (a = Cn.exec(t)); ) - (i = a.index) > n && (i = t.slice(n, i), l[r] ? l[r] += i : l[++r] = i), (o = o[0]) === (a = a[0]) ? l[r] ? l[r] += a : l[++r] = a : (l[++r] = null, u.push({ i: r, x: Ge(o, a) })), n = Cn.lastIndex; - return n < t.length && (i = t.slice(n), l[r] ? l[r] += i : l[++r] = i), l.length < 2 ? u[0] ? Ps(u[0].x) : Ms(t) : (t = u.length, function(s) { - for (var c = 0, d; c < t; ++c) - l[(d = u[c]).i] = d.x(s); - return l.join(""); - }); -} -var Ko = 180 / Math.PI, ri = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; -function li(e, t, n, o, a, i) { - var r, l, u; - return (r = Math.sqrt(e * e + t * t)) && (e /= r, t /= r), (u = e * n + t * o) && (n -= e * u, o -= t * u), (l = Math.sqrt(n * n + o * o)) && (n /= l, o /= l, u /= l), e * o < t * n && (e = -e, t = -t, u = -u, r = -r), { - translateX: a, - translateY: i, - rotate: Math.atan2(t, e) * Ko, - skewX: Math.atan(u) * Ko, - scaleX: r, - scaleY: l - }; -} -var At; -function $s(e) { - const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + ""); - return t.isIdentity ? ri : li(t.a, t.b, t.c, t.d, t.e, t.f); -} -function Ts(e) { - return e == null || (At || (At = document.createElementNS("http://www.w3.org/2000/svg", "g")), At.setAttribute("transform", e), !(e = At.transform.baseVal.consolidate())) ? ri : (e = e.matrix, li(e.a, e.b, e.c, e.d, e.e, e.f)); -} -function ui(e, t, n, o) { - function a(s) { - return s.length ? s.pop() + " " : ""; - } - function i(s, c, d, h, b, m) { - if (s !== d || c !== h) { - var w = b.push("translate(", null, t, null, n); - m.push({ i: w - 4, x: Ge(s, d) }, { i: w - 2, x: Ge(c, h) }); - } else - (d || h) && b.push("translate(" + d + t + h + n); - } - function r(s, c, d, h) { - s !== c ? (s - c > 180 ? c += 360 : c - s > 180 && (s += 360), h.push({ i: d.push(a(d) + "rotate(", null, o) - 2, x: Ge(s, c) })) : c && d.push(a(d) + "rotate(" + c + o); - } - function l(s, c, d, h) { - s !== c ? h.push({ i: d.push(a(d) + "skewX(", null, o) - 2, x: Ge(s, c) }) : c && d.push(a(d) + "skewX(" + c + o); - } - function u(s, c, d, h, b, m) { - if (s !== d || c !== h) { - var w = b.push(a(b) + "scale(", null, ",", null, ")"); - m.push({ i: w - 4, x: Ge(s, d) }, { i: w - 2, x: Ge(c, h) }); - } else - (d !== 1 || h !== 1) && b.push(a(b) + "scale(" + d + "," + h + ")"); - } - return function(s, c) { - var d = [], h = []; - return s = e(s), c = e(c), i(s.translateX, s.translateY, c.translateX, c.translateY, d, h), r(s.rotate, c.rotate, d, h), l(s.skewX, c.skewX, d, h), u(s.scaleX, s.scaleY, c.scaleX, c.scaleY, d, h), s = c = null, function(b) { - for (var m = -1, w = h.length, E; ++m < w; ) - d[(E = h[m]).i] = E.x(b); - return d.join(""); - }; - }; -} -var Os = ui($s, "px, ", "px)", "deg)"), Ds = ui(Ts, ", ", ")", ")"), Bs = 1e-12; -function Wo(e) { - return ((e = Math.exp(e)) + 1 / e) / 2; -} -function As(e) { - return ((e = Math.exp(e)) - 1 / e) / 2; -} -function zs(e) { - return ((e = Math.exp(2 * e)) - 1) / (e + 1); -} -const Rs = function e(t, n, o) { - function a(i, r) { - var l = i[0], u = i[1], s = i[2], c = r[0], d = r[1], h = r[2], b = c - l, m = d - u, w = b * b + m * m, E, _; - if (w < Bs) - _ = Math.log(h / s) / t, E = function(f) { - return [ - l + f * b, - u + f * m, - s * Math.exp(t * f * _) - ]; - }; - else { - var P = Math.sqrt(w), G = (h * h - s * s + o * w) / (2 * s * n * P), y = (h * h - s * s - o * w) / (2 * h * n * P), I = Math.log(Math.sqrt(G * G + 1) - G), z = Math.log(Math.sqrt(y * y + 1) - y); - _ = (z - I) / t, E = function(f) { - var x = f * _, N = Wo(I), C = s / (n * P) * (N * zs(t * x + I) - As(I)); - return [ - l + C * b, - u + C * m, - s * N / Wo(t * x + I) - ]; - }; - } - return E.duration = _ * 1e3 * t / Math.SQRT2, E; - } - return a.rho = function(i) { - var r = Math.max(1e-3, +i), l = r * r, u = l * l; - return e(r, l, u); - }, a; -}(Math.SQRT2, 2, 4); -var ft = 0, yt = 0, pt = 0, si = 1e3, Qt, bt, Jt = 0, Qe = 0, yn = 0, kt = typeof performance == "object" && performance.now ? performance : Date, ci = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) { - setTimeout(e, 17); -}; -function io() { - return Qe || (ci(Vs), Qe = kt.now() + yn); -} -function Vs() { - Qe = 0; -} -function en() { - this._call = this._time = this._next = null; -} -en.prototype = di.prototype = { - constructor: en, - restart: function(e, t, n) { - if (typeof e != "function") - throw new TypeError("callback is not a function"); - n = (n == null ? io() : +n) + (t == null ? 0 : +t), !this._next && bt !== this && (bt ? bt._next = this : Qt = this, bt = this), this._call = e, this._time = n, Hn(); - }, - stop: function() { - this._call && (this._call = null, this._time = 1 / 0, Hn()); - } -}; -function di(e, t, n) { - var o = new en(); - return o.restart(e, t, n), o; -} -function Ls() { - io(), ++ft; - for (var e = Qt, t; e; ) - (t = Qe - e._time) >= 0 && e._call.call(void 0, t), e = e._next; - --ft; -} -function qo() { - Qe = (Jt = kt.now()) + yn, ft = yt = 0; - try { - Ls(); - } finally { - ft = 0, Xs(), Qe = 0; - } -} -function Ys() { - var e = kt.now(), t = e - Jt; - t > si && (yn -= t, Jt = e); -} -function Xs() { - for (var e, t = Qt, n, o = 1 / 0; t; ) - t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Qt = n); - bt = e, Hn(o); -} -function Hn(e) { - if (!ft) { - yt && (yt = clearTimeout(yt)); - var t = e - Qe; - t > 24 ? (e < 1 / 0 && (yt = setTimeout(qo, e - kt.now() - yn)), pt && (pt = clearInterval(pt))) : (pt || (Jt = kt.now(), pt = setInterval(Ys, si)), ft = 1, ci(qo)); - } -} -function Qo(e, t, n) { - var o = new en(); - return t = t == null ? 0 : +t, o.restart((a) => { - o.stop(), e(a + t); - }, t, n), o; -} -var Gs = sn("start", "end", "cancel", "interrupt"), Hs = [], vi = 0, Jo = 1, Fn = 2, Yt = 3, ea = 4, Un = 5, Xt = 6; -function bn(e, t, n, o, a, i) { - var r = e.__transition; - if (!r) - e.__transition = {}; - else if (n in r) - return; - Fs(e, n, { - name: t, - index: o, - // For context during callback. - group: a, - // For context during callback. - on: Gs, - tween: Hs, - time: i.time, - delay: i.delay, - duration: i.duration, - ease: i.ease, - timer: null, - state: vi - }); -} -function ro(e, t) { - var n = Ce(e, t); - if (n.state > vi) - throw new Error("too late; already scheduled"); - return n; -} -function $e(e, t) { - var n = Ce(e, t); - if (n.state > Yt) - throw new Error("too late; already running"); - return n; -} -function Ce(e, t) { - var n = e.__transition; - if (!n || !(n = n[t])) - throw new Error("transition not found"); - return n; -} -function Fs(e, t, n) { - var o = e.__transition, a; - o[t] = n, n.timer = di(i, 0, n.time); - function i(s) { - n.state = Jo, n.timer.restart(r, n.delay, n.time), n.delay <= s && r(s - n.delay); - } - function r(s) { - var c, d, h, b; - if (n.state !== Jo) - return u(); - for (c in o) - if (b = o[c], b.name === n.name) { - if (b.state === Yt) - return Qo(r); - b.state === ea ? (b.state = Xt, b.timer.stop(), b.on.call("interrupt", e, e.__data__, b.index, b.group), delete o[c]) : +c < t && (b.state = Xt, b.timer.stop(), b.on.call("cancel", e, e.__data__, b.index, b.group), delete o[c]); - } - if (Qo(function() { - n.state === Yt && (n.state = ea, n.timer.restart(l, n.delay, n.time), l(s)); - }), n.state = Fn, n.on.call("start", e, e.__data__, n.index, n.group), n.state === Fn) { - for (n.state = Yt, a = new Array(h = n.tween.length), c = 0, d = -1; c < h; ++c) - (b = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (a[++d] = b); - a.length = d + 1; - } - } - function l(s) { - for (var c = s < n.duration ? n.ease.call(null, s / n.duration) : (n.timer.restart(u), n.state = Un, 1), d = -1, h = a.length; ++d < h; ) - a[d].call(e, c); - n.state === Un && (n.on.call("end", e, e.__data__, n.index, n.group), u()); - } - function u() { - n.state = Xt, n.timer.stop(), delete o[t]; - for (var s in o) - return; - delete e.__transition; - } -} -function Gt(e, t) { - var n = e.__transition, o, a, i = !0, r; - if (n) { - t = t == null ? null : t + ""; - for (r in n) { - if ((o = n[r]).name !== t) { - i = !1; - continue; - } - a = o.state > Fn && o.state < Un, o.state = Xt, o.timer.stop(), o.on.call(a ? "interrupt" : "cancel", e, e.__data__, o.index, o.group), delete n[r]; - } - i && delete e.__transition; - } -} -function Us(e) { - return this.each(function() { - Gt(this, e); - }); -} -function js(e, t) { - var n, o; - return function() { - var a = $e(this, e), i = a.tween; - if (i !== n) { - o = n = i; - for (var r = 0, l = o.length; r < l; ++r) - if (o[r].name === t) { - o = o.slice(), o.splice(r, 1); - break; - } - } - a.tween = o; - }; -} -function Zs(e, t, n) { - var o, a; - if (typeof n != "function") - throw new Error(); - return function() { - var i = $e(this, e), r = i.tween; - if (r !== o) { - a = (o = r).slice(); - for (var l = { name: t, value: n }, u = 0, s = a.length; u < s; ++u) - if (a[u].name === t) { - a[u] = l; - break; - } - u === s && a.push(l); - } - i.tween = a; - }; -} -function Ks(e, t) { - var n = this._id; - if (e += "", arguments.length < 2) { - for (var o = Ce(this.node(), n).tween, a = 0, i = o.length, r; a < i; ++a) - if ((r = o[a]).name === e) - return r.value; - return null; - } - return this.each((t == null ? js : Zs)(n, e, t)); -} -function lo(e, t, n) { - var o = e._id; - return e.each(function() { - var a = $e(this, o); - (a.value || (a.value = {}))[t] = n.apply(this, arguments); - }), function(a) { - return Ce(a, o).value[t]; - }; -} -function hi(e, t) { - var n; - return (typeof t == "number" ? Ge : t instanceof Nt ? Zo : (n = Nt(t)) ? (t = n, Zo) : Is)(e, t); -} -function Ws(e) { - return function() { - this.removeAttribute(e); - }; -} -function qs(e) { - return function() { - this.removeAttributeNS(e.space, e.local); - }; -} -function Qs(e, t, n) { - var o, a = n + "", i; - return function() { - var r = this.getAttribute(e); - return r === a ? null : r === o ? i : i = t(o = r, n); - }; -} -function Js(e, t, n) { - var o, a = n + "", i; - return function() { - var r = this.getAttributeNS(e.space, e.local); - return r === a ? null : r === o ? i : i = t(o = r, n); - }; -} -function ec(e, t, n) { - var o, a, i; - return function() { - var r, l = n(this), u; - return l == null ? void this.removeAttribute(e) : (r = this.getAttribute(e), u = l + "", r === u ? null : r === o && u === a ? i : (a = u, i = t(o = r, l))); - }; -} -function tc(e, t, n) { - var o, a, i; - return function() { - var r, l = n(this), u; - return l == null ? void this.removeAttributeNS(e.space, e.local) : (r = this.getAttributeNS(e.space, e.local), u = l + "", r === u ? null : r === o && u === a ? i : (a = u, i = t(o = r, l))); - }; -} -function nc(e, t) { - var n = cn(e), o = n === "transform" ? Ds : hi; - return this.attrTween(e, typeof t == "function" ? (n.local ? tc : ec)(n, o, lo(this, "attr." + e, t)) : t == null ? (n.local ? qs : Ws)(n) : (n.local ? Js : Qs)(n, o, t)); -} -function oc(e, t) { - return function(n) { - this.setAttribute(e, t.call(this, n)); - }; -} -function ac(e, t) { - return function(n) { - this.setAttributeNS(e.space, e.local, t.call(this, n)); - }; -} -function ic(e, t) { - var n, o; - function a() { - var i = t.apply(this, arguments); - return i !== o && (n = (o = i) && ac(e, i)), n; - } - return a._value = t, a; -} -function rc(e, t) { - var n, o; - function a() { - var i = t.apply(this, arguments); - return i !== o && (n = (o = i) && oc(e, i)), n; - } - return a._value = t, a; -} -function lc(e, t) { - var n = "attr." + e; - if (arguments.length < 2) - return (n = this.tween(n)) && n._value; - if (t == null) - return this.tween(n, null); - if (typeof t != "function") - throw new Error(); - var o = cn(e); - return this.tween(n, (o.local ? ic : rc)(o, t)); -} -function uc(e, t) { - return function() { - ro(this, e).delay = +t.apply(this, arguments); - }; -} -function sc(e, t) { - return t = +t, function() { - ro(this, e).delay = t; - }; -} -function cc(e) { - var t = this._id; - return arguments.length ? this.each((typeof e == "function" ? uc : sc)(t, e)) : Ce(this.node(), t).delay; -} -function dc(e, t) { - return function() { - $e(this, e).duration = +t.apply(this, arguments); - }; -} -function vc(e, t) { - return t = +t, function() { - $e(this, e).duration = t; - }; -} -function hc(e) { - var t = this._id; - return arguments.length ? this.each((typeof e == "function" ? dc : vc)(t, e)) : Ce(this.node(), t).duration; -} -function fc(e, t) { - if (typeof t != "function") - throw new Error(); - return function() { - $e(this, e).ease = t; - }; -} -function gc(e) { - var t = this._id; - return arguments.length ? this.each(fc(t, e)) : Ce(this.node(), t).ease; -} -function pc(e, t) { - return function() { - var n = t.apply(this, arguments); - if (typeof n != "function") - throw new Error(); - $e(this, e).ease = n; - }; -} -function mc(e) { - if (typeof e != "function") - throw new Error(); - return this.each(pc(this._id, e)); -} -function yc(e) { - typeof e != "function" && (e = Da(e)); - for (var t = this._groups, n = t.length, o = new Array(n), a = 0; a < n; ++a) - for (var i = t[a], r = i.length, l = o[a] = [], u, s = 0; s < r; ++s) - (u = i[s]) && e.call(u, u.__data__, s, i) && l.push(u); - return new Xe(o, this._parents, this._name, this._id); -} -function bc(e) { - if (e._id !== this._id) - throw new Error(); - for (var t = this._groups, n = e._groups, o = t.length, a = n.length, i = Math.min(o, a), r = new Array(o), l = 0; l < i; ++l) - for (var u = t[l], s = n[l], c = u.length, d = r[l] = new Array(c), h, b = 0; b < c; ++b) - (h = u[b] || s[b]) && (d[b] = h); - for (; l < o; ++l) - r[l] = t[l]; - return new Xe(r, this._parents, this._name, this._id); -} -function wc(e) { - return (e + "").trim().split(/^|\s+/).every(function(t) { - var n = t.indexOf("."); - return n >= 0 && (t = t.slice(0, n)), !t || t === "start"; - }); -} -function xc(e, t, n) { - var o, a, i = wc(t) ? ro : $e; - return function() { - var r = i(this, e), l = r.on; - l !== o && (a = (o = l).copy()).on(t, n), r.on = a; - }; -} -function _c(e, t) { - var n = this._id; - return arguments.length < 2 ? Ce(this.node(), n).on.on(e) : this.each(xc(n, e, t)); -} -function Ec(e) { - return function() { - var t = this.parentNode; - for (var n in this.__transition) - if (+n !== e) - return; - t && t.removeChild(this); - }; -} -function Sc() { - return this.on("end.remove", Ec(this._id)); -} -function Nc(e) { - var t = this._name, n = this._id; - typeof e != "function" && (e = to(e)); - for (var o = this._groups, a = o.length, i = new Array(a), r = 0; r < a; ++r) - for (var l = o[r], u = l.length, s = i[r] = new Array(u), c, d, h = 0; h < u; ++h) - (c = l[h]) && (d = e.call(c, c.__data__, h, l)) && ("__data__" in c && (d.__data__ = c.__data__), s[h] = d, bn(s[h], t, n, h, s, Ce(c, n))); - return new Xe(i, this._parents, t, n); -} -function kc(e) { - var t = this._name, n = this._id; - typeof e != "function" && (e = Oa(e)); - for (var o = this._groups, a = o.length, i = [], r = [], l = 0; l < a; ++l) - for (var u = o[l], s = u.length, c, d = 0; d < s; ++d) - if (c = u[d]) { - for (var h = e.call(c, c.__data__, d, u), b, m = Ce(c, n), w = 0, E = h.length; w < E; ++w) - (b = h[w]) && bn(b, t, n, w, h, m); - i.push(h), r.push(c); - } - return new Xe(i, r, t, n); -} -var Cc = Mt.prototype.constructor; -function Mc() { - return new Cc(this._groups, this._parents); -} -function Pc(e, t) { - var n, o, a; - return function() { - var i = ht(this, e), r = (this.style.removeProperty(e), ht(this, e)); - return i === r ? null : i === n && r === o ? a : a = t(n = i, o = r); - }; -} -function fi(e) { - return function() { - this.style.removeProperty(e); - }; -} -function Ic(e, t, n) { - var o, a = n + "", i; - return function() { - var r = ht(this, e); - return r === a ? null : r === o ? i : i = t(o = r, n); - }; -} -function $c(e, t, n) { - var o, a, i; - return function() { - var r = ht(this, e), l = n(this), u = l + ""; - return l == null && (u = l = (this.style.removeProperty(e), ht(this, e))), r === u ? null : r === o && u === a ? i : (a = u, i = t(o = r, l)); - }; -} -function Tc(e, t) { - var n, o, a, i = "style." + t, r = "end." + i, l; - return function() { - var u = $e(this, e), s = u.on, c = u.value[i] == null ? l || (l = fi(t)) : void 0; - (s !== n || a !== c) && (o = (n = s).copy()).on(r, a = c), u.on = o; - }; -} -function Oc(e, t, n) { - var o = (e += "") == "transform" ? Os : hi; - return t == null ? this.styleTween(e, Pc(e, o)).on("end.style." + e, fi(e)) : typeof t == "function" ? this.styleTween(e, $c(e, o, lo(this, "style." + e, t))).each(Tc(this._id, e)) : this.styleTween(e, Ic(e, o, t), n).on("end.style." + e, null); -} -function Dc(e, t, n) { - return function(o) { - this.style.setProperty(e, t.call(this, o), n); - }; -} -function Bc(e, t, n) { - var o, a; - function i() { - var r = t.apply(this, arguments); - return r !== a && (o = (a = r) && Dc(e, r, n)), o; - } - return i._value = t, i; -} -function Ac(e, t, n) { - var o = "style." + (e += ""); - if (arguments.length < 2) - return (o = this.tween(o)) && o._value; - if (t == null) - return this.tween(o, null); - if (typeof t != "function") - throw new Error(); - return this.tween(o, Bc(e, t, n ?? "")); -} -function zc(e) { - return function() { - this.textContent = e; - }; -} -function Rc(e) { - return function() { - var t = e(this); - this.textContent = t ?? ""; - }; -} -function Vc(e) { - return this.tween("text", typeof e == "function" ? Rc(lo(this, "text", e)) : zc(e == null ? "" : e + "")); -} -function Lc(e) { - return function(t) { - this.textContent = e.call(this, t); - }; -} -function Yc(e) { - var t, n; - function o() { - var a = e.apply(this, arguments); - return a !== n && (t = (n = a) && Lc(a)), t; - } - return o._value = e, o; -} -function Xc(e) { - var t = "text"; - if (arguments.length < 1) - return (t = this.tween(t)) && t._value; - if (e == null) - return this.tween(t, null); - if (typeof e != "function") - throw new Error(); - return this.tween(t, Yc(e)); -} -function Gc() { - for (var e = this._name, t = this._id, n = gi(), o = this._groups, a = o.length, i = 0; i < a; ++i) - for (var r = o[i], l = r.length, u, s = 0; s < l; ++s) - if (u = r[s]) { - var c = Ce(u, t); - bn(u, e, n, s, r, { - time: c.time + c.delay + c.duration, - delay: 0, - duration: c.duration, - ease: c.ease - }); - } - return new Xe(o, this._parents, e, n); -} -function Hc() { - var e, t, n = this, o = n._id, a = n.size(); - return new Promise(function(i, r) { - var l = { value: r }, u = { value: function() { - --a === 0 && i(); - } }; - n.each(function() { - var s = $e(this, o), c = s.on; - c !== e && (t = (e = c).copy(), t._.cancel.push(l), t._.interrupt.push(l), t._.end.push(u)), s.on = t; - }), a === 0 && i(); - }); -} -var Fc = 0; -function Xe(e, t, n, o) { - this._groups = e, this._parents = t, this._name = n, this._id = o; -} -function gi() { - return ++Fc; -} -var Oe = Mt.prototype; -Xe.prototype = { - constructor: Xe, - select: Nc, - selectAll: kc, - selectChild: Oe.selectChild, - selectChildren: Oe.selectChildren, - filter: yc, - merge: bc, - selection: Mc, - transition: Gc, - call: Oe.call, - nodes: Oe.nodes, - node: Oe.node, - size: Oe.size, - empty: Oe.empty, - each: Oe.each, - on: _c, - attr: nc, - attrTween: lc, - style: Oc, - styleTween: Ac, - text: Vc, - textTween: Xc, - remove: Sc, - tween: Ks, - delay: cc, - duration: hc, - ease: gc, - easeVarying: mc, - end: Hc, - [Symbol.iterator]: Oe[Symbol.iterator] -}; -function Uc(e) { - return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2; -} -var jc = { - time: null, - // Set on use. - delay: 0, - duration: 250, - ease: Uc -}; -function Zc(e, t) { - for (var n; !(n = e.__transition) || !(n = n[t]); ) - if (!(e = e.parentNode)) - throw new Error(`transition ${t} not found`); - return n; -} -function Kc(e) { - var t, n; - e instanceof Xe ? (t = e._id, e = e._name) : (t = gi(), (n = jc).time = io(), e = e == null ? null : e + ""); - for (var o = this._groups, a = o.length, i = 0; i < a; ++i) - for (var r = o[i], l = r.length, u, s = 0; s < l; ++s) - (u = r[s]) && bn(u, e, t, s, r, n || Zc(u, t)); - return new Xe(o, this._parents, e, t); -} -Mt.prototype.interrupt = Us; -Mt.prototype.transition = Kc; -const zt = (e) => () => e; -function Wc(e, { - sourceEvent: t, - target: n, - transform: o, - dispatch: a -}) { - Object.defineProperties(this, { - type: { value: e, enumerable: !0, configurable: !0 }, - sourceEvent: { value: t, enumerable: !0, configurable: !0 }, - target: { value: n, enumerable: !0, configurable: !0 }, - transform: { value: o, enumerable: !0, configurable: !0 }, - _: { value: a } - }); -} -function ze(e, t, n) { - this.k = e, this.x = t, this.y = n; -} -ze.prototype = { - constructor: ze, - scale: function(e) { - return e === 1 ? this : new ze(this.k * e, this.x, this.y); - }, - translate: function(e, t) { - return e === 0 & t === 0 ? this : new ze(this.k, this.x + this.k * e, this.y + this.k * t); - }, - apply: function(e) { - return [e[0] * this.k + this.x, e[1] * this.k + this.y]; - }, - applyX: function(e) { - return e * this.k + this.x; - }, - applyY: function(e) { - return e * this.k + this.y; - }, - invert: function(e) { - return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k]; - }, - invertX: function(e) { - return (e - this.x) / this.k; - }, - invertY: function(e) { - return (e - this.y) / this.k; - }, - rescaleX: function(e) { - return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e)); - }, - rescaleY: function(e) { - return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e)); - }, - toString: function() { - return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; - } -}; -var gt = new ze(1, 0, 0); -ze.prototype; -function Mn(e) { - e.stopImmediatePropagation(); -} -function mt(e) { - e.preventDefault(), e.stopImmediatePropagation(); -} -function qc(e) { - return (!e.ctrlKey || e.type === "wheel") && !e.button; -} -function Qc() { - var e = this; - return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]]; -} -function ta() { - return this.__zoom || gt; -} -function Jc(e) { - return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1); -} -function ed() { - return navigator.maxTouchPoints || "ontouchstart" in this; -} -function td(e, t, n) { - var o = e.invertX(t[0][0]) - n[0][0], a = e.invertX(t[1][0]) - n[1][0], i = e.invertY(t[0][1]) - n[0][1], r = e.invertY(t[1][1]) - n[1][1]; - return e.translate( - a > o ? (o + a) / 2 : Math.min(0, o) || Math.max(0, a), - r > i ? (i + r) / 2 : Math.min(0, i) || Math.max(0, r) - ); -} -function nd() { - var e = qc, t = Qc, n = td, o = Jc, a = ed, i = [0, 1 / 0], r = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, u = Rs, s = sn("start", "zoom", "end"), c, d, h, b = 500, m = 150, w = 0, E = 10; - function _(p) { - p.property("__zoom", ta).on("wheel.zoom", x, { passive: !1 }).on("mousedown.zoom", N).on("dblclick.zoom", C).filter(a).on("touchstart.zoom", T).on("touchmove.zoom", J).on("touchend.zoom touchcancel.zoom", ae).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - _.transform = function(p, R, S, B) { - var F = p.selection ? p.selection() : p; - F.property("__zoom", ta), p !== F ? I(p, R, S, B) : F.interrupt().each(function() { - z(this, arguments).event(B).start().zoom(null, typeof R == "function" ? R.apply(this, arguments) : R).end(); - }); - }, _.scaleBy = function(p, R, S, B) { - _.scaleTo(p, function() { - var F = this.__zoom.k, j = typeof R == "function" ? R.apply(this, arguments) : R; - return F * j; - }, S, B); - }, _.scaleTo = function(p, R, S, B) { - _.transform(p, function() { - var F = t.apply(this, arguments), j = this.__zoom, A = S == null ? y(F) : typeof S == "function" ? S.apply(this, arguments) : S, U = j.invert(A), V = typeof R == "function" ? R.apply(this, arguments) : R; - return n(G(P(j, V), A, U), F, r); - }, S, B); - }, _.translateBy = function(p, R, S, B) { - _.transform(p, function() { - return n(this.__zoom.translate( - typeof R == "function" ? R.apply(this, arguments) : R, - typeof S == "function" ? S.apply(this, arguments) : S - ), t.apply(this, arguments), r); - }, null, B); - }, _.translateTo = function(p, R, S, B, F) { - _.transform(p, function() { - var j = t.apply(this, arguments), A = this.__zoom, U = B == null ? y(j) : typeof B == "function" ? B.apply(this, arguments) : B; - return n(gt.translate(U[0], U[1]).scale(A.k).translate( - typeof R == "function" ? -R.apply(this, arguments) : -R, - typeof S == "function" ? -S.apply(this, arguments) : -S - ), j, r); - }, B, F); - }; - function P(p, R) { - return R = Math.max(i[0], Math.min(i[1], R)), R === p.k ? p : new ze(R, p.x, p.y); - } - function G(p, R, S) { - var B = R[0] - S[0] * p.k, F = R[1] - S[1] * p.k; - return B === p.x && F === p.y ? p : new ze(p.k, B, F); - } - function y(p) { - return [(+p[0][0] + +p[1][0]) / 2, (+p[0][1] + +p[1][1]) / 2]; - } - function I(p, R, S, B) { - p.on("start.zoom", function() { - z(this, arguments).event(B).start(); - }).on("interrupt.zoom end.zoom", function() { - z(this, arguments).event(B).end(); - }).tween("zoom", function() { - var F = this, j = arguments, A = z(F, j).event(B), U = t.apply(F, j), V = S == null ? y(U) : typeof S == "function" ? S.apply(F, j) : S, K = Math.max(U[1][0] - U[0][0], U[1][1] - U[0][1]), ne = F.__zoom, re = typeof R == "function" ? R.apply(F, j) : R, M = u(ne.invert(V).concat(K / ne.k), re.invert(V).concat(K / re.k)); - return function(v) { - if (v === 1) - v = re; - else { - var g = M(v), $ = K / g[2]; - v = new ze($, V[0] - g[0] * $, V[1] - g[1] * $); - } - A.zoom(null, v); - }; - }); - } - function z(p, R, S) { - return !S && p.__zooming || new f(p, R); - } - function f(p, R) { - this.that = p, this.args = R, this.active = 0, this.sourceEvent = null, this.extent = t.apply(p, R), this.taps = 0; - } - f.prototype = { - event: function(p) { - return p && (this.sourceEvent = p), this; - }, - start: function() { - return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this; - }, - zoom: function(p, R) { - return this.mouse && p !== "mouse" && (this.mouse[1] = R.invert(this.mouse[0])), this.touch0 && p !== "touch" && (this.touch0[1] = R.invert(this.touch0[0])), this.touch1 && p !== "touch" && (this.touch1[1] = R.invert(this.touch1[0])), this.that.__zoom = R, this.emit("zoom"), this; - }, - end: function() { - return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this; - }, - emit: function(p) { - var R = Ee(this.that).datum(); - s.call( - p, - this.that, - new Wc(p, { - sourceEvent: this.sourceEvent, - target: _, - type: p, - transform: this.that.__zoom, - dispatch: s - }), - R - ); - } - }; - function x(p, ...R) { - if (!e.apply(this, arguments)) - return; - var S = z(this, R).event(p), B = this.__zoom, F = Math.max(i[0], Math.min(i[1], B.k * Math.pow(2, o.apply(this, arguments)))), j = Me(p); - if (S.wheel) - (S.mouse[0][0] !== j[0] || S.mouse[0][1] !== j[1]) && (S.mouse[1] = B.invert(S.mouse[0] = j)), clearTimeout(S.wheel); - else { - if (B.k === F) - return; - S.mouse = [j, B.invert(j)], Gt(this), S.start(); - } - mt(p), S.wheel = setTimeout(A, m), S.zoom("mouse", n(G(P(B, F), S.mouse[0], S.mouse[1]), S.extent, r)); - function A() { - S.wheel = null, S.end(); - } - } - function N(p, ...R) { - if (h || !e.apply(this, arguments)) - return; - var S = p.currentTarget, B = z(this, R, !0).event(p), F = Ee(p.view).on("mousemove.zoom", V, !0).on("mouseup.zoom", K, !0), j = Me(p, S), A = p.clientX, U = p.clientY; - Ha(p.view), Mn(p), B.mouse = [j, this.__zoom.invert(j)], Gt(this), B.start(); - function V(ne) { - if (mt(ne), !B.moved) { - var re = ne.clientX - A, M = ne.clientY - U; - B.moved = re * re + M * M > w; - } - B.event(ne).zoom("mouse", n(G(B.that.__zoom, B.mouse[0] = Me(ne, S), B.mouse[1]), B.extent, r)); - } - function K(ne) { - F.on("mousemove.zoom mouseup.zoom", null), Fa(ne.view, B.moved), mt(ne), B.event(ne).end(); - } - } - function C(p, ...R) { - if (e.apply(this, arguments)) { - var S = this.__zoom, B = Me(p.changedTouches ? p.changedTouches[0] : p, this), F = S.invert(B), j = S.k * (p.shiftKey ? 0.5 : 2), A = n(G(P(S, j), B, F), t.apply(this, R), r); - mt(p), l > 0 ? Ee(this).transition().duration(l).call(I, A, B, p) : Ee(this).call(_.transform, A, B, p); - } - } - function T(p, ...R) { - if (e.apply(this, arguments)) { - var S = p.touches, B = S.length, F = z(this, R, p.changedTouches.length === B).event(p), j, A, U, V; - for (Mn(p), A = 0; A < B; ++A) - U = S[A], V = Me(U, this), V = [V, this.__zoom.invert(V), U.identifier], F.touch0 ? !F.touch1 && F.touch0[2] !== V[2] && (F.touch1 = V, F.taps = 0) : (F.touch0 = V, j = !0, F.taps = 1 + !!c); - c && (c = clearTimeout(c)), j && (F.taps < 2 && (d = V[0], c = setTimeout(function() { - c = null; - }, b)), Gt(this), F.start()); - } - } - function J(p, ...R) { - if (this.__zooming) { - var S = z(this, R).event(p), B = p.changedTouches, F = B.length, j, A, U, V; - for (mt(p), j = 0; j < F; ++j) - A = B[j], U = Me(A, this), S.touch0 && S.touch0[2] === A.identifier ? S.touch0[0] = U : S.touch1 && S.touch1[2] === A.identifier && (S.touch1[0] = U); - if (A = S.that.__zoom, S.touch1) { - var K = S.touch0[0], ne = S.touch0[1], re = S.touch1[0], M = S.touch1[1], v = (v = re[0] - K[0]) * v + (v = re[1] - K[1]) * v, g = (g = M[0] - ne[0]) * g + (g = M[1] - ne[1]) * g; - A = P(A, Math.sqrt(v / g)), U = [(K[0] + re[0]) / 2, (K[1] + re[1]) / 2], V = [(ne[0] + M[0]) / 2, (ne[1] + M[1]) / 2]; - } else if (S.touch0) - U = S.touch0[0], V = S.touch0[1]; - else - return; - S.zoom("touch", n(G(A, U, V), S.extent, r)); - } - } - function ae(p, ...R) { - if (this.__zooming) { - var S = z(this, R).event(p), B = p.changedTouches, F = B.length, j, A; - for (Mn(p), h && clearTimeout(h), h = setTimeout(function() { - h = null; - }, b), j = 0; j < F; ++j) - A = B[j], S.touch0 && S.touch0[2] === A.identifier ? delete S.touch0 : S.touch1 && S.touch1[2] === A.identifier && delete S.touch1; - if (S.touch1 && !S.touch0 && (S.touch0 = S.touch1, delete S.touch1), S.touch0) - S.touch0[1] = this.__zoom.invert(S.touch0[0]); - else if (S.end(), S.taps === 2 && (A = Me(A, this), Math.hypot(d[0] - A[0], d[1] - A[1]) < E)) { - var U = Ee(this).on("dblclick.zoom"); - U && U.apply(this, arguments); - } - } - } - return _.wheelDelta = function(p) { - return arguments.length ? (o = typeof p == "function" ? p : zt(+p), _) : o; - }, _.filter = function(p) { - return arguments.length ? (e = typeof p == "function" ? p : zt(!!p), _) : e; - }, _.touchable = function(p) { - return arguments.length ? (a = typeof p == "function" ? p : zt(!!p), _) : a; - }, _.extent = function(p) { - return arguments.length ? (t = typeof p == "function" ? p : zt([[+p[0][0], +p[0][1]], [+p[1][0], +p[1][1]]]), _) : t; - }, _.scaleExtent = function(p) { - return arguments.length ? (i[0] = +p[0], i[1] = +p[1], _) : [i[0], i[1]]; - }, _.translateExtent = function(p) { - return arguments.length ? (r[0][0] = +p[0][0], r[1][0] = +p[1][0], r[0][1] = +p[0][1], r[1][1] = +p[1][1], _) : [[r[0][0], r[0][1]], [r[1][0], r[1][1]]]; - }, _.constrain = function(p) { - return arguments.length ? (n = p, _) : n; - }, _.duration = function(p) { - return arguments.length ? (l = +p, _) : l; - }, _.interpolate = function(p) { - return arguments.length ? (u = p, _) : u; - }, _.on = function() { - var p = s.on.apply(s, arguments); - return p === s ? _ : p; - }, _.clickDistance = function(p) { - return arguments.length ? (w = (p = +p) * p, _) : Math.sqrt(w); - }, _.tapDistance = function(p) { - return arguments.length ? (E = +p, _) : E; - }, _; -} -const Pn = 0.1; -function He() { -} -const od = { - zoomIn: He, - zoomOut: He, - zoomTo: He, - fitView: He, - setCenter: He, - fitBounds: He, - project: (e) => e, - setTransform: He, - getTransform: () => ({ x: 0, y: 0, zoom: 1 }), - initialized: !1 -}, ad = (e, t) => { - const n = e, o = O(n, "nodes"), a = O(n, "d3Zoom"), i = O(n, "d3Selection"), r = O(n, "dimensions"), l = O(n, "translateExtent"), u = O(n, "minZoom"), s = O(n, "maxZoom"), c = O(n, "viewport"), d = O(n, "snapToGrid"), h = O(n, "snapGrid"), b = O(n, "hooks"), m = t, w = O(m, "getNodes"), E = ee(!1); - b.value.nodesInitialized.on(() => { - E.value = !0; - }); - const _ = q(() => !!a.value && !!i.value && !!r.value.width && !!r.value.height && E.value); - function P(y, I) { - i.value && a.value && a.value.scaleBy(In(i.value, I), y); - } - function G(y, I, z, f) { - const { x, y: N } = ma({ x: -y, y: -I }, l.value), C = gt.translate(-x, -N).scale(z); - i.value && a.value && a.value.transform(In(i.value, f), C); - } - return q(() => _.value ? { - initialized: !0, - zoomIn: (y) => { - P(1.2, y == null ? void 0 : y.duration); - }, - zoomOut: (y) => { - P(1 / 1.2, y == null ? void 0 : y.duration); - }, - zoomTo: (y, I) => { - i.value && a.value && a.value.scaleTo(In(i.value, I == null ? void 0 : I.duration), y); - }, - setTransform: (y, I) => { - G(y.x, y.y, y.zoom, I == null ? void 0 : I.duration); - }, - getTransform: () => ({ - x: c.value.x, - y: c.value.y, - zoom: c.value.zoom - }), - fitView: (y = { - padding: Pn, - includeHiddenNodes: !1, - duration: 0 - }) => { - if (!o.value.length) - return; - const I = (y.includeHiddenNodes ? o.value : w.value).filter((C) => { - var T; - const J = C.initialized && C.dimensions.width && C.dimensions.height; - let ae = !0; - return (T = y.nodes) != null && T.length && (ae = y.nodes.includes(C.id)), J && ae; - }), z = _a(I), { x: f, y: x, zoom: N } = So( - z, - r.value.width, - r.value.height, - y.minZoom ?? u.value, - y.maxZoom ?? s.value, - y.padding ?? Pn, - y.offset - ); - G(f, x, N, y == null ? void 0 : y.duration); - }, - setCenter: (y, I, z) => { - const f = typeof (z == null ? void 0 : z.zoom) < "u" ? z.zoom : s.value, x = r.value.width / 2 - y * f, N = r.value.height / 2 - I * f; - G(x, N, f, z == null ? void 0 : z.duration); - }, - fitBounds: (y, I = { padding: Pn }) => { - const { x: z, y: f, zoom: x } = So( - y, - r.value.width, - r.value.height, - u.value, - s.value, - I.padding - ); - G(z, f, x, I == null ? void 0 : I.duration); - }, - project: (y) => wa(y, c.value, d.value, h.value) - } : od); -}; -function In(e, t = 0) { - return e.transition().duration(t); -} -function $n(e, t) { - if (t) { - const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height; - if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) { - let a = {}; - if (Ye(t.style) ? a = { ...t.style(t) } : t.style && (a = { ...t.style }), a.width = a.width ?? `${t.dimensions.width}px`, a.height = a.height ?? `${t.dimensions.height}px`, n > 0) - if (Ae(a.width)) { - const i = Number(a.width.replace("px", "")); - a.width = `${i + n}px`; - } else - a.width += n; - if (o > 0) - if (Ae(a.height)) { - const i = Number(a.height.replace("px", "")); - a.height = `${i + o}px`; - } else - a.height += o; - if (e.position.x < 0) { - const i = Math.abs(e.position.x); - if (t.position.x = t.position.x - i, Ae(a.width)) { - const r = Number(a.width.replace("px", "")); - a.width = `${r + i}px`; - } else - a.width += i; - e.position.x = 0; - } - if (e.position.y < 0) { - const i = Math.abs(e.position.y); - if (t.position.y = t.position.y - i, Ae(a.height)) { - const r = Number(a.height.replace("px", "")); - a.height = `${r + i}px`; - } else - a.height += i; - e.position.y = 0; - } - t.dimensions.width = Number(a.width.toString().replace("px", "")), t.dimensions.height = Number(a.height.toString().replace("px", "")), Ye(t.style) ? t.style = (i) => { - const r = t.style; - return { - ...r(i), - ...a - }; - } : t.style = { - ...t.style, - ...a - }; - } - } -} -function na(e, t) { - e.filter((o) => o.type === "add" || o.type === "remove").forEach((o) => { - if (o.type === "add") - t.findIndex((a) => a.id === o.item.id) === -1 && t.push(o.item); - else if (o.type === "remove") { - const a = t.findIndex((i) => i.id === o.id); - a !== -1 && t.splice(a, 1); - } - }); - const n = t.map((o) => o.id); - return t.forEach((o) => { - var a, i; - const r = e.filter((l) => l.id === o.id); - for (const l of r) - switch (l.type) { - case "select": - o.selected = l.selected; - break; - case "position": - if (et(o) && (typeof l.position < "u" && (o.position = l.position), typeof l.dragging < "u" && (o.dragging = l.dragging), o.expandParent && o.parentNode)) { - const u = t[n.indexOf(o.parentNode)]; - u && et(u) && $n(o, u); - } - break; - case "dimensions": - if (et(o)) { - if (typeof l.dimensions < "u" && (o.dimensions = l.dimensions), typeof l.updateStyle < "u" && (o.style = { - ...o.style || {}, - width: `${(a = l.dimensions) == null ? void 0 : a.width}px`, - height: `${(i = l.dimensions) == null ? void 0 : i.height}px` - }), typeof l.resizing < "u" && (o.resizing = l.resizing), o.expandParent && o.parentNode) { - const u = t[n.indexOf(o.parentNode)]; - u && et(u) && (u.initialized ? $n(o, u) : Re(() => { - $n(o, u); - })); - } - o.initialized || (o.initialized = !0); - } - break; - } - }), t; -} -function De(e, t) { - return { - id: e, - type: "select", - selected: t - }; -} -function oa(e) { - return { - item: e, - type: "add" - }; -} -function Tn(e) { - return { - id: e, - type: "remove" - }; -} -function On(e, t) { - return e.reduce( - (n, o) => { - let a = t.includes(o.id); - se(o.selectable) && !o.selectable && (a = !1); - const i = et(o) ? "changedNodes" : "changedEdges"; - return !o.selected && a ? n[i].push(De(o.id, !0)) : o.selected && !a && n[i].push(De(o.id, !1)), n; - }, - { changedNodes: [], changedEdges: [] } - ); -} -function id(e, t, n, o) { - let a = !1; - const i = ad(e, t), r = (v) => { - const g = v ?? n.value ?? []; - e.hooks.updateNodeInternals.trigger(g); - }, l = (v) => { - if (v) - return e.nodes && !n.value.length ? e.nodes.find((g) => g.id === v) : e.nodes[n.value.indexOf(v)]; - }, u = (v) => { - if (v) - return e.edges && !o.value.length ? e.edges.find((g) => g.id === v) : e.edges[o.value.indexOf(v)]; - }, s = (v, g, $) => { - const D = []; - v.forEach((L) => { - var Y, W; - const Q = { - id: L.id, - type: "position", - dragging: $, - from: L.from - }; - if (g && (Q.position = L.position, L.parentNode)) { - const oe = l(L.parentNode); - Q.position = { - x: Q.position.x - (((Y = oe == null ? void 0 : oe.computedPosition) == null ? void 0 : Y.x) ?? 0), - y: Q.position.y - (((W = oe == null ? void 0 : oe.computedPosition) == null ? void 0 : W.y) ?? 0) - }; - } - D.push(Q); - }), D != null && D.length && e.hooks.nodesChange.trigger(D); - }, c = (v) => { - var g; - if (!e.vueFlowRef) - return; - const $ = e.vueFlowRef.querySelector(".vue-flow__transformationpane"); - if (!$) - return; - let D; - if ((g = e.__experimentalFeatures) != null && g.nestedFlow) { - let Y = [$], W = $, Q; - for (; !Q && W; ) - W = W.parentElement, Q = W == null ? void 0 : W.classList.contains("vue-flow__transformationpane"), Q && (Y = [W, ...Y]); - Y.forEach((oe) => { - const X = window.getComputedStyle(oe), { m22: he } = new window.DOMMatrixReadOnly(X.transform); - D ? D *= he : D = he; - }); - } else { - const Y = window.getComputedStyle($), { m22: W } = new window.DOMMatrixReadOnly(Y.transform); - D = W; - } - const L = v.reduce((Y, W) => { - const Q = l(W.id); - if (Q) { - const oe = nn(W.nodeElement); - oe.width && oe.height && (Q.dimensions.width !== oe.width || Q.dimensions.height !== oe.height || W.forceUpdate) && (Q.handleBounds.source = To(".source", W.nodeElement, D), Q.handleBounds.target = To(".target", W.nodeElement, D), Q.dimensions = oe, Q.initialized = !0, Y.push({ - id: Q.id, - type: "dimensions", - dimensions: oe - })); - } - return Y; - }, []); - e.fitViewOnInit && !a && (be(() => i.value.initialized).toBe(!0).then(() => { - i.value.fitView(); - }), a = !0), L.length && e.hooks.nodesChange.trigger(L); - }, d = (v, g) => { - const $ = v.map((Y) => Y.id); - let D, L = []; - if (e.multiSelectionActive) - D = $.map((Y) => De(Y, g)); - else { - const Y = On([...e.nodes, ...e.edges], $); - D = Y.changedNodes, L = Y.changedEdges; - } - D.length && e.hooks.nodesChange.trigger(D), L.length && e.hooks.edgesChange.trigger(L); - }, h = (v, g) => { - const $ = v.map((Y) => Y.id); - let D = [], L; - if (e.multiSelectionActive) - L = $.map((Y) => De(Y, g)); - else { - const Y = On([...e.nodes, ...e.edges], $); - D = Y.changedNodes, L = Y.changedEdges; - } - D.length && e.hooks.nodesChange.trigger(D), L.length && e.hooks.edgesChange.trigger(L); - }, b = (v, g) => { - const $ = v.filter(Vt).map((W) => W.id), D = v.filter(dt).map((W) => W.id); - let { changedNodes: L, changedEdges: Y } = On([...e.nodes, ...e.edges], [...$, ...D]); - e.multiSelectionActive && (L = $.map((W) => De(W, g)), Y = D.map((W) => De(W, g))), L.length && e.hooks.nodesChange.trigger(L), Y.length && e.hooks.edgesChange.trigger(Y); - }, m = (v) => { - d(v, !0); - }, w = (v) => { - h(v, !0); - }, E = (v) => { - b(v, !0); - }, _ = (v) => { - if (!v.length) - return d(v, !1); - const g = v.map(($) => $.id).map(($) => De($, !1)); - g.length && e.hooks.nodesChange.trigger(g); - }, P = (v) => { - if (!v.length) - return h(v, !1); - const g = v.map(($) => $.id).map(($) => De($, !1)); - g.length && e.hooks.edgesChange.trigger(g); - }, G = (v) => { - if (!v || !v.length) - return b([], !1); - const { changedNodes: g, changedEdges: $ } = v.reduce( - (D, L) => { - const Y = De(L.id, !1); - return Vt(L) ? D.changedNodes.push(Y) : D.changedEdges.push(Y), D; - }, - { changedNodes: [], changedEdges: [] } - ); - g.length && e.hooks.nodesChange.trigger(g), $.length && e.hooks.edgesChange.trigger($); - }, y = (v) => { - var g; - (g = e.d3Zoom) == null || g.scaleExtent([v, e.maxZoom]), e.minZoom = v; - }, I = (v) => { - var g; - (g = e.d3Zoom) == null || g.scaleExtent([e.minZoom, v]), e.maxZoom = v; - }, z = (v) => { - var g; - (g = e.d3Zoom) == null || g.translateExtent(v), e.translateExtent = v; - }, f = (v) => { - e.nodeExtent = v, r(n.value); - }, x = (v) => { - e.nodesDraggable = v, e.nodesConnectable = v, e.elementsSelectable = v; - }, N = (v) => { - const g = v instanceof Function ? v(e.nodes) : v; - !e.initialized && !g.length || (e.nodes = No(g, e.nodes, l, e.hooks.error.trigger)); - }, C = (v) => { - const g = v instanceof Function ? v(e.edges) : v; - if (!e.initialized && !g.length) - return; - const $ = e.isValidConnection ? g.filter( - (D) => e.isValidConnection(D, { - edges: e.edges, - sourceNode: l(D.source), - targetNode: l(D.target) - }) - ) : g; - e.edges = $.reduce((D, L) => { - const Y = l(L.source), W = l(L.target), Q = !Y || typeof Y > "u", oe = !W || typeof W > "u"; - if (Q && oe ? e.hooks.error.trigger(new me(pe.EDGE_SOURCE_TARGET_MISSING, L.id, L.source, L.target)) : (Q && e.hooks.error.trigger(new me(pe.EDGE_SOURCE_MISSING, L.id, L.source)), oe && e.hooks.error.trigger(new me(pe.EDGE_TARGET_MISSING, L.id, L.target))), Q || oe) - return D; - const X = u(L.id); - return D.push({ - ...ya(L, Object.assign({}, X, e.defaultEdgeOptions)), - sourceNode: Y, - targetNode: W - }), D; - }, []); - }, T = (v) => { - const g = v instanceof Function ? v([...e.nodes, ...e.edges]) : v; - !e.initialized && !g.length || (N(g.filter(Vt)), C(g.filter(dt))); - }, J = (v) => { - const g = v instanceof Function ? v(e.nodes) : v, $ = No(g, e.nodes, l, e.hooks.error.trigger).map(oa); - $.length && e.hooks.nodesChange.trigger($); - }, ae = (v) => { - const g = v instanceof Function ? v(e.edges) : v, $ = (e.isValidConnection ? g.filter( - (D) => e.isValidConnection(D, { - edges: e.edges, - sourceNode: l(D.source), - targetNode: l(D.target) - }) - ) : g).reduce((D, L) => { - const Y = mr( - { - ...L, - ...e.defaultEdgeOptions - }, - e.edges, - e.hooks.error.trigger - ); - if (Y) { - const W = l(Y.source), Q = l(Y.target), oe = !W || typeof W > "u", X = !Q || typeof Q > "u"; - if (oe && X ? e.hooks.error.trigger(new me(pe.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (oe && e.hooks.error.trigger(new me(pe.EDGE_SOURCE_MISSING, Y.id, Y.source)), X && e.hooks.error.trigger(new me(pe.EDGE_TARGET_MISSING, Y.id, Y.target))), oe || X) - return D; - D.push( - oa({ - ...Y, - sourceNode: W, - targetNode: Q - }) - ); - } - return D; - }, []); - $.length && e.hooks.edgesChange.trigger($); - }, p = (v, g = !0) => { - const $ = v instanceof Function ? v(e.nodes) : v, D = [], L = []; - $.forEach((Y) => { - const W = typeof Y == "string" ? l(Y) : Y; - if (!(se(W.deletable) && !W.deletable) && (D.push(Tn(W.id)), g)) { - const Q = on([W], e.edges).filter((oe) => se(oe.deletable) ? oe.deletable : !0); - L.push(...Q.map((oe) => Tn(oe.id))); - } - }), L.length && e.hooks.edgesChange.trigger(L), D.length && e.hooks.nodesChange.trigger(D); - }, R = (v) => { - const g = v instanceof Function ? v(e.edges) : v, $ = []; - g.forEach((D) => { - const L = typeof D == "string" ? u(D) : D; - se(L.deletable) && !L.deletable || $.push(Tn(typeof D == "string" ? D : D.id)); - }), e.hooks.edgesChange.trigger($); - }, S = (v, g, $ = !0) => yr(v, g, e.edges, u, $, e.hooks.error.trigger), B = (v) => na(v, e.nodes), F = (v) => na(v, e.edges), j = (v, g, $, D = !1) => { - D ? e.connectionClickStartHandle = v : e.connectionStartHandle = v, e.connectionEndHandle = null, e.connectionStatus = null, g && (e.connectionPosition = g); - }, A = (v, g = null, $ = null) => { - e.connectionStartHandle && (e.connectionPosition = v, e.connectionEndHandle = g, e.connectionStatus = $); - }, U = (v, g) => { - e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, g ? e.connectionClickStartHandle = null : e.connectionStartHandle = null; - }, V = (v) => { - const g = cr(v), $ = g ? null : l(v.id); - return !g && !$ ? [null, null, g] : [g ? v : _o($), $, g]; - }, K = (v, g = !0, $) => { - const [D, L, Y] = V(v); - return D ? ($ || e.nodes).filter((W) => { - if (!Y && (W.id === L.id || !W.computedPosition)) - return !1; - const Q = _o(W), oe = Bn(Q, D); - return g && oe > 0 || oe >= Number(v.width) * Number(v.height); - }) : []; - }, ne = (v, g, $ = !0) => { - const [D] = V(v); - if (!D) - return !1; - const L = Bn(D, g); - return $ && L > 0 || L >= Number(v.width) * Number(v.height); - }, re = (v) => { - const { viewport: g, dimensions: $, d3Zoom: D, d3Selection: L, translateExtent: Y } = e; - if (!D || !L || !v.x && !v.y) - return !1; - const W = gt.translate(g.x + v.x, g.y + v.y).scale(g.zoom), Q = [ - [0, 0], - [$.width, $.height] - ], oe = D.constrain()(W, Q, Y), X = e.viewport.x !== oe.x || e.viewport.y !== oe.y || e.viewport.zoom !== oe.k; - return D.transform(L, oe), X; - }, M = (v) => { - const g = v instanceof Function ? v(e) : v, $ = [ - "modelValue", - "nodes", - "edges", - "maxZoom", - "minZoom", - "translateExtent", - "nodeExtent", - "hooks", - "defaultEdgeOptions" - ], D = [ - "d3Zoom", - "d3Selection", - "d3ZoomHandler", - "viewportRef", - "vueFlowRef", - "dimensions", - "hooks" - ]; - se(g.defaultEdgeOptions) && (e.defaultEdgeOptions = g.defaultEdgeOptions); - const L = g.modelValue || g.nodes || g.edges ? [] : void 0; - L && (g.modelValue && L.push(...g.modelValue), g.nodes && L.push(...g.nodes), g.edges && L.push(...g.edges), T(L)); - const Y = () => { - se(g.maxZoom) && I(g.maxZoom), se(g.minZoom) && y(g.minZoom), se(g.translateExtent) && z(g.translateExtent), se(g.nodeExtent) && f(g.nodeExtent); - }; - Object.keys(g).forEach((W) => { - const Q = W, oe = g[Q]; - ![...$, ...D].includes(Q) && se(oe) && (e[Q] = oe); - }), e.d3Zoom ? Y() : be(() => e.d3Zoom).not.toBeUndefined().then(Y), e.initialized || (e.initialized = !0); - }; - return { - updateNodePositions: s, - updateNodeDimensions: c, - setElements: T, - setNodes: N, - setEdges: C, - addNodes: J, - addEdges: ae, - removeNodes: p, - removeEdges: R, - findNode: l, - findEdge: u, - updateEdge: S, - applyEdgeChanges: F, - applyNodeChanges: B, - addSelectedElements: E, - addSelectedNodes: m, - addSelectedEdges: w, - setMinZoom: y, - setMaxZoom: I, - setTranslateExtent: z, - setNodeExtent: f, - removeSelectedElements: G, - removeSelectedNodes: _, - removeSelectedEdges: P, - startConnection: j, - updateConnection: A, - endConnection: U, - setInteractive: x, - setState: M, - getIntersectingNodes: K, - isNodeIntersecting: ne, - panBy: re, - fitView: async (v = { padding: 0.1 }) => { - await be(() => i.value.initialized).toBe(!0), i.value.fitView(v); - }, - zoomIn: async (v) => { - await be(() => i.value.initialized).toBe(!0), i.value.zoomIn(v); - }, - zoomOut: async (v) => { - await be(() => i.value.initialized).toBe(!0), i.value.zoomOut(v); - }, - zoomTo: async (v, g) => { - await be(() => i.value.initialized).toBe(!0), i.value.zoomTo(v, g); - }, - setTransform: async (v, g) => { - await be(() => i.value.initialized).toBe(!0), i.value.setTransform(v, g); - }, - getTransform: () => i.value.getTransform(), - setCenter: async (v, g, $) => { - await be(() => i.value.initialized).toBe(!0), i.value.setCenter(v, g, $); - }, - fitBounds: async (v, g) => { - await be(() => i.value.initialized).toBe(!0), i.value.fitBounds(v, g); - }, - project: (v) => i.value.project(v), - toObject: () => JSON.parse( - JSON.stringify({ - nodes: e.nodes.map((v) => { - const { - computedPosition: g, - handleBounds: $, - selected: D, - dimensions: L, - isParent: Y, - resizing: W, - dragging: Q, - initialized: oe, - ...X - } = v; - return X; - }), - edges: e.edges.map((v) => { - const { selected: g, sourceNode: $, targetNode: D, ...L } = v; - return L; - }), - position: [e.viewport.x, e.viewport.y], - zoom: e.viewport.zoom - }) - ), - updateNodeInternals: r, - $reset: () => { - const v = ti(); - if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) { - const g = gt.translate(v.defaultViewport.x ?? 0, v.defaultViewport.y ?? 0).scale(We(v.defaultViewport.zoom ?? 1, v.minZoom, v.maxZoom)), $ = e.viewportRef.getBoundingClientRect(), D = [ - [0, 0], - [$.width, $.height] - ], L = e.d3Zoom.constrain()(g, D, v.translateExtent); - e.d3Zoom.transform(e.d3Selection, L); - } - M(v); - }, - $destroy: () => { - } - }; -} -class tt { - constructor() { - this.currentId = 0, this.flows = /* @__PURE__ */ new Map(); - } - static getInstance() { - return tt.instance || (tt.instance = new tt()), tt.instance; - } - set(t, n) { - return this.flows.set(t, n); - } - get(t) { - return this.flows.get(t); - } - remove(t) { - return this.flows.delete(t); - } - create(t, n) { - const o = ti(n), a = Si(o), i = q(() => a.nodes.map((h) => h.id)), r = q(() => a.edges.map((h) => h.id)), l = vs(a, i, r), u = id(a, l, i, r), s = {}; - Object.entries(a.hooks).forEach(([h, b]) => { - const m = `on${h.charAt(0).toUpperCase() + h.slice(1)}`; - s[m] = b.on; - }); - const c = {}; - Object.entries(a.hooks).forEach(([h, b]) => { - c[h] = b.trigger; - }), u.setState(a); - const d = { - ...s, - ...l, - ...u, - ...Ni(a), - emits: c, - id: t, - vueFlowVersion: "1.19.4", - $destroy: () => { - this.remove(t); - } - }; - return this.set(t, d), d; - } - getId() { - return `vue-flow-${this.currentId++}`; - } -} -const ve = (e) => { - const t = tt.getInstance(), n = ia(), o = e == null ? void 0 : e.id, a = (n == null ? void 0 : n.vueFlowId) || o; - let i, r = !1; - if (n) { - const l = ut(ko, null); - typeof l < "u" && l !== null && (i = l); - } - if (i || a && (i = t.get(a)), !i || i && o && o !== i.id) { - const l = o ?? t.getId(); - i = t.create(l, e), n && (r = !0); - } else - e && i.setState(e); - return n && (lt(ko, i), n.vueFlowId = i.id, r && Ct(() => { - if (i) { - const l = t.get(i.id); - l ? l.$destroy() : pa(`No store instance found for id ${i.id} in storage.`); - } - })), i; -}; -function rd(e, t, n) { - const o = Ei(); - return o.run(() => { - [ - () => { - o.run(() => { - let a, i, r = !!(n.nodes.value.length || n.edges.value.length); - a = Je([e.modelValue, () => { - var l, u; - return (u = (l = e.modelValue) == null ? void 0 : l.value) == null ? void 0 : u.length; - }], ([l]) => { - l && Array.isArray(l) && (i == null || i.pause(), n.setElements(l), !i && !r && l.length ? r = !0 : i == null || i.resume()); - }), i = Je( - [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length], - ([l, u]) => { - var s; - (s = e.modelValue) != null && s.value && Array.isArray(e.modelValue.value) && (a == null || a.pause(), e.modelValue.value = [...l, ...u], Re(() => { - a == null || a.resume(); - })); - }, - { immediate: r } - ), Rt(() => { - a == null || a.stop(), i == null || i.stop(); - }); - }); - }, - () => { - o.run(() => { - let a, i, r = !!n.nodes.value.length; - a = Je([e.nodes, () => { - var l, u; - return (u = (l = e.nodes) == null ? void 0 : l.value) == null ? void 0 : u.length; - }], ([l]) => { - l && Array.isArray(l) && (i == null || i.pause(), n.setNodes(l), !i && !r && l.length ? r = !0 : i == null || i.resume()); - }), i = Je( - [n.nodes, () => n.nodes.value.length], - ([l]) => { - var u; - (u = e.nodes) != null && u.value && Array.isArray(e.nodes.value) && (a == null || a.pause(), e.nodes.value = [...l], Re(() => { - a == null || a.resume(); - })); - }, - { immediate: r } - ), Rt(() => { - a == null || a.stop(), i == null || i.stop(); - }); - }); - }, - () => { - o.run(() => { - let a, i, r = !!n.edges.value.length; - a = Je([e.edges, () => { - var l, u; - return (u = (l = e.edges) == null ? void 0 : l.value) == null ? void 0 : u.length; - }], ([l]) => { - l && Array.isArray(l) && (i == null || i.pause(), n.setEdges(l), !i && !r && l.length ? r = !0 : i == null || i.resume()); - }), i = Je( - [n.edges, () => n.edges.value.length], - ([l]) => { - var u; - (u = e.edges) != null && u.value && Array.isArray(e.edges.value) && (a == null || a.pause(), e.edges.value = [...l], Re(() => { - a == null || a.resume(); - })); - }, - { immediate: r } - ), Rt(() => { - a == null || a.stop(), i == null || i.stop(); - }); - }); - }, - () => { - o.run(() => { - ce( - () => t.minZoom, - () => { - t.minZoom && se(t.minZoom) && n.setMinZoom(t.minZoom); - } - ); - }); - }, - () => { - o.run(() => { - ce( - () => t.maxZoom, - () => { - t.maxZoom && se(t.maxZoom) && n.setMaxZoom(t.maxZoom); - } - ); - }); - }, - () => { - o.run(() => { - ce( - () => t.translateExtent, - () => { - t.translateExtent && se(t.translateExtent) && n.setTranslateExtent(t.translateExtent); - } - ); - }); - }, - () => { - o.run(() => { - ce( - () => t.nodeExtent, - () => { - t.nodeExtent && se(t.nodeExtent) && n.setNodeExtent(t.nodeExtent); - } - ); - }); - }, - () => { - o.run(() => { - ce( - () => t.applyDefault, - () => { - se(t.applyDefault) && (n.applyDefault.value = t.applyDefault); - } - ), ce( - n.applyDefault, - (a, i, r) => { - n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), r(() => { - n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges); - }); - }, - { immediate: !0 } - ); - }); - }, - () => { - o.run(() => { - const a = async (i) => { - let r = i; - Ye(t.autoConnect) && (r = await t.autoConnect(i)), r !== !1 && n.addEdges([r]); - }; - ce( - () => t.autoConnect, - () => { - se(t.autoConnect) && (n.autoConnect.value = t.autoConnect); - } - ), ce( - n.autoConnect, - (i, r, l) => { - i ? n.onConnect(a) : n.hooks.value.connect.off(a), l(() => { - n.hooks.value.connect.off(a); - }); - }, - { immediate: !0 } - ); - }); - }, - () => { - const a = [ - "id", - "modelValue", - "translateExtent", - "nodeExtent", - "edges", - "nodes", - "maxZoom", - "minZoom", - "applyDefault", - "autoConnect" - ]; - Object.keys(t).forEach((i) => { - if (!a.includes(i)) { - const r = O(t, i), l = n[i]; - o.run(() => { - ce( - r, - (u) => { - se(u) && (l.value = u); - }, - { flush: "pre" } - ); - }); - } - }); - } - ].forEach((a) => a()); - }), () => o.stop(); -} -function aa(e, t) { - return { - x: e.clientX - t.left, - y: e.clientY - t.top - }; -} -const ld = { - name: "Pane", - compatConfig: { MODE: 3 } -}, ud = /* @__PURE__ */ fe({ - ...ld, - props: { - isSelecting: { type: Boolean } - }, - setup(e) { - const { - id: t, - vueFlowRef: n, - getNodes: o, - getEdges: a, - viewport: i, - emits: r, - userSelectionActive: l, - removeSelectedElements: u, - panOnDrag: s, - userSelectionRect: c, - elementsSelectable: d, - nodesSelectionActive: h, - addSelectedElements: b, - getSelectedEdges: m, - getSelectedNodes: w, - removeNodes: E, - removeEdges: _, - selectionMode: P, - deleteKeyCode: G, - multiSelectionKeyCode: y, - multiSelectionActive: I - } = ve(), z = ee(null), f = ee(0), x = ee(0), N = ee(), C = q(() => d.value && (e.isSelecting || l.value)); - xt(G, (A) => { - if (!A) - return; - const U = o.value.reduce((V, K) => ((!K.selected && K.parentNode && V.find((ne) => ne.id === K.parentNode) || K.selected) && V.push(K), V), []); - (U || m.value) && (m.value.length > 0 && _(m.value), U.length > 0 && E(U), h.value = !1, u()); - }), xt(y, (A) => { - I.value = A; - }); - function T() { - l.value = !1, c.value = null, f.value = 0, x.value = 0; - } - function J(A) { - A.target !== z.value || C.value || (r.paneClick(A), u(), h.value = !1); - } - function ae(A) { - var U; - if (A.target === z.value) { - if (Array.isArray(s.value) && (U = s.value) != null && U.includes(2)) { - A.preventDefault(); - return; - } - r.paneContextMenu(A); - } - } - function p(A) { - A.target === z.value && r.paneScroll(A); - } - function R(A) { - if (N.value = n.value.getBoundingClientRect(), !C.value || !d || !e.isSelecting || A.button !== 0 || A.target !== z.value || !N.value) - return; - const { x: U, y: V } = aa(A, N.value); - u(), c.value = { - width: 0, - height: 0, - startX: U, - startY: V, - x: U, - y: V - }, l.value = !0, r.selectionStart(A); - } - function S(A) { - if (!C.value) - return r.paneMouseMove(A); - if (!e.isSelecting || !N.value || !c.value) - return; - l.value || (l.value = !0), h.value && (h.value = !1); - const U = aa(A, N.value), V = c.value.startX ?? 0, K = c.value.startY ?? 0, ne = { - ...c.value, - x: U.x < V ? U.x : V, - y: U.y < K ? U.y : K, - width: Math.abs(U.x - V), - height: Math.abs(U.y - K) - }, re = Ea( - o.value, - c.value, - i.value, - P.value === Qn.Partial - ), M = on(re, a.value); - f.value = re.length, x.value = M.length, c.value = ne, b([...re, ...M]); - } - function B(A) { - C.value && A.button === 0 && (!l.value && c.value && A.target === z.value && J(A), h.value = f.value > 0, T(), r.selectionEnd(A)); - } - function F(A) { - var U; - if (!C.value) - return r.paneMouseLeave(A); - l.value && (h.value = f.value > 0, (U = r.selectionEnd) == null || U.call(r, A)), T(); - } - function j(A) { - C.value || r.paneMouseEnter(A); - } - return (A, U) => (te(), ie("div", { - ref_key: "container", - ref: z, - key: `pane-${k(t)}`, - class: Ke(["vue-flow__pane vue-flow__container", { selection: e.isSelecting }]), - onClick: J, - onContextmenu: ae, - onWheelPassive: p, - onMouseenter: j, - onMousedown: R, - onMousemove: S, - onMouseup: B, - onMouseleave: F - }, [ - xe(A.$slots, "default"), - k(l) && k(c) ? (te(), _e(us, { key: 0 })) : ge("", !0), - k(h) && k(w).length ? (te(), _e(rs, { key: 1 })) : ge("", !0) - ], 34)); - } -}), sd = { class: "vue-flow__nodes vue-flow__container" }, cd = { - name: "Nodes", - compatConfig: { MODE: 3 } -}, dd = /* @__PURE__ */ fe({ - ...cd, - setup(e) { - const t = ut(an), n = ve(), o = O(n, "nodesDraggable"), a = O(n, "nodesFocusable"), i = O(n, "elementsSelectable"), r = O(n, "nodesConnectable"), l = O(n, "getNodes"), u = O(n, "getNodesInitialized"), s = O(n, "getNodeTypes"), c = O(n, "updateNodeDimensions"), d = O(n, "emits"); - let h = ee(); - be(() => l.value.length > 0 && u.value.length === l.value.length).toBe(!0).then(() => { - Re(() => { - d.value.nodesInitialized(u.value); - }); - }), Ve(() => { - h.value = new ResizeObserver((P) => { - const G = P.map((y) => ({ - id: y.target.getAttribute("data-id"), - nodeElement: y.target, - forceUpdate: !0 - })); - c.value(G); - }); - }), jn(() => { - var P; - return (P = h.value) == null ? void 0 : P.disconnect(); - }); - function b(P) { - return typeof P > "u" ? o.value : P; - } - function m(P) { - return typeof P > "u" ? i.value : P; - } - function w(P) { - return typeof P > "u" ? r.value : P; - } - function E(P) { - return typeof P > "u" ? a.value : P; - } - function _(P, G) { - const y = P || "default"; - let I = G ?? s.value[y]; - const z = tn(); - if (typeof I == "string" && z) { - const x = Object.keys(z.appContext.components); - x && x.includes(y) && (I = la(y, !1)); - } - return typeof I != "string" ? I : (t == null ? void 0 : t[`node-${y}`]) || (d.value.error(new me(pe.NODE_TYPE_MISSING, I)), !1); - } - return (P, G) => (te(), ie("div", sd, [ - k(h) ? (te(!0), ie(Ne, { key: 0 }, st(k(l), (y) => (te(), _e(k(Tu), { - id: y.id, - key: y.id, - "resize-observer": k(h), - type: _(y.type, y.template), - name: y.type || "default", - draggable: b(y.draggable), - selectable: m(y.selectable), - connectable: w(y.connectable), - focusable: E(y.focusable), - node: y - }, null, 8, ["id", "resize-observer", "type", "name", "draggable", "selectable", "connectable", "focusable", "node"]))), 128)) : ge("", !0) - ])); - } -}), vd = ["id", "markerWidth", "markerHeight", "markerUnits", "orient"], hd = ["stroke", "stroke-width", "fill"], fd = ["stroke", "stroke-width"], gd = { - name: "MarkerType", - compatConfig: { MODE: 3 } -}, pd = /* @__PURE__ */ fe({ - ...gd, - props: { - id: null, - type: null, - color: { default: "none" }, - width: { default: 12.5 }, - height: { default: 12.5 }, - markerUnits: { default: "strokeWidth" }, - orient: { default: "auto-start-reverse" }, - strokeWidth: { default: 1 } - }, - setup(e) { - return (t, n) => (te(), ie("marker", { - id: e.id, - class: "vue-flow__arrowhead", - viewBox: "-10 -10 20 20", - refX: "0", - refY: "0", - markerWidth: `${e.width}`, - markerHeight: `${e.height}`, - markerUnits: e.markerUnits, - orient: e.orient - }, [ - e.type === k(An).ArrowClosed ? (te(), ie("polyline", { - key: 0, - stroke: e.color, - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": e.strokeWidth, - fill: e.color, - points: "-5,-4 0,0 -5,4 -5,-4" - }, null, 8, hd)) : ge("", !0), - e.type === k(An).Arrow ? (te(), ie("polyline", { - key: 1, - stroke: e.color, - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": e.strokeWidth, - fill: "none", - points: "-5,-4 0,0 -5,4" - }, null, 8, fd)) : ge("", !0) - ], 8, vd)); - } -}), md = { - name: "MarkerDefinitions", - compatConfig: { MODE: 3 } -}, yd = /* @__PURE__ */ fe({ - ...md, - setup(e) { - const t = ve(), n = O(t, "id"), o = O(t, "edges"), a = O(t, "connectionLineOptions"), i = O(t, "defaultMarkerColor"), r = q(() => { - const l = [], u = [], s = (c) => { - if (c) { - const d = Ue(c, n.value); - l.includes(d) || (typeof c == "object" ? u.push({ ...c, id: d, color: c.color || i.value }) : u.push({ id: d, color: i.value, type: c }), l.push(d)); - } - }; - return [a.value.markerEnd, a.value.markerStart].forEach(s), o.value.reduce((c, d) => ([d.markerStart, d.markerEnd].forEach(s), c.sort((h, b) => h.id.localeCompare(b.id))), u), u; - }); - return (l, u) => (te(), ie("defs", null, [ - (te(!0), ie(Ne, null, st(k(r), (s) => (te(), _e(pd, { - id: s.id, - key: s.id, - type: s.type, - color: s.color, - width: s.width, - height: s.height, - markerUnits: s.markerUnits, - "stroke-width": s.strokeWidth, - orient: s.orient - }, null, 8, ["id", "type", "color", "width", "height", "markerUnits", "stroke-width", "orient"]))), 128)) - ])); - } -}), bd = { - key: 0, - class: "vue-flow__edges vue-flow__connectionline vue-flow__container" -}, wd = { - name: "Edges", - compatConfig: { MODE: 3 } -}, xd = /* @__PURE__ */ fe({ - ...wd, - setup(e) { - const t = ut(an), n = ve(), o = O(n, "connectionStartHandle"), a = O(n, "nodesConnectable"), i = O(n, "edgesUpdatable"), r = O(n, "edgesFocusable"), l = O(n, "elementsSelectable"), u = O(n, "getSelectedNodes"), s = O(n, "findNode"), c = O(n, "edges"), d = O(n, "getEdges"), h = O(n, "getNodesInitialized"), b = O(n, "getEdgeTypes"), m = O(n, "elevateEdgesOnSelect"), w = O(n, "dimensions"), E = O(n, "emits"), _ = _n( - () => { - var x; - return (x = o.value) == null ? void 0 : x.nodeId; - }, - () => { - var x; - return (x = o.value) != null && x.nodeId ? s.value(o.value.nodeId) : !1; - } - ), P = _n( - () => { - var x; - return (x = o.value) == null ? void 0 : x.nodeId; - }, - () => { - var x, N; - return !!(_.value && (typeof _.value.connectable > "u" ? a.value : _.value.connectable) && (x = o.value) != null && x.nodeId && (N = o.value) != null && N.type); - } - ), G = _n( - [ - () => c.value.map((x) => x.zIndex), - () => m.value ? [u.value.length] : [0], - () => m.value ? h.value.map((x) => x.computedPosition.z) : [] - ], - () => Sr(d.value, s.value, m.value) - ); - function y(x) { - return typeof x > "u" ? l.value : x; - } - function I(x) { - return typeof x > "u" ? i.value : x; - } - function z(x) { - return typeof x > "u" ? r.value : x; - } - function f(x, N) { - const C = x || "default"; - let T = N ?? b.value[C]; - const J = tn(); - if (typeof T == "string" && J) { - const p = Object.keys(J.appContext.components); - p && p.includes(C) && (T = la(C, !1)); - } - return T && typeof T != "string" ? T : (t == null ? void 0 : t[`edge-${C}`]) || (E.value.error(new me(pe.EDGE_TYPE_MISSING, T)), !1); - } - return (x, N) => k(w).width && k(w).height ? (te(), ie(Ne, { key: 0 }, [ - (te(!0), ie(Ne, null, st(k(G), (C) => (te(), ie("svg", { - key: C.level, - class: "vue-flow__edges vue-flow__container", - style: Le(`z-index: ${C.level}`) - }, [ - C.isMaxLevel ? (te(), _e(yd, { key: 0 })) : ge("", !0), - de("g", null, [ - (te(!0), ie(Ne, null, st(C.edges, (T) => (te(), _e(k(Wu), { - id: T.id, - key: T.id, - edge: T, - type: f(T.type, T.template), - name: T.type || "default", - selectable: y(T.selectable), - updatable: I(T.updatable), - focusable: z(T.focusable) - }, null, 8, ["id", "edge", "type", "name", "selectable", "updatable", "focusable"]))), 128)) - ]) - ], 4))), 128)), - k(P) && k(_) ? (te(), ie("svg", bd, [ - ke(os, { "source-node": k(_) }, null, 8, ["source-node"]) - ])) : ge("", !0) - ], 64)) : ge("", !0); - } -}), _d = /* @__PURE__ */ de("div", { class: "vue-flow__edge-labels" }, null, -1), Ed = { - name: "Transform", - compatConfig: { MODE: 3 } -}, Sd = /* @__PURE__ */ fe({ - ...Ed, - setup(e) { - const { id: t, viewport: n, emits: o, d3Zoom: a, d3Selection: i, dimensions: r, ...l } = ve(), u = ee(!Zn); - return be(() => a.value && i.value && r.value.width > 0 && r.value.height > 0).toBeTruthy().then(() => { - o.paneReady({ - id: t, - viewport: n, - emits: o, - d3Zoom: a, - d3Selection: i, - dimensions: r, - ...l - }), setTimeout(() => { - u.value = !0; - }, 0); - }), (s, c) => (te(), ie("div", { - key: `transform-${k(t)}`, - class: "vue-flow__transformationpane vue-flow__container", - style: Le({ - transform: `translate(${k(n).x}px,${k(n).y}px) scale(${k(n).zoom})`, - opacity: k(u) ? void 0 : 0 - }) - }, [ - ke(xd), - _d, - ke(dd), - xe(s.$slots, "default") - ], 4)); - } -}), Nd = { - name: "Viewport", - compatConfig: { MODE: 3 } -}, kd = /* @__PURE__ */ fe({ - ...Nd, - setup(e) { - const { - id: t, - minZoom: n, - maxZoom: o, - defaultViewport: a, - translateExtent: i, - dimensions: r, - zoomActivationKeyCode: l, - selectionKeyCode: u, - panActivationKeyCode: s, - panOnScroll: c, - panOnScrollMode: d, - panOnScrollSpeed: h, - panOnDrag: b, - zoomOnDoubleClick: m, - zoomOnPinch: w, - zoomOnScroll: E, - preventScrolling: _, - noWheelClassName: P, - noPanClassName: G, - emits: y, - connectionStartHandle: I, - userSelectionActive: z, - paneDragging: f, - d3Zoom: x, - d3Selection: N, - d3ZoomHandler: C, - viewport: T, - viewportRef: J - } = ve(), ae = ee(), p = ee(!1), R = ee(!1); - let S = !1, B = 0, F = { - x: 0, - y: 0, - zoom: 0 - }; - const j = xt(s), A = q(() => !p.value && b.value && j.value), U = q( - () => u.value !== !0 && p.value || u.value === !0 && !A.value - ); - Ve(() => { - er(ae, re); - const v = qn(); - Wn(v, "resize", re); - }), Ve(() => { - const v = ae.value, g = v.getBoundingClientRect(), $ = nd().scaleExtent([n.value, o.value]).translateExtent(i.value), D = Ee(v).call($), L = D.on("wheel.zoom"), Y = gt.translate(a.value.x ?? 0, a.value.y ?? 0).scale(We(a.value.zoom ?? 1, n.value, o.value)), W = [ - [0, 0], - [g.width, g.height] - ], Q = $.constrain()(Y, W, i.value); - $.transform(D, Q), x.value = $, N.value = D, C.value = L, T.value = { x: Q.x, y: Q.y, zoom: Q.k }, J.value = v, xt(u, (X) => { - p.value = X; - }); - const oe = xt(l); - uo(() => { - p.value && z.value && !R.value ? $.on("zoom", null) : !p.value && !z.value && $.on("zoom", (X) => { - T.value = { x: X.transform.x, y: X.transform.y, zoom: X.transform.k }; - const he = ne(X.transform); - S = V(b.value, B ?? 0), y.viewportChange(he), y.move({ event: X, flowTransform: he }); - }); - }), $.on("start", (X) => { - var he; - if (!X.sourceEvent) - return null; - B = X.sourceEvent.button, R.value = !0; - const Te = ne(X.transform); - ((he = X.sourceEvent) == null ? void 0 : he.type) === "mousedown" && (f.value = !0), F = Te, y.viewportChangeStart(Te), y.moveStart({ event: X, flowTransform: Te }); - }), $.on("end", (X) => { - if (!X.sourceEvent) - return null; - if (R.value = !1, f.value = !1, V(b.value, B ?? 0) && !S && y.paneContextMenu(X.sourceEvent), S = !1, K(F, X.transform)) { - const he = ne(X.transform); - F = he, y.viewportChangeEnd(he), y.moveEnd({ event: X, flowTransform: he }); - } - }), uo(() => { - c.value && !oe.value && !z.value ? D.on( - "wheel.zoom", - (X) => { - if (M(X, P.value)) - return !1; - X.preventDefault(), X.stopImmediatePropagation(); - const he = D.property("__zoom").k || 1; - if (X.ctrlKey && w.value) { - const xn = Me(X), mi = -X.deltaY * (X.deltaMode === 1 ? 0.05 : X.deltaMode ? 1 : 2e-3) * 10, yi = he * 2 ** mi; - $.scaleTo(D, yi, xn); - return; - } - const Te = X.deltaMode === 1 ? 20 : 1, It = d.value === Ut.Vertical ? 0 : X.deltaX * Te, wn = d.value === Ut.Horizontal ? 0 : X.deltaY * Te; - $.translateBy( - D, - -(It / he) * h.value, - -(wn / he) * h.value - ); - }, - { passive: !1 } - ) : typeof L < "u" && D.on( - "wheel.zoom", - function(X, he) { - if (!_.value || M(X, P.value)) - return null; - X.preventDefault(), L.call(this, X, he); - }, - { passive: !1 } - ); - }), $.filter((X) => { - var he, Te; - const It = oe.value || E.value, wn = w.value && X.ctrlKey; - if (X.button === 1 && X.type === "mousedown" && ((he = X.target) != null && he.closest(".vue-flow__node") || (Te = X.target) != null && Te.closest(".vue-flow__edge"))) - return !0; - if (!b.value && !It && !c.value && !m.value && !w.value || z.value || !m.value && X.type === "dblclick" || M(X, P.value) && X.type === "wheel" || M(X, G.value) && X.type !== "wheel" || !w.value && X.ctrlKey && X.type === "wheel" || !It && !c.value && !wn && X.type === "wheel" || !b.value && (X.type === "mousedown" || X.type === "touchstart") || Array.isArray(b.value) && !b.value.includes(X.button) && (X.type === "mousedown" || X.type === "touchstart")) - return !1; - const xn = Array.isArray(b.value) && b.value.includes(X.button) || !X.button || X.button <= 1; - return (!X.ctrlKey || X.type === "wheel") && xn; - }); - }); - function V(v, g) { - return g === 2 && Array.isArray(v) && v.includes(2); - } - function K(v, g) { - return v.x !== g.x && !isNaN(g.x) || v.y !== g.y && !isNaN(g.y) || v.zoom !== g.k && !isNaN(g.k); - } - function ne(v) { - return { - x: v.x, - y: v.y, - zoom: v.k - }; - } - function re() { - if (!ae.value) - return; - const { width: v, height: g } = nn(ae.value); - (v === 0 || g === 0) && y.error(new me(pe.MISSING_VIEWPORT_DIMENSIONS)), r.value.width = v || 500, r.value.height = g || 500; - } - function M(v, g) { - return v.target.closest(`.${g}`); - } - return (v, g) => (te(), ie(Ne, null, [ - (te(), ie("div", { - ref_key: "viewportEl", - ref: ae, - key: `viewport-${k(t)}`, - class: "vue-flow__viewport vue-flow__container" - }, [ - ke(ud, { - "is-selecting": k(U), - class: Ke({ connecting: !!k(I), dragging: k(f), draggable: !!k(b) }) - }, { - default: Pe(() => [ - ke(Sd, null, { - default: Pe(() => [ - xe(v.$slots, "zoom-pane") - ]), - _: 3 - }) - ]), - _: 3 - }, 8, ["is-selecting", "class"]) - ])), - xe(v.$slots, "default") - ], 64)); - } -}), Cd = ["id"], Md = ["id"], Pd = ["id"], Id = { - name: "A11yDescriptions", - compatConfig: { MODE: 3 } -}, $d = /* @__PURE__ */ fe({ - ...Id, - setup(e) { - const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = ve(), a = { - position: "absolute", - width: 1, - height: 1, - margin: -1, - border: 0, - padding: 0, - overflow: "hidden", - clip: "rect(0px, 0px, 0px, 0px)", - clipPath: "inset(100%)" - }; - return (i, r) => (te(), ie(Ne, null, [ - de("div", { - id: `${k(ja)}-${k(t)}`, - style: { display: "none" } - }, " Press enter or space to select a node. " + ct(k(n) ? "" : "You can then use the arrow keys to move the node around.") + " You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ", 9, Cd), - de("div", { - id: `${k(Za)}-${k(t)}`, - style: { display: "none" } - }, " Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ", 8, Md), - k(n) ? ge("", !0) : (te(), ie("div", { - key: 0, - id: `${k(Mu)}-${k(t)}`, - "aria-live": "assertive", - "aria-atomic": "true", - style: a - }, ct(k(o)), 9, Pd)) - ], 64)); - } -}), Td = { - name: "VueFlow", - compatConfig: { MODE: 3 } -}, Od = /* @__PURE__ */ fe({ - ...Td, - props: { - id: null, - modelValue: null, - nodes: null, - edges: null, - edgeTypes: null, - nodeTypes: null, - connectionMode: null, - connectionLineType: null, - connectionLineStyle: { default: void 0 }, - connectionLineOptions: { default: void 0 }, - connectionRadius: null, - isValidConnection: { type: [Function, null], default: void 0 }, - deleteKeyCode: null, - selectionKeyCode: null, - multiSelectionKeyCode: null, - zoomActivationKeyCode: null, - panActivationKeyCode: null, - snapToGrid: { type: Boolean, default: void 0 }, - snapGrid: null, - onlyRenderVisibleElements: { type: Boolean, default: void 0 }, - edgesUpdatable: { type: [Boolean, String], default: void 0 }, - nodesDraggable: { type: Boolean, default: void 0 }, - nodesConnectable: { type: Boolean, default: void 0 }, - elementsSelectable: { type: Boolean, default: void 0 }, - selectNodesOnDrag: { type: Boolean, default: void 0 }, - panOnDrag: { type: [Boolean, Array], default: void 0 }, - minZoom: null, - maxZoom: null, - defaultViewport: null, - translateExtent: null, - nodeExtent: null, - defaultMarkerColor: null, - zoomOnScroll: { type: Boolean, default: void 0 }, - zoomOnPinch: { type: Boolean, default: void 0 }, - panOnScroll: { type: Boolean, default: void 0 }, - panOnScrollSpeed: null, - panOnScrollMode: null, - zoomOnDoubleClick: { type: Boolean, default: void 0 }, - preventScrolling: { type: Boolean, default: void 0 }, - selectionMode: null, - edgeUpdaterRadius: null, - fitViewOnInit: { type: Boolean, default: void 0 }, - connectOnClick: { type: Boolean, default: void 0 }, - applyDefault: { type: Boolean, default: void 0 }, - autoConnect: { type: [Boolean, Function], default: void 0 }, - noDragClassName: null, - noWheelClassName: null, - noPanClassName: null, - defaultEdgeOptions: null, - elevateEdgesOnSelect: { type: Boolean, default: void 0 }, - elevateNodesOnSelect: { type: Boolean, default: void 0 }, - disableKeyboardA11y: { type: Boolean, default: void 0 }, - edgesFocusable: { type: Boolean, default: void 0 }, - nodesFocusable: { type: Boolean, default: void 0 }, - autoPanOnConnect: { type: Boolean, default: void 0 }, - autoPanOnNodeDrag: { type: Boolean, default: void 0 }, - __experimentalFeatures: null - }, - emits: ["nodesChange", "edgesChange", "nodeDoubleClick", "nodeClick", "nodeMouseEnter", "nodeMouseMove", "nodeMouseLeave", "nodeContextMenu", "nodeDragStart", "nodeDrag", "nodeDragStop", "nodesInitialized", "miniMapNodeClick", "miniMapNodeDoubleClick", "miniMapNodeMouseEnter", "miniMapNodeMouseMove", "miniMapNodeMouseLeave", "connect", "connectStart", "connectEnd", "clickConnectStart", "clickConnectEnd", "moveStart", "move", "moveEnd", "selectionDragStart", "selectionDrag", "selectionDragStop", "selectionContextMenu", "selectionStart", "selectionEnd", "viewportChangeStart", "viewportChange", "viewportChangeEnd", "paneReady", "paneScroll", "paneClick", "paneContextMenu", "paneMouseEnter", "paneMouseMove", "paneMouseLeave", "edgeContextMenu", "edgeMouseEnter", "edgeMouseMove", "edgeMouseLeave", "edgeDoubleClick", "edgeClick", "edgeUpdateStart", "edgeUpdate", "edgeUpdateEnd", "updateNodeInternals", "error", "update:modelValue", "update:nodes", "update:edges"], - setup(e, { expose: t, emit: n }) { - const o = e, a = wt(o, "modelValue", n), i = wt(o, "nodes", n), r = wt(o, "edges", n), { vueFlowRef: l, hooks: u, getNodeTypes: s, getEdgeTypes: c, ...d } = ve(o), h = rd({ modelValue: a, nodes: i, edges: r }, o, { - vueFlowRef: l, - hooks: u, - getNodeTypes: s, - getEdgeTypes: c, - ...d - }); - ur(n, u); - const b = ee(); - return lt(an, wi()), xi(() => { - h(); - }), Ve(() => { - l.value = b.value; - }), t({ - vueFlowRef: l, - hooks: u, - getNodeTypes: s, - getEdgeTypes: c, - ...d - }), (m, w) => (te(), ie("div", { - ref_key: "el", - ref: b, - class: "vue-flow" - }, [ - ke(kd, null, { - nodes: Pe(() => [ - (te(!0), ie(Ne, null, st(Object.keys(k(s)), (E) => xe(m.$slots, `node-${E}`)), 256)) - ]), - edges: Pe(() => [ - (te(!0), ie(Ne, null, st(Object.keys(k(c)), (E) => xe(m.$slots, `edge-${E}`)), 256)) - ]), - "connection-name": Pe(() => [ - xe(m.$slots, "connection-line") - ]), - "zoom-pane": Pe(() => [ - xe(m.$slots, "zoom-pane") - ]), - default: Pe(() => [ - xe(m.$slots, "default") - ]), - _: 3 - }), - ke($d) - ], 512)); - } -}), Dd = { - key: 0, - class: "label-input-wrapper" -}, Bd = /* @__PURE__ */ fe({ - __name: "EditableNode", - props: { - id: {}, - label: {}, - sourcePosition: {}, - targetPosition: {}, - data: {}, - type: {}, - selected: { type: Boolean }, - connectable: { type: [Boolean, String, Function] }, - position: {}, - dimensions: {}, - isValidTargetPos: { type: Function }, - isValidSourcePos: { type: Function }, - parent: {}, - dragging: { type: Boolean }, - resizing: { type: Boolean }, - zIndex: {}, - dragHandle: {}, - events: {} - }, - emits: ["change"], - setup(e, { emit: t }) { - const n = e, o = t, a = { - top: Z.Top, - right: Z.Right, - bottom: Z.Bottom, - left: Z.Left - }, i = q(() => a[n.sourcePosition]), r = q(() => a[n.targetPosition]), l = ee(), u = ee(""), s = ee(!1); - let c = 0; - const d = () => { - let m = Date.now(); - m - c < 500 && !s.value && h(), c = m; - }, h = async () => { - u.value = n.label, s.value = !0, await Re(), l.value.focus(); - }, b = () => { - s.value = !1, o("change", u.value); - }; - return (m, w) => (te(), ie("div", { - onClick: w[2] || (w[2] = (E) => d()) - }, [ - de("div", null, ct(n.label), 1), - s.value ? (te(), ie("div", Dd, [ - sa(de("input", { - ref_key: "labelInput", - ref: l, - class: "label-input", - "onUpdate:modelValue": w[0] || (w[0] = (E) => u.value = E), - onBlur: w[1] || (w[1] = (E) => s.value = !1), - onKeypress: ca(b, ["enter"]) - }, null, 544), [ - [da, u.value] - ]) - ])) : ge("", !0), - n.data.hasInput ? (te(), _e(k(vt), { - key: 1, - id: "a", - type: "target", - position: r.value - }, null, 8, ["position"])) : ge("", !0), - n.data.hasOutput ? (te(), _e(k(vt), { - key: 2, - id: "b", - type: "source", - position: i.value - }, null, 8, ["position"])) : ge("", !0) - ])); - } -}), Ad = ["id", "d", "marker-end"], zd = { class: "vue-flow__edge-label" }, Rd = { - key: 0, - class: "label-input-wrapper" -}, Vd = { - inheritAttrs: !1 -}, Ld = /* @__PURE__ */ fe({ - ...Vd, - __name: "EditableEdge", - props: { - id: {}, - sourceX: {}, - sourceY: {}, - targetX: {}, - targetY: {}, - sourcePosition: {}, - targetPosition: {}, - data: {}, - markerEnd: {}, - style: {}, - label: {}, - sourceNode: {}, - targetNode: {}, - source: {}, - target: {}, - type: {}, - selected: { type: Boolean }, - sourceHandleId: {}, - targetHandleId: {}, - animated: { type: Boolean }, - updatable: { type: Boolean }, - markerStart: {}, - curvature: {}, - interactionWidth: {}, - events: {}, - labelStyle: {}, - labelShowBg: { type: Boolean }, - labelBgStyle: {}, - labelBgPadding: {}, - labelBgBorderRadius: {} - }, - emits: ["change"], - setup(e, { emit: t }) { - const n = e; - ve(); - const o = t, a = ee(), i = ee(""), r = ee(!1); - let l = 0; - const u = () => { - let h = Date.now(); - h - l < 500 && !r.value && s(), l = h; - }, s = async () => { - i.value = n.label, r.value = !0, await Re(), a.value.focus(); - }, c = () => { - r.value = !1, o("change", i.value); - }, d = q(() => Kt(n)); - return (h, b) => (te(), ie(Ne, null, [ - de("path", { - id: h.id, - style: Le(h.style), - class: "vue-flow__edge-path", - d: d.value[0], - "marker-end": h.markerEnd - }, null, 12, Ad), - ke(k(Ju), null, { - default: Pe(() => [ - de("div", { - style: Le({ - pointerEvents: "all", - position: "absolute", - transform: `translate(-50%, -50%) translate(${d.value[1]}px,${d.value[2]}px)` - }), - class: "nodrag nopan editable-edge-label", - onClick: b[2] || (b[2] = (m) => u()) - }, [ - de("div", zd, ct(n.label), 1), - r.value ? (te(), ie("div", Rd, [ - sa(de("input", { - ref_key: "labelInput", - ref: a, - class: "label-input", - "onUpdate:modelValue": b[0] || (b[0] = (m) => i.value = m), - onBlur: b[1] || (b[1] = (m) => r.value = !1), - onKeypress: ca(c, ["enter"]) - }, null, 544), [ - [da, i.value] - ]) - ])) : ge("", !0) - ], 4) - ]), - _: 1 - }) - ], 64)); - } -}), Yd = { class: "chart-controls" }, Xd = { class: "chart-controls-left" }, Gd = /* @__PURE__ */ de("b", null, "Selected Node:", -1), Hd = { class: "chart-controls-right" }, Fd = { key: 0 }, Ud = { key: 1 }, pi = /* @__PURE__ */ fe({ - __name: "NodeEditor", - props: { - modelValue: {}, - nodeContainerClass: {} - }, - emits: ["update:modelValue"], - setup(e, { emit: t }) { - const n = e, o = t, a = ee(""), i = ee({}), r = ee(!1); - ee({ - x: 0, - y: 0 - }); - const l = ee(""), u = ee([]), s = q(() => { - for (let f = 0; f < u.value.length; f++) - if (u.value[f].id == l.value) - return f; - return -1; - }), c = q({ - get: () => { - let f = n.modelValue; - n.nodeContainerClass ? a.value = n.nodeContainerClass : a.value = "defaultContainerClass"; - for (let x = 0; x < f.length; x++) - f[x].data = {}, f[x].type == "input" ? (f[x].data.hasInput = !1, f[x].data.hasOutput = !0) : f[x].type == "output" ? (f[x].data.hasInput = !0, f[x].data.hasOutput = !1) : (f[x].data.hasInput = !0, f[x].data.hasOutput = !0), f[x].class = "vue-flow__node-default", f[x].type = "editable"; - for (let x = 0; x < f.length; x++) { - let N = f[x].id; - f[x], f[x].events = { - click: () => { - l.value = N; - } - }; - } - return f; - }, - set: (f) => { - o("update:modelValue", JSON.parse(JSON.stringify(f))); - } - }), { getNodes: d, onPaneReady: h } = ve({}); - h((f) => { - i.value = f; - }), u.value = c.value, Ve(() => { - document.removeEventListener("keypress", _), document.addEventListener("keypress", _); - }), jn(() => { - document.removeEventListener("keypress", _); - }); - const b = (f) => ({ - top: "right", - right: "bottom", - bottom: "left", - left: "top" - })[f], m = () => { - s.value > -1 && (u.value[s.value].sourcePosition = b( - u.value[s.value].sourcePosition - )); - }, w = () => { - s.value > -1 && (u.value[s.value].targetPosition = b( - u.value[s.value].targetPosition - )); - }, E = (f) => { - window.scrollBy(0, f.deltaY); - }, _ = (f) => { - r.value && f.ctrlKey == !0 && ((f.key == "+" || f.key == "=") && i.value.zoomIn(), f.key == "-" && i.value.zoomOut()); - }, P = () => { - i.value.fitView(); - }, G = () => { - let f = { x: Math.random() * 200, y: Math.random() * 200 }, x = !1; - if (s.value > -1) { - const T = u.value[s.value]; - T.data.hasOutput && (f = { x: T.position.x + 200, y: T.position.y + 50 }, x = !0); - } - let N = u.value.length, C = `node-${N}`; - if (u.value.push({ - id: C, - label: "Node " + N, - sourcePosition: "right", - targetPosition: "left", - class: "vue-flow__node-default", - type: "editable", - data: { - hasInput: !0, - hasOutput: !0 - }, - events: { - click: () => { - l.value = C; - } - }, - // position: { x: Math.random() * vueFlowInstance.value.dimensions.width, y: Math.random() * vueFlowInstance.value.dimensions.height } - position: f - }), x) { - let T = `edge-${N + 1}`; - u.value.push({ - id: T, - source: l.value, - target: C, - type: "editable", - label: `EDGE ${N + 1}`, - animated: !0, - events: { - click: () => { - l.value = T; - } - } - }); - } - }, y = (f) => { - console.log("edge connect", f); - }, I = (f) => { - console.log("edge double click", f); - }, z = (f, x) => { - for (let N = 0; N < u.value.length; N++) - if (u.value[N].id == x) { - u.value[N].label = f; - break; - } - }; - return (f, x) => (te(), ie("div", { - class: Ke(["node-editor-wrapper", a.value]), - onMouseover: x[8] || (x[8] = (N) => r.value = !0), - onMouseleave: x[9] || (x[9] = (N) => r.value = !1) - }, [ - de("div", Yd, [ - de("div", Xd, [ - de("div", null, [ - Gd, - ua(" " + ct(l.value ? l.value : "none"), 1) - ]) - ]), - de("div", Hd, [ - de("div", null, [ - de("button", { - class: "button-default", - onClick: x[0] || (x[0] = (N) => G()) - }, "Add Node") - ]), - de("div", null, [ - de("button", { - class: "button-default", - onClick: x[1] || (x[1] = (N) => P()) - }, "Center") - ]), - s.value > -1 ? (te(), ie("div", Fd, [ - de("button", { - class: "button-default", - onClick: x[2] || (x[2] = (N) => w()) - }, "Shift Input Position") - ])) : ge("", !0), - s.value > -1 ? (te(), ie("div", Ud, [ - de("button", { - class: "button-default", - onClick: x[3] || (x[3] = (N) => m()) - }, "Shift Output Position") - ])) : ge("", !0) - ]) - ]), - u.value && u.value.length ? (te(), _e(k(Od), { - key: 0, - onWheel: x[4] || (x[4] = Ii((N) => E(N), ["prevent"])), - class: "nowheel", - "prevent-scrolling": !0, - "zoom-on-scroll": !1, - "fit-view-on-init": !0, - modelValue: u.value, - "onUpdate:modelValue": x[5] || (x[5] = (N) => u.value = N), - onConnect: x[6] || (x[6] = (N) => y(N)), - onEdgeDoubleClick: x[7] || (x[7] = (N) => I(N)) - }, { - "node-editable": Pe((N) => [ - ke(Bd, Ht(N, { - onChange: (C) => z(C, N.id) - }), null, 16, ["onChange"]) - ]), - "edge-editable": Pe((N) => [ - ke(Ld, Ht(N, { - onChange: (C) => z(C, N.id) - }), null, 16, ["onChange"]) - ]), - _: 1 - }, 8, ["modelValue"])) : ge("", !0) - ], 34)); - } -}), jd = /* @__PURE__ */ fe({ - __name: "StateEditor", - props: ["layout", "nodeContainerClass", "modelValue"], - emits: ["update:modelValue"], - setup(e, { emit: t }) { - const n = e, o = t, a = q({ - get: () => { - let r = n.modelValue, l = {}, u = {}, s = 0, c = []; - for (let d in r) { - c.length; - let h = { - id: d, - label: d, - position: n.layout[d] && n.layout[d].position ? n.layout[d].position : { x: 200 * s, y: 100 }, - targetPosition: n.layout[d] && n.layout[d].targetPosition ? n.layout[d].targetPosition : "left", - sourcePosition: n.layout[d] && n.layout[d].sourcePosition ? n.layout[d].sourcePosition : "right" - }; - r[d].type && r[d].type == "final" && (h.type = "output", h.class = "default-output-node"), l[d] = h; - let b = r[d].on; - for (let m in r[d].on) { - let w = b[m]; - typeof w == "object" && w.constructor === Object && (w = w.target), c.push({ - id: `${d}-${b[m]}-${m}`, - target: w, - source: d, - label: m, - animated: !0 - }), u[w] = !0; - } - s++; - } - for (let d in l) - u[d] || (l[d].type = "input", l[d].class = "default-input-node"), c.push(l[d]); - return c; - }, - set: (r) => { - i(r); - } - }), i = (r) => { - let l = {}, u = {}, s = {}; - for (let c = 0; c < r.length; c++) { - let d = r[c]; - d.type == "input" ? l[d.label] = { - on: {} - } : d.type == "output" ? l[d.label] = { - type: "final" - } : d.source && d.target ? (u[d.source] = u[d.source] || {}, u[d.source][d.label] = { - target: d.target - }) : l[d.label] = { - on: {} - }, s[d.id] = d.label; - } - for (let c in u) { - let d = s[c]; - for (let h in u[c]) - l[d].on[h] = u[c][h]; - } - o("update:modelValue", l); - }; - return (r, l) => (te(), ie("div", null, [ - ke(pi, { - modelValue: a.value, - "onUpdate:modelValue": l[0] || (l[0] = (u) => a.value = u), - "node-container-class": e.nodeContainerClass - }, null, 8, ["modelValue", "node-container-class"]) - ])); - } -}); -function Kd(e) { - e.component("NodeEditor", pi), e.component("StateEditor", jd); -} -export { - pi as NodeEditor, - jd as StateEditor, - Kd as install -}; -//# sourceMappingURL=node-editor.js.map diff --git a/node_editor/dist/node-editor.js.map b/node_editor/dist/node-editor.js.map deleted file mode 100644 index a0def6bc..00000000 --- a/node_editor/dist/node-editor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node-editor.js","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.23/node_modules/@vue-flow/core/dist/vue-flow-core.mjs","../src/components/EditableNode.vue","../src/components/EditableEdge.vue","../src/components/NodeEditor.vue","../src/components/StateEditor.vue","../src/index.ts"],"sourcesContent":["import { unref as C, ref as ie, watch as de, customRef as br, getCurrentScope as hi, onScopeDispose as Vt, getCurrentInstance as on, onMounted as Ve, nextTick as Ue, readonly as Er, isRef as Sr, computed as J, onBeforeMount as Nr, markRaw as it, inject as He, defineComponent as ge, toRef as M, openBlock as oe, createElementBlock as se, normalizeClass as Ke, renderSlot as xe, h as ue, provide as ut, onBeforeUnmount as gi, normalizeStyle as Le, createCommentVNode as Ee, createElementVNode as ct, mergeProps as vi, createBlock as ze, resolveDynamicComponent as mi, Fragment as Ce, createTextVNode as Cr, toDisplayString as Vn, Teleport as Mr, normalizeProps as $r, reactive as kr, toRefs as Or, effectScope as Tr, renderList as dt, resolveComponent as pi, createVNode as qe, watchEffect as bo, withCtx as Fe, useSlots as Ir, onUnmounted as Pr } from \"vue\";\nvar Eo;\nconst oo = typeof window < \"u\", Dr = (e) => typeof e < \"u\", zr = (e) => typeof e == \"boolean\", Ae = (e) => typeof e == \"function\", Ie = (e) => typeof e == \"number\", Pe = (e) => typeof e == \"string\", Ar = () => {\n};\noo && ((Eo = window == null ? void 0 : window.navigator) != null && Eo.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction le(e) {\n return typeof e == \"function\" ? e() : C(e);\n}\nfunction Br(e, t) {\n function n(...o) {\n return new Promise((i, r) => {\n Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(i).catch(r);\n });\n }\n return n;\n}\nconst yi = (e) => e();\nfunction Rr(e = yi) {\n const t = ie(!0);\n function n() {\n t.value = !1;\n }\n function o() {\n t.value = !0;\n }\n const i = (...r) => {\n t.value && e(...r);\n };\n return { isActive: Er(t), pause: n, resume: o, eventFilter: i };\n}\nfunction So(e, t = !1, n = \"Timeout\") {\n return new Promise((o, i) => {\n setTimeout(t ? () => i(n) : o, e);\n });\n}\nfunction Vr(e) {\n return e;\n}\nfunction Sn(e, t) {\n let n, o, i;\n const r = ie(!0), a = () => {\n r.value = !0, i();\n };\n de(e, a, { flush: \"sync\" });\n const s = Ae(t) ? t : t.get, l = Ae(t) ? void 0 : t.set, u = br((c, v) => (o = c, i = v, {\n get() {\n return r.value && (n = s(), r.value = !1), o(), n;\n },\n set(g) {\n l == null || l(g);\n }\n }));\n return Object.isExtensible(u) && (u.trigger = a), u;\n}\nfunction Mt(e) {\n return hi() ? (Vt(e), !0) : !1;\n}\nfunction Hr(e, t = !0) {\n on() ? Ve(e) : t ? e() : Ue(e);\n}\nfunction Hn(e, t = !1) {\n function n(v, { flush: g = \"sync\", deep: x = !1, timeout: h, throwOnTimeout: d } = {}) {\n let w = null;\n const S = [new Promise((V) => {\n w = de(e, (p) => {\n v(p) !== t && (w == null || w(), V(p));\n }, {\n flush: g,\n deep: x,\n immediate: !0\n });\n })];\n return h != null && S.push(So(h, d).then(() => le(e)).finally(() => w == null ? void 0 : w())), Promise.race(S);\n }\n function o(v, g) {\n if (!Sr(v))\n return n((p) => p === v, g);\n const { flush: x = \"sync\", deep: h = !1, timeout: d, throwOnTimeout: w } = g ?? {};\n let y = null;\n const V = [new Promise((p) => {\n y = de([e, v], ([N, T]) => {\n t !== (N === T) && (y == null || y(), p(N));\n }, {\n flush: x,\n deep: h,\n immediate: !0\n });\n })];\n return d != null && V.push(So(d, w).then(() => le(e)).finally(() => (y == null || y(), le(e)))), Promise.race(V);\n }\n function i(v) {\n return n((g) => Boolean(g), v);\n }\n function r(v) {\n return o(null, v);\n }\n function a(v) {\n return o(void 0, v);\n }\n function s(v) {\n return n(Number.isNaN, v);\n }\n function l(v, g) {\n return n((x) => {\n const h = Array.from(x);\n return h.includes(v) || h.includes(le(v));\n }, g);\n }\n function u(v) {\n return c(1, v);\n }\n function c(v = 1, g) {\n let x = -1;\n return n(() => (x += 1, x >= v), g);\n }\n return Array.isArray(le(e)) ? {\n toMatch: n,\n toContains: l,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n } : {\n toMatch: n,\n toBe: o,\n toBeTruthy: i,\n toBeNull: r,\n toBeNaN: s,\n toBeUndefined: a,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n };\n}\nfunction ye(e) {\n return Hn(e);\n}\nvar No = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Gr = Object.prototype.propertyIsEnumerable, Fr = (e, t) => {\n var n = {};\n for (var o in e)\n Lr.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && No)\n for (var o of No(e))\n t.indexOf(o) < 0 && Gr.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction Yr(e, t, n = {}) {\n const o = n, {\n eventFilter: i = yi\n } = o, r = Fr(o, [\n \"eventFilter\"\n ]);\n return de(e, Br(i, t), r);\n}\nvar Xr = Object.defineProperty, Zr = Object.defineProperties, Ur = Object.getOwnPropertyDescriptors, Yt = Object.getOwnPropertySymbols, xi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, Co = (e, t, n) => t in e ? Xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wr = (e, t) => {\n for (var n in t || (t = {}))\n xi.call(t, n) && Co(e, n, t[n]);\n if (Yt)\n for (var n of Yt(t))\n _i.call(t, n) && Co(e, n, t[n]);\n return e;\n}, Kr = (e, t) => Zr(e, Ur(t)), qr = (e, t) => {\n var n = {};\n for (var o in e)\n xi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && Yt)\n for (var o of Yt(e))\n t.indexOf(o) < 0 && _i.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction tt(e, t, n = {}) {\n const o = n, {\n eventFilter: i\n } = o, r = qr(o, [\n \"eventFilter\"\n ]), { eventFilter: a, pause: s, resume: l, isActive: u } = Rr(i);\n return { stop: Yr(e, t, Kr(Wr({}, r), {\n eventFilter: a\n })), pause: s, resume: l, isActive: u };\n}\nfunction wi(e) {\n var t;\n const n = le(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst io = oo ? window : void 0;\nfunction ro(...e) {\n let t, n, o, i;\n if (Pe(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = io) : [t, n, o, i] = e, !t)\n return Ar;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const r = [], a = () => {\n r.forEach((c) => c()), r.length = 0;\n }, s = (c, v, g, x) => (c.addEventListener(v, g, x), () => c.removeEventListener(v, g, x)), l = de(() => [wi(t), le(i)], ([c, v]) => {\n a(), c && r.push(...n.flatMap((g) => o.map((x) => s(c, g, x, v))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n l(), a();\n };\n return Mt(u), u;\n}\nconst jr = (e) => typeof e == \"function\" ? e : typeof e == \"string\" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;\nfunction Mo(...e) {\n let t, n, o = {};\n e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == \"object\" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);\n const { target: i = io, eventName: r = \"keydown\", passive: a = !1 } = o, s = jr(t);\n return ro(i, r, (u) => {\n s(u) && n(u);\n }, a);\n}\nfunction Qr(e, t = !1) {\n const n = ie(), o = () => n.value = Boolean(e());\n return o(), Hr(o, t), n;\n}\nfunction Jr(e) {\n return JSON.parse(JSON.stringify(e));\n}\nconst Ln = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Gn = \"__vueuse_ssr_handlers__\";\nLn[Gn] = Ln[Gn] || {};\nLn[Gn];\nvar $o = Object.getOwnPropertySymbols, ea = Object.prototype.hasOwnProperty, ta = Object.prototype.propertyIsEnumerable, na = (e, t) => {\n var n = {};\n for (var o in e)\n ea.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && $o)\n for (var o of $o(e))\n t.indexOf(o) < 0 && ta.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction oa(e, t, n = {}) {\n const o = n, { window: i = io } = o, r = na(o, [\"window\"]);\n let a;\n const s = Qr(() => i && \"ResizeObserver\" in i), l = () => {\n a && (a.disconnect(), a = void 0);\n }, u = de(() => wi(e), (v) => {\n l(), s.value && i && v && (a = new ResizeObserver(t), a.observe(v, r));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n l(), u();\n };\n return Mt(c), {\n isSupported: s,\n stop: c\n };\n}\nvar ko;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(ko || (ko = {}));\nvar ia = Object.defineProperty, Oo = Object.getOwnPropertySymbols, ra = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, To = (e, t, n) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t) => {\n for (var n in t || (t = {}))\n ra.call(t, n) && To(e, n, t[n]);\n if (Oo)\n for (var n of Oo(t))\n aa.call(t, n) && To(e, n, t[n]);\n return e;\n};\nconst la = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nsa({\n linear: Vr\n}, la);\nfunction yt(e, t, n, o = {}) {\n var i, r, a;\n const {\n clone: s = !1,\n passive: l = !1,\n eventName: u,\n deep: c = !1,\n defaultValue: v\n } = o, g = on(), x = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((a = (r = g == null ? void 0 : g.proxy) == null ? void 0 : r.$emit) == null ? void 0 : a.bind(g == null ? void 0 : g.proxy));\n let h = u;\n t || (t = \"modelValue\"), h = u || h || `update:${t.toString()}`;\n const d = (y) => s ? Ae(s) ? s(y) : Jr(y) : y, w = () => Dr(e[t]) ? d(e[t]) : v;\n if (l) {\n const y = w(), S = ie(y);\n return de(() => e[t], (V) => S.value = d(V)), de(S, (V) => {\n (V !== e[t] || c) && x(h, V);\n }, { deep: c }), S;\n } else\n return J({\n get() {\n return w();\n },\n set(y) {\n x(h, y);\n }\n });\n}\nfunction X(e = () => {\n}) {\n const t = ie(/* @__PURE__ */ new Set());\n e && t.value.add(e);\n const n = (r) => {\n t.value.delete(r);\n };\n return {\n on: (r) => {\n t.value.has(e) && t.value.delete(e), t.value.add(r);\n const a = () => n(r);\n return Mt(a), {\n off: a\n };\n },\n off: n,\n trigger: (r) => Promise.all(Array.from(t.value).map((a) => a(r))),\n fns: t\n };\n}\nconst ua = [\"production\", \"prod\"];\nfunction wt(e, ...t) {\n ua.includes(process.env.NODE_ENV || \"\") || console.warn(`[Vue Flow]: ${e}`, ...t);\n}\nfunction ca() {\n return {\n edgesChange: X(),\n nodesChange: X(),\n nodeDoubleClick: X(),\n nodeClick: X(),\n nodeMouseEnter: X(),\n nodeMouseMove: X(),\n nodeMouseLeave: X(),\n nodeContextMenu: X(),\n nodeDragStart: X(),\n nodeDrag: X(),\n nodeDragStop: X(),\n nodesInitialized: X(),\n miniMapNodeClick: X(),\n miniMapNodeDoubleClick: X(),\n miniMapNodeMouseEnter: X(),\n miniMapNodeMouseMove: X(),\n miniMapNodeMouseLeave: X(),\n connect: X(),\n connectStart: X(),\n connectEnd: X(),\n clickConnectStart: X(),\n clickConnectEnd: X(),\n paneReady: X(),\n move: X(),\n moveStart: X(),\n moveEnd: X(),\n selectionDragStart: X(),\n selectionDrag: X(),\n selectionDragStop: X(),\n selectionContextMenu: X(),\n selectionStart: X(),\n selectionEnd: X(),\n viewportChangeStart: X(),\n viewportChange: X(),\n viewportChangeEnd: X(),\n paneScroll: X(),\n paneClick: X(),\n paneContextMenu: X(),\n paneMouseEnter: X(),\n paneMouseMove: X(),\n paneMouseLeave: X(),\n edgeContextMenu: X(),\n edgeMouseEnter: X(),\n edgeMouseMove: X(),\n edgeMouseLeave: X(),\n edgeDoubleClick: X(),\n edgeClick: X(),\n edgeUpdateStart: X(),\n edgeUpdate: X(),\n edgeUpdateEnd: X(),\n updateNodeInternals: X(),\n error: X((e) => wt(e.message))\n };\n}\nfunction da(e, t) {\n Nr(() => {\n for (const [n, o] of Object.entries(t.value)) {\n const i = (r) => {\n e(n, r);\n };\n o.on(i), Mt(() => {\n o.off(i);\n });\n }\n });\n}\nvar he = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = \"MISSING_VIEWPORT_DIMENSIONS\", e.NODE_NOT_FOUND = \"NODE_NOT_FOUND\", e.NODE_MISSING_PARENT = \"NODE_MISSING_PARENT\", e.NODE_TYPE_MISSING = \"NODE_TYPE_MISSING\", e.NODE_EXTENT_INVALID = \"NODE_EXTENT_INVALID\", e.EDGE_INVALID = \"EDGE_INVALID\", e.EDGE_NOT_FOUND = \"EDGE_NOT_FOUND\", e.EDGE_SOURCE_MISSING = \"EDGE_SOURCE_MISSING\", e.EDGE_TARGET_MISSING = \"EDGE_TARGET_MISSING\", e.EDGE_TYPE_MISSING = \"EDGE_TYPE_MISSING\", e.EDGE_SOURCE_TARGET_SAME = \"EDGE_SOURCE_TARGET_SAME\", e.EDGE_SOURCE_TARGET_MISSING = \"EDGE_SOURCE_TARGET_MISSING\", e.EDGE_ORPHANED = \"EDGE_ORPHANED\", e))(he || {});\nconst Nn = {\n MISSING_VIEWPORT_DIMENSIONS: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n NODE_NOT_FOUND: (e) => `Node not found\nNode: ${e}`,\n NODE_MISSING_PARENT: (e, t) => `Node is missing a parent\nNode: ${e}\nParent: ${t}`,\n NODE_TYPE_MISSING: (e) => `Node type is missing\nType: ${e}`,\n NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent\nNode: ${e}`,\n EDGE_INVALID: (e) => `An edge needs a source and a target\nEdge: ${e}`,\n EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing\nEdge: ${e} \nSource: ${t}`,\n EDGE_TARGET_MISSING: (e, t) => `Edge target is missing\nEdge: ${e} \nTarget: ${t}`,\n EDGE_TYPE_MISSING: (e) => `Edge type is missing\nType: ${e}`,\n EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,\n EDGE_NOT_FOUND: (e) => `Edge not found\nEdge: ${e}`\n};\nclass ve extends Error {\n constructor(t, ...n) {\n var o;\n super((o = Nn[t]) == null ? void 0 : o.call(Nn, ...n)), this.code = t;\n }\n}\nconst ao = () => typeof window < \"u\" ? window : { chrome: !1 };\nfunction Io(e) {\n return {\n ...e.computedPosition || { x: 0, y: 0 },\n width: e.dimensions.width || 0,\n height: e.dimensions.height || 0\n };\n}\nfunction Fn(e, t) {\n const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));\n return Math.ceil(n * o);\n}\nfunction rn(e) {\n return {\n width: e.offsetWidth,\n height: e.offsetHeight\n };\n}\nfunction je(e, t = 0, n = 1) {\n return Math.min(Math.max(e, t), n);\n}\nfunction so(e, t) {\n return {\n x: je(e.x, t[0][0], t[1][0]),\n y: je(e.y, t[0][1], t[1][1])\n };\n}\nfunction Po(e) {\n const t = e.getRootNode(), n = ao();\n return \"elementFromPoint\" in t ? t : n.document;\n}\nfunction $e(e) {\n return e && \"id\" in e && \"source\" in e && \"target\" in e;\n}\nfunction fa(e) {\n return $e(e) && \"sourceNode\" in e && \"targetNode\" in e;\n}\nfunction xt(e) {\n return e && \"id\" in e && !$e(e);\n}\nfunction nt(e) {\n return xt(e) && \"computedPosition\" in e;\n}\nfunction ha(e) {\n return !!e.width && !!e.height && !!e.x && !!e.y;\n}\nfunction ga(e, t = {}) {\n let n = t;\n return nt(e) || (n = {\n type: e.type ?? t.type ?? \"default\",\n dimensions: it({\n width: 0,\n height: 0\n }),\n handleBounds: {\n source: [],\n target: []\n },\n computedPosition: it({\n z: 0,\n ...e.position\n }),\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: !1,\n dragging: !1,\n resizing: !1,\n initialized: !1,\n ...t,\n data: ce(e.data) ? e.data : {},\n events: it(ce(e.events) ? e.events : {})\n }), Object.assign({}, n, e, { id: e.id.toString() });\n}\nfunction lo(e, t = {}) {\n const n = ce(e.events) ? e.events : t.events && ce(t.events) ? t.events : {}, o = ce(e.data) ? e.data : t.data && ce(t.data) ? t.data : {};\n return t = fa(e) ? t : {\n ...t,\n sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle,\n targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle,\n type: e.type ?? t.type ?? \"default\",\n source: e.source.toString() || t.source,\n target: e.target.toString() || t.target,\n updatable: e.updatable ?? t.updatable,\n selectable: e.selectable ?? t.selectable,\n focusable: e.focusable ?? t.focusable,\n data: o,\n events: it(n),\n label: (e.label && !Pe(e.label) ? it(e.label) : e.label) || t.label,\n interactionWidth: e.interactionWidth || t.interactionWidth\n }, Object.assign({}, t, e, { id: e.id.toString() });\n}\nfunction bi(e, t, n) {\n if (!xt(e))\n return [];\n const o = n === \"source\" ? \"target\" : \"source\", i = t.filter((r) => $e(r) && r[o] === e.id).map((r) => $e(r) && r[n]);\n return t.filter((r) => i.includes(r.id));\n}\nfunction Pd(e, t) {\n return bi(e, t, \"target\");\n}\nfunction Dd(e, t) {\n return bi(e, t, \"source\");\n}\nfunction an({ source: e, sourceHandle: t, target: n, targetHandle: o }) {\n return `vueflow__edge-${e}${t ?? \"\"}-${n}${o ?? \"\"}`;\n}\nfunction Ei(e, t) {\n return t.some(\n (n) => $e(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle)\n );\n}\nfunction zd(e, t, n) {\n if (!e.source || !e.target)\n return wt(\"Can't create edge. An edge needs a source and a target.\"), t;\n let o;\n return $e(e) ? o = { ...e } : o = {\n ...e,\n id: an(e)\n }, o = lo(o, n), Ei(o, t) || t.push(o), t;\n}\nfunction Ad(e, t, n) {\n if (!t.source || !t.target)\n return wt(\"Can't create new edge. An edge needs a source and a target.\"), n;\n const o = n.find((r) => $e(r) && r.id === e.id);\n if (!o)\n return wt(`The old edge with id=${e.id} does not exist.`), n;\n const i = {\n ...e,\n id: an(t),\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(o), 1, i), n.filter((r) => r.id !== e.id);\n}\nfunction va({ x: e, y: t }, { x: n, y: o, zoom: i }) {\n return {\n x: e * i + n,\n y: t * i + o\n };\n}\nfunction uo({ x: e, y: t }, { x: n, y: o, zoom: i }, r, [a, s]) {\n const l = {\n x: (e - n) / i,\n y: (t - o) / i\n };\n return r ? {\n x: a * Math.round(l.x / a),\n y: s * Math.round(l.y / s)\n } : l;\n}\nfunction Si(e, t) {\n return {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x2, t.x2),\n y2: Math.max(e.y2, t.y2)\n };\n}\nfunction Xt({ x: e, y: t, width: n, height: o }) {\n return {\n x: e,\n y: t,\n x2: e + n,\n y2: t + o\n };\n}\nfunction Ni({ x: e, y: t, x2: n, y2: o }) {\n return {\n x: e,\n y: t,\n width: n - e,\n height: o - t\n };\n}\nfunction Bd(e, t) {\n return Ni(Si(Xt(e), Xt(t)));\n}\nfunction co(e) {\n const t = e.reduce(\n (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: i = { width: 0, height: 0 } } = {}) => Si(\n n,\n Xt({\n ...o,\n ...i\n })\n ),\n { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }\n );\n return Ni(t);\n}\nfunction Ci(e, t, { x: n, y: o, zoom: i } = { x: 0, y: 0, zoom: 1 }, r = !1, a = !1) {\n const s = {\n x: (t.x - n) / i,\n y: (t.y - o) / i,\n width: t.width / i,\n height: t.height / i\n };\n return e.filter((l) => {\n const { computedPosition: u = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: v } = l;\n if (a && !v)\n return !1;\n const g = { ...u, width: c.width || 0, height: c.height || 0 }, x = Fn(s, g), h = typeof c.width > \"u\" || typeof c.height > \"u\" || c.width === 0 || c.height === 0, d = r && x > 0, w = c.width * c.height;\n return h || d || x >= w;\n });\n}\nfunction sn(e, t) {\n const n = e.map((o) => Pe(o) ? o : o.id);\n return t.filter((o) => n.includes(o.source) || n.includes(o.target));\n}\nfunction Zt(e, t, n, o, i, r = 0.1, a = { x: 0, y: 0 }) {\n const s = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), u = Math.min(s, l), c = je(u, o, i), v = e.x + e.width / 2, g = e.y + e.height / 2, x = t / 2 - v * c + (a.x ?? 0), h = n / 2 - g * c + (a.y ?? 0);\n return { x, y: h, zoom: c };\n}\nfunction ma(e, t) {\n return {\n x: t.x + e.x,\n y: t.y + e.y,\n z: (e.z > t.z ? e.z : t.z) + 1\n };\n}\nfunction Mi(e, t) {\n if (!e.parentNode)\n return !1;\n const n = t(e.parentNode);\n return n ? n.selected ? !0 : Mi(n, t) : !1;\n}\nfunction Xe(e, t) {\n return typeof e > \"u\" ? \"\" : typeof e == \"string\" ? e : `${t ? `${t}__` : \"\"}${Object.keys(e).sort().map((o) => `${o}=${e[o]}`).join(\"&\")}`;\n}\nfunction ce(e) {\n return typeof C(e) < \"u\";\n}\nfunction pa(e, t, n) {\n if (!e.source || !e.target)\n return n(new ve(he.EDGE_INVALID, e.id)), !1;\n let o;\n return $e(e) ? o = e : o = {\n ...e,\n id: an(e)\n }, o = lo(o), Ei(o, t) ? !1 : o;\n}\nfunction ya(e, t, n, o, i, r) {\n if (!t.source || !t.target)\n return r(new ve(he.EDGE_INVALID, e.id)), !1;\n const a = o(e.id);\n if (!a)\n return r(new ve(he.EDGE_NOT_FOUND, e.id)), !1;\n const { id: s, ...l } = e, u = {\n ...l,\n id: i ? an(t) : s,\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(a), 1, u), u;\n}\nfunction Do(e, t, n, o) {\n const i = {}, r = e.map((s) => {\n const l = ga(s, {\n ...n(s.id),\n parentNode: s.parentNode\n });\n return s.parentNode && (i[s.parentNode] = !0), l;\n }), a = [...r, ...t];\n return r.forEach((s) => {\n const l = a.find((u) => u.id === s.parentNode);\n s.parentNode && !l && o(new ve(he.NODE_MISSING_PARENT, s.id, s.parentNode)), (s.parentNode || i[s.id]) && (i[s.id] && (s.isParent = !0), l && (l.isParent = !0));\n }), r;\n}\nvar j = /* @__PURE__ */ ((e) => (e.Left = \"left\", e.Top = \"top\", e.Right = \"right\", e.Bottom = \"bottom\", e))(j || {}), fo = /* @__PURE__ */ ((e) => (e.Partial = \"partial\", e.Full = \"full\", e))(fo || {}), Ye = /* @__PURE__ */ ((e) => (e.Bezier = \"default\", e.SimpleBezier = \"simple-bezier\", e.Straight = \"straight\", e.Step = \"step\", e.SmoothStep = \"smoothstep\", e))(Ye || {}), Qe = /* @__PURE__ */ ((e) => (e.Strict = \"strict\", e.Loose = \"loose\", e))(Qe || {}), Yn = /* @__PURE__ */ ((e) => (e.Arrow = \"arrow\", e.ArrowClosed = \"arrowclosed\", e))(Yn || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = \"free\", e.Vertical = \"vertical\", e.Horizontal = \"horizontal\", e))(Ut || {}), xa = /* @__PURE__ */ ((e) => (e.TopLeft = \"top-left\", e.TopCenter = \"top-center\", e.TopRight = \"top-right\", e.BottomLeft = \"bottom-left\", e.BottomCenter = \"bottom-center\", e.BottomRight = \"bottom-right\", e))(xa || {});\nconst zo = Symbol(\"vueFlow\"), $i = Symbol(\"nodeId\"), ki = Symbol(\"nodeRef\"), Oi = Symbol(\"edgeId\"), Ti = Symbol(\"edgeRef\"), ln = Symbol(\"slots\");\nfunction _a(e) {\n const t = e ?? He($i, \"\"), n = He(ki, null), { findNode: o, edges: i, emits: r } = fe(), a = o(t);\n return a || r.error(new ve(he.NODE_NOT_FOUND, t)), {\n id: t,\n nodeEl: n,\n node: a,\n parentNode: J(() => o(a.parentNode)),\n connectedEdges: J(() => sn([a], i.value))\n };\n}\nfunction ho(e) {\n return \"clientX\" in e;\n}\nfunction rt(e, t) {\n var r, a;\n const n = ho(e), o = n ? e.clientX : (r = e.touches) == null ? void 0 : r[0].clientX, i = n ? e.clientY : (a = e.touches) == null ? void 0 : a[0].clientY;\n return {\n x: o - ((t == null ? void 0 : t.left) ?? 0),\n y: i - ((t == null ? void 0 : t.top) ?? 0)\n };\n}\nfunction Wt(e, t, n) {\n const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, i = ((n == null ? void 0 : n.y) ?? 0) + t.y, r = (n == null ? void 0 : n.width) ?? t.width, a = (n == null ? void 0 : n.height) ?? t.height;\n switch (e) {\n case j.Top:\n return {\n x: o + r / 2,\n y: i\n };\n case j.Right:\n return {\n x: o + r,\n y: i + a / 2\n };\n case j.Bottom:\n return {\n x: o + r / 2,\n y: i + a\n };\n case j.Left:\n return {\n x: o,\n y: i + a / 2\n };\n }\n}\nfunction Ao(e = [], t) {\n return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null;\n}\nfunction wa(e, t, n, o, i, r) {\n const a = Wt(\n n,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n t\n ), s = Wt(\n r,\n {\n ...o.dimensions,\n ...o.computedPosition\n },\n i\n );\n return {\n sourceX: a.x,\n sourceY: a.y,\n targetX: s.x,\n targetY: s.y\n };\n}\nfunction ba({\n sourcePos: e,\n targetPos: t,\n sourceWidth: n,\n sourceHeight: o,\n targetWidth: i,\n targetHeight: r,\n width: a,\n height: s,\n viewport: l\n}) {\n const u = {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x + n, t.x + i),\n y2: Math.max(e.y + o, t.y + r)\n };\n u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);\n const c = Xt({\n x: (0 - l.x) / l.zoom,\n y: (0 - l.y) / l.zoom,\n width: a / l.zoom,\n height: s / l.zoom\n }), v = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), g = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));\n return Math.ceil(v * g) > 0;\n}\nfunction Ea(e, t, n = !1) {\n let o = -1;\n const i = e.reduce((r, a) => {\n const s = Ie(a.zIndex);\n let l = s ? a.zIndex : 0;\n const u = t(a.source), c = t(a.target);\n return !u || !c || (n && (l = s ? a.zIndex : Math.max(u.computedPosition.z || 0, c.computedPosition.z || 0)), r[l] ? r[l].push(a) : r[l] = [a], o = l > o ? l : o), r;\n }, {});\n return Object.entries(Object.keys(i).length ? i : { 0: [] }).map(([r, a]) => {\n const s = +r;\n return {\n edges: a,\n level: s,\n isMaxLevel: s === o\n };\n });\n}\nfunction Cn(e) {\n e == null || e.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction Bo(e, t, n, o) {\n return (t[n] || []).reduce((i, r) => (`${e.id}-${r.id}-${n}` !== o && i.push({\n id: r.id || null,\n type: n,\n nodeId: e.id,\n ...Wt(\n r.position,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n r\n )\n }), i), []);\n}\nfunction Sa(e, t, n) {\n let o = null, i = 1 / 0;\n return n.forEach((r) => {\n const a = Math.sqrt((r.x - e.x) ** 2 + (r.y - e.y) ** 2);\n a <= t && a < i && (i = a, o = r);\n }), o;\n}\nfunction Ro(e, t, n, o, i, r, a, s, l, u) {\n const c = r === \"target\", v = s.querySelector(`.vue-flow__handle[data-id=\"${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}\"]`), { x: g, y: x } = rt(e), h = s.elementFromPoint(g, x), d = h != null && h.classList.contains(\"vue-flow__handle\") ? h : v, w = {\n handleDomNode: d,\n isValid: !1,\n connection: { source: \"\", target: \"\", sourceHandle: null, targetHandle: null },\n endHandle: null\n };\n if (d) {\n const y = Ii(void 0, d), S = d.getAttribute(\"data-nodeid\"), V = d.getAttribute(\"data-handleid\"), p = d.classList.contains(\"connectable\"), N = d.classList.contains(\"connectableend\"), T = {\n source: c ? S : o,\n sourceHandle: c ? V : i,\n target: c ? o : S,\n targetHandle: c ? i : V\n };\n w.connection = T, p && N && (n === Qe.Strict ? c && y === \"source\" || !c && y === \"target\" : S !== o || V !== i) && (w.endHandle = {\n nodeId: S,\n handleId: V,\n type: y\n }, w.isValid = a(T, {\n edges: l,\n sourceNode: u(T.source),\n targetNode: u(T.target)\n }));\n }\n return w;\n}\nfunction Na({ nodes: e, nodeId: t, handleId: n, handleType: o }) {\n return e.reduce((i, r) => {\n const { handleBounds: a } = r;\n let s = [], l = [];\n return a && (s = Bo(r, a, \"source\", `${t}-${n}-${o}`), l = Bo(r, a, \"target\", `${t}-${n}-${o}`)), i.push(...s, ...l), i;\n }, []);\n}\nfunction Ii(e, t) {\n return e || (t != null && t.classList.contains(\"target\") ? \"target\" : t != null && t.classList.contains(\"source\") ? \"source\" : null);\n}\nfunction Ca(e, t) {\n let n = null;\n return t ? n = \"valid\" : e && !t && (n = \"invalid\"), n;\n}\nfunction Vo(e, t, n) {\n return e < t ? je(Math.abs(e - t), 1, 50) / 50 : e > n ? -je(Math.abs(e - n), 1, 50) / 50 : 0;\n}\nfunction Pi(e, t) {\n const n = Vo(e.x, 35, t.width - 35) * 20, o = Vo(e.y, 35, t.height - 35) * 20;\n return [n, o];\n}\nfunction It() {\n return !0;\n}\nfunction Di({\n handleId: e,\n nodeId: t,\n type: n,\n isValidConnection: o,\n edgeUpdaterType: i,\n onEdgeUpdate: r,\n onEdgeUpdateEnd: a\n}) {\n const s = J(() => le(n) === \"target\"), {\n vueFlowRef: l,\n connectionMode: u,\n connectionRadius: c,\n connectOnClick: v,\n connectionClickStartHandle: g,\n nodesConnectable: x,\n autoPanOnConnect: h,\n findNode: d,\n panBy: w,\n getNodes: y,\n startConnection: S,\n updateConnection: V,\n endConnection: p,\n emits: N,\n viewport: T,\n edges: _,\n isValidConnection: P\n } = fe();\n let R = null, $ = !1, D = null;\n function Q(m) {\n var G;\n const A = ho(m), E = Po(m.target);\n if (A && m.button === 0 || !A) {\n let Z = function(Y) {\n L = rt(Y, f), B = Sa(\n uo(L, T.value, !1, [1, 1]),\n c.value,\n F\n ), I || (U(), I = !0);\n const ne = Ro(\n Y,\n B,\n u.value,\n le(t),\n le(e),\n s.value ? \"target\" : \"source\",\n W,\n E,\n _.value,\n d\n );\n if (R = ne.connection, $ = ne.isValid, D = ne.handleDomNode, V(\n B && $ ? va(\n {\n x: B.x,\n y: B.y\n },\n T.value\n ) : L,\n ne.endHandle,\n Ca(!!B, $)\n ), !B && !$ && !D)\n return Cn(b);\n R && R.source !== R.target && D && (Cn(b), b = D, D.classList.add(\"connecting\", \"vue-flow__handle-connecting\"), D.classList.toggle(\"valid\", $), D.classList.toggle(\"vue-flow__handle-valid\", $));\n }, K = function(Y) {\n (B || D) && R && $ && (r ? r(Y, R) : N.connect(R)), N.connectEnd(Y), i && (a == null || a(Y)), Cn(b), cancelAnimationFrame(q), p(Y), I = !1, $ = !1, R = null, D = null, E.removeEventListener(\"mousemove\", Z), E.removeEventListener(\"mouseup\", K), E.removeEventListener(\"touchmove\", Z), E.removeEventListener(\"touchend\", K);\n };\n const z = d(le(t));\n let W = o || P.value || It;\n !W && z && (W = (s ? z.isValidSourcePos : z.isValidTargetPos) || It);\n let B, q = 0;\n const { x: te, y: re } = rt(m), k = E == null ? void 0 : E.elementFromPoint(te, re), H = Ii(le(i), k), f = (G = l.value) == null ? void 0 : G.getBoundingClientRect();\n if (!f || !H)\n return;\n let b, L = rt(m, f), I = !1;\n const F = Na({\n nodes: y.value,\n nodeId: le(t),\n handleId: le(e),\n handleType: H\n }), U = () => {\n if (!h)\n return;\n const [Y, ne] = Pi(L, f);\n w({ x: Y, y: ne }), q = requestAnimationFrame(U);\n };\n S(\n {\n nodeId: le(t),\n handleId: le(e),\n type: H\n },\n {\n x: te - f.left,\n y: re - f.top\n },\n m\n ), N.connectStart({ event: m, nodeId: le(t), handleId: le(e), handleType: H }), E.addEventListener(\"mousemove\", Z), E.addEventListener(\"mouseup\", K), E.addEventListener(\"touchmove\", Z), E.addEventListener(\"touchend\", K);\n }\n }\n function ee(m) {\n if (v.value)\n if (!g.value)\n N.clickConnectStart({ event: m, nodeId: le(t), handleId: le(e) }), S(\n { nodeId: le(t), type: le(n), handleId: le(e) },\n void 0,\n m,\n !0\n );\n else {\n let A = o || P.value || It;\n const E = d(le(t));\n if (!A && E && (A = (s ? E.isValidSourcePos : E.isValidTargetPos) || It), E && (typeof E.connectable > \"u\" ? x.value : E.connectable) === !1)\n return;\n const G = Po(m.target), { connection: Z, isValid: K } = Ro(\n m,\n {\n nodeId: le(t),\n id: le(e),\n type: le(n)\n },\n u.value,\n g.value.nodeId,\n g.value.handleId || null,\n g.value.type,\n A,\n G,\n _.value,\n d\n ), z = Z.source === Z.target;\n K && !z && N.connect(Z), N.clickConnectEnd(m), p(m, !0);\n }\n }\n return {\n handlePointerDown: Q,\n handleClick: ee\n };\n}\nfunction Ma(e, t) {\n const n = {};\n for (const o in e)\n t.includes(o) || Object.defineProperty(n, o, {\n enumerable: !0,\n get: () => e[o]\n });\n return n;\n}\nconst $a = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"], ka = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n}, Kt = /* @__PURE__ */ ge({\n ...ka,\n props: {\n id: null,\n type: null,\n position: { default: j.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: !0 },\n connectableEnd: { type: Boolean, default: !0 }\n },\n setup(e) {\n const t = Ma(e, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\", \"isValidConnection\"]), n = M(t, \"type\", \"source\"), {\n connectionStartHandle: o,\n connectionClickStartHandle: i,\n connectionEndHandle: r,\n vueFlowRef: a,\n nodesConnectable: s,\n noDragClassName: l,\n noPanClassName: u\n } = fe(), { id: c, node: v, nodeEl: g, connectedEdges: x } = _a(), h = ie(), d = J(() => e.id ?? `${c}__handle-${e.position}`), w = J(() => typeof e.connectableStart < \"u\" ? e.connectableStart : !0), y = J(() => typeof e.connectableEnd < \"u\" ? e.connectableEnd : !0), { handlePointerDown: S, handleClick: V } = Di({\n nodeId: c,\n handleId: d,\n isValidConnection: e.isValidConnection,\n type: n\n }), p = J(() => Pe(e.connectable) && e.connectable === \"single\" ? !x.value.some((R) => {\n const $ = R[`${n.value}Handle`];\n return R[n.value] !== c ? !1 : $ ? $ === d.value : !0;\n }) : Ae(e.connectable) ? e.connectable(v, x.value) : ce(e.connectable) ? e.connectable : s.value), N = J(\n () => {\n var R, $, D, Q, ee, m;\n return ((R = o.value) == null ? void 0 : R.nodeId) === c && (($ = o.value) == null ? void 0 : $.handleId) === d.value && ((D = o.value) == null ? void 0 : D.type) === n.value || ((Q = r.value) == null ? void 0 : Q.nodeId) === c && ((ee = r.value) == null ? void 0 : ee.handleId) === d.value && ((m = r.value) == null ? void 0 : m.type) === n.value;\n }\n ), T = J(\n () => {\n var R, $, D;\n return ((R = i.value) == null ? void 0 : R.nodeId) === c && (($ = i.value) == null ? void 0 : $.handleId) === d.value && ((D = i.value) == null ? void 0 : D.type) === n.value;\n }\n );\n ye(() => v.initialized).toBe(!0, { flush: \"post\" }).then(() => {\n var E;\n const R = (E = v.handleBounds[n.value]) == null ? void 0 : E.find((G) => G.id === d.value);\n if (!a.value || R)\n return;\n const $ = a.value.querySelector(\".vue-flow__transformationpane\");\n if (!g || !h.value || !$ || !d.value)\n return;\n const D = g.value.getBoundingClientRect(), Q = h.value.getBoundingClientRect(), ee = window.getComputedStyle($), { m22: m } = new window.DOMMatrixReadOnly(ee.transform), A = {\n id: d.value,\n position: e.position,\n x: (Q.left - D.left) / m,\n y: (Q.top - D.top) / m,\n ...rn(h.value)\n };\n v.handleBounds[n.value] = [...v.handleBounds[n.value] ?? [], A];\n });\n function _(R) {\n const $ = ho(R);\n p.value && w.value && ($ && R.button === 0 || !$) && S(R);\n }\n function P(R) {\n !c || !i.value && !w.value || p.value && V(R);\n }\n return (R, $) => (oe(), se(\"div\", {\n ref_key: \"handle\",\n ref: h,\n \"data-id\": `${C(c)}-${C(d)}-${C(n)}`,\n \"data-handleid\": C(d),\n \"data-nodeid\": C(c),\n \"data-handlepos\": e.position,\n class: Ke([\"vue-flow__handle\", [\n `vue-flow__handle-${e.position}`,\n `vue-flow__handle-${C(d)}`,\n C(l),\n C(u),\n C(n),\n {\n connectable: C(p),\n connecting: C(T),\n connectablestart: C(w),\n connectableend: C(y),\n connectionindicator: C(p) && (C(w) && !C(N) || C(y) && C(N))\n }\n ]]),\n onMousedown: _,\n onTouchstartPassive: _,\n onClick: P\n }, [\n xe(R.$slots, \"default\", { id: e.id })\n ], 42, $a));\n }\n}), un = function({\n sourcePosition: e = j.Bottom,\n targetPosition: t = j.Top,\n label: n,\n connectable: o = !0,\n isValidTargetPos: i,\n isValidSourcePos: r\n}) {\n return [\n ue(Kt, { type: \"target\", position: t, connectable: o, isValidConnection: i }),\n typeof n != \"string\" && n ? ue(n) : ue(\"div\", { innerHTML: n }),\n ue(Kt, { type: \"source\", position: e, connectable: o, isValidConnection: r })\n ];\n};\nun.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\"];\nun.inheritAttrs = !1;\nun.compatConfig = { MODE: 3 };\nconst Oa = un, cn = function({\n sourcePosition: e = j.Bottom,\n label: t,\n connectable: n = !0,\n isValidSourcePos: o\n}) {\n return [\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t }),\n ue(Kt, { type: \"source\", position: e, connectable: n, isValidConnection: o })\n ];\n};\ncn.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\"];\ncn.inheritAttrs = !1;\ncn.compatConfig = { MODE: 3 };\nconst Ta = cn, dn = function({\n targetPosition: e = j.Top,\n label: t,\n connectable: n = !0,\n isValidTargetPos: o\n}) {\n return [\n ue(Kt, { type: \"target\", position: e, connectable: n, isValidConnection: o }),\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t })\n ];\n};\ndn.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\"];\ndn.inheritAttrs = !1;\ndn.compatConfig = { MODE: 3 };\nconst Ia = dn;\nfunction Ho(e, t, n) {\n let o = e;\n do {\n if (o && o.matches(t))\n return !0;\n if (o === n)\n return !1;\n o = o.parentElement;\n } while (o);\n return !1;\n}\nfunction Pa(e, t, n, o, i) {\n return e.filter(\n (r) => (r.selected || r.id === i) && (!r.parentNode || !Mi(r, o)) && (r.draggable || t && typeof r.draggable > \"u\")\n ).map(\n (r) => {\n var a, s;\n return it({\n id: r.id,\n position: r.position || { x: 0, y: 0 },\n distance: {\n x: n.x - ((a = r.computedPosition) == null ? void 0 : a.x) || 0,\n y: n.y - ((s = r.computedPosition) == null ? void 0 : s.y) || 0\n },\n from: r.computedPosition,\n extent: r.extent,\n parentNode: r.parentNode,\n dimensions: r.dimensions\n });\n }\n );\n}\nfunction Mn({\n id: e,\n dragItems: t,\n findNode: n\n}) {\n const o = t.reduce((i, r) => {\n const a = n(r.id);\n return a && i.push(a), i;\n }, []);\n return [e ? o.find((i) => i.id === e) : o[0], o];\n}\nfunction zi(e) {\n if (Array.isArray(e))\n switch (e.length) {\n case 1:\n return [e[0], e[0], e[0], e[0]];\n case 2:\n return [e[0], e[1], e[0], e[1]];\n case 3:\n return [e[0], e[1], e[2], e[1]];\n case 4:\n return e;\n default:\n return [0, 0, 0, 0];\n }\n return [e, e, e, e];\n}\nfunction Da(e, t, n) {\n const [o, i, r, a] = typeof e != \"string\" ? zi(e.padding) : [0, 0, 0, 0];\n return n && Ie(n.computedPosition.x) && Ie(n.computedPosition.y) && Ie(n.dimensions.width) && Ie(n.dimensions.height) ? [\n [n.computedPosition.x + a, n.computedPosition.y + o],\n [\n n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - i,\n n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - r\n ]\n ] : !1;\n}\nfunction za(e, t, n, o) {\n let i = e.extent || n;\n if (i === \"parent\" || !Array.isArray(i) && (i == null ? void 0 : i.range) === \"parent\")\n if (e.parentNode && o && e.dimensions.width && e.dimensions.height) {\n const r = Da(i, e, o);\n r && (i = r);\n } else\n t(new ve(he.NODE_EXTENT_INVALID, e.id)), i = n;\n else if (Array.isArray(i)) {\n const r = (o == null ? void 0 : o.computedPosition.x) || 0, a = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i[0][0] + r, i[0][1] + a],\n [i[1][0] + r, i[1][1] + a]\n ];\n } else if (i != null && i.range && Array.isArray(i.range)) {\n const [r, a, s, l] = zi(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i.range[0][0] + u + l, i.range[0][1] + c + r],\n [i.range[1][0] + u - a, i.range[1][1] + c - s]\n ];\n }\n return i;\n}\nfunction go(e, t, n, o, i) {\n const r = za(e, n, o, i), a = so(t, r);\n return {\n position: {\n x: a.x - ((i == null ? void 0 : i.computedPosition.x) || 0),\n y: a.y - ((i == null ? void 0 : i.computedPosition.y) || 0)\n },\n computedPosition: a\n };\n}\nfunction Ai() {\n const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: a, emits: s } = fe();\n return (l, u = !1) => {\n const c = r.value ? i.value[0] : 5, v = r.value ? i.value[1] : 5, g = u ? 4 : 1, x = l.x * c * g, h = l.y * v * g, d = e.value.filter((w) => w.draggable || a && typeof w.draggable > \"u\").map((w) => {\n const y = { x: w.computedPosition.x + x, y: w.computedPosition.y + h }, { computedPosition: S } = go(\n w,\n y,\n s.error,\n t.value,\n w.parentNode ? o(w.parentNode) : void 0\n );\n return {\n id: w.id,\n position: S,\n from: w.position,\n distance: { x: l.x, y: l.y },\n dimensions: w.dimensions\n };\n });\n n(d, !0, !1);\n };\n}\nfunction Aa() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n dragStart: X(),\n drag: X(),\n dragStop: X()\n };\n}\nfunction Ba(e, t) {\n const n = Aa();\n return n.doubleClick.on((o) => {\n var i, r;\n t.nodeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.nodeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.nodeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.nodeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.nodeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.nodeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.dragStart.on((o) => {\n var i, r;\n t.nodeDragStart(o), (r = (i = e.events) == null ? void 0 : i.dragStart) == null || r.call(i, o);\n }), n.drag.on((o) => {\n var i, r;\n t.nodeDrag(o), (r = (i = e.events) == null ? void 0 : i.drag) == null || r.call(i, o);\n }), n.dragStop.on((o) => {\n var i, r;\n t.nodeDragStop(o), (r = (i = e.events) == null ? void 0 : i.dragStop) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nfunction Ra() {\n const { viewport: e, snapGrid: t, snapToGrid: n } = fe();\n return ({ sourceEvent: o }) => {\n const i = o.touches ? o.touches[0].clientX : o.clientX, r = o.touches ? o.touches[0].clientY : o.clientY, a = {\n x: (i - e.value.x) / e.value.zoom,\n y: (r - e.value.y) / e.value.zoom\n };\n return {\n xSnapped: n.value ? t.value[0] * Math.round(a.x / t.value[0]) : a.x,\n ySnapped: n.value ? t.value[1] * Math.round(a.y / t.value[1]) : a.y,\n ...a\n };\n };\n}\nfunction Lo(e, t, n) {\n const o = t.querySelectorAll(`.vue-flow__handle${e}`);\n if (!o || !o.length)\n return;\n const i = Array.from(o), r = t.getBoundingClientRect();\n return i.map((a) => {\n const s = a.getBoundingClientRect();\n return {\n id: a.getAttribute(\"data-handleid\"),\n position: a.getAttribute(\"data-handlepos\"),\n x: (s.left - r.left) / n,\n y: (s.top - r.top) / n,\n ...rn(a)\n };\n });\n}\nfunction Xn(e, t, n, o, i, r = !1, a) {\n i.value = !1, e.selected ? (r || e.selected && t) && (o([e]), Ue(a.blur)) : n([e]);\n}\nvar Va = { value: () => {\n} };\nfunction fn() {\n for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) {\n if (!(o = arguments[e] + \"\") || o in n || /[\\s.]/.test(o))\n throw new Error(\"illegal type: \" + o);\n n[o] = [];\n }\n return new Ht(n);\n}\nfunction Ht(e) {\n this._ = e;\n}\nfunction Ha(e, t) {\n return e.trim().split(/^|\\s+/).map(function(n) {\n var o = \"\", i = n.indexOf(\".\");\n if (i >= 0 && (o = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n))\n throw new Error(\"unknown type: \" + n);\n return { type: n, name: o };\n });\n}\nHt.prototype = fn.prototype = {\n constructor: Ht,\n on: function(e, t) {\n var n = this._, o = Ha(e + \"\", n), i, r = -1, a = o.length;\n if (arguments.length < 2) {\n for (; ++r < a; )\n if ((i = (e = o[r]).type) && (i = La(n[i], e.name)))\n return i;\n return;\n }\n if (t != null && typeof t != \"function\")\n throw new Error(\"invalid callback: \" + t);\n for (; ++r < a; )\n if (i = (e = o[r]).type)\n n[i] = Go(n[i], e.name, t);\n else if (t == null)\n for (i in n)\n n[i] = Go(n[i], e.name, null);\n return this;\n },\n copy: function() {\n var e = {}, t = this._;\n for (var n in t)\n e[n] = t[n].slice();\n return new Ht(e);\n },\n call: function(e, t) {\n if ((i = arguments.length - 2) > 0)\n for (var n = new Array(i), o = 0, i, r; o < i; ++o)\n n[o] = arguments[o + 2];\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (r = this._[e], o = 0, i = r.length; o < i; ++o)\n r[o].value.apply(t, n);\n },\n apply: function(e, t, n) {\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (var o = this._[e], i = 0, r = o.length; i < r; ++i)\n o[i].value.apply(t, n);\n }\n};\nfunction La(e, t) {\n for (var n = 0, o = e.length, i; n < o; ++n)\n if ((i = e[n]).name === t)\n return i.value;\n}\nfunction Go(e, t, n) {\n for (var o = 0, i = e.length; o < i; ++o)\n if (e[o].name === t) {\n e[o] = Va, e = e.slice(0, o).concat(e.slice(o + 1));\n break;\n }\n return n != null && e.push({ name: t, value: n }), e;\n}\nvar Zn = \"http://www.w3.org/1999/xhtml\";\nconst Fo = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: Zn,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction hn(e) {\n var t = e += \"\", n = t.indexOf(\":\");\n return n >= 0 && (t = e.slice(0, n)) !== \"xmlns\" && (e = e.slice(n + 1)), Fo.hasOwnProperty(t) ? { space: Fo[t], local: e } : e;\n}\nfunction Ga(e) {\n return function() {\n var t = this.ownerDocument, n = this.namespaceURI;\n return n === Zn && t.documentElement.namespaceURI === Zn ? t.createElement(e) : t.createElementNS(n, e);\n };\n}\nfunction Fa(e) {\n return function() {\n return this.ownerDocument.createElementNS(e.space, e.local);\n };\n}\nfunction Bi(e) {\n var t = hn(e);\n return (t.local ? Fa : Ga)(t);\n}\nfunction Ya() {\n}\nfunction vo(e) {\n return e == null ? Ya : function() {\n return this.querySelector(e);\n };\n}\nfunction Xa(e) {\n typeof e != \"function\" && (e = vo(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = new Array(a), l, u, c = 0; c < a; ++c)\n (l = r[c]) && (u = e.call(l, l.__data__, c, r)) && (\"__data__\" in l && (u.__data__ = l.__data__), s[c] = u);\n return new _e(o, this._parents);\n}\nfunction Za(e) {\n return e == null ? [] : Array.isArray(e) ? e : Array.from(e);\n}\nfunction Ua() {\n return [];\n}\nfunction Ri(e) {\n return e == null ? Ua : function() {\n return this.querySelectorAll(e);\n };\n}\nfunction Wa(e) {\n return function() {\n return Za(e.apply(this, arguments));\n };\n}\nfunction Ka(e) {\n typeof e == \"function\" ? e = Wa(e) : e = Ri(e);\n for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)\n for (var a = t[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && (o.push(e.call(l, l.__data__, u, a)), i.push(l));\n return new _e(o, i);\n}\nfunction Vi(e) {\n return function() {\n return this.matches(e);\n };\n}\nfunction Hi(e) {\n return function(t) {\n return t.matches(e);\n };\n}\nvar qa = Array.prototype.find;\nfunction ja(e) {\n return function() {\n return qa.call(this.children, e);\n };\n}\nfunction Qa() {\n return this.firstElementChild;\n}\nfunction Ja(e) {\n return this.select(e == null ? Qa : ja(typeof e == \"function\" ? e : Hi(e)));\n}\nvar es = Array.prototype.filter;\nfunction ts() {\n return Array.from(this.children);\n}\nfunction ns(e) {\n return function() {\n return es.call(this.children, e);\n };\n}\nfunction os(e) {\n return this.selectAll(e == null ? ts : ns(typeof e == \"function\" ? e : Hi(e)));\n}\nfunction is(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new _e(o, this._parents);\n}\nfunction Li(e) {\n return new Array(e.length);\n}\nfunction rs() {\n return new _e(this._enter || this._groups.map(Li), this._parents);\n}\nfunction qt(e, t) {\n this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;\n}\nqt.prototype = {\n constructor: qt,\n appendChild: function(e) {\n return this._parent.insertBefore(e, this._next);\n },\n insertBefore: function(e, t) {\n return this._parent.insertBefore(e, t);\n },\n querySelector: function(e) {\n return this._parent.querySelector(e);\n },\n querySelectorAll: function(e) {\n return this._parent.querySelectorAll(e);\n }\n};\nfunction as(e) {\n return function() {\n return e;\n };\n}\nfunction ss(e, t, n, o, i, r) {\n for (var a = 0, s, l = t.length, u = r.length; a < u; ++a)\n (s = t[a]) ? (s.__data__ = r[a], o[a] = s) : n[a] = new qt(e, r[a]);\n for (; a < l; ++a)\n (s = t[a]) && (i[a] = s);\n}\nfunction ls(e, t, n, o, i, r, a) {\n var s, l, u = /* @__PURE__ */ new Map(), c = t.length, v = r.length, g = new Array(c), x;\n for (s = 0; s < c; ++s)\n (l = t[s]) && (g[s] = x = a.call(l, l.__data__, s, t) + \"\", u.has(x) ? i[s] = l : u.set(x, l));\n for (s = 0; s < v; ++s)\n x = a.call(e, r[s], s, r) + \"\", (l = u.get(x)) ? (o[s] = l, l.__data__ = r[s], u.delete(x)) : n[s] = new qt(e, r[s]);\n for (s = 0; s < c; ++s)\n (l = t[s]) && u.get(g[s]) === l && (i[s] = l);\n}\nfunction us(e) {\n return e.__data__;\n}\nfunction cs(e, t) {\n if (!arguments.length)\n return Array.from(this, us);\n var n = t ? ls : ss, o = this._parents, i = this._groups;\n typeof e != \"function\" && (e = as(e));\n for (var r = i.length, a = new Array(r), s = new Array(r), l = new Array(r), u = 0; u < r; ++u) {\n var c = o[u], v = i[u], g = v.length, x = ds(e.call(c, c && c.__data__, u, o)), h = x.length, d = s[u] = new Array(h), w = a[u] = new Array(h), y = l[u] = new Array(g);\n n(c, v, d, w, y, x, t);\n for (var S = 0, V = 0, p, N; S < h; ++S)\n if (p = d[S]) {\n for (S >= V && (V = S + 1); !(N = w[V]) && ++V < h; )\n ;\n p._next = N || null;\n }\n }\n return a = new _e(a, o), a._enter = s, a._exit = l, a;\n}\nfunction ds(e) {\n return typeof e == \"object\" && \"length\" in e ? e : Array.from(e);\n}\nfunction fs() {\n return new _e(this._exit || this._groups.map(Li), this._parents);\n}\nfunction hs(e, t, n) {\n var o = this.enter(), i = this, r = this.exit();\n return typeof e == \"function\" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + \"\"), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;\n}\nfunction gs(e) {\n for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, a = Math.min(i, r), s = new Array(i), l = 0; l < a; ++l)\n for (var u = n[l], c = o[l], v = u.length, g = s[l] = new Array(v), x, h = 0; h < v; ++h)\n (x = u[h] || c[h]) && (g[h] = x);\n for (; l < i; ++l)\n s[l] = n[l];\n return new _e(s, this._parents);\n}\nfunction vs() {\n for (var e = this._groups, t = -1, n = e.length; ++t < n; )\n for (var o = e[t], i = o.length - 1, r = o[i], a; --i >= 0; )\n (a = o[i]) && (r && a.compareDocumentPosition(r) ^ 4 && r.parentNode.insertBefore(a, r), r = a);\n return this;\n}\nfunction ms(e) {\n e || (e = ps);\n function t(v, g) {\n return v && g ? e(v.__data__, g.__data__) : !v - !g;\n }\n for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {\n for (var a = n[r], s = a.length, l = i[r] = new Array(s), u, c = 0; c < s; ++c)\n (u = a[c]) && (l[c] = u);\n l.sort(t);\n }\n return new _e(i, this._parents).order();\n}\nfunction ps(e, t) {\n return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;\n}\nfunction ys() {\n var e = arguments[0];\n return arguments[0] = this, e.apply(null, arguments), this;\n}\nfunction xs() {\n return Array.from(this);\n}\nfunction _s() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length; i < r; ++i) {\n var a = o[i];\n if (a)\n return a;\n }\n return null;\n}\nfunction ws() {\n let e = 0;\n for (const t of this)\n ++e;\n return e;\n}\nfunction bs() {\n return !this.node();\n}\nfunction Es(e) {\n for (var t = this._groups, n = 0, o = t.length; n < o; ++n)\n for (var i = t[n], r = 0, a = i.length, s; r < a; ++r)\n (s = i[r]) && e.call(s, s.__data__, r, i);\n return this;\n}\nfunction Ss(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ns(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction Cs(e, t) {\n return function() {\n this.setAttribute(e, t);\n };\n}\nfunction Ms(e, t) {\n return function() {\n this.setAttributeNS(e.space, e.local, t);\n };\n}\nfunction $s(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttribute(e) : this.setAttribute(e, n);\n };\n}\nfunction ks(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);\n };\n}\nfunction Os(e, t) {\n var n = hn(e);\n if (arguments.length < 2) {\n var o = this.node();\n return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n);\n }\n return this.each((t == null ? n.local ? Ns : Ss : typeof t == \"function\" ? n.local ? ks : $s : n.local ? Ms : Cs)(n, t));\n}\nfunction Gi(e) {\n return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;\n}\nfunction Ts(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction Is(e, t, n) {\n return function() {\n this.style.setProperty(e, t, n);\n };\n}\nfunction Ps(e, t, n) {\n return function() {\n var o = t.apply(this, arguments);\n o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n);\n };\n}\nfunction Ds(e, t, n) {\n return arguments.length > 1 ? this.each((t == null ? Ts : typeof t == \"function\" ? Ps : Is)(e, t, n ?? \"\")) : ft(this.node(), e);\n}\nfunction ft(e, t) {\n return e.style.getPropertyValue(t) || Gi(e).getComputedStyle(e, null).getPropertyValue(t);\n}\nfunction zs(e) {\n return function() {\n delete this[e];\n };\n}\nfunction As(e, t) {\n return function() {\n this[e] = t;\n };\n}\nfunction Bs(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? delete this[e] : this[e] = n;\n };\n}\nfunction Rs(e, t) {\n return arguments.length > 1 ? this.each((t == null ? zs : typeof t == \"function\" ? Bs : As)(e, t)) : this.node()[e];\n}\nfunction Fi(e) {\n return e.trim().split(/^|\\s+/);\n}\nfunction mo(e) {\n return e.classList || new Yi(e);\n}\nfunction Yi(e) {\n this._node = e, this._names = Fi(e.getAttribute(\"class\") || \"\");\n}\nYi.prototype = {\n add: function(e) {\n var t = this._names.indexOf(e);\n t < 0 && (this._names.push(e), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n remove: function(e) {\n var t = this._names.indexOf(e);\n t >= 0 && (this._names.splice(t, 1), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n contains: function(e) {\n return this._names.indexOf(e) >= 0;\n }\n};\nfunction Xi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.add(t[o]);\n}\nfunction Zi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.remove(t[o]);\n}\nfunction Vs(e) {\n return function() {\n Xi(this, e);\n };\n}\nfunction Hs(e) {\n return function() {\n Zi(this, e);\n };\n}\nfunction Ls(e, t) {\n return function() {\n (t.apply(this, arguments) ? Xi : Zi)(this, e);\n };\n}\nfunction Gs(e, t) {\n var n = Fi(e + \"\");\n if (arguments.length < 2) {\n for (var o = mo(this.node()), i = -1, r = n.length; ++i < r; )\n if (!o.contains(n[i]))\n return !1;\n return !0;\n }\n return this.each((typeof t == \"function\" ? Ls : t ? Vs : Hs)(n, t));\n}\nfunction Fs() {\n this.textContent = \"\";\n}\nfunction Ys(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Xs(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.textContent = t ?? \"\";\n };\n}\nfunction Zs(e) {\n return arguments.length ? this.each(e == null ? Fs : (typeof e == \"function\" ? Xs : Ys)(e)) : this.node().textContent;\n}\nfunction Us() {\n this.innerHTML = \"\";\n}\nfunction Ws(e) {\n return function() {\n this.innerHTML = e;\n };\n}\nfunction Ks(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.innerHTML = t ?? \"\";\n };\n}\nfunction qs(e) {\n return arguments.length ? this.each(e == null ? Us : (typeof e == \"function\" ? Ks : Ws)(e)) : this.node().innerHTML;\n}\nfunction js() {\n this.nextSibling && this.parentNode.appendChild(this);\n}\nfunction Qs() {\n return this.each(js);\n}\nfunction Js() {\n this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction el() {\n return this.each(Js);\n}\nfunction tl(e) {\n var t = typeof e == \"function\" ? e : Bi(e);\n return this.select(function() {\n return this.appendChild(t.apply(this, arguments));\n });\n}\nfunction nl() {\n return null;\n}\nfunction ol(e, t) {\n var n = typeof e == \"function\" ? e : Bi(e), o = t == null ? nl : typeof t == \"function\" ? t : vo(t);\n return this.select(function() {\n return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);\n });\n}\nfunction il() {\n var e = this.parentNode;\n e && e.removeChild(this);\n}\nfunction rl() {\n return this.each(il);\n}\nfunction al() {\n var e = this.cloneNode(!1), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction sl() {\n var e = this.cloneNode(!0), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction ll(e) {\n return this.select(e ? sl : al);\n}\nfunction ul(e) {\n return arguments.length ? this.property(\"__data__\", e) : this.node().__data__;\n}\nfunction cl(e) {\n return function(t) {\n e.call(this, t, this.__data__);\n };\n}\nfunction dl(e) {\n return e.trim().split(/^|\\s+/).map(function(t) {\n var n = \"\", o = t.indexOf(\".\");\n return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };\n });\n}\nfunction fl(e) {\n return function() {\n var t = this.__on;\n if (t) {\n for (var n = 0, o = -1, i = t.length, r; n < i; ++n)\n r = t[n], (!e.type || r.type === e.type) && r.name === e.name ? this.removeEventListener(r.type, r.listener, r.options) : t[++o] = r;\n ++o ? t.length = o : delete this.__on;\n }\n };\n}\nfunction hl(e, t, n) {\n return function() {\n var o = this.__on, i, r = cl(t);\n if (o) {\n for (var a = 0, s = o.length; a < s; ++a)\n if ((i = o[a]).type === e.type && i.name === e.name) {\n this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;\n return;\n }\n }\n this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];\n };\n}\nfunction gl(e, t, n) {\n var o = dl(e + \"\"), i, r = o.length, a;\n if (arguments.length < 2) {\n var s = this.node().__on;\n if (s) {\n for (var l = 0, u = s.length, c; l < u; ++l)\n for (i = 0, c = s[l]; i < r; ++i)\n if ((a = o[i]).type === c.type && a.name === c.name)\n return c.value;\n }\n return;\n }\n for (s = t ? hl : fl, i = 0; i < r; ++i)\n this.each(s(o[i], t, n));\n return this;\n}\nfunction Ui(e, t, n) {\n var o = Gi(e), i = o.CustomEvent;\n typeof i == \"function\" ? i = new i(t, n) : (i = o.document.createEvent(\"Event\"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);\n}\nfunction vl(e, t) {\n return function() {\n return Ui(this, e, t);\n };\n}\nfunction ml(e, t) {\n return function() {\n return Ui(this, e, t.apply(this, arguments));\n };\n}\nfunction pl(e, t) {\n return this.each((typeof t == \"function\" ? ml : vl)(e, t));\n}\nfunction* yl() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length, a; i < r; ++i)\n (a = o[i]) && (yield a);\n}\nvar Wi = [null];\nfunction _e(e, t) {\n this._groups = e, this._parents = t;\n}\nfunction $t() {\n return new _e([[document.documentElement]], Wi);\n}\nfunction xl() {\n return this;\n}\n_e.prototype = $t.prototype = {\n constructor: _e,\n select: Xa,\n selectAll: Ka,\n selectChild: Ja,\n selectChildren: os,\n filter: is,\n data: cs,\n enter: rs,\n exit: fs,\n join: hs,\n merge: gs,\n selection: xl,\n order: vs,\n sort: ms,\n call: ys,\n nodes: xs,\n node: _s,\n size: ws,\n empty: bs,\n each: Es,\n attr: Os,\n style: Ds,\n property: Rs,\n classed: Gs,\n text: Zs,\n html: qs,\n raise: Qs,\n lower: el,\n append: tl,\n insert: ol,\n remove: rl,\n clone: ll,\n datum: ul,\n on: gl,\n dispatch: pl,\n [Symbol.iterator]: yl\n};\nfunction we(e) {\n return typeof e == \"string\" ? new _e([[document.querySelector(e)]], [document.documentElement]) : new _e([[e]], Wi);\n}\nfunction _l(e) {\n let t;\n for (; t = e.sourceEvent; )\n e = t;\n return e;\n}\nfunction Ne(e, t) {\n if (e = _l(e), t === void 0 && (t = e.currentTarget), t) {\n var n = t.ownerSVGElement || t;\n if (n.createSVGPoint) {\n var o = n.createSVGPoint();\n return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y];\n }\n if (t.getBoundingClientRect) {\n var i = t.getBoundingClientRect();\n return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];\n }\n }\n return [e.pageX, e.pageY];\n}\nconst wl = { passive: !1 }, bt = { capture: !0, passive: !1 };\nfunction $n(e) {\n e.stopImmediatePropagation();\n}\nfunction at(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Ki(e) {\n var t = e.document.documentElement, n = we(e).on(\"dragstart.drag\", at, bt);\n \"onselectstart\" in t ? n.on(\"selectstart.drag\", at, bt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = \"none\");\n}\nfunction qi(e, t) {\n var n = e.document.documentElement, o = we(e).on(\"dragstart.drag\", null);\n t && (o.on(\"click.drag\", at, bt), setTimeout(function() {\n o.on(\"click.drag\", null);\n }, 0)), \"onselectstart\" in n ? o.on(\"selectstart.drag\", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);\n}\nconst Pt = (e) => () => e;\nfunction Un(e, {\n sourceEvent: t,\n subject: n,\n target: o,\n identifier: i,\n active: r,\n x: a,\n y: s,\n dx: l,\n dy: u,\n dispatch: c\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n subject: { value: n, enumerable: !0, configurable: !0 },\n target: { value: o, enumerable: !0, configurable: !0 },\n identifier: { value: i, enumerable: !0, configurable: !0 },\n active: { value: r, enumerable: !0, configurable: !0 },\n x: { value: a, enumerable: !0, configurable: !0 },\n y: { value: s, enumerable: !0, configurable: !0 },\n dx: { value: l, enumerable: !0, configurable: !0 },\n dy: { value: u, enumerable: !0, configurable: !0 },\n _: { value: c }\n });\n}\nUn.prototype.on = function() {\n var e = this._.on.apply(this._, arguments);\n return e === this._ ? this : e;\n};\nfunction bl(e) {\n return !e.ctrlKey && !e.button;\n}\nfunction El() {\n return this.parentNode;\n}\nfunction Sl(e, t) {\n return t ?? { x: e.x, y: e.y };\n}\nfunction Nl() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Cl() {\n var e = bl, t = El, n = Sl, o = Nl, i = {}, r = fn(\"start\", \"drag\", \"end\"), a = 0, s, l, u, c, v = 0;\n function g(p) {\n p.on(\"mousedown.drag\", x).filter(o).on(\"touchstart.drag\", w).on(\"touchmove.drag\", y, wl).on(\"touchend.drag touchcancel.drag\", S).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function x(p, N) {\n if (!(c || !e.call(this, p, N))) {\n var T = V(this, t.call(this, p, N), p, N, \"mouse\");\n T && (we(p.view).on(\"mousemove.drag\", h, bt).on(\"mouseup.drag\", d, bt), Ki(p.view), $n(p), u = !1, s = p.clientX, l = p.clientY, T(\"start\", p));\n }\n }\n function h(p) {\n if (at(p), !u) {\n var N = p.clientX - s, T = p.clientY - l;\n u = N * N + T * T > v;\n }\n i.mouse(\"drag\", p);\n }\n function d(p) {\n we(p.view).on(\"mousemove.drag mouseup.drag\", null), qi(p.view, u), at(p), i.mouse(\"end\", p);\n }\n function w(p, N) {\n if (e.call(this, p, N)) {\n var T = p.changedTouches, _ = t.call(this, p, N), P = T.length, R, $;\n for (R = 0; R < P; ++R)\n ($ = V(this, _, p, N, T[R].identifier, T[R])) && ($n(p), $(\"start\", p, T[R]));\n }\n }\n function y(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (_ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && (at(p), P(\"drag\", p, N[_]));\n }\n function S(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (c && clearTimeout(c), c = setTimeout(function() {\n c = null;\n }, 500), _ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && ($n(p), P(\"end\", p, N[_]));\n }\n function V(p, N, T, _, P, R) {\n var $ = r.copy(), D = Ne(R || T, N), Q, ee, m;\n if ((m = n.call(p, new Un(\"beforestart\", {\n sourceEvent: T,\n target: g,\n identifier: P,\n active: a,\n x: D[0],\n y: D[1],\n dx: 0,\n dy: 0,\n dispatch: $\n }), _)) != null)\n return Q = m.x - D[0] || 0, ee = m.y - D[1] || 0, function A(E, G, Z) {\n var K = D, z;\n switch (E) {\n case \"start\":\n i[P] = A, z = a++;\n break;\n case \"end\":\n delete i[P], --a;\n case \"drag\":\n D = Ne(Z || G, N), z = a;\n break;\n }\n $.call(\n E,\n p,\n new Un(E, {\n sourceEvent: G,\n subject: m,\n target: g,\n identifier: P,\n active: z,\n x: D[0] + Q,\n y: D[1] + ee,\n dx: D[0] - K[0],\n dy: D[1] - K[1],\n dispatch: $\n }),\n _\n );\n };\n }\n return g.filter = function(p) {\n return arguments.length ? (e = typeof p == \"function\" ? p : Pt(!!p), g) : e;\n }, g.container = function(p) {\n return arguments.length ? (t = typeof p == \"function\" ? p : Pt(p), g) : t;\n }, g.subject = function(p) {\n return arguments.length ? (n = typeof p == \"function\" ? p : Pt(p), g) : n;\n }, g.touchable = function(p) {\n return arguments.length ? (o = typeof p == \"function\" ? p : Pt(!!p), g) : o;\n }, g.on = function() {\n var p = r.on.apply(r, arguments);\n return p === r ? g : p;\n }, g.clickDistance = function(p) {\n return arguments.length ? (v = (p = +p) * p, g) : Math.sqrt(v);\n }, g;\n}\nfunction ji(e) {\n const t = fe(), n = M(t, \"vueFlowRef\"), o = M(t, \"snapToGrid\"), i = M(t, \"snapGrid\"), r = M(t, \"noDragClassName\"), a = M(t, \"nodes\"), s = M(t, \"nodeExtent\"), l = M(t, \"viewport\"), u = M(t, \"autoPanOnNodeDrag\"), c = M(t, \"nodesDraggable\"), v = M(t, \"panBy\"), g = M(t, \"findNode\"), x = M(t, \"multiSelectionActive\"), h = M(t, \"nodesSelectionActive\"), d = M(t, \"selectNodesOnDrag\"), w = M(t, \"removeSelectedElements\"), y = M(t, \"addSelectedNodes\"), S = M(t, \"updateNodePositions\"), V = M(t, \"emits\"), { onStart: p, onDrag: N, onStop: T, el: _, disabled: P, id: R, selectable: $ } = e, D = ie(!1);\n let Q = ie([]), ee = ie(), m = ie(null), A = ie({ x: void 0, y: void 0 }), E = ie({ x: 0, y: 0 }), G = ie(null), Z = ie(0), K = ie(!1);\n const z = Ra(), W = ({ x: q, y: te }) => {\n A.value = { x: q, y: te };\n let re = !1;\n if (Q.value = Q.value.map((k) => {\n const H = { x: q - k.distance.x, y: te - k.distance.y };\n o.value && (H.x = i.value[0] * Math.round(H.x / i.value[0]), H.y = i.value[1] * Math.round(H.y / i.value[1]));\n const { computedPosition: f } = go(\n k,\n H,\n V.value.error,\n s.value,\n k.parentNode ? g.value(k.parentNode) : void 0\n );\n return re = re || k.position.x !== f.x || k.position.y !== f.y, k.position = f, k;\n }), !!re && (S.value(Q.value, !0, !0), D.value = !0, G.value)) {\n const [k, H] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n N({ event: G.value, node: k, nodes: H });\n }\n }, B = () => {\n if (!m.value)\n return;\n const [q, te] = Pi(E.value, m.value);\n if (q !== 0 || te !== 0) {\n const re = {\n x: (A.value.x ?? 0) - q / l.value.zoom,\n y: (A.value.y ?? 0) - te / l.value.zoom\n };\n v.value({ x: q, y: te }) && W(re);\n }\n Z.value = requestAnimationFrame(B);\n };\n return de([() => le(P), _], ([q, te]) => {\n if (te) {\n const re = we(te);\n if (q)\n re.on(\".drag\", null);\n else {\n const k = g.value(R);\n ee.value = Cl().on(\"start\", (H) => {\n var b;\n !d.value && !x.value && k && (k.selected || w.value()), k && le($) && d.value && Xn(\n k,\n x.value,\n y.value,\n w.value,\n h,\n !1,\n te\n );\n const f = z(H);\n if (A.value = f, Q.value = Pa(a.value, c.value, f, g.value, R), Q.value.length) {\n const [L, I] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n p({ event: H.sourceEvent, node: L, nodes: I });\n }\n m.value = ((b = n.value) == null ? void 0 : b.getBoundingClientRect()) || null, E.value = rt(H.sourceEvent, m.value);\n }).on(\"drag\", (H) => {\n const f = z(H);\n !K.value && u.value && (K.value = !0, B()), (A.value.x !== f.xSnapped || A.value.y !== f.ySnapped) && Q.value.length && (G.value = H.sourceEvent, E.value = rt(H.sourceEvent, m.value), W(f));\n }).on(\"end\", (H) => {\n if (D.value = !1, K.value = !1, cancelAnimationFrame(Z.value), Q.value.length) {\n S.value(Q.value, !1, !1);\n const [f, b] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n T({ event: H.sourceEvent, node: f, nodes: b });\n }\n }).filter((H) => {\n const f = H.target;\n return !H.button && (!r.value || !Ho(f, `.${r.value}`, te) && (!(k != null && k.dragHandle) || Ho(f, k.dragHandle, te)));\n }), re.call(ee.value);\n }\n }\n }), D;\n}\nconst Qi = \"vue-flow__node-desc\", Ji = \"vue-flow__edge-desc\", Ml = \"vue-flow__aria-live\", er = [\"Enter\", \" \", \"Escape\"], st = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction Wn(e) {\n var i, r;\n const t = ((r = (i = e.composedPath) == null ? void 0 : i.call(e)) == null ? void 0 : r[0]) || e.target, n = Ae(t.hasAttribute) ? t.hasAttribute(\"contenteditable\") : !1, o = Ae(t.closest) ? t.closest(\".nokey\") : null;\n return [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(t == null ? void 0 : t.nodeName) || n || !!o;\n}\nfunction $l(e) {\n return e.ctrlKey || e.metaKey || e.shiftKey;\n}\nfunction kl(e, t) {\n return (n) => e.some((o) => {\n const i = o.split(\"+\").map((r) => r.trim().toLowerCase());\n return i.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), i.every((r) => t.has(r)));\n });\n}\nconst _t = (e, t) => {\n const n = ao(), o = ie(le(e) === !0), i = ie(!1), r = ie(/* @__PURE__ */ new Set());\n return de(o, () => {\n t == null || t(o.value);\n }), de(\n () => le(e),\n (a) => {\n if (n && typeof n.addEventListener < \"u\" && ro(n, \"blur\", () => {\n o.value = !1;\n }), zr(a)) {\n o.value = a;\n return;\n }\n Array.isArray(a) && (a = kl(a, r.value)), a && (Mo(\n a,\n (s) => {\n i.value = $l(s), !(!i.value && Wn(s)) && (s.preventDefault(), o.value = !0);\n },\n { eventName: \"keydown\" }\n ), Mo(\n a,\n (s) => {\n if (o.value) {\n if (!i.value && Wn(s))\n return;\n i.value = !1, r.value.clear(), o.value = !1;\n }\n },\n { eventName: \"keyup\" }\n ));\n },\n {\n immediate: !0\n }\n ), o;\n}, Ol = ge({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"draggable\", \"selectable\", \"focusable\", \"connectable\", \"node\", \"resizeObserver\"],\n setup(e) {\n ut($i, e.id);\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"noPanClassName\"), r = M(t, \"selectNodesOnDrag\"), a = M(t, \"nodesSelectionActive\"), s = M(t, \"multiSelectionActive\"), l = M(t, \"emits\"), u = M(t, \"findNode\"), c = M(t, \"removeSelectedNodes\"), v = M(t, \"addSelectedNodes\"), g = M(t, \"updateNodeDimensions\"), x = M(t, \"onUpdateNodeInternals\"), h = M(t, \"getIntersectingNodes\"), d = M(t, \"getNodeTypes\"), w = M(t, \"nodeExtent\"), y = M(t, \"elevateNodesOnSelect\"), S = M(t, \"disableKeyboardA11y\"), V = M(t, \"ariaLiveMessage\"), p = M(t, \"snapToGrid\"), N = M(t, \"snapGrid\"), T = Ai(), _ = yt(e, \"node\"), P = J(() => u.value(_.value.parentNode)), R = J(() => sn([_.value], o.value)), $ = ie();\n ut(ki, $);\n const { emit: D, on: Q } = Ba(_.value, l.value), ee = ji({\n id: e.id,\n el: $,\n disabled: () => !e.draggable,\n selectable: () => e.selectable,\n onStart(k) {\n D.dragStart({ ...k, intersections: h.value(_.value) });\n },\n onDrag(k) {\n D.drag({ ...k, intersections: h.value(_.value) });\n },\n onStop(k) {\n D.dragStop({ ...k, intersections: h.value(_.value) });\n }\n }), m = J(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = J(() => {\n const k = (_.value.style instanceof Function ? _.value.style(_.value) : _.value.style) || {}, H = _.value.width instanceof Function ? _.value.width(_.value) : _.value.width, f = _.value.height instanceof Function ? _.value.height(_.value) : _.value.height;\n return H && (k.width = typeof H == \"string\" ? H : `${H}px`), f && (k.height = typeof f == \"string\" ? f : `${f}px`), k;\n }), E = () => Number(_.value.zIndex ?? A.value.zIndex ?? 0);\n return x.value((k) => {\n k.includes(e.id) && Z();\n }), Ve(() => {\n e.resizeObserver.observe($.value);\n }), gi(() => {\n e.resizeObserver.unobserve($.value);\n }), de(\n [() => _.value.type, () => _.value.sourcePosition, () => _.value.targetPosition],\n () => {\n g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n },\n { flush: \"pre\" }\n ), de(\n [\n () => _.value.position.x,\n () => _.value.position.y,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.x;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.y;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.z;\n },\n () => E(),\n () => _.value.selected,\n () => _.value.dimensions.height,\n () => _.value.dimensions.width,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.height;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.width;\n }\n ],\n ([k, H, f, b, L, I]) => {\n const F = {\n x: k,\n y: H,\n z: I + (y.value && _.value.selected ? 1e3 : 0)\n };\n Ie(f) && Ie(b) ? _.value.computedPosition = ma({ x: f, y: b, z: L }, F) : _.value.computedPosition = F;\n },\n { flush: \"pre\", immediate: !0 }\n ), de([() => _.value.extent, () => w.value], ([k, H], [f, b]) => {\n (k !== f || H !== b) && G();\n }), _.value.extent === \"parent\" || typeof _.value.extent == \"object\" && \"range\" in _.value.extent && _.value.extent.range === \"parent\" ? ye(() => _.value.initialized).toBe(!0).then(G) : G(), () => ue(\n \"div\",\n {\n ref: $,\n \"data-id\": _.value.id,\n class: [\n \"vue-flow__node\",\n `vue-flow__node-${e.type === !1 ? \"default\" : e.name}`,\n {\n [i.value]: e.draggable,\n dragging: ee == null ? void 0 : ee.value,\n selected: _.value.selected,\n selectable: e.selectable\n },\n m.value\n ],\n style: {\n zIndex: _.value.computedPosition.z ?? E(),\n transform: `translate(${_.value.computedPosition.x}px,${_.value.computedPosition.y}px)`,\n pointerEvents: e.selectable || e.draggable ? \"all\" : \"none\",\n visibility: _.value.initialized ? \"visible\" : \"hidden\",\n ...A.value\n },\n tabIndex: e.focusable ? 0 : void 0,\n role: e.focusable ? \"button\" : void 0,\n \"aria-describedby\": S.value ? void 0 : `${Qi}-${n.value}`,\n \"aria-label\": _.value.ariaLabel,\n onMouseenter: K,\n onMousemove: z,\n onMouseleave: W,\n onContextmenu: B,\n onClick: te,\n onDblclick: q,\n onKeydown: re\n },\n [\n ue(e.type === !1 ? d.value.default : e.type, {\n id: _.value.id,\n type: _.value.type,\n data: _.value.data,\n events: { ..._.value.events, ...Q },\n selected: !!_.value.selected,\n resizing: !!_.value.resizing,\n dragging: ee.value,\n connectable: e.connectable,\n position: _.value.position,\n dimensions: _.value.dimensions,\n isValidTargetPos: _.value.isValidTargetPos,\n isValidSourcePos: _.value.isValidSourcePos,\n parent: _.value.parentNode,\n zIndex: _.value.computedPosition.z,\n targetPosition: _.value.targetPosition,\n sourcePosition: _.value.sourcePosition,\n label: _.value.label,\n dragHandle: _.value.dragHandle,\n onUpdateNodeInternals: Z\n })\n ]\n );\n function G() {\n const k = _.value.computedPosition;\n p.value && (k.x = N.value[0] * Math.round(k.x / N.value[0]), k.y = N.value[1] * Math.round(k.y / N.value[1]));\n const { computedPosition: H, position: f } = go(_.value, k, l.value.error, w.value, P.value);\n (_.value.computedPosition.x !== H.x || _.value.computedPosition.y !== H.y) && (_.value.computedPosition = { ..._.value.computedPosition, ...H }), (_.value.position.x !== f.x || _.value.position.y !== f.y) && (_.value.position = f);\n }\n function Z() {\n $.value && g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n }\n function K(k) {\n ee != null && ee.value || D.mouseEnter({ event: k, node: _.value, connectedEdges: R.value });\n }\n function z(k) {\n ee != null && ee.value || D.mouseMove({ event: k, node: _.value, connectedEdges: R.value });\n }\n function W(k) {\n ee != null && ee.value || D.mouseLeave({ event: k, node: _.value, connectedEdges: R.value });\n }\n function B(k) {\n return D.contextMenu({ event: k, node: _.value, connectedEdges: R.value });\n }\n function q(k) {\n return D.doubleClick({ event: k, node: _.value, connectedEdges: R.value });\n }\n function te(k) {\n e.selectable && (!r.value || !e.draggable) && Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n !1,\n $.value\n ), D.click({ event: k, node: _.value, connectedEdges: R.value });\n }\n function re(k) {\n var H;\n if (!Wn(k))\n if (er.includes(k.key) && e.selectable) {\n const f = k.key === \"Escape\";\n f && ((H = $.value) == null || H.blur()), Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n f,\n $.value\n );\n } else\n !S.value && e.draggable && _.value.selected && st[k.key] && (V.value = `Moved selected node ${k.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~_.value.position.x}, y: ${~~_.value.position.y}`, T(\n {\n x: st[k.key].x,\n y: st[k.key].y\n },\n k.shiftKey\n ));\n }\n }\n}), Tl = Ol, Il = [\"transform\"], Pl = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"], Dl = [\"y\"], zl = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n}, Al = /* @__PURE__ */ ge({\n ...zl,\n props: {\n x: null,\n y: null,\n label: null,\n labelStyle: { default: {} },\n labelShowBg: { type: Boolean, default: !0 },\n labelBgStyle: { default: {} },\n labelBgPadding: { default: [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(e) {\n let t = ie({ x: 0, y: 0, width: 0, height: 0 });\n const n = ie(null), o = J(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`);\n Ve(i), de([() => e.x, () => e.y, n, () => e.label], i);\n function i() {\n if (!n.value)\n return;\n const r = n.value.getBBox();\n (r.width !== t.value.width || r.height !== t.value.height) && (t.value = r);\n }\n return (r, a) => (oe(), se(\"g\", {\n transform: C(o),\n class: \"vue-flow__edge-textwrapper\"\n }, [\n e.labelShowBg ? (oe(), se(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${C(t).width + 2 * e.labelBgPadding[0]}px`,\n height: `${C(t).height + 2 * e.labelBgPadding[1]}px`,\n x: -e.labelBgPadding[0],\n y: -e.labelBgPadding[1],\n style: Le(e.labelBgStyle),\n rx: e.labelBgBorderRadius,\n ry: e.labelBgBorderRadius\n }, null, 12, Pl)) : Ee(\"\", !0),\n ct(\"text\", vi(r.$attrs, {\n ref_key: \"el\",\n ref: n,\n class: \"vue-flow__edge-text\",\n y: C(t).height / 2,\n dy: \"0.3em\",\n style: e.labelStyle\n }), [\n xe(r.$slots, \"default\", {}, () => [\n C(Pe)(e.label) ? (oe(), se(Ce, { key: 1 }, [\n Cr(Vn(e.label), 1)\n ], 64)) : (oe(), ze(mi(e.label), { key: 0 }))\n ])\n ], 16, Dl)\n ], 8, Il));\n }\n}), gn = function({\n path: e,\n label: t,\n labelX: n,\n labelY: o,\n labelBgBorderRadius: i,\n labelBgPadding: r,\n labelBgStyle: a,\n labelShowBg: s = !0,\n labelStyle: l,\n markerStart: u,\n markerEnd: c,\n interactionWidth: v = 20\n}, { attrs: g }) {\n return [\n ue(\"path\", {\n style: g.style,\n class: [\"vue-flow__edge-path\", g.class].join(\" \"),\n d: e,\n \"marker-end\": c,\n \"marker-start\": u\n }),\n v ? ue(\"path\", {\n d: e,\n fill: \"none\",\n \"stroke-opacity\": 0,\n \"stroke-width\": v\n }) : null,\n t && Ie(n) && Ie(o) ? ue(Al, {\n x: n,\n y: o,\n label: t,\n labelStyle: l,\n labelShowBg: s,\n labelBgStyle: a,\n labelBgPadding: r,\n labelBgBorderRadius: i\n }) : null\n ];\n};\ngn.props = [\n \"path\",\n \"labelX\",\n \"labelY\",\n \"label\",\n \"labelBgBorderRadius\",\n \"labelBgPadding\",\n \"labelBgStyle\",\n \"labelShowBg\",\n \"labelStyle\",\n \"markerStart\",\n \"markerEnd\",\n \"interactionWidth\"\n];\ngn.inheritAttrs = !1;\ngn.compatConfig = { MODE: 3 };\nconst vn = gn;\nfunction tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, a = Math.abs(o - t) / 2, s = o < t ? o + a : o - a;\n return [r, s, i, a];\n}\nfunction nr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o,\n sourceControlX: i,\n sourceControlY: r,\n targetControlX: a,\n targetControlY: s\n}) {\n const l = e * 0.125 + i * 0.375 + a * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(l - e), v = Math.abs(u - t);\n return [l, u, c, v];\n}\nfunction Dt(e, t) {\n return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);\n}\nfunction Yo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {\n let a, s;\n switch (e) {\n case j.Left:\n a = t - Dt(t - o, r), s = n;\n break;\n case j.Right:\n a = t + Dt(o - t, r), s = n;\n break;\n case j.Top:\n a = t, s = n - Dt(n - i, r);\n break;\n case j.Bottom:\n a = t, s = n + Dt(i - n, r);\n break;\n }\n return [a, s];\n}\nfunction Kn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n curvature: a = 0.25\n}) {\n const [s, l] = Yo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i,\n c: a\n }), [u, c] = Yo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t,\n c: a\n }), [v, g, x, h] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: s,\n sourceControlY: l,\n targetControlX: u,\n targetControlY: c\n });\n return [\n `M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,\n v,\n g,\n x,\n h\n ];\n}\nconst mn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = Kn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nmn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nmn.inheritAttrs = !1;\nmn.compatConfig = { MODE: 3 };\nconst Bl = mn;\nfunction Xo({ pos: e, x1: t, y1: n, x2: o, y2: i }) {\n let r, a;\n switch (e) {\n case j.Left:\n case j.Right:\n r = 0.5 * (t + o), a = n;\n break;\n case j.Top:\n case j.Bottom:\n r = t, a = 0.5 * (n + i);\n break;\n }\n return [r, a];\n}\nfunction or({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top\n}) {\n const [a, s] = Xo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i\n }), [l, u] = Xo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t\n }), [c, v, g, x] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: a,\n sourceControlY: s,\n targetControlX: l,\n targetControlY: u\n });\n return [\n `M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,\n c,\n v,\n g,\n x\n ];\n}\nconst pn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = or({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\npn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\npn.inheritAttrs = !1;\npn.compatConfig = { MODE: 3 };\nconst Rl = pn, Zo = {\n [j.Left]: { x: -1, y: 0 },\n [j.Right]: { x: 1, y: 0 },\n [j.Top]: { x: 0, y: -1 },\n [j.Bottom]: { x: 0, y: 1 }\n};\nfunction Vl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n\n}) {\n return t === j.Left || t === j.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction Uo(e, t) {\n return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);\n}\nfunction Hl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n,\n targetPosition: o = j.Top,\n center: i,\n offset: r\n}) {\n const a = Zo[t], s = Zo[o], l = { x: e.x + a.x * r, y: e.y + a.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Vl({\n source: l,\n sourcePosition: t,\n target: u\n }), v = c.x !== 0 ? \"x\" : \"y\", g = c[v];\n let x, h, d;\n const [w, y, S, V] = tr({\n sourceX: e.x,\n sourceY: e.y,\n targetX: n.x,\n targetY: n.y\n });\n if (a[v] * s[v] === -1) {\n h = i.x || w, d = i.y || y;\n const N = [\n { x: h, y: l.y },\n { x: h, y: u.y }\n ], T = [\n { x: l.x, y: d },\n { x: u.x, y: d }\n ];\n a[v] === g ? x = v === \"x\" ? N : T : x = v === \"x\" ? T : N;\n } else {\n const N = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];\n if (v === \"x\" ? x = a.x === g ? T : N : x = a.y === g ? N : T, t !== o) {\n const _ = v === \"x\" ? \"y\" : \"x\", P = a[v] === s[_], R = l[_] > u[_], $ = l[_] < u[_];\n (a[v] === 1 && (!P && R || P && $) || a[v] !== 1 && (!P && $ || P && R)) && (x = v === \"x\" ? N : T);\n }\n h = x[0].x, d = x[0].y;\n }\n return [[e, l, ...x, u, n], h, d, S, V];\n}\nfunction Ll(e, t, n, o) {\n const i = Math.min(Uo(e, t) / 2, Uo(t, n) / 2, o), { x: r, y: a } = t;\n if (e.x === r && r === n.x || e.y === a && a === n.y)\n return `L${r} ${a}`;\n if (e.y === a) {\n const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;\n return `L ${r + i * u},${a}Q ${r},${a} ${r},${a + i * c}`;\n }\n const s = e.x < n.x ? 1 : -1, l = e.y < n.y ? -1 : 1;\n return `L ${r},${a + i * l}Q ${r},${a} ${r + i * s},${a}`;\n}\nfunction qn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n borderRadius: a = 5,\n centerX: s,\n centerY: l,\n offset: u = 20\n}) {\n const [c, v, g, x, h] = Hl({\n source: { x: e, y: t },\n sourcePosition: n,\n target: { x: o, y: i },\n targetPosition: r,\n center: { x: s, y: l },\n offset: u\n });\n return [c.reduce((w, y, S) => {\n let V;\n return S > 0 && S < c.length - 1 ? V = Ll(c[S - 1], y, c[S + 1], a) : V = `${S === 0 ? \"M\" : \"L\"}${y.x} ${y.y}`, w += V, w;\n }, \"\"), v, g, x, h];\n}\nconst yn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = qn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nyn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n];\nyn.inheritAttrs = !1;\nyn.compatConfig = { MODE: 3 };\nconst ir = yn, xn = function(e, { attrs: t }) {\n return ue(ir, { ...e, ...t, borderRadius: 0 });\n};\nxn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nxn.inheritAttrs = !1;\nxn.compatConfig = { MODE: 3 };\nconst Gl = xn;\nfunction rr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const [i, r, a, s] = tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n });\n return [`M ${e},${t}L ${n},${o}`, i, r, a, s];\n}\nconst _n = function(e, { attrs: t }) {\n const [n, o, i] = rr(e);\n return ue(vn, {\n path: n,\n labelX: o,\n labelY: i,\n ...e,\n ...t\n });\n};\n_n.props = [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\n_n.inheritAttrs = !1;\n_n.compatConfig = { MODE: 3 };\nconst Fl = _n;\nfunction Yl(e, t, n) {\n return n === j.Left ? e - t : n === j.Right ? e + t : e;\n}\nfunction Xl(e, t, n) {\n return n === j.Top ? e - t : n === j.Bottom ? e + t : e;\n}\nconst po = function({\n radius: e = 10,\n centerX: t = 0,\n centerY: n = 0,\n position: o = j.Top,\n type: i\n}) {\n return ue(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,\n cx: Yl(t, e, o),\n cy: Xl(n, e, o),\n r: e,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\npo.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\npo.compatConfig = { MODE: 3 };\nconst Wo = po;\nfunction Zl() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n updateStart: X(),\n update: X(),\n updateEnd: X()\n };\n}\nfunction Ul(e, t) {\n const n = Zl();\n return n.doubleClick.on((o) => {\n var i, r;\n t.edgeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.edgeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.edgeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.edgeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.edgeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.edgeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.updateStart.on((o) => {\n var i, r;\n t.edgeUpdateStart(o), (r = (i = e.events) == null ? void 0 : i.updateStart) == null || r.call(i, o);\n }), n.update.on((o) => {\n var i, r;\n t.edgeUpdate(o), (r = (i = e.events) == null ? void 0 : i.update) == null || r.call(i, o);\n }), n.updateEnd.on((o) => {\n var i, r;\n t.edgeUpdateEnd(o), (r = (i = e.events) == null ? void 0 : i.updateEnd) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nconst Wl = ge({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"updatable\", \"selectable\", \"focusable\", \"edge\"],\n setup(e) {\n const {\n id: t,\n addSelectedEdges: n,\n connectionMode: o,\n edgeUpdaterRadius: i,\n emits: r,\n nodesSelectionActive: a,\n noPanClassName: s,\n getEdgeTypes: l,\n removeSelectedEdges: u,\n findEdge: c,\n findNode: v,\n isValidConnection: g\n } = fe(), x = Ul(e.edge, r), h = yt(e, \"edge\");\n let d = ie(!1), w = ie(!1);\n const y = ie(\"\"), S = ie(null), V = ie(\"source\"), p = ie();\n ut(Oi, e.id), ut(Ti, p);\n const N = J(() => h.value.class instanceof Function ? h.value.class(h.value) : h.value.class), T = J(() => h.value.style instanceof Function ? h.value.style(h.value) : h.value.style), { handlePointerDown: _ } = Di({\n nodeId: y,\n handleId: S,\n type: V,\n isValidConnection: g.value,\n edgeUpdaterType: V,\n onEdgeUpdate: $,\n onEdgeUpdateEnd: D\n });\n return () => {\n const B = v(h.value.source), q = v(h.value.target);\n if (!B || !q || !h.value)\n return null;\n let te;\n o.value === Qe.Strict ? te = B.handleBounds.source : te = [...B.handleBounds.source || [], ...B.handleBounds.target || []];\n const re = Ao(te, h.value.sourceHandle);\n let k;\n o.value === Qe.Strict ? k = q.handleBounds.target : k = [...q.handleBounds.target || [], ...q.handleBounds.source || []];\n const H = Ao(k, h.value.targetHandle), f = re ? re.position : j.Bottom, b = H ? H.position : j.Top, { sourceX: L, sourceY: I, targetY: F, targetX: U } = wa(\n B,\n re,\n f,\n q,\n H,\n b\n );\n return h.value.sourceX = L, h.value.sourceY = I, h.value.targetX = U, h.value.targetY = F, ue(\n \"g\",\n {\n ref: p,\n key: e.id,\n \"data-id\": e.id,\n class: [\n \"vue-flow__edge\",\n `vue-flow__edge-${e.type === !1 ? \"default\" : e.name}`,\n s.value,\n N.value,\n {\n updating: d.value,\n selected: h.value.selected,\n animated: h.value.animated,\n inactive: !e.selectable\n }\n ],\n onClick: ee,\n onContextmenu: m,\n onDblclick: A,\n onMouseenter: E,\n onMousemove: G,\n onMouseleave: Z,\n onKeyDown: e.focusable ? W : void 0,\n tabIndex: e.focusable ? 0 : void 0,\n \"aria-label\": h.value.ariaLabel === null ? void 0 : h.value.ariaLabel || `Edge from ${h.value.source} to ${h.value.target}`,\n \"aria-describedby\": e.focusable ? `${Ji}-${t}` : void 0,\n role: e.focusable ? \"button\" : void 0\n },\n [\n w.value ? null : ue(e.type === !1 ? l.value.default : e.type, {\n id: e.id,\n sourceNode: B,\n targetNode: q,\n source: h.value.source,\n target: h.value.target,\n type: h.value.type,\n updatable: e.updatable,\n selected: h.value.selected,\n animated: h.value.animated,\n label: h.value.label,\n labelStyle: h.value.labelStyle,\n labelShowBg: h.value.labelShowBg,\n labelBgStyle: h.value.labelBgStyle,\n labelBgPadding: h.value.labelBgPadding,\n labelBgBorderRadius: h.value.labelBgBorderRadius,\n data: h.value.data,\n events: { ...h.value.events, ...x.on },\n style: T.value,\n markerStart: `url(#${Xe(h.value.markerStart, t)})`,\n markerEnd: `url(#${Xe(h.value.markerEnd, t)})`,\n sourcePosition: f,\n targetPosition: b,\n sourceX: L,\n sourceY: I,\n targetX: U,\n targetY: F,\n sourceHandleId: h.value.sourceHandle,\n targetHandleId: h.value.targetHandle,\n interactionWidth: h.value.interactionWidth\n }),\n [\n e.updatable === \"source\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: K,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: f,\n centerX: L,\n centerY: I,\n radius: i.value,\n type: \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n e.updatable === \"target\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: z,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: b,\n centerX: U,\n centerY: F,\n radius: i.value,\n type: \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function P() {\n d.value = !0;\n }\n function R() {\n d.value = !1;\n }\n function $(B, q) {\n x.emit.update({ event: B, edge: h.value, connection: q });\n }\n function D(B) {\n x.emit.updateEnd({ event: B, edge: h.value }), w.value = !1;\n }\n function Q(B, q) {\n B.button === 0 && (w.value = !0, y.value = q ? h.value.target : h.value.source, S.value = (q ? h.value.targetHandle : h.value.sourceHandle) ?? \"\", V.value = q ? \"target\" : \"source\", x.emit.updateStart({ event: B, edge: h.value }), _(B));\n }\n function ee(B) {\n const q = { event: B, edge: h.value };\n e.selectable && (a.value = !1, n([h.value])), x.emit.click(q);\n }\n function m(B) {\n x.emit.contextMenu({ event: B, edge: h.value });\n }\n function A(B) {\n x.emit.doubleClick({ event: B, edge: h.value });\n }\n function E(B) {\n x.emit.mouseEnter({ event: B, edge: h.value });\n }\n function G(B) {\n x.emit.mouseMove({ event: B, edge: h.value });\n }\n function Z(B) {\n x.emit.mouseLeave({ event: B, edge: h.value });\n }\n function K(B) {\n Q(B, !0);\n }\n function z(B) {\n Q(B, !1);\n }\n function W(B) {\n var q;\n er.includes(B.key) && e.selectable && (B.key === \"Escape\" ? ((q = p.value) == null || q.blur(), u([c(e.id)])) : n([c(e.id)]));\n }\n }\n}), Kl = Wl, ql = {\n height: \"0\",\n width: \"0\"\n}, jl = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n}, Rd = /* @__PURE__ */ ge({\n ...jl,\n setup(e) {\n const { viewportRef: t } = fe(), n = J(() => {\n var o;\n return (o = t.value) == null ? void 0 : o.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (o, i) => (oe(), se(\"svg\", null, [\n (oe(), se(\"foreignObject\", ql, [\n (oe(), ze(Mr, {\n to: C(n),\n disabled: !C(n)\n }, [\n xe(o.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]));\n }\n}), Ql = { class: \"vue-flow__connection\" }, Jl = [\"d\", \"marker-end\", \"marker-start\"], eu = {\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 }\n}, tu = /* @__PURE__ */ ge({\n ...eu,\n props: {\n sourceNode: null\n },\n setup(e) {\n var R;\n const t = fe(), n = M(t, \"connectionMode\"), o = M(t, \"connectionStartHandle\"), i = M(t, \"connectionEndHandle\"), r = M(t, \"connectionPosition\"), a = M(t, \"connectionLineType\"), s = M(t, \"connectionLineStyle\"), l = M(t, \"connectionLineOptions\"), u = M(t, \"connectionStatus\"), c = M(t, \"viewport\"), v = M(t, \"findNode\"), g = {\n [j.Left]: j.Right,\n [j.Right]: j.Left,\n [j.Top]: j.Bottom,\n [j.Bottom]: j.Top\n }, x = (R = He(ln)) == null ? void 0 : R[\"connection-line\"], h = J(() => o.value.handleId), d = J(() => o.value.type), w = J(() => {\n var $;\n return (($ = i.value) == null ? void 0 : $.handleId) && v.value(i.value.nodeId) || null;\n }), y = J(\n () => {\n var $, D;\n return (n.value === Qe.Strict ? ($ = e.sourceNode.handleBounds[d.value]) == null ? void 0 : $.find((Q) => Q.id === h.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((Q) => Q.id === h.value)) || ((D = e.sourceNode.handleBounds[d.value ?? \"source\"]) == null ? void 0 : D[0]);\n }\n ), S = J(() => {\n var $, D, Q;\n return w.value && (($ = i.value) == null ? void 0 : $.handleId) && ((n.value === Qe.Strict ? (D = w.value.handleBounds[d.value === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : D.find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n ) : [...w.value.handleBounds.source || [], ...w.value.handleBounds.target || []].find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n )) || ((Q = w.value.handleBounds[d.value ?? \"target\"]) == null ? void 0 : Q[0])) || null;\n }), V = J(() => {\n var $;\n return ($ = y.value) == null ? void 0 : $.position;\n }), p = J(() => y.value ? Wt(\n V.value || j.Top,\n { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition },\n y.value\n ) : {\n x: e.sourceNode.dimensions.width / 2,\n y: e.sourceNode.dimensions.height / 2\n }), N = J(() => V.value ? g[V.value] : void 0), T = J(() => (r.value.x - c.value.x) / c.value.zoom), _ = J(() => (r.value.y - c.value.y) / c.value.zoom), P = J(() => {\n let $;\n const D = {\n sourceX: p.value.x,\n sourceY: p.value.y,\n sourcePosition: V.value,\n targetX: T.value,\n targetY: _.value,\n targetPosition: N.value\n };\n switch (a.value ?? l.value.type) {\n case Ye.Bezier:\n [$] = Kn(D);\n break;\n case Ye.Step:\n [$] = qn({\n ...D,\n borderRadius: 0\n });\n break;\n case Ye.SmoothStep:\n [$] = qn(D);\n break;\n case Ye.SimpleBezier:\n [$] = or(D);\n break;\n case Ye.Straight:\n [$] = rr(D);\n break;\n default:\n [$] = Kn(D);\n break;\n }\n return $;\n });\n return ($, D) => {\n var Q;\n return oe(), se(\"g\", Ql, [\n C(x) ? (oe(), ze(mi(C(x)), $r(vi({ key: 0 }, {\n sourceX: C(p).x,\n sourceY: C(p).y,\n sourcePosition: (Q = C(y)) == null ? void 0 : Q.position,\n targetX: C(T),\n targetY: C(_),\n targetPosition: C(N),\n sourceNode: e.sourceNode,\n sourceHandle: C(y),\n targetNode: C(w),\n targetHandle: C(S),\n markerEnd: `url(#${C(Xe)(C(l).markerEnd)})`,\n markerStart: `url(#${C(Xe)(C(l).markerStart)})`,\n connectionStatus: C(u)\n })), null, 16)) : (oe(), se(\"path\", {\n key: 1,\n d: C(P),\n class: Ke([\"vue-flow__connection-path\", [C(l).class, C(u)]]),\n style: Le(C(s) || C(l).style || {}),\n \"marker-end\": `url(#${C(Xe)(C(l).markerEnd)})`,\n \"marker-start\": `url(#${C(Xe)(C(l).markerStart)})`\n }, null, 14, Jl))\n ]);\n };\n }\n}), nu = [\"tabIndex\"], ou = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n}, iu = /* @__PURE__ */ ge({\n ...ou,\n setup(e) {\n const t = fe(), n = M(t, \"emits\"), o = M(t, \"viewport\"), i = M(t, \"getSelectedNodes\"), r = M(t, \"noPanClassName\"), a = M(t, \"disableKeyboardA11y\"), s = M(t, \"userSelectionActive\"), l = Ai(), u = ie(), c = ji({\n el: u,\n onStart(d) {\n n.value.selectionDragStart(d);\n },\n onDrag(d) {\n n.value.selectionDrag(d);\n },\n onStop(d) {\n n.value.selectionDragStop(d);\n }\n });\n Ve(() => {\n var d;\n a.value || (d = u.value) == null || d.focus({ preventScroll: !0 });\n });\n const v = J(() => co(i.value)), g = J(() => ({\n width: `${v.value.width}px`,\n height: `${v.value.height}px`,\n top: `${v.value.y}px`,\n left: `${v.value.x}px`\n }));\n function x(d) {\n n.value.selectionContextMenu({ event: d, nodes: i.value });\n }\n function h(d) {\n a.value || st[d.key] && l(\n {\n x: st[d.key].x,\n y: st[d.key].y\n },\n d.shiftKey\n );\n }\n return (d, w) => !C(s) && C(v).width && C(v).height ? (oe(), se(\"div\", {\n key: 0,\n class: Ke([\"vue-flow__nodesselection vue-flow__container\", C(r)]),\n style: Le({ transform: `translate(${C(o).x}px,${C(o).y}px) scale(${C(o).zoom})` })\n }, [\n ct(\"div\", {\n ref_key: \"el\",\n ref: u,\n class: Ke([{ dragging: C(c) }, \"vue-flow__nodesselection-rect\"]),\n style: Le(C(g)),\n tabIndex: C(a) ? void 0 : -1,\n onContextmenu: x,\n onKeydown: h\n }, null, 46, nu)\n ], 6)) : Ee(\"\", !0);\n }\n}), ru = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n}, au = /* @__PURE__ */ ge({\n ...ru,\n setup(e) {\n const { userSelectionRect: t } = fe();\n return (n, o) => {\n var i, r, a, s;\n return oe(), se(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: Le({\n width: `${(i = C(t)) == null ? void 0 : i.width}px`,\n height: `${(r = C(t)) == null ? void 0 : r.height}px`,\n transform: `translate(${(a = C(t)) == null ? void 0 : a.x}px, ${(s = C(t)) == null ? void 0 : s.y}px)`\n })\n }, null, 4);\n };\n }\n}), su = {\n input: Ta,\n default: Oa,\n output: Ia\n}, lu = {\n default: Bl,\n straight: Fl,\n step: Gl,\n smoothstep: ir,\n simplebezier: Rl\n};\nfunction uu() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n nodeTypes: {},\n edgeTypes: {},\n initialized: !1,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: fo.Full,\n paneDragging: !1,\n preventScrolling: !0,\n zoomOnScroll: !0,\n zoomOnPinch: !0,\n zoomOnDoubleClick: !0,\n panOnScroll: !1,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: Ut.Free,\n panOnDrag: !0,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: !1,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: !1,\n userSelectionActive: !1,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: Ye.Bezier,\n style: {}\n },\n connectionMode: Qe.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: NaN, y: NaN },\n connectionRadius: 20,\n connectOnClick: !0,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: !1,\n edgesUpdatable: !1,\n edgesFocusable: !0,\n nodesFocusable: !0,\n nodesConnectable: !0,\n nodesDraggable: !0,\n elementsSelectable: !0,\n selectNodesOnDrag: !0,\n multiSelectionActive: !1,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: \"Meta\",\n zoomActivationKeyCode: \"Meta\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: ca(),\n applyDefault: !0,\n autoConnect: !1,\n fitViewOnInit: !1,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: !1,\n elevateNodesOnSelect: !0,\n autoPanOnNodeDrag: !0,\n autoPanOnConnect: !0,\n disableKeyboardA11y: !1,\n ariaLiveMessage: \"\",\n __experimentalFeatures: {\n nestedFlow: !1\n }\n };\n}\nfunction ar(e) {\n const t = uu();\n return e && Object.keys(e).forEach((n) => {\n const o = e[n];\n ce(o) && (t[n] = o);\n }), t;\n}\nfunction cu(e, t, n) {\n const o = J(() => (d) => e.nodes && !t.value.length ? e.nodes.find((w) => w.id === d) : e.nodes[t.value.indexOf(d)]), i = J(() => (d) => e.edges && !n.value.length ? e.edges.find((w) => w.id === d) : e.edges[n.value.indexOf(d)]), r = J(() => {\n var y;\n const d = {\n ...lu,\n ...e.edgeTypes\n }, w = Object.keys(d);\n return (y = e.edges) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), a = J(() => {\n var y;\n const d = {\n ...su,\n ...e.nodeTypes\n }, w = Object.keys(d);\n return (y = e.nodes) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), s = J(() => {\n const d = e.nodes.filter((w) => !w.hidden);\n return e.onlyRenderVisibleElements ? d && Ci(\n d,\n {\n x: 0,\n y: 0,\n width: e.dimensions.width,\n height: e.dimensions.height\n },\n e.viewport,\n !0\n ) : d ?? [];\n }), l = (d, w, y) => {\n if (w = w ?? o.value(d.source), y = y ?? o.value(d.target), !w || !y) {\n e.hooks.error.trigger(new ve(he.EDGE_ORPHANED, d.id));\n return;\n }\n return !d.hidden && !y.hidden && !w.hidden;\n }, u = J(() => e.onlyRenderVisibleElements ? e.edges.filter((d) => {\n const w = o.value(d.source), y = o.value(d.target);\n return l(d, w, y) && ba({\n sourcePos: w.computedPosition || { x: 0, y: 0 },\n targetPos: y.computedPosition || { x: 0, y: 0 },\n sourceWidth: w.dimensions.width,\n sourceHeight: w.dimensions.height,\n targetWidth: y.dimensions.width,\n targetHeight: y.dimensions.height,\n width: e.dimensions.width,\n height: e.dimensions.height,\n viewport: e.viewport\n });\n }) : e.edges.filter((d) => l(d))), c = J(() => [...s.value, ...u.value]), v = J(() => e.nodes.filter((d) => d.selected)), g = J(() => e.edges.filter((d) => d.selected)), x = J(() => [\n ...v.value ?? [],\n ...g.value ?? []\n ]), h = J(\n () => s.value.filter((d) => d.initialized && d.handleBounds !== void 0)\n );\n return {\n getNode: o,\n getEdge: i,\n getElements: c,\n getEdgeTypes: r,\n getNodeTypes: a,\n getEdges: u,\n getNodes: s,\n getSelectedElements: x,\n getSelectedNodes: v,\n getSelectedEdges: g,\n getNodesInitialized: h\n };\n}\nfunction yo(e, t, n) {\n e.prototype = t.prototype = n, n.constructor = e;\n}\nfunction sr(e, t) {\n var n = Object.create(e.prototype);\n for (var o in t)\n n[o] = t[o];\n return n;\n}\nfunction kt() {\n}\nvar Et = 0.7, jt = 1 / Et, lt = \"\\\\s*([+-]?\\\\d+)\\\\s*\", St = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", Me = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", du = /^#([0-9a-f]{3,8})$/, fu = new RegExp(`^rgb\\\\(${lt},${lt},${lt}\\\\)$`), hu = new RegExp(`^rgb\\\\(${Me},${Me},${Me}\\\\)$`), gu = new RegExp(`^rgba\\\\(${lt},${lt},${lt},${St}\\\\)$`), vu = new RegExp(`^rgba\\\\(${Me},${Me},${Me},${St}\\\\)$`), mu = new RegExp(`^hsl\\\\(${St},${Me},${Me}\\\\)$`), pu = new RegExp(`^hsla\\\\(${St},${Me},${Me},${St}\\\\)$`), Ko = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\nyo(kt, Nt, {\n copy(e) {\n return Object.assign(new this.constructor(), this, e);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: qo,\n // Deprecated! Use color.formatHex.\n formatHex: qo,\n formatHex8: yu,\n formatHsl: xu,\n formatRgb: jo,\n toString: jo\n});\nfunction qo() {\n return this.rgb().formatHex();\n}\nfunction yu() {\n return this.rgb().formatHex8();\n}\nfunction xu() {\n return lr(this).formatHsl();\n}\nfunction jo() {\n return this.rgb().formatRgb();\n}\nfunction Nt(e) {\n var t, n;\n return e = (e + \"\").trim().toLowerCase(), (t = du.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qo(t) : n === 3 ? new pe(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? zt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? zt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fu.exec(e)) ? new pe(t[1], t[2], t[3], 1) : (t = hu.exec(e)) ? new pe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = gu.exec(e)) ? zt(t[1], t[2], t[3], t[4]) : (t = vu.exec(e)) ? zt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = mu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, 1) : (t = pu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, t[4]) : Ko.hasOwnProperty(e) ? Qo(Ko[e]) : e === \"transparent\" ? new pe(NaN, NaN, NaN, 0) : null;\n}\nfunction Qo(e) {\n return new pe(e >> 16 & 255, e >> 8 & 255, e & 255, 1);\n}\nfunction zt(e, t, n, o) {\n return o <= 0 && (e = t = n = NaN), new pe(e, t, n, o);\n}\nfunction _u(e) {\n return e instanceof kt || (e = Nt(e)), e ? (e = e.rgb(), new pe(e.r, e.g, e.b, e.opacity)) : new pe();\n}\nfunction jn(e, t, n, o) {\n return arguments.length === 1 ? _u(e) : new pe(e, t, n, o ?? 1);\n}\nfunction pe(e, t, n, o) {\n this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;\n}\nyo(pe, jn, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new pe(We(this.r), We(this.g), We(this.b), Qt(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: Jo,\n // Deprecated! Use color.formatHex.\n formatHex: Jo,\n formatHex8: wu,\n formatRgb: ei,\n toString: ei\n}));\nfunction Jo() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`;\n}\nfunction wu() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction ei() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"rgb(\" : \"rgba(\"}${We(this.r)}, ${We(this.g)}, ${We(this.b)}${e === 1 ? \")\" : `, ${e})`}`;\n}\nfunction Qt(e) {\n return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));\n}\nfunction We(e) {\n return Math.max(0, Math.min(255, Math.round(e) || 0));\n}\nfunction Ze(e) {\n return e = We(e), (e < 16 ? \"0\" : \"\") + e.toString(16);\n}\nfunction ti(e, t, n, o) {\n return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, n, o);\n}\nfunction lr(e) {\n if (e instanceof be)\n return new be(e.h, e.s, e.l, e.opacity);\n if (e instanceof kt || (e = Nt(e)), !e)\n return new be();\n if (e instanceof be)\n return e;\n e = e.rgb();\n var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), a = NaN, s = r - i, l = (r + i) / 2;\n return s ? (t === r ? a = (n - o) / s + (n < o) * 6 : n === r ? a = (o - t) / s + 2 : a = (t - n) / s + 4, s /= l < 0.5 ? r + i : 2 - r - i, a *= 60) : s = l > 0 && l < 1 ? 0 : a, new be(a, s, l, e.opacity);\n}\nfunction bu(e, t, n, o) {\n return arguments.length === 1 ? lr(e) : new be(e, t, n, o ?? 1);\n}\nfunction be(e, t, n, o) {\n this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;\n}\nyo(be, bu, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n rgb() {\n var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - o;\n return new pe(\n kn(e >= 240 ? e - 240 : e + 120, i, o),\n kn(e, i, o),\n kn(e < 120 ? e + 240 : e - 120, i, o),\n this.opacity\n );\n },\n clamp() {\n return new be(ni(this.h), At(this.s), At(this.l), Qt(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"hsl(\" : \"hsla(\"}${ni(this.h)}, ${At(this.s) * 100}%, ${At(this.l) * 100}%${e === 1 ? \")\" : `, ${e})`}`;\n }\n}));\nfunction ni(e) {\n return e = (e || 0) % 360, e < 0 ? e + 360 : e;\n}\nfunction At(e) {\n return Math.max(0, Math.min(1, e || 0));\n}\nfunction kn(e, t, n) {\n return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;\n}\nconst ur = (e) => () => e;\nfunction Eu(e, t) {\n return function(n) {\n return e + n * t;\n };\n}\nfunction Su(e, t, n) {\n return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {\n return Math.pow(e + o * t, n);\n };\n}\nfunction Nu(e) {\n return (e = +e) == 1 ? cr : function(t, n) {\n return n - t ? Su(t, n, e) : ur(isNaN(t) ? n : t);\n };\n}\nfunction cr(e, t) {\n var n = t - e;\n return n ? Eu(e, n) : ur(isNaN(e) ? t : e);\n}\nconst oi = function e(t) {\n var n = Nu(t);\n function o(i, r) {\n var a = n((i = jn(i)).r, (r = jn(r)).r), s = n(i.g, r.g), l = n(i.b, r.b), u = cr(i.opacity, r.opacity);\n return function(c) {\n return i.r = a(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + \"\";\n };\n }\n return o.gamma = e, o;\n}(1);\nfunction Re(e, t) {\n return e = +e, t = +t, function(n) {\n return e * (1 - n) + t * n;\n };\n}\nvar Qn = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, On = new RegExp(Qn.source, \"g\");\nfunction Cu(e) {\n return function() {\n return e;\n };\n}\nfunction Mu(e) {\n return function(t) {\n return e(t) + \"\";\n };\n}\nfunction $u(e, t) {\n var n = Qn.lastIndex = On.lastIndex = 0, o, i, r, a = -1, s = [], l = [];\n for (e = e + \"\", t = t + \"\"; (o = Qn.exec(e)) && (i = On.exec(t)); )\n (r = i.index) > n && (r = t.slice(n, r), s[a] ? s[a] += r : s[++a] = r), (o = o[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, l.push({ i: a, x: Re(o, i) })), n = On.lastIndex;\n return n < t.length && (r = t.slice(n), s[a] ? s[a] += r : s[++a] = r), s.length < 2 ? l[0] ? Mu(l[0].x) : Cu(t) : (t = l.length, function(u) {\n for (var c = 0, v; c < t; ++c)\n s[(v = l[c]).i] = v.x(u);\n return s.join(\"\");\n });\n}\nvar ii = 180 / Math.PI, Jn = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction dr(e, t, n, o, i, r) {\n var a, s, l;\n return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * o) && (n -= e * l, o -= t * l), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, l /= s), e * o < t * n && (e = -e, t = -t, l = -l, a = -a), {\n translateX: i,\n translateY: r,\n rotate: Math.atan2(t, e) * ii,\n skewX: Math.atan(l) * ii,\n scaleX: a,\n scaleY: s\n };\n}\nvar Bt;\nfunction ku(e) {\n const t = new (typeof DOMMatrix == \"function\" ? DOMMatrix : WebKitCSSMatrix)(e + \"\");\n return t.isIdentity ? Jn : dr(t.a, t.b, t.c, t.d, t.e, t.f);\n}\nfunction Ou(e) {\n return e == null || (Bt || (Bt = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\")), Bt.setAttribute(\"transform\", e), !(e = Bt.transform.baseVal.consolidate())) ? Jn : (e = e.matrix, dr(e.a, e.b, e.c, e.d, e.e, e.f));\n}\nfunction fr(e, t, n, o) {\n function i(u) {\n return u.length ? u.pop() + \" \" : \"\";\n }\n function r(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(\"translate(\", null, t, null, n);\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v || g) && x.push(\"translate(\" + v + t + g + n);\n }\n function a(u, c, v, g) {\n u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), g.push({ i: v.push(i(v) + \"rotate(\", null, o) - 2, x: Re(u, c) })) : c && v.push(i(v) + \"rotate(\" + c + o);\n }\n function s(u, c, v, g) {\n u !== c ? g.push({ i: v.push(i(v) + \"skewX(\", null, o) - 2, x: Re(u, c) }) : c && v.push(i(v) + \"skewX(\" + c + o);\n }\n function l(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(i(x) + \"scale(\", null, \",\", null, \")\");\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v !== 1 || g !== 1) && x.push(i(x) + \"scale(\" + v + \",\" + g + \")\");\n }\n return function(u, c) {\n var v = [], g = [];\n return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, v, g), a(u.rotate, c.rotate, v, g), s(u.skewX, c.skewX, v, g), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, v, g), u = c = null, function(x) {\n for (var h = -1, d = g.length, w; ++h < d; )\n v[(w = g[h]).i] = w.x(x);\n return v.join(\"\");\n };\n };\n}\nvar Tu = fr(ku, \"px, \", \"px)\", \"deg)\"), Iu = fr(Ou, \", \", \")\", \")\"), Pu = 1e-12;\nfunction ri(e) {\n return ((e = Math.exp(e)) + 1 / e) / 2;\n}\nfunction Du(e) {\n return ((e = Math.exp(e)) - 1 / e) / 2;\n}\nfunction zu(e) {\n return ((e = Math.exp(2 * e)) - 1) / (e + 1);\n}\nconst Au = function e(t, n, o) {\n function i(r, a) {\n var s = r[0], l = r[1], u = r[2], c = a[0], v = a[1], g = a[2], x = c - s, h = v - l, d = x * x + h * h, w, y;\n if (d < Pu)\n y = Math.log(g / u) / t, w = function(_) {\n return [\n s + _ * x,\n l + _ * h,\n u * Math.exp(t * _ * y)\n ];\n };\n else {\n var S = Math.sqrt(d), V = (g * g - u * u + o * d) / (2 * u * n * S), p = (g * g - u * u - o * d) / (2 * g * n * S), N = Math.log(Math.sqrt(V * V + 1) - V), T = Math.log(Math.sqrt(p * p + 1) - p);\n y = (T - N) / t, w = function(_) {\n var P = _ * y, R = ri(N), $ = u / (n * S) * (R * zu(t * P + N) - Du(N));\n return [\n s + $ * x,\n l + $ * h,\n u * R / ri(t * P + N)\n ];\n };\n }\n return w.duration = y * 1e3 * t / Math.SQRT2, w;\n }\n return i.rho = function(r) {\n var a = Math.max(1e-3, +r), s = a * a, l = s * s;\n return e(a, s, l);\n }, i;\n}(Math.SQRT2, 2, 4);\nvar ht = 0, mt = 0, gt = 0, hr = 1e3, Jt, pt, en = 0, Je = 0, wn = 0, Ct = typeof performance == \"object\" && performance.now ? performance : Date, gr = typeof window == \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {\n setTimeout(e, 17);\n};\nfunction xo() {\n return Je || (gr(Bu), Je = Ct.now() + wn);\n}\nfunction Bu() {\n Je = 0;\n}\nfunction tn() {\n this._call = this._time = this._next = null;\n}\ntn.prototype = vr.prototype = {\n constructor: tn,\n restart: function(e, t, n) {\n if (typeof e != \"function\")\n throw new TypeError(\"callback is not a function\");\n n = (n == null ? xo() : +n) + (t == null ? 0 : +t), !this._next && pt !== this && (pt ? pt._next = this : Jt = this, pt = this), this._call = e, this._time = n, eo();\n },\n stop: function() {\n this._call && (this._call = null, this._time = 1 / 0, eo());\n }\n};\nfunction vr(e, t, n) {\n var o = new tn();\n return o.restart(e, t, n), o;\n}\nfunction Ru() {\n xo(), ++ht;\n for (var e = Jt, t; e; )\n (t = Je - e._time) >= 0 && e._call.call(void 0, t), e = e._next;\n --ht;\n}\nfunction ai() {\n Je = (en = Ct.now()) + wn, ht = mt = 0;\n try {\n Ru();\n } finally {\n ht = 0, Hu(), Je = 0;\n }\n}\nfunction Vu() {\n var e = Ct.now(), t = e - en;\n t > hr && (wn -= t, en = e);\n}\nfunction Hu() {\n for (var e, t = Jt, n, o = 1 / 0; t; )\n t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Jt = n);\n pt = e, eo(o);\n}\nfunction eo(e) {\n if (!ht) {\n mt && (mt = clearTimeout(mt));\n var t = e - Je;\n t > 24 ? (e < 1 / 0 && (mt = setTimeout(ai, e - Ct.now() - wn)), gt && (gt = clearInterval(gt))) : (gt || (en = Ct.now(), gt = setInterval(Vu, hr)), ht = 1, gr(ai));\n }\n}\nfunction si(e, t, n) {\n var o = new tn();\n return t = t == null ? 0 : +t, o.restart((i) => {\n o.stop(), e(i + t);\n }, t, n), o;\n}\nvar Lu = fn(\"start\", \"end\", \"cancel\", \"interrupt\"), Gu = [], mr = 0, li = 1, to = 2, Lt = 3, ui = 4, no = 5, Gt = 6;\nfunction bn(e, t, n, o, i, r) {\n var a = e.__transition;\n if (!a)\n e.__transition = {};\n else if (n in a)\n return;\n Fu(e, n, {\n name: t,\n index: o,\n // For context during callback.\n group: i,\n // For context during callback.\n on: Lu,\n tween: Gu,\n time: r.time,\n delay: r.delay,\n duration: r.duration,\n ease: r.ease,\n timer: null,\n state: mr\n });\n}\nfunction _o(e, t) {\n var n = Se(e, t);\n if (n.state > mr)\n throw new Error(\"too late; already scheduled\");\n return n;\n}\nfunction ke(e, t) {\n var n = Se(e, t);\n if (n.state > Lt)\n throw new Error(\"too late; already running\");\n return n;\n}\nfunction Se(e, t) {\n var n = e.__transition;\n if (!n || !(n = n[t]))\n throw new Error(\"transition not found\");\n return n;\n}\nfunction Fu(e, t, n) {\n var o = e.__transition, i;\n o[t] = n, n.timer = vr(r, 0, n.time);\n function r(u) {\n n.state = li, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);\n }\n function a(u) {\n var c, v, g, x;\n if (n.state !== li)\n return l();\n for (c in o)\n if (x = o[c], x.name === n.name) {\n if (x.state === Lt)\n return si(a);\n x.state === ui ? (x.state = Gt, x.timer.stop(), x.on.call(\"interrupt\", e, e.__data__, x.index, x.group), delete o[c]) : +c < t && (x.state = Gt, x.timer.stop(), x.on.call(\"cancel\", e, e.__data__, x.index, x.group), delete o[c]);\n }\n if (si(function() {\n n.state === Lt && (n.state = ui, n.timer.restart(s, n.delay, n.time), s(u));\n }), n.state = to, n.on.call(\"start\", e, e.__data__, n.index, n.group), n.state === to) {\n for (n.state = Lt, i = new Array(g = n.tween.length), c = 0, v = -1; c < g; ++c)\n (x = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++v] = x);\n i.length = v + 1;\n }\n }\n function s(u) {\n for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(l), n.state = no, 1), v = -1, g = i.length; ++v < g; )\n i[v].call(e, c);\n n.state === no && (n.on.call(\"end\", e, e.__data__, n.index, n.group), l());\n }\n function l() {\n n.state = Gt, n.timer.stop(), delete o[t];\n for (var u in o)\n return;\n delete e.__transition;\n }\n}\nfunction Ft(e, t) {\n var n = e.__transition, o, i, r = !0, a;\n if (n) {\n t = t == null ? null : t + \"\";\n for (a in n) {\n if ((o = n[a]).name !== t) {\n r = !1;\n continue;\n }\n i = o.state > to && o.state < no, o.state = Gt, o.timer.stop(), o.on.call(i ? \"interrupt\" : \"cancel\", e, e.__data__, o.index, o.group), delete n[a];\n }\n r && delete e.__transition;\n }\n}\nfunction Yu(e) {\n return this.each(function() {\n Ft(this, e);\n });\n}\nfunction Xu(e, t) {\n var n, o;\n return function() {\n var i = ke(this, e), r = i.tween;\n if (r !== n) {\n o = n = r;\n for (var a = 0, s = o.length; a < s; ++a)\n if (o[a].name === t) {\n o = o.slice(), o.splice(a, 1);\n break;\n }\n }\n i.tween = o;\n };\n}\nfunction Zu(e, t, n) {\n var o, i;\n if (typeof n != \"function\")\n throw new Error();\n return function() {\n var r = ke(this, e), a = r.tween;\n if (a !== o) {\n i = (o = a).slice();\n for (var s = { name: t, value: n }, l = 0, u = i.length; l < u; ++l)\n if (i[l].name === t) {\n i[l] = s;\n break;\n }\n l === u && i.push(s);\n }\n r.tween = i;\n };\n}\nfunction Uu(e, t) {\n var n = this._id;\n if (e += \"\", arguments.length < 2) {\n for (var o = Se(this.node(), n).tween, i = 0, r = o.length, a; i < r; ++i)\n if ((a = o[i]).name === e)\n return a.value;\n return null;\n }\n return this.each((t == null ? Xu : Zu)(n, e, t));\n}\nfunction wo(e, t, n) {\n var o = e._id;\n return e.each(function() {\n var i = ke(this, o);\n (i.value || (i.value = {}))[t] = n.apply(this, arguments);\n }), function(i) {\n return Se(i, o).value[t];\n };\n}\nfunction pr(e, t) {\n var n;\n return (typeof t == \"number\" ? Re : t instanceof Nt ? oi : (n = Nt(t)) ? (t = n, oi) : $u)(e, t);\n}\nfunction Wu(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ku(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction qu(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttribute(e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction ju(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttributeNS(e.space, e.local);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction Qu(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttribute(e) : (a = this.getAttribute(e), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction Ju(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttributeNS(e.space, e.local) : (a = this.getAttributeNS(e.space, e.local), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction ec(e, t) {\n var n = hn(e), o = n === \"transform\" ? Iu : pr;\n return this.attrTween(e, typeof t == \"function\" ? (n.local ? Ju : Qu)(n, o, wo(this, \"attr.\" + e, t)) : t == null ? (n.local ? Ku : Wu)(n) : (n.local ? ju : qu)(n, o, t));\n}\nfunction tc(e, t) {\n return function(n) {\n this.setAttribute(e, t.call(this, n));\n };\n}\nfunction nc(e, t) {\n return function(n) {\n this.setAttributeNS(e.space, e.local, t.call(this, n));\n };\n}\nfunction oc(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && nc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction ic(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && tc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction rc(e, t) {\n var n = \"attr.\" + e;\n if (arguments.length < 2)\n return (n = this.tween(n)) && n._value;\n if (t == null)\n return this.tween(n, null);\n if (typeof t != \"function\")\n throw new Error();\n var o = hn(e);\n return this.tween(n, (o.local ? oc : ic)(o, t));\n}\nfunction ac(e, t) {\n return function() {\n _o(this, e).delay = +t.apply(this, arguments);\n };\n}\nfunction sc(e, t) {\n return t = +t, function() {\n _o(this, e).delay = t;\n };\n}\nfunction lc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? ac : sc)(t, e)) : Se(this.node(), t).delay;\n}\nfunction uc(e, t) {\n return function() {\n ke(this, e).duration = +t.apply(this, arguments);\n };\n}\nfunction cc(e, t) {\n return t = +t, function() {\n ke(this, e).duration = t;\n };\n}\nfunction dc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? uc : cc)(t, e)) : Se(this.node(), t).duration;\n}\nfunction fc(e, t) {\n if (typeof t != \"function\")\n throw new Error();\n return function() {\n ke(this, e).ease = t;\n };\n}\nfunction hc(e) {\n var t = this._id;\n return arguments.length ? this.each(fc(t, e)) : Se(this.node(), t).ease;\n}\nfunction gc(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n if (typeof n != \"function\")\n throw new Error();\n ke(this, e).ease = n;\n };\n}\nfunction vc(e) {\n if (typeof e != \"function\")\n throw new Error();\n return this.each(gc(this._id, e));\n}\nfunction mc(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new Be(o, this._parents, this._name, this._id);\n}\nfunction pc(e) {\n if (e._id !== this._id)\n throw new Error();\n for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), a = new Array(o), s = 0; s < r; ++s)\n for (var l = t[s], u = n[s], c = l.length, v = a[s] = new Array(c), g, x = 0; x < c; ++x)\n (g = l[x] || u[x]) && (v[x] = g);\n for (; s < o; ++s)\n a[s] = t[s];\n return new Be(a, this._parents, this._name, this._id);\n}\nfunction yc(e) {\n return (e + \"\").trim().split(/^|\\s+/).every(function(t) {\n var n = t.indexOf(\".\");\n return n >= 0 && (t = t.slice(0, n)), !t || t === \"start\";\n });\n}\nfunction xc(e, t, n) {\n var o, i, r = yc(t) ? _o : ke;\n return function() {\n var a = r(this, e), s = a.on;\n s !== o && (i = (o = s).copy()).on(t, n), a.on = i;\n };\n}\nfunction _c(e, t) {\n var n = this._id;\n return arguments.length < 2 ? Se(this.node(), n).on.on(e) : this.each(xc(n, e, t));\n}\nfunction wc(e) {\n return function() {\n var t = this.parentNode;\n for (var n in this.__transition)\n if (+n !== e)\n return;\n t && t.removeChild(this);\n };\n}\nfunction bc() {\n return this.on(\"end.remove\", wc(this._id));\n}\nfunction Ec(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = vo(e));\n for (var o = this._groups, i = o.length, r = new Array(i), a = 0; a < i; ++a)\n for (var s = o[a], l = s.length, u = r[a] = new Array(l), c, v, g = 0; g < l; ++g)\n (c = s[g]) && (v = e.call(c, c.__data__, g, s)) && (\"__data__\" in c && (v.__data__ = c.__data__), u[g] = v, bn(u[g], t, n, g, u, Se(c, n)));\n return new Be(r, this._parents, t, n);\n}\nfunction Sc(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = Ri(e));\n for (var o = this._groups, i = o.length, r = [], a = [], s = 0; s < i; ++s)\n for (var l = o[s], u = l.length, c, v = 0; v < u; ++v)\n if (c = l[v]) {\n for (var g = e.call(c, c.__data__, v, l), x, h = Se(c, n), d = 0, w = g.length; d < w; ++d)\n (x = g[d]) && bn(x, t, n, d, g, h);\n r.push(g), a.push(c);\n }\n return new Be(r, a, t, n);\n}\nvar Nc = $t.prototype.constructor;\nfunction Cc() {\n return new Nc(this._groups, this._parents);\n}\nfunction Mc(e, t) {\n var n, o, i;\n return function() {\n var r = ft(this, e), a = (this.style.removeProperty(e), ft(this, e));\n return r === a ? null : r === n && a === o ? i : i = t(n = r, o = a);\n };\n}\nfunction yr(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction $c(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = ft(this, e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction kc(e, t, n) {\n var o, i, r;\n return function() {\n var a = ft(this, e), s = n(this), l = s + \"\";\n return s == null && (l = s = (this.style.removeProperty(e), ft(this, e))), a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s));\n };\n}\nfunction Oc(e, t) {\n var n, o, i, r = \"style.\" + t, a = \"end.\" + r, s;\n return function() {\n var l = ke(this, e), u = l.on, c = l.value[r] == null ? s || (s = yr(t)) : void 0;\n (u !== n || i !== c) && (o = (n = u).copy()).on(a, i = c), l.on = o;\n };\n}\nfunction Tc(e, t, n) {\n var o = (e += \"\") == \"transform\" ? Tu : pr;\n return t == null ? this.styleTween(e, Mc(e, o)).on(\"end.style.\" + e, yr(e)) : typeof t == \"function\" ? this.styleTween(e, kc(e, o, wo(this, \"style.\" + e, t))).each(Oc(this._id, e)) : this.styleTween(e, $c(e, o, t), n).on(\"end.style.\" + e, null);\n}\nfunction Ic(e, t, n) {\n return function(o) {\n this.style.setProperty(e, t.call(this, o), n);\n };\n}\nfunction Pc(e, t, n) {\n var o, i;\n function r() {\n var a = t.apply(this, arguments);\n return a !== i && (o = (i = a) && Ic(e, a, n)), o;\n }\n return r._value = t, r;\n}\nfunction Dc(e, t, n) {\n var o = \"style.\" + (e += \"\");\n if (arguments.length < 2)\n return (o = this.tween(o)) && o._value;\n if (t == null)\n return this.tween(o, null);\n if (typeof t != \"function\")\n throw new Error();\n return this.tween(o, Pc(e, t, n ?? \"\"));\n}\nfunction zc(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Ac(e) {\n return function() {\n var t = e(this);\n this.textContent = t ?? \"\";\n };\n}\nfunction Bc(e) {\n return this.tween(\"text\", typeof e == \"function\" ? Ac(wo(this, \"text\", e)) : zc(e == null ? \"\" : e + \"\"));\n}\nfunction Rc(e) {\n return function(t) {\n this.textContent = e.call(this, t);\n };\n}\nfunction Vc(e) {\n var t, n;\n function o() {\n var i = e.apply(this, arguments);\n return i !== n && (t = (n = i) && Rc(i)), t;\n }\n return o._value = e, o;\n}\nfunction Hc(e) {\n var t = \"text\";\n if (arguments.length < 1)\n return (t = this.tween(t)) && t._value;\n if (e == null)\n return this.tween(t, null);\n if (typeof e != \"function\")\n throw new Error();\n return this.tween(t, Vc(e));\n}\nfunction Lc() {\n for (var e = this._name, t = this._id, n = xr(), o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n if (l = a[u]) {\n var c = Se(l, t);\n bn(l, e, n, u, a, {\n time: c.time + c.delay + c.duration,\n delay: 0,\n duration: c.duration,\n ease: c.ease\n });\n }\n return new Be(o, this._parents, e, n);\n}\nfunction Gc() {\n var e, t, n = this, o = n._id, i = n.size();\n return new Promise(function(r, a) {\n var s = { value: a }, l = { value: function() {\n --i === 0 && r();\n } };\n n.each(function() {\n var u = ke(this, o), c = u.on;\n c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(l)), u.on = t;\n }), i === 0 && r();\n });\n}\nvar Fc = 0;\nfunction Be(e, t, n, o) {\n this._groups = e, this._parents = t, this._name = n, this._id = o;\n}\nfunction xr() {\n return ++Fc;\n}\nvar Oe = $t.prototype;\nBe.prototype = {\n constructor: Be,\n select: Ec,\n selectAll: Sc,\n selectChild: Oe.selectChild,\n selectChildren: Oe.selectChildren,\n filter: mc,\n merge: pc,\n selection: Cc,\n transition: Lc,\n call: Oe.call,\n nodes: Oe.nodes,\n node: Oe.node,\n size: Oe.size,\n empty: Oe.empty,\n each: Oe.each,\n on: _c,\n attr: ec,\n attrTween: rc,\n style: Tc,\n styleTween: Dc,\n text: Bc,\n textTween: Hc,\n remove: bc,\n tween: Uu,\n delay: lc,\n duration: dc,\n ease: hc,\n easeVarying: vc,\n end: Gc,\n [Symbol.iterator]: Oe[Symbol.iterator]\n};\nfunction Yc(e) {\n return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;\n}\nvar Xc = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: Yc\n};\nfunction Zc(e, t) {\n for (var n; !(n = e.__transition) || !(n = n[t]); )\n if (!(e = e.parentNode))\n throw new Error(`transition ${t} not found`);\n return n;\n}\nfunction Uc(e) {\n var t, n;\n e instanceof Be ? (t = e._id, e = e._name) : (t = xr(), (n = Xc).time = xo(), e = e == null ? null : e + \"\");\n for (var o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && bn(l, e, t, u, a, n || Zc(l, t));\n return new Be(o, this._parents, e, t);\n}\n$t.prototype.interrupt = Yu;\n$t.prototype.transition = Uc;\nconst Rt = (e) => () => e;\nfunction Wc(e, {\n sourceEvent: t,\n target: n,\n transform: o,\n dispatch: i\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n target: { value: n, enumerable: !0, configurable: !0 },\n transform: { value: o, enumerable: !0, configurable: !0 },\n _: { value: i }\n });\n}\nfunction De(e, t, n) {\n this.k = e, this.x = t, this.y = n;\n}\nDe.prototype = {\n constructor: De,\n scale: function(e) {\n return e === 1 ? this : new De(this.k * e, this.x, this.y);\n },\n translate: function(e, t) {\n return e === 0 & t === 0 ? this : new De(this.k, this.x + this.k * e, this.y + this.k * t);\n },\n apply: function(e) {\n return [e[0] * this.k + this.x, e[1] * this.k + this.y];\n },\n applyX: function(e) {\n return e * this.k + this.x;\n },\n applyY: function(e) {\n return e * this.k + this.y;\n },\n invert: function(e) {\n return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];\n },\n invertX: function(e) {\n return (e - this.x) / this.k;\n },\n invertY: function(e) {\n return (e - this.y) / this.k;\n },\n rescaleX: function(e) {\n return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));\n },\n rescaleY: function(e) {\n return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar et = new De(1, 0, 0);\nDe.prototype;\nfunction Tn(e) {\n e.stopImmediatePropagation();\n}\nfunction vt(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Kc(e) {\n return (!e.ctrlKey || e.type === \"wheel\") && !e.button;\n}\nfunction qc() {\n var e = this;\n return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute(\"viewBox\") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction ci() {\n return this.__zoom || et;\n}\nfunction jc(e) {\n return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);\n}\nfunction Qc() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Jc(e, t, n) {\n var o = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], r = e.invertY(t[0][1]) - n[0][1], a = e.invertY(t[1][1]) - n[1][1];\n return e.translate(\n i > o ? (o + i) / 2 : Math.min(0, o) || Math.max(0, i),\n a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a)\n );\n}\nfunction ed() {\n var e = Kc, t = qc, n = Jc, o = jc, i = Qc, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Au, u = fn(\"start\", \"zoom\", \"end\"), c, v, g, x = 500, h = 150, d = 0, w = 10;\n function y(m) {\n m.property(\"__zoom\", ci).on(\"wheel.zoom\", P, { passive: !1 }).on(\"mousedown.zoom\", R).on(\"dblclick.zoom\", $).filter(i).on(\"touchstart.zoom\", D).on(\"touchmove.zoom\", Q).on(\"touchend.zoom touchcancel.zoom\", ee).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n y.transform = function(m, A, E, G) {\n var Z = m.selection ? m.selection() : m;\n Z.property(\"__zoom\", ci), m !== Z ? N(m, A, E, G) : Z.interrupt().each(function() {\n T(this, arguments).event(G).start().zoom(null, typeof A == \"function\" ? A.apply(this, arguments) : A).end();\n });\n }, y.scaleBy = function(m, A, E, G) {\n y.scaleTo(m, function() {\n var Z = this.__zoom.k, K = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return Z * K;\n }, E, G);\n }, y.scaleTo = function(m, A, E, G) {\n y.transform(m, function() {\n var Z = t.apply(this, arguments), K = this.__zoom, z = E == null ? p(Z) : typeof E == \"function\" ? E.apply(this, arguments) : E, W = K.invert(z), B = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return n(V(S(K, B), z, W), Z, a);\n }, E, G);\n }, y.translateBy = function(m, A, E, G) {\n y.transform(m, function() {\n return n(this.__zoom.translate(\n typeof A == \"function\" ? A.apply(this, arguments) : A,\n typeof E == \"function\" ? E.apply(this, arguments) : E\n ), t.apply(this, arguments), a);\n }, null, G);\n }, y.translateTo = function(m, A, E, G, Z) {\n y.transform(m, function() {\n var K = t.apply(this, arguments), z = this.__zoom, W = G == null ? p(K) : typeof G == \"function\" ? G.apply(this, arguments) : G;\n return n(et.translate(W[0], W[1]).scale(z.k).translate(\n typeof A == \"function\" ? -A.apply(this, arguments) : -A,\n typeof E == \"function\" ? -E.apply(this, arguments) : -E\n ), K, a);\n }, G, Z);\n };\n function S(m, A) {\n return A = Math.max(r[0], Math.min(r[1], A)), A === m.k ? m : new De(A, m.x, m.y);\n }\n function V(m, A, E) {\n var G = A[0] - E[0] * m.k, Z = A[1] - E[1] * m.k;\n return G === m.x && Z === m.y ? m : new De(m.k, G, Z);\n }\n function p(m) {\n return [(+m[0][0] + +m[1][0]) / 2, (+m[0][1] + +m[1][1]) / 2];\n }\n function N(m, A, E, G) {\n m.on(\"start.zoom\", function() {\n T(this, arguments).event(G).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n T(this, arguments).event(G).end();\n }).tween(\"zoom\", function() {\n var Z = this, K = arguments, z = T(Z, K).event(G), W = t.apply(Z, K), B = E == null ? p(W) : typeof E == \"function\" ? E.apply(Z, K) : E, q = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), te = Z.__zoom, re = typeof A == \"function\" ? A.apply(Z, K) : A, k = l(te.invert(B).concat(q / te.k), re.invert(B).concat(q / re.k));\n return function(H) {\n if (H === 1)\n H = re;\n else {\n var f = k(H), b = q / f[2];\n H = new De(b, B[0] - f[0] * b, B[1] - f[1] * b);\n }\n z.zoom(null, H);\n };\n });\n }\n function T(m, A, E) {\n return !E && m.__zooming || new _(m, A);\n }\n function _(m, A) {\n this.that = m, this.args = A, this.active = 0, this.sourceEvent = null, this.extent = t.apply(m, A), this.taps = 0;\n }\n _.prototype = {\n event: function(m) {\n return m && (this.sourceEvent = m), this;\n },\n start: function() {\n return ++this.active === 1 && (this.that.__zooming = this, this.emit(\"start\")), this;\n },\n zoom: function(m, A) {\n return this.mouse && m !== \"mouse\" && (this.mouse[1] = A.invert(this.mouse[0])), this.touch0 && m !== \"touch\" && (this.touch0[1] = A.invert(this.touch0[0])), this.touch1 && m !== \"touch\" && (this.touch1[1] = A.invert(this.touch1[0])), this.that.__zoom = A, this.emit(\"zoom\"), this;\n },\n end: function() {\n return --this.active === 0 && (delete this.that.__zooming, this.emit(\"end\")), this;\n },\n emit: function(m) {\n var A = we(this.that).datum();\n u.call(\n m,\n this.that,\n new Wc(m, {\n sourceEvent: this.sourceEvent,\n target: y,\n type: m,\n transform: this.that.__zoom,\n dispatch: u\n }),\n A\n );\n }\n };\n function P(m, ...A) {\n if (!e.apply(this, arguments))\n return;\n var E = T(this, A).event(m), G = this.__zoom, Z = Math.max(r[0], Math.min(r[1], G.k * Math.pow(2, o.apply(this, arguments)))), K = Ne(m);\n if (E.wheel)\n (E.mouse[0][0] !== K[0] || E.mouse[0][1] !== K[1]) && (E.mouse[1] = G.invert(E.mouse[0] = K)), clearTimeout(E.wheel);\n else {\n if (G.k === Z)\n return;\n E.mouse = [K, G.invert(K)], Ft(this), E.start();\n }\n vt(m), E.wheel = setTimeout(z, h), E.zoom(\"mouse\", n(V(S(G, Z), E.mouse[0], E.mouse[1]), E.extent, a));\n function z() {\n E.wheel = null, E.end();\n }\n }\n function R(m, ...A) {\n if (g || !e.apply(this, arguments))\n return;\n var E = m.currentTarget, G = T(this, A, !0).event(m), Z = we(m.view).on(\"mousemove.zoom\", B, !0).on(\"mouseup.zoom\", q, !0), K = Ne(m, E), z = m.clientX, W = m.clientY;\n Ki(m.view), Tn(m), G.mouse = [K, this.__zoom.invert(K)], Ft(this), G.start();\n function B(te) {\n if (vt(te), !G.moved) {\n var re = te.clientX - z, k = te.clientY - W;\n G.moved = re * re + k * k > d;\n }\n G.event(te).zoom(\"mouse\", n(V(G.that.__zoom, G.mouse[0] = Ne(te, E), G.mouse[1]), G.extent, a));\n }\n function q(te) {\n Z.on(\"mousemove.zoom mouseup.zoom\", null), qi(te.view, G.moved), vt(te), G.event(te).end();\n }\n }\n function $(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = this.__zoom, G = Ne(m.changedTouches ? m.changedTouches[0] : m, this), Z = E.invert(G), K = E.k * (m.shiftKey ? 0.5 : 2), z = n(V(S(E, K), G, Z), t.apply(this, A), a);\n vt(m), s > 0 ? we(this).transition().duration(s).call(N, z, G, m) : we(this).call(y.transform, z, G, m);\n }\n }\n function D(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = m.touches, G = E.length, Z = T(this, A, m.changedTouches.length === G).event(m), K, z, W, B;\n for (Tn(m), z = 0; z < G; ++z)\n W = E[z], B = Ne(W, this), B = [B, this.__zoom.invert(B), W.identifier], Z.touch0 ? !Z.touch1 && Z.touch0[2] !== B[2] && (Z.touch1 = B, Z.taps = 0) : (Z.touch0 = B, K = !0, Z.taps = 1 + !!c);\n c && (c = clearTimeout(c)), K && (Z.taps < 2 && (v = B[0], c = setTimeout(function() {\n c = null;\n }, x)), Ft(this), Z.start());\n }\n }\n function Q(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z, W, B;\n for (vt(m), K = 0; K < Z; ++K)\n z = G[K], W = Ne(z, this), E.touch0 && E.touch0[2] === z.identifier ? E.touch0[0] = W : E.touch1 && E.touch1[2] === z.identifier && (E.touch1[0] = W);\n if (z = E.that.__zoom, E.touch1) {\n var q = E.touch0[0], te = E.touch0[1], re = E.touch1[0], k = E.touch1[1], H = (H = re[0] - q[0]) * H + (H = re[1] - q[1]) * H, f = (f = k[0] - te[0]) * f + (f = k[1] - te[1]) * f;\n z = S(z, Math.sqrt(H / f)), W = [(q[0] + re[0]) / 2, (q[1] + re[1]) / 2], B = [(te[0] + k[0]) / 2, (te[1] + k[1]) / 2];\n } else if (E.touch0)\n W = E.touch0[0], B = E.touch0[1];\n else\n return;\n E.zoom(\"touch\", n(V(z, W, B), E.extent, a));\n }\n }\n function ee(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z;\n for (Tn(m), g && clearTimeout(g), g = setTimeout(function() {\n g = null;\n }, x), K = 0; K < Z; ++K)\n z = G[K], E.touch0 && E.touch0[2] === z.identifier ? delete E.touch0 : E.touch1 && E.touch1[2] === z.identifier && delete E.touch1;\n if (E.touch1 && !E.touch0 && (E.touch0 = E.touch1, delete E.touch1), E.touch0)\n E.touch0[1] = this.__zoom.invert(E.touch0[0]);\n else if (E.end(), E.taps === 2 && (z = Ne(z, this), Math.hypot(v[0] - z[0], v[1] - z[1]) < w)) {\n var W = we(this).on(\"dblclick.zoom\");\n W && W.apply(this, arguments);\n }\n }\n }\n return y.wheelDelta = function(m) {\n return arguments.length ? (o = typeof m == \"function\" ? m : Rt(+m), y) : o;\n }, y.filter = function(m) {\n return arguments.length ? (e = typeof m == \"function\" ? m : Rt(!!m), y) : e;\n }, y.touchable = function(m) {\n return arguments.length ? (i = typeof m == \"function\" ? m : Rt(!!m), y) : i;\n }, y.extent = function(m) {\n return arguments.length ? (t = typeof m == \"function\" ? m : Rt([[+m[0][0], +m[0][1]], [+m[1][0], +m[1][1]]]), y) : t;\n }, y.scaleExtent = function(m) {\n return arguments.length ? (r[0] = +m[0], r[1] = +m[1], y) : [r[0], r[1]];\n }, y.translateExtent = function(m) {\n return arguments.length ? (a[0][0] = +m[0][0], a[1][0] = +m[1][0], a[0][1] = +m[0][1], a[1][1] = +m[1][1], y) : [[a[0][0], a[0][1]], [a[1][0], a[1][1]]];\n }, y.constrain = function(m) {\n return arguments.length ? (n = m, y) : n;\n }, y.duration = function(m) {\n return arguments.length ? (s = +m, y) : s;\n }, y.interpolate = function(m) {\n return arguments.length ? (l = m, y) : l;\n }, y.on = function() {\n var m = u.on.apply(u, arguments);\n return m === u ? y : m;\n }, y.clickDistance = function(m) {\n return arguments.length ? (d = (m = +m) * m, y) : Math.sqrt(d);\n }, y.tapDistance = function(m) {\n return arguments.length ? (w = +m, y) : w;\n }, y;\n}\nconst In = 0.1;\nfunction Ge() {\n}\nconst td = {\n zoomIn: Ge,\n zoomOut: Ge,\n zoomTo: Ge,\n fitView: Ge,\n setCenter: Ge,\n fitBounds: Ge,\n project: (e) => e,\n setTransform: Ge,\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n initialized: !1\n}, nd = (e, t) => {\n const n = e, o = M(n, \"nodes\"), i = M(n, \"d3Zoom\"), r = M(n, \"d3Selection\"), a = M(n, \"dimensions\"), s = M(n, \"translateExtent\"), l = M(n, \"minZoom\"), u = M(n, \"maxZoom\"), c = M(n, \"viewport\"), v = M(n, \"snapToGrid\"), g = M(n, \"snapGrid\"), x = M(n, \"hooks\"), h = t, d = M(h, \"getNodes\"), w = ie(!1);\n x.value.nodesInitialized.on(() => {\n w.value = !0;\n });\n const y = J(() => !!i.value && !!r.value && !!a.value.width && !!a.value.height && w.value);\n function S(p, N) {\n r.value && i.value && i.value.scaleBy(Pn(r.value, N), p);\n }\n function V(p, N, T, _) {\n const { x: P, y: R } = so({ x: -p, y: -N }, s.value), $ = et.translate(-P, -R).scale(T);\n r.value && i.value && i.value.transform(Pn(r.value, _), $);\n }\n return J(() => y.value ? {\n initialized: !0,\n zoomIn: (p) => {\n S(1.2, p == null ? void 0 : p.duration);\n },\n zoomOut: (p) => {\n S(1 / 1.2, p == null ? void 0 : p.duration);\n },\n zoomTo: (p, N) => {\n r.value && i.value && i.value.scaleTo(Pn(r.value, N == null ? void 0 : N.duration), p);\n },\n setTransform: (p, N) => {\n V(p.x, p.y, p.zoom, N == null ? void 0 : N.duration);\n },\n getTransform: () => ({\n x: c.value.x,\n y: c.value.y,\n zoom: c.value.zoom\n }),\n fitView: (p = {\n padding: In,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!o.value.length)\n return;\n const N = (p.includeHiddenNodes ? o.value : d.value).filter(($) => {\n var ee;\n const D = $.initialized && $.dimensions.width && $.dimensions.height;\n let Q = !0;\n return (ee = p.nodes) != null && ee.length && (Q = p.nodes.includes($.id)), D && Q;\n }), T = co(N), { x: _, y: P, zoom: R } = Zt(\n T,\n a.value.width,\n a.value.height,\n p.minZoom ?? l.value,\n p.maxZoom ?? u.value,\n p.padding ?? In,\n p.offset\n );\n V(_, P, R, p == null ? void 0 : p.duration);\n },\n setCenter: (p, N, T) => {\n const _ = typeof (T == null ? void 0 : T.zoom) < \"u\" ? T.zoom : u.value, P = a.value.width / 2 - p * _, R = a.value.height / 2 - N * _;\n V(P, R, _, T == null ? void 0 : T.duration);\n },\n fitBounds: (p, N = { padding: In }) => {\n const { x: T, y: _, zoom: P } = Zt(\n p,\n a.value.width,\n a.value.height,\n l.value,\n u.value,\n N.padding\n );\n V(T, _, P, N == null ? void 0 : N.duration);\n },\n project: (p) => uo(p, c.value, v.value, g.value)\n } : td);\n};\nfunction Pn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Dn(e, t) {\n if (t) {\n const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height;\n if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) {\n let i = {};\n if (Ae(t.style) ? i = { ...t.style(t) } : t.style && (i = { ...t.style }), i.width = i.width ?? `${t.dimensions.width}px`, i.height = i.height ?? `${t.dimensions.height}px`, n > 0)\n if (Pe(i.width)) {\n const r = Number(i.width.replace(\"px\", \"\"));\n i.width = `${r + n}px`;\n } else\n i.width += n;\n if (o > 0)\n if (Pe(i.height)) {\n const r = Number(i.height.replace(\"px\", \"\"));\n i.height = `${r + o}px`;\n } else\n i.height += o;\n if (e.position.x < 0) {\n const r = Math.abs(e.position.x);\n if (t.position.x = t.position.x - r, Pe(i.width)) {\n const a = Number(i.width.replace(\"px\", \"\"));\n i.width = `${a + r}px`;\n } else\n i.width += r;\n e.position.x = 0;\n }\n if (e.position.y < 0) {\n const r = Math.abs(e.position.y);\n if (t.position.y = t.position.y - r, Pe(i.height)) {\n const a = Number(i.height.replace(\"px\", \"\"));\n i.height = `${a + r}px`;\n } else\n i.height += r;\n e.position.y = 0;\n }\n t.dimensions.width = Number(i.width.toString().replace(\"px\", \"\")), t.dimensions.height = Number(i.height.toString().replace(\"px\", \"\")), Ae(t.style) ? t.style = (r) => {\n const a = t.style;\n return {\n ...a(r),\n ...i\n };\n } : t.style = {\n ...t.style,\n ...i\n };\n }\n }\n}\nfunction nn(e, t) {\n e.filter((i) => i.type === \"add\" || i.type === \"remove\").forEach((i) => {\n if (i.type === \"add\")\n t.findIndex((a) => a.id === i.item.id) === -1 && t.push(i.item);\n else if (i.type === \"remove\") {\n const r = t.findIndex((a) => a.id === i.id);\n r !== -1 && t.splice(r, 1);\n }\n });\n const o = t.map((i) => i.id);\n return t.forEach((i) => {\n var a, s;\n const r = e.filter((l) => l.id === i.id);\n for (const l of r)\n switch (l.type) {\n case \"select\":\n i.selected = l.selected;\n break;\n case \"position\":\n if (nt(i) && (typeof l.position < \"u\" && (i.position = l.position), typeof l.dragging < \"u\" && (i.dragging = l.dragging), i.expandParent && i.parentNode)) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && Dn(i, u);\n }\n break;\n case \"dimensions\":\n if (nt(i)) {\n if (typeof l.dimensions < \"u\" && (i.dimensions = l.dimensions), typeof l.updateStyle < \"u\" && (i.style = {\n ...i.style || {},\n width: `${(a = l.dimensions) == null ? void 0 : a.width}px`,\n height: `${(s = l.dimensions) == null ? void 0 : s.height}px`\n }), typeof l.resizing < \"u\" && (i.resizing = l.resizing), i.expandParent && i.parentNode) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && (u.initialized ? Dn(i, u) : Ue(() => {\n Dn(i, u);\n }));\n }\n i.initialized || (i.initialized = !0);\n }\n break;\n }\n }), t;\n}\nfunction Vd(e, t) {\n return nn(e, t);\n}\nfunction Hd(e, t) {\n return nn(e, t);\n}\nfunction Te(e, t) {\n return {\n id: e,\n type: \"select\",\n selected: t\n };\n}\nfunction di(e) {\n return {\n item: e,\n type: \"add\"\n };\n}\nfunction zn(e) {\n return {\n id: e,\n type: \"remove\"\n };\n}\nfunction An(e, t) {\n return e.reduce(\n (n, o) => {\n let i = t.includes(o.id);\n ce(o.selectable) && !o.selectable && (i = !1);\n const r = nt(o) ? \"changedNodes\" : \"changedEdges\";\n return !o.selected && i ? n[r].push(Te(o.id, !0)) : o.selected && !i && n[r].push(Te(o.id, !1)), n;\n },\n { changedNodes: [], changedEdges: [] }\n );\n}\nfunction od(e, t, n, o) {\n let i = !1;\n const r = nd(e, t), a = (f) => {\n const b = f ?? n.value ?? [];\n e.hooks.updateNodeInternals.trigger(b);\n }, s = (f) => {\n if (f)\n return e.nodes && !n.value.length ? e.nodes.find((b) => b.id === f) : e.nodes[n.value.indexOf(f)];\n }, l = (f) => {\n if (f)\n return e.edges && !o.value.length ? e.edges.find((b) => b.id === f) : e.edges[o.value.indexOf(f)];\n }, u = (f, b, L) => {\n const I = [];\n f.forEach((F) => {\n var Y, ne;\n const U = {\n id: F.id,\n type: \"position\",\n dragging: L,\n from: F.from\n };\n if (b && (U.position = F.position, F.parentNode)) {\n const O = s(F.parentNode);\n U.position = {\n x: U.position.x - (((Y = O == null ? void 0 : O.computedPosition) == null ? void 0 : Y.x) ?? 0),\n y: U.position.y - (((ne = O == null ? void 0 : O.computedPosition) == null ? void 0 : ne.y) ?? 0)\n };\n }\n I.push(U);\n }), I != null && I.length && e.hooks.nodesChange.trigger(I);\n }, c = (f) => {\n var F;\n if (!e.vueFlowRef)\n return;\n const b = e.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!b)\n return;\n let L;\n if ((F = e.__experimentalFeatures) != null && F.nestedFlow) {\n let U = [b], Y = b, ne;\n for (; !ne && Y; )\n Y = Y.parentElement, ne = Y == null ? void 0 : Y.classList.contains(\"vue-flow__transformationpane\"), ne && (U = [Y, ...U]);\n U.forEach((O) => {\n const ae = window.getComputedStyle(O), { m22: me } = new window.DOMMatrixReadOnly(ae.transform);\n L ? L *= me : L = me;\n });\n } else {\n const U = window.getComputedStyle(b), { m22: Y } = new window.DOMMatrixReadOnly(U.transform);\n L = Y;\n }\n const I = f.reduce((U, Y) => {\n const ne = s(Y.id);\n if (ne) {\n const O = rn(Y.nodeElement);\n !!(O.width && O.height && (ne.dimensions.width !== O.width || ne.dimensions.height !== O.height || Y.forceUpdate)) && (ne.handleBounds.source = Lo(\".source\", Y.nodeElement, L), ne.handleBounds.target = Lo(\".target\", Y.nodeElement, L), ne.dimensions = O, ne.initialized = !0, U.push({\n id: ne.id,\n type: \"dimensions\",\n dimensions: O\n }));\n }\n return U;\n }, []);\n e.fitViewOnInit && !i && (ye(() => r.value.initialized).toBe(!0).then(() => {\n r.value.fitView();\n }), i = !0), I.length && e.hooks.nodesChange.trigger(I);\n }, v = (f, b) => {\n const L = f.map((U) => U.id);\n let I, F = [];\n if (e.multiSelectionActive)\n I = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, g = (f, b) => {\n const L = f.map((U) => U.id);\n let I = [], F;\n if (e.multiSelectionActive)\n F = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, x = (f, b) => {\n const L = f.filter(xt).map((Y) => Y.id), I = f.filter($e).map((Y) => Y.id);\n let { changedNodes: F, changedEdges: U } = An([...e.nodes, ...e.edges], [...L, ...I]);\n e.multiSelectionActive && (F = L.map((Y) => Te(Y, b)), U = I.map((Y) => Te(Y, b))), F.length && e.hooks.nodesChange.trigger(F), U.length && e.hooks.edgesChange.trigger(U);\n }, h = (f) => {\n v(f, !0);\n }, d = (f) => {\n g(f, !0);\n }, w = (f) => {\n x(f, !0);\n }, y = (f) => {\n if (!f.length)\n return v(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.nodesChange.trigger(L);\n }, S = (f) => {\n if (!f.length)\n return g(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.edgesChange.trigger(L);\n }, V = (f) => {\n if (!f || !f.length)\n return x([], !1);\n const { changedNodes: b, changedEdges: L } = f.reduce(\n (I, F) => {\n const U = Te(F.id, !1);\n return xt(F) ? I.changedNodes.push(U) : I.changedEdges.push(U), I;\n },\n { changedNodes: [], changedEdges: [] }\n );\n b.length && e.hooks.nodesChange.trigger(b), L.length && e.hooks.edgesChange.trigger(L);\n }, p = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([f, e.maxZoom]), e.minZoom = f;\n }, N = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([e.minZoom, f]), e.maxZoom = f;\n }, T = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.translateExtent(f), e.translateExtent = f;\n }, _ = (f) => {\n e.nodeExtent = f, a(n.value);\n }, P = (f) => {\n e.nodesDraggable = f, e.nodesConnectable = f, e.elementsSelectable = f;\n }, R = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f;\n !e.initialized && !b.length || (e.nodes = Do(b, e.nodes, s, e.hooks.error.trigger));\n }, $ = (f) => {\n const b = f instanceof Function ? f(e.edges) : f;\n if (!e.initialized && !b.length)\n return;\n const L = e.isValidConnection ? b.filter(\n (I) => e.isValidConnection(I, {\n edges: e.edges,\n sourceNode: s(I.source),\n targetNode: s(I.target)\n })\n ) : b;\n e.edges = L.reduce((I, F) => {\n const U = s(F.source), Y = s(F.target), ne = !U || typeof U > \"u\", O = !Y || typeof Y > \"u\";\n if (ne && O ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, F.id, F.source, F.target)) : (ne && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, F.id, F.source)), O && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, F.id, F.target))), ne || O)\n return I;\n const ae = l(F.id);\n return I.push({\n ...lo(F, Object.assign({}, ae, e.defaultEdgeOptions)),\n sourceNode: U,\n targetNode: Y\n }), I;\n }, []);\n }, D = (f) => {\n const b = f instanceof Function ? f([...e.nodes, ...e.edges]) : f;\n !e.initialized && !b.length || (R(b.filter(xt)), $(b.filter($e)));\n }, Q = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f, I = Do(b, e.nodes, s, e.hooks.error.trigger).map(di);\n I.length && e.hooks.nodesChange.trigger(I);\n }, ee = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, I = (e.isValidConnection ? b.filter(\n (F) => e.isValidConnection(F, {\n edges: e.edges,\n sourceNode: s(F.source),\n targetNode: s(F.target)\n })\n ) : b).reduce((F, U) => {\n const Y = pa(\n {\n ...U,\n ...e.defaultEdgeOptions\n },\n e.edges,\n e.hooks.error.trigger\n );\n if (Y) {\n const ne = s(Y.source), O = s(Y.target), ae = !ne || typeof ne > \"u\", me = !O || typeof O > \"u\";\n if (ae && me ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (ae && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, Y.id, Y.source)), me && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, Y.id, Y.target))), ae || me)\n return F;\n F.push(\n di({\n ...Y,\n sourceNode: ne,\n targetNode: O\n })\n );\n }\n return F;\n }, []);\n I.length && e.hooks.edgesChange.trigger(I);\n }, m = (f, b = !0) => {\n const L = f instanceof Function ? f(e.nodes) : f, I = [], F = [];\n L.forEach((U) => {\n const Y = typeof U == \"string\" ? s(U) : U;\n if (!(ce(Y.deletable) && !Y.deletable) && (I.push(zn(Y.id)), b)) {\n const ne = sn([Y], e.edges).filter((O) => ce(O.deletable) ? O.deletable : !0);\n F.push(...ne.map((O) => zn(O.id)));\n }\n }), F.length && e.hooks.edgesChange.trigger(F), I.length && e.hooks.nodesChange.trigger(I);\n }, A = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, L = [];\n b.forEach((I) => {\n const F = typeof I == \"string\" ? l(I) : I;\n ce(F.deletable) && !F.deletable || L.push(zn(typeof I == \"string\" ? I : I.id));\n }), e.hooks.edgesChange.trigger(L);\n }, E = (f, b, L = !0) => ya(f, b, e.edges, l, L, e.hooks.error.trigger), G = (f) => nn(f, e.nodes), Z = (f) => nn(f, e.edges), K = (f, b, L, I = !1) => {\n I ? e.connectionClickStartHandle = f : e.connectionStartHandle = f, e.connectionEndHandle = null, e.connectionStatus = null, b && (e.connectionPosition = b);\n }, z = (f, b = null, L = null) => {\n e.connectionStartHandle && (e.connectionPosition = f, e.connectionEndHandle = b, e.connectionStatus = L);\n }, W = (f, b) => {\n e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, b ? e.connectionClickStartHandle = null : e.connectionStartHandle = null;\n }, B = (f) => {\n const b = ha(f), L = b ? null : s(f.id);\n return !b && !L ? [null, null, b] : [b ? f : Io(L), L, b];\n }, q = (f, b = !0, L) => {\n const [I, F, U] = B(f);\n return I ? (L || e.nodes).filter((Y) => {\n if (!U && (Y.id === F.id || !Y.computedPosition))\n return !1;\n const ne = Io(Y), O = Fn(ne, I);\n return b && O > 0 || O >= Number(f.width) * Number(f.height);\n }) : [];\n }, te = (f, b, L = !0) => {\n const [I] = B(f);\n if (!I)\n return !1;\n const F = Fn(I, b);\n return L && F > 0 || F >= Number(f.width) * Number(f.height);\n }, re = (f) => {\n const { viewport: b, dimensions: L, d3Zoom: I, d3Selection: F, translateExtent: U } = e;\n if (!I || !F || !f.x && !f.y)\n return !1;\n const Y = et.translate(b.x + f.x, b.y + f.y).scale(b.zoom), ne = [\n [0, 0],\n [L.width, L.height]\n ], O = I.constrain()(Y, ne, U), ae = e.viewport.x !== O.x || e.viewport.y !== O.y || e.viewport.zoom !== O.k;\n return I.transform(F, O), ae;\n }, k = (f) => {\n const b = f instanceof Function ? f(e) : f, L = [\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"nodeExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n ], I = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n ce(b.defaultEdgeOptions) && (e.defaultEdgeOptions = b.defaultEdgeOptions);\n const F = b.modelValue || b.nodes || b.edges ? [] : void 0;\n F && (b.modelValue && F.push(...b.modelValue), b.nodes && F.push(...b.nodes), b.edges && F.push(...b.edges), D(F));\n const U = () => {\n ce(b.maxZoom) && N(b.maxZoom), ce(b.minZoom) && p(b.minZoom), ce(b.translateExtent) && T(b.translateExtent), ce(b.nodeExtent) && _(b.nodeExtent);\n };\n Object.keys(b).forEach((Y) => {\n const ne = Y, O = b[ne];\n ![...L, ...I].includes(ne) && ce(O) && (e[ne] = O);\n }), e.d3Zoom ? U() : ye(() => e.d3Zoom).not.toBeUndefined().then(U), e.initialized || (e.initialized = !0);\n };\n return {\n updateNodePositions: u,\n updateNodeDimensions: c,\n setElements: D,\n setNodes: R,\n setEdges: $,\n addNodes: Q,\n addEdges: ee,\n removeNodes: m,\n removeEdges: A,\n findNode: s,\n findEdge: l,\n updateEdge: E,\n applyEdgeChanges: Z,\n applyNodeChanges: G,\n addSelectedElements: w,\n addSelectedNodes: h,\n addSelectedEdges: d,\n setMinZoom: p,\n setMaxZoom: N,\n setTranslateExtent: T,\n setNodeExtent: _,\n removeSelectedElements: V,\n removeSelectedNodes: y,\n removeSelectedEdges: S,\n startConnection: K,\n updateConnection: z,\n endConnection: W,\n setInteractive: P,\n setState: k,\n getIntersectingNodes: q,\n isNodeIntersecting: te,\n panBy: re,\n fitView: async (f = { padding: 0.1 }) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitView(f);\n },\n zoomIn: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomIn(f);\n },\n zoomOut: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomOut(f);\n },\n zoomTo: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomTo(f, b);\n },\n setTransform: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setTransform(f, b);\n },\n getTransform: () => r.value.getTransform(),\n setCenter: async (f, b, L) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setCenter(f, b, L);\n },\n fitBounds: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitBounds(f, b);\n },\n project: (f) => r.value.project(f),\n toObject: () => JSON.parse(\n JSON.stringify({\n nodes: e.nodes.map((f) => {\n const {\n computedPosition: b,\n handleBounds: L,\n selected: I,\n dimensions: F,\n isParent: U,\n resizing: Y,\n dragging: ne,\n initialized: O,\n ...ae\n } = f;\n return ae;\n }),\n edges: e.edges.map((f) => {\n const { selected: b, sourceNode: L, targetNode: I, ...F } = f;\n return F;\n }),\n position: [e.viewport.x, e.viewport.y],\n zoom: e.viewport.zoom\n })\n ),\n updateNodeInternals: a,\n $reset: () => {\n const f = ar();\n if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) {\n const b = et.translate(f.defaultViewport.x ?? 0, f.defaultViewport.y ?? 0).scale(je(f.defaultViewport.zoom ?? 1, f.minZoom, f.maxZoom)), L = e.viewportRef.getBoundingClientRect(), I = [\n [0, 0],\n [L.width, L.height]\n ], F = e.d3Zoom.constrain()(b, I, f.translateExtent);\n e.d3Zoom.transform(e.d3Selection, F);\n }\n k(f);\n },\n $destroy: () => {\n }\n };\n}\nclass ot {\n constructor() {\n this.currentId = 0, this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n return ot.instance || (ot.instance = new ot()), ot.instance;\n }\n set(t, n) {\n return this.flows.set(t, n);\n }\n get(t) {\n return this.flows.get(t);\n }\n remove(t) {\n return this.flows.delete(t);\n }\n create(t, n) {\n const o = ar(n), i = kr(o), r = J(() => i.nodes.map((g) => g.id)), a = J(() => i.edges.map((g) => g.id)), s = cu(i, r, a), l = od(i, s, r, a), u = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n const h = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;\n u[h] = x.on;\n });\n const c = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n c[g] = x.trigger;\n }), l.setState(i);\n const v = {\n ...u,\n ...s,\n ...l,\n ...Or(i),\n emits: c,\n id: t,\n vueFlowVersion: \"1.19.4\",\n $destroy: () => {\n this.remove(t);\n }\n };\n return this.set(t, v), v;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nconst fe = (e) => {\n const t = ot.getInstance(), n = hi(), o = e == null ? void 0 : e.id, i = (n == null ? void 0 : n.vueFlowId) || o;\n let r, a = !1;\n if (n) {\n const s = He(zo, null);\n typeof s < \"u\" && s !== null && (r = s);\n }\n if (r || i && (r = t.get(i)), !r || r && o && o !== r.id) {\n const s = o ?? t.getId();\n r = t.create(s, e), n && (a = !0);\n } else\n e && r.setState(e);\n return n && (ut(zo, r), n.vueFlowId = r.id, a && Mt(() => {\n if (r) {\n const s = t.get(r.id);\n s ? s.$destroy() : wt(`No store instance found for id ${r.id} in storage.`);\n }\n })), r;\n};\nfunction id(e, t, n) {\n const o = Tr();\n return o.run(() => {\n [\n () => {\n o.run(() => {\n let h, d, w = !!(n.nodes.value.length || n.edges.value.length);\n h = tt([e.modelValue, () => {\n var y, S;\n return (S = (y = e.modelValue) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setElements(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],\n ([y, S]) => {\n var V;\n (V = e.modelValue) != null && V.value && Array.isArray(e.modelValue.value) && (h == null || h.pause(), e.modelValue.value = [...y, ...S], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.nodes.value.length;\n h = tt([e.nodes, () => {\n var y, S;\n return (S = (y = e.nodes) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setNodes(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, () => n.nodes.value.length],\n ([y]) => {\n var S;\n (S = e.nodes) != null && S.value && Array.isArray(e.nodes.value) && (h == null || h.pause(), e.nodes.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.edges.value.length;\n h = tt([e.edges, () => {\n var y, S;\n return (S = (y = e.edges) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setEdges(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.edges, () => n.edges.value.length],\n ([y]) => {\n var S;\n (S = e.edges) != null && S.value && Array.isArray(e.edges.value) && (h == null || h.pause(), e.edges.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.minZoom,\n () => {\n t.minZoom && ce(t.minZoom) && n.setMinZoom(t.minZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.maxZoom,\n () => {\n t.maxZoom && ce(t.maxZoom) && n.setMaxZoom(t.maxZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.translateExtent,\n () => {\n t.translateExtent && ce(t.translateExtent) && n.setTranslateExtent(t.translateExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.nodeExtent,\n () => {\n t.nodeExtent && ce(t.nodeExtent) && n.setNodeExtent(t.nodeExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.applyDefault,\n () => {\n ce(t.applyDefault) && (n.applyDefault.value = t.applyDefault);\n }\n ), de(\n n.applyDefault,\n (h, d, w) => {\n n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), w(() => {\n n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n o.run(() => {\n const h = async (d) => {\n let w = d;\n Ae(t.autoConnect) && (w = await t.autoConnect(d)), w !== !1 && n.addEdges([w]);\n };\n de(\n () => t.autoConnect,\n () => {\n ce(t.autoConnect) && (n.autoConnect.value = t.autoConnect);\n }\n ), de(\n n.autoConnect,\n (d, w, y) => {\n d ? n.onConnect(h) : n.hooks.value.connect.off(h), y(() => {\n n.hooks.value.connect.off(h);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n const h = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n Object.keys(t).forEach((d) => {\n if (!h.includes(d)) {\n const w = M(t, d), y = n[d];\n o.run(() => {\n de(\n w,\n (S) => {\n ce(S) && (y.value = S);\n },\n { flush: \"pre\" }\n );\n });\n }\n });\n }\n ].forEach((h) => h());\n }), () => o.stop();\n}\nfunction fi(e, t) {\n return {\n x: e.clientX - t.left,\n y: e.clientY - t.top\n };\n}\nconst rd = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n}, ad = /* @__PURE__ */ ge({\n ...rd,\n props: {\n isSelecting: { type: Boolean }\n },\n setup(e) {\n const {\n id: t,\n vueFlowRef: n,\n getNodes: o,\n getEdges: i,\n viewport: r,\n emits: a,\n userSelectionActive: s,\n removeSelectedElements: l,\n panOnDrag: u,\n userSelectionRect: c,\n elementsSelectable: v,\n nodesSelectionActive: g,\n addSelectedElements: x,\n getSelectedEdges: h,\n getSelectedNodes: d,\n removeNodes: w,\n removeEdges: y,\n selectionMode: S,\n deleteKeyCode: V,\n multiSelectionKeyCode: p,\n multiSelectionActive: N\n } = fe(), T = ie(null), _ = ie(0), P = ie(0), R = ie(), $ = J(() => v.value && (e.isSelecting || s.value));\n _t(V, (z) => {\n if (!z)\n return;\n const W = o.value.reduce((B, q) => ((!q.selected && q.parentNode && B.find((te) => te.id === q.parentNode) || q.selected) && B.push(q), B), []);\n (W || h.value) && (h.value.length > 0 && y(h.value), W.length > 0 && w(W), g.value = !1, l());\n }), _t(p, (z) => {\n N.value = z;\n });\n function D() {\n s.value = !1, c.value = null, _.value = 0, P.value = 0;\n }\n function Q(z) {\n z.target !== T.value || $.value || (a.paneClick(z), l(), g.value = !1);\n }\n function ee(z) {\n var W;\n if (z.target === T.value) {\n if (Array.isArray(u.value) && ((W = u.value) != null && W.includes(2))) {\n z.preventDefault();\n return;\n }\n a.paneContextMenu(z);\n }\n }\n function m(z) {\n z.target === T.value && a.paneScroll(z);\n }\n function A(z) {\n if (R.value = n.value.getBoundingClientRect(), !$.value || !v || !e.isSelecting || z.button !== 0 || z.target !== T.value || !R.value)\n return;\n const { x: W, y: B } = fi(z, R.value);\n l(), c.value = {\n width: 0,\n height: 0,\n startX: W,\n startY: B,\n x: W,\n y: B\n }, s.value = !0, a.selectionStart(z);\n }\n function E(z) {\n if (!$.value)\n return a.paneMouseMove(z);\n if (!e.isSelecting || !R.value || !c.value)\n return;\n s.value || (s.value = !0), g.value && (g.value = !1);\n const W = fi(z, R.value), B = c.value.startX ?? 0, q = c.value.startY ?? 0, te = {\n ...c.value,\n x: W.x < B ? W.x : B,\n y: W.y < q ? W.y : q,\n width: Math.abs(W.x - B),\n height: Math.abs(W.y - q)\n }, re = Ci(\n o.value,\n c.value,\n r.value,\n S.value === fo.Partial\n ), k = sn(re, i.value);\n _.value = re.length, P.value = k.length, c.value = te, x([...re, ...k]);\n }\n function G(z) {\n $.value && z.button === 0 && (!s.value && c.value && z.target === T.value && Q(z), g.value = _.value > 0, D(), a.selectionEnd(z));\n }\n function Z(z) {\n var W;\n if (!$.value)\n return a.paneMouseLeave(z);\n s.value && (g.value = _.value > 0, (W = a.selectionEnd) == null || W.call(a, z)), D();\n }\n function K(z) {\n $.value || a.paneMouseEnter(z);\n }\n return (z, W) => (oe(), se(\"div\", {\n ref_key: \"container\",\n ref: T,\n key: `pane-${C(t)}`,\n class: Ke([\"vue-flow__pane vue-flow__container\", { selection: e.isSelecting }]),\n onClick: Q,\n onContextmenu: ee,\n onWheelPassive: m,\n onMouseenter: K,\n onMousedown: A,\n onMousemove: E,\n onMouseup: G,\n onMouseleave: Z\n }, [\n xe(z.$slots, \"default\"),\n C(s) && C(c) ? (oe(), ze(au, { key: 0 })) : Ee(\"\", !0),\n C(g) && C(d).length ? (oe(), ze(iu, { key: 1 })) : Ee(\"\", !0)\n ], 34));\n }\n}), sd = { class: \"vue-flow__nodes vue-flow__container\" }, ld = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n}, ud = /* @__PURE__ */ ge({\n ...ld,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"nodesDraggable\"), i = M(n, \"nodesFocusable\"), r = M(n, \"elementsSelectable\"), a = M(n, \"nodesConnectable\"), s = M(n, \"getNodes\"), l = M(n, \"getNodesInitialized\"), u = M(n, \"getNodeTypes\"), c = M(n, \"updateNodeDimensions\"), v = M(n, \"emits\");\n let g = ie();\n ye(() => s.value.length > 0 && l.value.length === s.value.length).toBe(!0).then(() => {\n Ue(() => {\n v.value.nodesInitialized(l.value);\n });\n }), Ve(() => {\n g.value = new ResizeObserver((S) => {\n const V = S.map((p) => ({\n id: p.target.getAttribute(\"data-id\"),\n nodeElement: p.target,\n forceUpdate: !0\n }));\n c.value(V);\n });\n }), gi(() => {\n var S;\n return (S = g.value) == null ? void 0 : S.disconnect();\n });\n function x(S) {\n return typeof S > \"u\" ? o.value : S;\n }\n function h(S) {\n return typeof S > \"u\" ? r.value : S;\n }\n function d(S) {\n return typeof S > \"u\" ? a.value : S;\n }\n function w(S) {\n return typeof S > \"u\" ? i.value : S;\n }\n function y(S, V) {\n const p = S || \"default\";\n let N = V ?? u.value[p];\n const T = on();\n if (typeof N == \"string\" && T) {\n const P = Object.keys(T.appContext.components);\n P && P.includes(p) && (N = pi(p, !1));\n }\n if (typeof N != \"string\")\n return N;\n const _ = t == null ? void 0 : t[`node-${p}`];\n return _ || (v.value.error(new ve(he.NODE_TYPE_MISSING, N)), !1);\n }\n return (S, V) => (oe(), se(\"div\", sd, [\n C(g) ? (oe(!0), se(Ce, { key: 0 }, dt(C(s), (p) => (oe(), ze(C(Tl), {\n id: p.id,\n key: p.id,\n \"resize-observer\": C(g),\n type: y(p.type, p.template),\n name: p.type || \"default\",\n draggable: x(p.draggable),\n selectable: h(p.selectable),\n connectable: d(p.connectable),\n focusable: w(p.focusable),\n node: p\n }, null, 8, [\"id\", \"resize-observer\", \"type\", \"name\", \"draggable\", \"selectable\", \"connectable\", \"focusable\", \"node\"]))), 128)) : Ee(\"\", !0)\n ]));\n }\n}), cd = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"], dd = [\"stroke\", \"stroke-width\", \"fill\"], fd = [\"stroke\", \"stroke-width\"], hd = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n}, gd = /* @__PURE__ */ ge({\n ...hd,\n props: {\n id: null,\n type: null,\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(e) {\n return (t, n) => (oe(), se(\"marker\", {\n id: e.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${e.width}`,\n markerHeight: `${e.height}`,\n markerUnits: e.markerUnits,\n orient: e.orient\n }, [\n e.type === C(Yn).ArrowClosed ? (oe(), se(\"polyline\", {\n key: 0,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: e.color,\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 8, dd)) : Ee(\"\", !0),\n e.type === C(Yn).Arrow ? (oe(), se(\"polyline\", {\n key: 1,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 8, fd)) : Ee(\"\", !0)\n ], 8, cd));\n }\n}), vd = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n}, md = /* @__PURE__ */ ge({\n ...vd,\n setup(e) {\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"connectionLineOptions\"), r = M(t, \"defaultMarkerColor\"), a = J(() => {\n const s = [], l = [], u = (c) => {\n if (c) {\n const v = Xe(c, n.value);\n s.includes(v) || (typeof c == \"object\" ? l.push({ ...c, id: v, color: c.color || r.value }) : l.push({ id: v, color: r.value, type: c }), s.push(v));\n }\n };\n return [i.value.markerEnd, i.value.markerStart].forEach(u), o.value.reduce((c, v) => ([v.markerStart, v.markerEnd].forEach(u), c.sort((g, x) => g.id.localeCompare(x.id))), l), l;\n });\n return (s, l) => (oe(), se(\"defs\", null, [\n (oe(!0), se(Ce, null, dt(C(a), (u) => (oe(), ze(gd, {\n id: u.id,\n key: u.id,\n type: u.type,\n color: u.color,\n width: u.width,\n height: u.height,\n markerUnits: u.markerUnits,\n \"stroke-width\": u.strokeWidth,\n orient: u.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]))), 128))\n ]));\n }\n}), pd = {\n key: 0,\n class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\"\n}, yd = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n}, xd = /* @__PURE__ */ ge({\n ...yd,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"connectionStartHandle\"), i = M(n, \"nodesConnectable\"), r = M(n, \"edgesUpdatable\"), a = M(n, \"edgesFocusable\"), s = M(n, \"elementsSelectable\"), l = M(n, \"getSelectedNodes\"), u = M(n, \"findNode\"), c = M(n, \"edges\"), v = M(n, \"getEdges\"), g = M(n, \"getNodesInitialized\"), x = M(n, \"getEdgeTypes\"), h = M(n, \"elevateEdgesOnSelect\"), d = M(n, \"dimensions\"), w = M(n, \"emits\"), y = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P;\n return (P = o.value) != null && P.nodeId ? u.value(o.value.nodeId) : !1;\n }\n ), S = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P, R;\n return !!(y.value && (typeof y.value.connectable > \"u\" ? i.value : y.value.connectable) && ((P = o.value) != null && P.nodeId) && ((R = o.value) != null && R.type));\n }\n ), V = Sn(\n [\n () => c.value.map((P) => P.zIndex),\n () => h.value ? [l.value.length] : [0],\n () => h.value ? g.value.map((P) => P.computedPosition.z) : []\n ],\n () => Ea(v.value, u.value, h.value)\n );\n function p(P) {\n return typeof P > \"u\" ? s.value : P;\n }\n function N(P) {\n return typeof P > \"u\" ? r.value : P;\n }\n function T(P) {\n return typeof P > \"u\" ? a.value : P;\n }\n function _(P, R) {\n const $ = P || \"default\";\n let D = R ?? x.value[$];\n const Q = on();\n if (typeof D == \"string\" && Q) {\n const m = Object.keys(Q.appContext.components);\n m && m.includes($) && (D = pi($, !1));\n }\n if (D && typeof D != \"string\")\n return D;\n const ee = t == null ? void 0 : t[`edge-${$}`];\n return ee || (w.value.error(new ve(he.EDGE_TYPE_MISSING, D)), !1);\n }\n return (P, R) => C(d).width && C(d).height ? (oe(), se(Ce, { key: 0 }, [\n (oe(!0), se(Ce, null, dt(C(V), ($) => (oe(), se(\"svg\", {\n key: $.level,\n class: \"vue-flow__edges vue-flow__container\",\n style: Le(`z-index: ${$.level}`)\n }, [\n $.isMaxLevel ? (oe(), ze(md, { key: 0 })) : Ee(\"\", !0),\n ct(\"g\", null, [\n (oe(!0), se(Ce, null, dt($.edges, (D) => (oe(), ze(C(Kl), {\n id: D.id,\n key: D.id,\n edge: D,\n type: _(D.type, D.template),\n name: D.type || \"default\",\n selectable: p(D.selectable),\n updatable: N(D.updatable),\n focusable: T(D.focusable)\n }, null, 8, [\"id\", \"edge\", \"type\", \"name\", \"selectable\", \"updatable\", \"focusable\"]))), 128))\n ])\n ], 4))), 128)),\n C(S) && C(y) ? (oe(), se(\"svg\", pd, [\n qe(tu, { \"source-node\": C(y) }, null, 8, [\"source-node\"])\n ])) : Ee(\"\", !0)\n ], 64)) : Ee(\"\", !0);\n }\n}), _d = /* @__PURE__ */ ct(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1), wd = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n}, bd = /* @__PURE__ */ ge({\n ...wd,\n setup(e) {\n const { id: t, viewport: n, emits: o, d3Zoom: i, d3Selection: r, dimensions: a, ...s } = fe(), l = ie(!oo);\n return ye(() => i.value && r.value && a.value.width > 0 && a.value.height > 0).toBeTruthy().then(() => {\n o.paneReady({\n id: t,\n viewport: n,\n emits: o,\n d3Zoom: i,\n d3Selection: r,\n dimensions: a,\n ...s\n }), setTimeout(() => {\n l.value = !0;\n }, 0);\n }), (u, c) => (oe(), se(\"div\", {\n key: `transform-${C(t)}`,\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: Le({\n transform: `translate(${C(n).x}px,${C(n).y}px) scale(${C(n).zoom})`,\n opacity: C(l) ? void 0 : 0\n })\n }, [\n qe(xd),\n _d,\n qe(ud),\n xe(u.$slots, \"default\")\n ], 4));\n }\n}), Ed = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n}, Sd = /* @__PURE__ */ ge({\n ...Ed,\n setup(e) {\n const {\n id: t,\n minZoom: n,\n maxZoom: o,\n defaultViewport: i,\n translateExtent: r,\n dimensions: a,\n zoomActivationKeyCode: s,\n selectionKeyCode: l,\n panActivationKeyCode: u,\n panOnScroll: c,\n panOnScrollMode: v,\n panOnScrollSpeed: g,\n panOnDrag: x,\n zoomOnDoubleClick: h,\n zoomOnPinch: d,\n zoomOnScroll: w,\n preventScrolling: y,\n noWheelClassName: S,\n noPanClassName: V,\n emits: p,\n connectionStartHandle: N,\n userSelectionActive: T,\n paneDragging: _,\n d3Zoom: P,\n d3Selection: R,\n d3ZoomHandler: $,\n viewport: D,\n viewportRef: Q\n } = fe(), ee = ie(), m = ie(!1), A = ie(!1);\n let E = !1, G = 0, Z = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const K = _t(u), z = J(() => !m.value && x.value && K.value), W = J(\n () => l.value !== !0 && m.value || l.value === !0 && !z.value\n );\n Ve(() => {\n oa(ee, re);\n const H = ao();\n ro(H, \"resize\", re);\n }), Ve(() => {\n const H = ee.value, f = H.getBoundingClientRect(), b = ed().scaleExtent([n.value, o.value]).translateExtent(r.value), L = we(H).call(b), I = L.on(\"wheel.zoom\"), F = et.translate(i.value.x ?? 0, i.value.y ?? 0).scale(je(i.value.zoom ?? 1, n.value, o.value)), U = [\n [0, 0],\n [f.width, f.height]\n ], Y = b.constrain()(F, U, r.value);\n b.transform(L, Y), P.value = b, R.value = L, $.value = I, D.value = { x: Y.x, y: Y.y, zoom: Y.k }, Q.value = H, _t(l, (O) => {\n m.value = O;\n });\n const ne = _t(s);\n bo(() => {\n m.value && T.value && !A.value ? b.on(\"zoom\", null) : !m.value && !T.value && b.on(\"zoom\", (O) => {\n D.value = { x: O.transform.x, y: O.transform.y, zoom: O.transform.k };\n const ae = te(O.transform);\n E = B(x.value, G ?? 0), p.viewportChange(ae), p.move({ event: O, flowTransform: ae });\n });\n }), b.on(\"start\", (O) => {\n var me;\n if (!O.sourceEvent)\n return null;\n G = O.sourceEvent.button, A.value = !0;\n const ae = te(O.transform);\n ((me = O.sourceEvent) == null ? void 0 : me.type) === \"mousedown\" && (_.value = !0), Z = ae, p.viewportChangeStart(ae), p.moveStart({ event: O, flowTransform: ae });\n }), b.on(\"end\", (O) => {\n if (!O.sourceEvent)\n return null;\n if (A.value = !1, _.value = !1, B(x.value, G ?? 0) && !E && p.paneContextMenu(O.sourceEvent), E = !1, q(Z, O.transform)) {\n const ae = te(O.transform);\n Z = ae, p.viewportChangeEnd(ae), p.moveEnd({ event: O, flowTransform: ae });\n }\n }), bo(() => {\n c.value && !ne.value && !T.value ? L.on(\n \"wheel.zoom\",\n (O) => {\n if (k(O, S.value))\n return !1;\n O.preventDefault(), O.stopImmediatePropagation();\n const ae = L.property(\"__zoom\").k || 1;\n if (O.ctrlKey && d.value) {\n const Tt = Ne(O), _r = -O.deltaY * (O.deltaMode === 1 ? 0.05 : O.deltaMode ? 1 : 2e-3) * 10, wr = ae * 2 ** _r;\n b.scaleTo(L, wr, Tt);\n return;\n }\n const me = O.deltaMode === 1 ? 20 : 1, En = v.value === Ut.Vertical ? 0 : O.deltaX * me, Ot = v.value === Ut.Horizontal ? 0 : O.deltaY * me;\n b.translateBy(\n L,\n -(En / ae) * g.value,\n -(Ot / ae) * g.value\n );\n },\n { passive: !1 }\n ) : typeof I < \"u\" && L.on(\n \"wheel.zoom\",\n function(O, ae) {\n if (!y.value || k(O, S.value))\n return null;\n O.preventDefault(), I.call(this, O, ae);\n },\n { passive: !1 }\n );\n }), b.filter((O) => {\n var Ot, Tt;\n const ae = ne.value || w.value, me = d.value && O.ctrlKey;\n if (O.button === 1 && O.type === \"mousedown\" && ((Ot = O.target) != null && Ot.closest(\".vue-flow__node\") || (Tt = O.target) != null && Tt.closest(\".vue-flow__edge\")))\n return !0;\n if (!x.value && !ae && !c.value && !h.value && !d.value || T.value || !h.value && O.type === \"dblclick\" || k(O, S.value) && O.type === \"wheel\" || k(O, V.value) && O.type !== \"wheel\" || !d.value && O.ctrlKey && O.type === \"wheel\" || !ae && !c.value && !me && O.type === \"wheel\" || !x.value && (O.type === \"mousedown\" || O.type === \"touchstart\") || Array.isArray(x.value) && !x.value.includes(O.button) && (O.type === \"mousedown\" || O.type === \"touchstart\"))\n return !1;\n const En = Array.isArray(x.value) && x.value.includes(O.button) || !O.button || O.button <= 1;\n return (!O.ctrlKey || O.type === \"wheel\") && En;\n });\n });\n function B(H, f) {\n return f === 2 && Array.isArray(H) && H.includes(2);\n }\n function q(H, f) {\n return H.x !== f.x && !isNaN(f.x) || H.y !== f.y && !isNaN(f.y) || H.zoom !== f.k && !isNaN(f.k);\n }\n function te(H) {\n return {\n x: H.x,\n y: H.y,\n zoom: H.k\n };\n }\n function re() {\n if (!ee.value)\n return;\n const { width: H, height: f } = rn(ee.value);\n (H === 0 || f === 0) && p.error(new ve(he.MISSING_VIEWPORT_DIMENSIONS)), a.value.width = H || 500, a.value.height = f || 500;\n }\n function k(H, f) {\n return H.target.closest(`.${f}`);\n }\n return (H, f) => (oe(), se(Ce, null, [\n (oe(), se(\"div\", {\n ref_key: \"viewportEl\",\n ref: ee,\n key: `viewport-${C(t)}`,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n qe(ad, {\n \"is-selecting\": C(W),\n class: Ke({ connecting: !!C(N), dragging: C(_), draggable: !!C(x) })\n }, {\n default: Fe(() => [\n qe(bd, null, {\n default: Fe(() => [\n xe(H.$slots, \"zoom-pane\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"class\"])\n ])),\n xe(H.$slots, \"default\")\n ], 64));\n }\n}), Nd = [\"id\"], Cd = [\"id\"], Md = [\"id\"], $d = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n}, kd = /* @__PURE__ */ ge({\n ...$d,\n setup(e) {\n const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = fe(), i = {\n position: \"absolute\",\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: \"hidden\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n clipPath: \"inset(100%)\"\n };\n return (r, a) => (oe(), se(Ce, null, [\n ct(\"div\", {\n id: `${C(Qi)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select a node. \" + Vn(C(n) ? \"\" : \"You can then use the arrow keys to move the node around.\") + \" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. \", 9, Nd),\n ct(\"div\", {\n id: `${C(Ji)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, Cd),\n C(n) ? Ee(\"\", !0) : (oe(), se(\"div\", {\n key: 0,\n id: `${C(Ml)}-${C(t)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n style: i\n }, Vn(C(o)), 9, Md))\n ], 64));\n }\n}), Od = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n}, Ld = /* @__PURE__ */ ge({\n ...Od,\n props: {\n id: null,\n modelValue: null,\n nodes: null,\n edges: null,\n edgeTypes: null,\n nodeTypes: null,\n connectionMode: null,\n connectionLineType: null,\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: null,\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: null,\n selectionKeyCode: null,\n multiSelectionKeyCode: null,\n zoomActivationKeyCode: null,\n panActivationKeyCode: null,\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: null,\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: null,\n maxZoom: null,\n defaultViewport: null,\n translateExtent: null,\n nodeExtent: null,\n defaultMarkerColor: null,\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: null,\n panOnScrollMode: null,\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: null,\n edgeUpdaterRadius: null,\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: null,\n noWheelClassName: null,\n noPanClassName: null,\n defaultEdgeOptions: null,\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n __experimentalFeatures: null\n },\n emits: [\"nodesChange\", \"edgesChange\", \"nodeDoubleClick\", \"nodeClick\", \"nodeMouseEnter\", \"nodeMouseMove\", \"nodeMouseLeave\", \"nodeContextMenu\", \"nodeDragStart\", \"nodeDrag\", \"nodeDragStop\", \"nodesInitialized\", \"miniMapNodeClick\", \"miniMapNodeDoubleClick\", \"miniMapNodeMouseEnter\", \"miniMapNodeMouseMove\", \"miniMapNodeMouseLeave\", \"connect\", \"connectStart\", \"connectEnd\", \"clickConnectStart\", \"clickConnectEnd\", \"moveStart\", \"move\", \"moveEnd\", \"selectionDragStart\", \"selectionDrag\", \"selectionDragStop\", \"selectionContextMenu\", \"selectionStart\", \"selectionEnd\", \"viewportChangeStart\", \"viewportChange\", \"viewportChangeEnd\", \"paneReady\", \"paneScroll\", \"paneClick\", \"paneContextMenu\", \"paneMouseEnter\", \"paneMouseMove\", \"paneMouseLeave\", \"edgeContextMenu\", \"edgeMouseEnter\", \"edgeMouseMove\", \"edgeMouseLeave\", \"edgeDoubleClick\", \"edgeClick\", \"edgeUpdateStart\", \"edgeUpdate\", \"edgeUpdateEnd\", \"updateNodeInternals\", \"error\", \"update:modelValue\", \"update:nodes\", \"update:edges\"],\n setup(e, { expose: t, emit: n }) {\n const o = e, i = yt(o, \"modelValue\", n), r = yt(o, \"nodes\", n), a = yt(o, \"edges\", n), { vueFlowRef: s, hooks: l, getNodeTypes: u, getEdgeTypes: c, ...v } = fe(o), g = id({ modelValue: i, nodes: r, edges: a }, o, {\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n });\n da(n, l);\n const x = ie();\n return ut(ln, Ir()), Pr(() => {\n g();\n }), Ve(() => {\n s.value = x.value;\n }), t({\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n }), (h, d) => (oe(), se(\"div\", {\n ref_key: \"el\",\n ref: x,\n class: \"vue-flow\"\n }, [\n qe(Sd, null, {\n nodes: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(u)), (w) => xe(h.$slots, `node-${w}`)), 256))\n ]),\n edges: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(c)), (w) => xe(h.$slots, `edge-${w}`)), 256))\n ]),\n \"connection-name\": Fe(() => [\n xe(h.$slots, \"connection-line\")\n ]),\n \"zoom-pane\": Fe(() => [\n xe(h.$slots, \"zoom-pane\")\n ]),\n default: Fe(() => [\n xe(h.$slots, \"default\")\n ]),\n _: 3\n }),\n qe(kd)\n ], 512));\n }\n}), Td = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n}, Gd = /* @__PURE__ */ ge({\n ...Td,\n props: {\n position: null\n },\n setup(e) {\n const t = e, { userSelectionActive: n } = fe(), o = J(() => `${t.position}`.split(\"-\"));\n return (i, r) => (oe(), se(\"div\", {\n class: Ke([\"vue-flow__panel\", C(o)]),\n style: Le({ pointerEvents: C(n) ? \"none\" : \"all\" })\n }, [\n xe(i.$slots, \"default\")\n ], 6));\n }\n}), Bn = 0.1, Fd = (e) => {\n const t = fe({ id: e }), n = M(t, \"nodes\"), o = M(t, \"d3Zoom\"), i = M(t, \"d3Selection\"), r = M(t, \"dimensions\"), a = M(t, \"translateExtent\"), s = M(t, \"minZoom\"), l = M(t, \"maxZoom\"), u = M(t, \"viewport\"), c = M(t, \"snapToGrid\"), v = M(t, \"snapGrid\"), g = M(t, \"getNodes\");\n return {\n zoomIn: (d) => {\n x(1.2, d == null ? void 0 : d.duration);\n },\n zoomOut: (d) => {\n x(1 / 1.2, d == null ? void 0 : d.duration);\n },\n zoomTo: (d, w) => {\n i.value && o.value && o.value.scaleTo(Rn(i.value, w == null ? void 0 : w.duration), d);\n },\n setTransform: (d, w) => {\n h(d.x, d.y, d.zoom, w == null ? void 0 : w.duration);\n },\n getTransform: () => ({\n x: u.value.x,\n y: u.value.y,\n zoom: u.value.zoom\n }),\n fitView: (d = {\n padding: Bn,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!n.value.length)\n return;\n const w = (d.includeHiddenNodes ? n.value : g.value).filter((N) => {\n var P;\n const T = N.initialized && N.dimensions.width && N.dimensions.height;\n let _ = !0;\n return (P = d.nodes) != null && P.length && (_ = d.nodes.includes(N.id)), T && _;\n }), y = co(w), { x: S, y: V, zoom: p } = Zt(\n y,\n r.value.width,\n r.value.height,\n d.minZoom ?? s.value,\n d.maxZoom ?? l.value,\n d.padding ?? Bn,\n d.offset\n );\n h(S, V, p, d == null ? void 0 : d.duration);\n },\n setCenter: (d, w, y) => {\n const S = typeof (y == null ? void 0 : y.zoom) < \"u\" ? y.zoom : l.value, V = r.value.width / 2 - d * S, p = r.value.height / 2 - w * S;\n h(V, p, S, y == null ? void 0 : y.duration);\n },\n fitBounds: (d, w = { padding: Bn }) => {\n const { x: y, y: S, zoom: V } = Zt(d, r.value.width, r.value.height, s.value, l.value, w.padding);\n h(y, S, V, w == null ? void 0 : w.duration);\n },\n project: (d) => uo(d, u.value, c.value, v.value)\n };\n function x(d, w) {\n i.value && o.value && o.value.scaleBy(Rn(i.value, w), d);\n }\n function h(d, w, y, S) {\n const { x: V, y: p } = so({ x: -d, y: -w }, a.value), N = et.translate(-V, -p).scale(y);\n i.value && o.value && o.value.transform(Rn(i.value, S), N);\n }\n};\nfunction Rn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Yd(e) {\n const t = e ?? He(Oi, \"\"), n = He(Ti, null), { findEdge: o, emits: i } = fe(), r = o(t);\n return r || i.error(new ve(he.EDGE_NOT_FOUND, t)), {\n id: t,\n edge: r,\n edgeEl: n\n };\n}\nexport {\n vn as BaseEdge,\n Bl as BezierEdge,\n Ye as ConnectionLineType,\n Qe as ConnectionMode,\n Rd as EdgeLabelRenderer,\n Al as EdgeText,\n he as ErrorCode,\n ot as GlobalVueFlowStorage,\n Kt as Handle,\n Yn as MarkerType,\n $i as NodeIdInjection,\n Ut as PanOnScrollMode,\n Gd as Panel,\n xa as PanelPosition,\n j as Position,\n fo as SelectionMode,\n Rl as SimpleBezierEdge,\n ir as SmoothStepEdge,\n Gl as StepEdge,\n Fl as StraightEdge,\n Ld as VueFlow,\n ve as VueFlowError,\n zo as VueFlowInjection,\n zd as addEdge,\n nn as applyChanges,\n Vd as applyEdgeChanges,\n Hd as applyNodeChanges,\n je as clamp,\n Ei as connectionExists,\n lu as defaultEdgeTypes,\n su as defaultNodeTypes,\n nr as getBezierEdgeCenter,\n Kn as getBezierPath,\n Bd as getBoundsofRects,\n sn as getConnectedEdges,\n Dd as getIncomers,\n Xe as getMarkerId,\n Ci as getNodesInside,\n Pd as getOutgoers,\n co as getRectOfNodes,\n or as getSimpleBezierPath,\n tr as getSimpleEdgeCenter,\n qn as getSmoothStepPath,\n rr as getStraightPath,\n Zt as getTransformForBounds,\n va as graphPosToZoomedPos,\n $e as isEdge,\n fa as isGraphEdge,\n nt as isGraphNode,\n xt as isNode,\n uo as pointToRendererPoint,\n va as rendererPointToPoint,\n Ad as updateEdge,\n Yd as useEdge,\n Ra as useGetPointerPosition,\n Di as useHandle,\n _a as useNode,\n fe as useVueFlow,\n Fd as useZoomPanHelper\n};\n","\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","import { App } from 'vue'\n\nimport NodeEditor from '@/components/NodeEditor.vue'\nimport StateEditor from '@/components/StateEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('NodeEditor', NodeEditor)\n\tapp.component('StateEditor', StateEditor)\n}\n\nexport { install, NodeEditor, StateEditor }\n"],"names":["Eo","oo","Dr","zr","Ae","Ie","Pe","Ar","C","Br","i","r","yi","Rr","ie","Er","So","Vr","Sn","a","de","s","l","u","br","v","g","Mt","hi","Vt","Hr","on","Ve","Ue","Hn","x","h","d","w","S","V","p","Sr","y","N","T","ye","No","Lr","Gr","Fr","Yr","Xr","Zr","Ur","Yt","xi","_i","Co","Wr","Kr","qr","tt","wi","io","ro","jr","Mo","Qr","Jr","Ln","Gn","$o","ea","ta","na","oa","ko","ia","Oo","ra","aa","To","sa","la","yt","J","X","ua","wt","ca","da","Nr","he","Nn","ve","ao","Io","Fn","rn","je","so","Po","$e","fa","xt","nt","ha","ga","it","ce","lo","an","Ei","va","uo","Si","Xt","Ni","co","Ci","sn","Zt","ma","Mi","Xe","o","pa","ya","Do","j","fo","Ye","Qe","Yn","zo","$i","ki","Oi","Ti","ln","_a","He","fe","ho","rt","n","Wt","Ao","wa","ba","Ea","Cn","Bo","Sa","Ro","Ii","Na","Ca","Vo","Pi","It","Di","_","P","R","$","D","Q","m","G","A","E","Z","Y","L","f","B","F","I","U","ne","W","b","K","q","z","te","k","H","ee","Ma","$a","ka","Kt","ge","M","oe","se","Ke","xe","un","ue","Oa","cn","Ta","dn","Ia","Ho","Pa","Mn","zi","Da","za","go","Ai","Aa","Ba","Ra","Lo","Xn","Va","fn","Ht","Ha","La","Go","Zn","Fo","hn","Ga","Fa","Bi","Ya","vo","Xa","_e","Za","Ua","Ri","Wa","Ka","Vi","Hi","qa","ja","Qa","Ja","es","ts","ns","os","is","Li","rs","qt","as","ss","ls","us","cs","ds","fs","hs","gs","vs","ms","ps","ys","xs","_s","ws","bs","Es","Ss","Ns","Cs","Ms","$s","ks","Os","Gi","Ts","Is","Ps","Ds","ft","zs","As","Bs","Rs","Fi","mo","Yi","Xi","Zi","Vs","Hs","Ls","Gs","Fs","Ys","Xs","Zs","Us","Ws","Ks","qs","js","Qs","Js","el","tl","nl","ol","il","rl","al","sl","ll","ul","cl","dl","fl","hl","gl","Ui","vl","ml","pl","yl","Wi","$t","xl","we","_l","Ne","wl","bt","$n","Ki","qi","Pt","Un","bl","El","Sl","Nl","Cl","ji","Qi","Ji","Ml","er","st","Wn","t","$l","kl","_t","Ol","ut","gi","Tl","Il","Pl","Dl","zl","Al","Le","Ee","ct","vi","Ce","Cr","Vn","ze","mi","gn","tr","nr","Dt","Yo","Kn","mn","Bl","Xo","or","pn","Rl","Zo","Vl","Uo","Hl","Ll","qn","yn","ir","xn","Gl","rr","_n","Fl","Yl","Xl","po","Wo","Zl","Ul","Wl","Kl","ql","jl","Rd","Mr","Ql","Jl","eu","tu","c","$r","nu","ou","iu","ru","au","su","lu","uu","ar","cu","yo","sr","kt","jt","lt","Me","du","fu","hu","gu","vu","mu","pu","Ko","qo","yu","xu","jo","lr","Qo","pe","zt","ti","_u","jn","We","Qt","Jo","wu","ei","Ze","be","bu","ni","At","ur","Eu","Su","Nu","cr","oi","Re","Qn","On","Cu","Mu","$u","ii","Jn","dr","Bt","ku","Ou","fr","Tu","Iu","Pu","ri","Du","zu","Au","ht","mt","gt","hr","Jt","pt","en","Je","wn","Ct","gr","xo","Bu","tn","vr","eo","Ru","ai","Hu","Vu","si","Lu","Gu","mr","li","to","Lt","ui","no","Gt","Fu","_o","Se","ke","Ft","Yu","Xu","Zu","Uu","wo","pr","Wu","Ku","qu","ju","Qu","Ju","ec","tc","nc","oc","ic","rc","ac","lc","uc","cc","dc","hc","gc","vc","mc","Be","pc","yc","wc","bc","Ec","Sc","Nc","Cc","Mc","yr","$c","kc","Oc","Tc","Ic","Pc","Dc","Ac","Bc","Rc","Vc","Hc","Lc","xr","Gc","Yc","Xc","Uc","Rt","De","et","Tn","vt","Kc","qc","ci","jc","Qc","Jc","ed","In","Ge","td","nd","Pn","Dn","nn","Te","di","zn","An","od","O","ae","me","ot","kr","Or","id","Tr","fi","rd","ad","ld","ud","pi","dt","cd","dd","hd","gd","vd","md","pd","yd","qe","wd","bd","Ed","Sd","bo","Tt","_r","wr","En","Ot","Fe","Nd","Cd","Md","$d","kd","Od","Ld","Ir","Pr","props","__props","emit","__emit","positionMap","Position","sourcePosition","computed","targetPosition","labelInput","ref","newLabel","showInput","lastClick","nodeOnClick","now","showLabelInput","nextTick","submitNewLabel","__default__","useVueFlow","labelOnClick","path","getBezierPath","containerClass","vueFlowInstance","hover","activeElementKey","vueFlowElements","activeElementIndex","elements","_elements","key","newValue","getNodes","onPaneReady","onMounted","handleKeypress","onBeforeUnmount","shiftTerminal","currentTerminal","shiftOutput","shiftInput","onWheel","$event","e","fitView","addNode","newNodePosition","makeEdge","activeNode","nodeId","edgeId","onConnect","onEdgeDoubleClick","labelChanged","states","stateHash","hasInputs","stateElements","edges","edgeKey","target","onElementsChange","idToLabel","label","install","app","NodeEditor","StateEditor"],"mappings":";AACA,IAAIA;AACJ,MAAMC,KAAK,OAAO,SAAS,KAAKC,KAAK,CAAC,MAAM,OAAO,IAAI,KAAKC,KAAK,CAAC,MAAM,OAAO,KAAK,WAAWC,KAAK,CAAC,MAAM,OAAO,KAAK,YAAYC,KAAK,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAK,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAK,MAAM;AAClN;AACAN,OAAQD,KAAK,UAAU,OAAO,SAAS,OAAO,cAAc,QAAQA,GAAG,aAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AACrI,SAAS,GAAG,GAAG;AACb,SAAO,OAAO,KAAK,aAAa,EAAC,IAAKQ,EAAE,CAAC;AAC3C;AACA,SAASC,GAAG,GAAG,GAAG;AAChB,WAAS,KAAK,GAAG;AACf,WAAO,IAAI,QAAQ,CAACC,GAAGC,MAAM;AAC3B,cAAQ,QAAQ,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,SAAS,MAAM,MAAM,GAAG,CAAC,EAAE,KAAKD,CAAC,EAAE,MAAMC,CAAC;AAAA,IACnG,CAAK;AAAA,EACF;AACD,SAAO;AACT;AACA,MAAMC,KAAK,CAAC,MAAM;AAClB,SAASC,GAAG,IAAID,IAAI;AAClB,QAAM,IAAIE,GAAG,EAAE;AACf,WAAS,IAAI;AACX,MAAE,QAAQ;AAAA,EACX;AACD,WAAS,IAAI;AACX,MAAE,QAAQ;AAAA,EACX;AACD,QAAMJ,IAAI,IAAIC,MAAM;AAClB,MAAE,SAAS,EAAE,GAAGA,CAAC;AAAA,EACrB;AACE,SAAO,EAAE,UAAUI,GAAG,CAAC,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAaL,EAAC;AAC/D;AAC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B,IAAS,CAAA,GACTI,IAAQ,CAAA,GACRI,IAAY,CAAA;AAChB,eAASjsB,IAAI,GAAGA,IAAI+pB,EAAS,QAAQ/pB,KAAK;AACrC,YAAA6S,IAAKkX,EAAS/pB,CAAC;AACf,QAAA6S,EAAG,QAAQ,UAEP4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,IAAI,CAAC;AAAA,QAAA,IAEIA,EAAG,QAAQ,WAEd4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,MAAM;AAAA,QAAA,IAEGA,EAAG,UAAUA,EAAG,UAE1BgZ,EAAMhZ,EAAG,MAAM,IAAIgZ,EAAMhZ,EAAG,MAAM,KAAK,IACvCgZ,EAAMhZ,EAAG,MAAM,EAAEA,EAAG,KAAK,IAAI;AAAA,UAC5B,QAAQA,EAAG;AAAA,QAAA,KAIL4Y,EAAA5Y,EAAG,KAAK,IAAI;AAAA,UAClB,IAAI,CAAC;AAAA,QAAA,GAGGoZ,EAAApZ,EAAG,EAAE,IAAIA,EAAG;AAAA,MACvB;AAEA,eAASoX,KAAO4B,GAAO;AAElB,YAAAK,IAAQD,EAAUhC,CAAG;AAChB,iBAAA6B,KAAWD,EAAM5B,CAAG;AACrB,UAAAwB,EAAAS,CAAK,EAAE,GAAGJ,CAAO,IAAID,EAAM5B,CAAG,EAAE6B,CAAO;AAAA,MAEhD;AACA,MAAA3D,EAAK,qBAAqBsD,CAAM;AAAA,IAAA;;;;;;;;;;ACjHjC,SAASU,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,cAAcC,EAAU,GAClCD,EAAA,UAAU,eAAeE,EAAW;AACzC;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/node_editor/dist/node-editor.umd.cjs b/node_editor/dist/node-editor.umd.cjs deleted file mode 100644 index 704e43c4..00000000 --- a/node_editor/dist/node-editor.umd.cjs +++ /dev/null @@ -1,21 +0,0 @@ -(function(ye,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(ye=typeof globalThis<"u"?globalThis:ye||self,a(ye["@stonecrop/node-editor"]={},ye.Vue))})(this,function(ye,a){"use strict";var Dn;const jt=typeof window<"u",zr=e=>typeof e<"u",Ar=e=>typeof e=="boolean",ve=e=>typeof e=="function",we=e=>typeof e=="number",be=e=>typeof e=="string",Vr=()=>{};jt&&(Dn=window==null?void 0:window.navigator)!=null&&Dn.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ne(e){return typeof e=="function"?e():a.unref(e)}function Lr(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const zn=e=>e();function Yr(e=zn){const t=a.ref(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:a.readonly(t),pause:n,resume:o,eventFilter:r}}function An(e,t=!1,n="Timeout"){return new Promise((o,r)=>{setTimeout(t?()=>r(n):o,e)})}function Xr(e){return e}function Zt(e,t){let n,o,r;const i=a.ref(!0),l=()=>{i.value=!0,r()};a.watch(e,l,{flush:"sync"});const s=ve(t)?t:t.get,u=ve(t)?void 0:t.set,c=a.customRef((d,f)=>(o=d,r=f,{get(){return i.value&&(n=s(),i.value=!1),o(),n},set(p){u==null||u(p)}}));return Object.isExtensible(c)&&(c.trigger=l),c}function je(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Gr(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function Kt(e,t=!1){function n(f,{flush:p="sync",deep:b=!1,timeout:v,throwOnTimeout:x}={}){let k=null;const E=[new Promise(B=>{k=a.watch(e,G=>{f(G)!==t&&(k==null||k(),B(G))},{flush:p,deep:b,immediate:!0})})];return v!=null&&E.push(An(v,x).then(()=>ne(e)).finally(()=>k==null?void 0:k())),Promise.race(E)}function o(f,p){if(!a.isRef(f))return n(G=>G===f,p);const{flush:b="sync",deep:v=!1,timeout:x,throwOnTimeout:k}=p??{};let E=null;const B=[new Promise(G=>{E=a.watch([e,f],([w,P])=>{t!==(w===P)&&(E==null||E(),G(w))},{flush:b,deep:v,immediate:!0})})];return x!=null&&B.push(An(x,k).then(()=>ne(e)).finally(()=>(E==null||E(),ne(e)))),Promise.race(B)}function r(f){return n(p=>!!p,f)}function i(f){return o(null,f)}function l(f){return o(void 0,f)}function s(f){return n(Number.isNaN,f)}function u(f,p){return n(b=>{const v=Array.from(b);return v.includes(f)||v.includes(ne(f))},p)}function c(f){return d(1,f)}function d(f=1,p){let b=-1;return n(()=>(b+=1,b>=f),p)}return Array.isArray(ne(e))?{toMatch:n,toContains:u,changed:c,changedTimes:d,get not(){return Kt(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:r,toBeNull:i,toBeNaN:s,toBeUndefined:l,changed:c,changedTimes:d,get not(){return Kt(e,!t)}}}function ue(e){return Kt(e)}var Vn=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,Ur=(e,t)=>{var n={};for(var o in e)Fr.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Vn)for(var o of Vn(e))t.indexOf(o)<0&&Hr.call(e,o)&&(n[o]=e[o]);return n};function jr(e,t,n={}){const o=n,{eventFilter:r=zn}=o,i=Ur(o,["eventFilter"]);return a.watch(e,Lr(r,t),i)}var Zr=Object.defineProperty,Kr=Object.defineProperties,Wr=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Yn=Object.prototype.propertyIsEnumerable,Xn=(e,t,n)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qr=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&Xn(e,n,t[n]);if(lt)for(var n of lt(t))Yn.call(t,n)&&Xn(e,n,t[n]);return e},Qr=(e,t)=>Kr(e,Wr(t)),Jr=(e,t)=>{var n={};for(var o in e)Ln.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&<)for(var o of lt(e))t.indexOf(o)<0&&Yn.call(e,o)&&(n[o]=e[o]);return n};function Oe(e,t,n={}){const o=n,{eventFilter:r}=o,i=Jr(o,["eventFilter"]),{eventFilter:l,pause:s,resume:u,isActive:c}=Yr(r);return{stop:jr(e,t,Qr(qr({},i),{eventFilter:l})),pause:s,resume:u,isActive:c}}function Gn(e){var t;const n=ne(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Wt=jt?window:void 0;function qt(...e){let t,n,o,r;if(be(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=Wt):[t,n,o,r]=e,!t)return Vr;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(d=>d()),i.length=0},s=(d,f,p,b)=>(d.addEventListener(f,p,b),()=>d.removeEventListener(f,p,b)),u=a.watch(()=>[Gn(t),ne(r)],([d,f])=>{l(),d&&i.push(...n.flatMap(p=>o.map(b=>s(d,p,b,f))))},{immediate:!0,flush:"post"}),c=()=>{u(),l()};return je(c),c}const ea=e=>typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0;function Fn(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=Wt,eventName:i="keydown",passive:l=!1}=o,s=ea(t);return qt(r,i,u=>{s(u)&&n(u)},l)}function ta(e,t=!1){const n=a.ref(),o=()=>n.value=!!e();return o(),Gr(o,t),n}function na(e){return JSON.parse(JSON.stringify(e))}const Hn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Un="__vueuse_ssr_handlers__";Hn[Un]=Hn[Un]||{};var jn=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,ra=Object.prototype.propertyIsEnumerable,aa=(e,t)=>{var n={};for(var o in e)oa.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&jn)for(var o of jn(e))t.indexOf(o)<0&&ra.call(e,o)&&(n[o]=e[o]);return n};function ia(e,t,n={}){const o=n,{window:r=Wt}=o,i=aa(o,["window"]);let l;const s=ta(()=>r&&"ResizeObserver"in r),u=()=>{l&&(l.disconnect(),l=void 0)},c=a.watch(()=>Gn(e),f=>{u(),s.value&&r&&f&&(l=new ResizeObserver(t),l.observe(f,i))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return je(d),{isSupported:s,stop:d}}var Zn;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Zn||(Zn={}));var la=Object.defineProperty,Kn=Object.getOwnPropertySymbols,sa=Object.prototype.hasOwnProperty,ua=Object.prototype.propertyIsEnumerable,Wn=(e,t,n)=>t in e?la(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ca=(e,t)=>{for(var n in t||(t={}))sa.call(t,n)&&Wn(e,n,t[n]);if(Kn)for(var n of Kn(t))ua.call(t,n)&&Wn(e,n,t[n]);return e};ca({linear:Xr},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function Ze(e,t,n,o={}){var r,i,l;const{clone:s=!1,passive:u=!1,eventName:c,deep:d=!1,defaultValue:f}=o,p=a.getCurrentInstance(),b=n||(p==null?void 0:p.emit)||((r=p==null?void 0:p.$emit)==null?void 0:r.bind(p))||((l=(i=p==null?void 0:p.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(p==null?void 0:p.proxy));let v=c;t||(t="modelValue"),v=c||v||`update:${t.toString()}`;const x=E=>s?ve(s)?s(E):na(E):E,k=()=>zr(e[t])?x(e[t]):f;if(u){const E=k(),B=a.ref(E);return a.watch(()=>e[t],G=>B.value=x(G)),a.watch(B,G=>{(G!==e[t]||d)&&b(v,G)},{deep:d}),B}else return a.computed({get(){return k()},set(E){b(v,E)}})}function X(e=()=>{}){const t=a.ref(new Set);e&&t.value.add(e);const n=o=>{t.value.delete(o)};return{on:o=>{t.value.has(e)&&t.value.delete(e),t.value.add(o);const r=()=>n(o);return je(r),{off:r}},off:n,trigger:o=>Promise.all(Array.from(t.value).map(r=>r(o))),fns:t}}const da=["production","prod"];function qn(e,...t){da.includes(process.env.NODE_ENV||"")||console.warn(`[Vue Flow]: ${e}`,...t)}function fa(){return{edgesChange:X(),nodesChange:X(),nodeDoubleClick:X(),nodeClick:X(),nodeMouseEnter:X(),nodeMouseMove:X(),nodeMouseLeave:X(),nodeContextMenu:X(),nodeDragStart:X(),nodeDrag:X(),nodeDragStop:X(),nodesInitialized:X(),miniMapNodeClick:X(),miniMapNodeDoubleClick:X(),miniMapNodeMouseEnter:X(),miniMapNodeMouseMove:X(),miniMapNodeMouseLeave:X(),connect:X(),connectStart:X(),connectEnd:X(),clickConnectStart:X(),clickConnectEnd:X(),paneReady:X(),move:X(),moveStart:X(),moveEnd:X(),selectionDragStart:X(),selectionDrag:X(),selectionDragStop:X(),selectionContextMenu:X(),selectionStart:X(),selectionEnd:X(),viewportChangeStart:X(),viewportChange:X(),viewportChangeEnd:X(),paneScroll:X(),paneClick:X(),paneContextMenu:X(),paneMouseEnter:X(),paneMouseMove:X(),paneMouseLeave:X(),edgeContextMenu:X(),edgeMouseEnter:X(),edgeMouseMove:X(),edgeMouseLeave:X(),edgeDoubleClick:X(),edgeClick:X(),edgeUpdateStart:X(),edgeUpdate:X(),edgeUpdateEnd:X(),updateNodeInternals:X(),error:X(e=>qn(e.message))}}function ha(e,t){a.onBeforeMount(()=>{for(const[n,o]of Object.entries(t.value)){const r=i=>{e(n,i)};o.on(r),je(()=>{o.off(r)})}})}var ie=(e=>(e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e))(ie||{});const Qn={MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_NOT_FOUND:e=>`Node not found -Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent -Node: ${e} -Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing -Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent -Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target -Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing -Edge: ${e} -Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing -Edge: ${e} -Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing -Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same -Edge: ${e} -Source: ${t} -Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing -Edge: ${e} -Source: ${t} -Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed -Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found -Edge: ${e}`};class le extends Error{constructor(t,...n){var o;super((o=Qn[t])==null?void 0:o.call(Qn,...n)),this.code=t}}const Qt=()=>typeof window<"u"?window:{chrome:!1};function Jn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Jt(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function st(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Ce(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function eo(e,t){return{x:Ce(e.x,t[0][0],t[1][0]),y:Ce(e.y,t[0][1],t[1][1])}}function to(e){const t=e.getRootNode(),n=Qt();return"elementFromPoint"in t?t:n.document}function De(e){return e&&"id"in e&&"source"in e&&"target"in e}function pa(e){return De(e)&&"sourceNode"in e&&"targetNode"in e}function ut(e){return e&&"id"in e&&!De(e)}function ze(e){return ut(e)&&"computedPosition"in e}function ga(e){return!!e.width&&!!e.height&&!!e.x&&!!e.y}function ma(e,t={}){let n=t;return ze(e)||(n={type:e.type??t.type??"default",dimensions:a.markRaw({width:0,height:0}),handleBounds:{source:[],target:[]},computedPosition:a.markRaw({z:0,...e.position}),draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,...t,data:oe(e.data)?e.data:{},events:a.markRaw(oe(e.events)?e.events:{})}),Object.assign({},n,e,{id:e.id.toString()})}function no(e,t={}){const n=oe(e.events)?e.events:t.events&&oe(t.events)?t.events:{},o=oe(e.data)?e.data:t.data&&oe(t.data)?t.data:{};return t=pa(e)?t:{...t,sourceHandle:(e.sourceHandle?e.sourceHandle.toString():void 0)||t.sourceHandle,targetHandle:(e.targetHandle?e.targetHandle.toString():void 0)||t.targetHandle,type:e.type??t.type??"default",source:e.source.toString()||t.source,target:e.target.toString()||t.target,updatable:e.updatable??t.updatable,selectable:e.selectable??t.selectable,focusable:e.focusable??t.focusable,data:o,events:a.markRaw(n),label:(e.label&&!be(e.label)?a.markRaw(e.label):e.label)||t.label,interactionWidth:e.interactionWidth||t.interactionWidth},Object.assign({},t,e,{id:e.id.toString()})}function oo({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function ya(e,t){return t.some(n=>De(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function va({x:e,y:t},{x:n,y:o,zoom:r}){return{x:e*r+n,y:t*r+o}}function ro({x:e,y:t},{x:n,y:o,zoom:r},i,[l,s]){const u={x:(e-n)/r,y:(t-o)/r};return i?{x:l*Math.round(u.x/l),y:s*Math.round(u.y/s)}:u}function wa(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function ao({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function ba({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function io(e){const t=e.reduce((n,{computedPosition:o={x:0,y:0},dimensions:r={width:0,height:0}}={})=>wa(n,ao({...o,...r})),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ba(t)}function lo(e,t,{x:n,y:o,zoom:r}={x:0,y:0,zoom:1},i=!1,l=!1){const s={x:(t.x-n)/r,y:(t.y-o)/r,width:t.width/r,height:t.height/r};return e.filter(u=>{const{computedPosition:c={x:0,y:0},dimensions:d={width:0,height:0},selectable:f}=u;if(l&&!f)return!1;const p={...c,width:d.width||0,height:d.height||0},b=Jt(s,p),v=typeof d.width>"u"||typeof d.height>"u"||d.width===0||d.height===0,x=i&&b>0,k=d.width*d.height;return v||x||b>=k})}function ct(e,t){const n=e.map(o=>be(o)?o:o.id);return t.filter(o=>n.includes(o.source)||n.includes(o.target))}function so(e,t,n,o,r,i=.1,l={x:0,y:0}){const s=t/(e.width*(1+i)),u=n/(e.height*(1+i)),c=Math.min(s,u),d=Ce(c,o,r),f=e.x+e.width/2,p=e.y+e.height/2,b=t/2-f*d+(l.x??0),v=n/2-p*d+(l.y??0);return{x:b,y:v,zoom:d}}function xa(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function uo(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:uo(n,t):!1}function Me(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`}function oe(e){return typeof a.unref(e)<"u"}function _a(e,t,n){if(!e.source||!e.target)return n(new le(ie.EDGE_INVALID,e.id)),!1;let o;return De(e)?o=e:o={...e,id:oo(e)},o=no(o),ya(o,t)?!1:o}function Ea(e,t,n,o,r,i){if(!t.source||!t.target)return i(new le(ie.EDGE_INVALID,e.id)),!1;const l=o(e.id);if(!l)return i(new le(ie.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...u}=e,c={...u,id:r?oo(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.splice(n.indexOf(l),1,c),c}function co(e,t,n,o){const r={},i=e.map(s=>{const u=ma(s,{...n(s.id),parentNode:s.parentNode});return s.parentNode&&(r[s.parentNode]=!0),u}),l=[...i,...t];return i.forEach(s=>{const u=l.find(c=>c.id===s.parentNode);s.parentNode&&!u&&o(new le(ie.NODE_MISSING_PARENT,s.id,s.parentNode)),(s.parentNode||r[s.id])&&(r[s.id]&&(s.isParent=!0),u&&(u.isParent=!0))}),i}var j=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(j||{}),en=(e=>(e.Partial="partial",e.Full="full",e))(en||{}),Be=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Be||{}),Pe=(e=>(e.Strict="strict",e.Loose="loose",e))(Pe||{}),tn=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(tn||{}),dt=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(dt||{});const fo=Symbol("vueFlow"),ho=Symbol("nodeId"),po=Symbol("nodeRef"),ka=Symbol("edgeId"),Sa=Symbol("edgeRef"),ft=Symbol("slots");function Na(e){const t=e??a.inject(ho,""),n=a.inject(po,null),{findNode:o,edges:r,emits:i}=re(),l=o(t);return l||i.error(new le(ie.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:l,parentNode:a.computed(()=>o(l.parentNode)),connectedEdges:a.computed(()=>ct([l],r.value))}}function nn(e){return"clientX"in e}function Ae(e,t){var n,o;const r=nn(e),i=r?e.clientX:(n=e.touches)==null?void 0:n[0].clientX,l=r?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:l-((t==null?void 0:t.top)??0)}}function ht(e,t,n){const o=((n==null?void 0:n.x)??0)+t.x,r=((n==null?void 0:n.y)??0)+t.y,i=(n==null?void 0:n.width)??t.width,l=(n==null?void 0:n.height)??t.height;switch(e){case j.Top:return{x:o+i/2,y:r};case j.Right:return{x:o+i,y:r+l/2};case j.Bottom:return{x:o+i/2,y:r+l};case j.Left:return{x:o,y:r+l/2}}}function go(e=[],t){return e.length?!t||e.length===1?e[0]:t&&e.find(n=>n.id===t)||null:null}function Ca(e,t,n,o,r,i){const l=ht(n,{...e.dimensions,...e.computedPosition},t),s=ht(i,{...o.dimensions,...o.computedPosition},r);return{sourceX:l.x,sourceY:l.y,targetX:s.x,targetY:s.y}}function Ma({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:r,targetHeight:i,width:l,height:s,viewport:u}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+r),y2:Math.max(e.y+o,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=ao({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:l/u.zoom,height:s/u.zoom}),f=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),p=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*p)>0}function Ba(e,t,n=!1){let o=-1;const r=e.reduce((i,l)=>{const s=we(l.zIndex);let u=s?l.zIndex:0;const c=t(l.source),d=t(l.target);return!c||!d||(n&&(u=s?l.zIndex:Math.max(c.computedPosition.z||0,d.computedPosition.z||0)),i[u]?i[u].push(l):i[u]=[l],o=u>o?u:o),i},{});return Object.entries(Object.keys(r).length?r:{0:[]}).map(([i,l])=>{const s=+i;return{edges:l,level:s,isMaxLevel:s===o}})}function on(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function mo(e,t,n,o){return(t[n]||[]).reduce((r,i)=>(`${e.id}-${i.id}-${n}`!==o&&r.push({id:i.id||null,type:n,nodeId:e.id,...ht(i.position,{...e.dimensions,...e.computedPosition},i)}),r),[])}function Pa(e,t,n){let o=null,r=1/0;return n.forEach(i=>{const l=Math.sqrt((i.x-e.x)**2+(i.y-e.y)**2);l<=t&&l{const{handleBounds:l}=i;let s=[],u=[];return l&&(s=mo(i,l,"source",`${t}-${n}-${o}`),u=mo(i,l,"target",`${t}-${n}-${o}`)),r.push(...s,...u),r},[])}function vo(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function $a(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function wo(e,t,n){return en?-Ce(Math.abs(e-n),1,50)/50:0}function bo(e,t){const n=wo(e.x,35,t.width-35)*20,o=wo(e.y,35,t.height-35)*20;return[n,o]}function pt(){return!0}function xo({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:r,onEdgeUpdate:i,onEdgeUpdateEnd:l}){const s=a.computed(()=>ne(n)==="target"),{vueFlowRef:u,connectionMode:c,connectionRadius:d,connectOnClick:f,connectionClickStartHandle:p,nodesConnectable:b,autoPanOnConnect:v,findNode:x,panBy:k,getNodes:E,startConnection:B,updateConnection:G,endConnection:w,emits:P,viewport:D,edges:g,isValidConnection:_}=re();let N=null,C=!1,$=null;function q(y){var z;const S=nn(y),R=to(y.target);if(S&&y.button===0||!S){let F=function(W){T=Ae(W,m),A=Pa(ro(T,D.value,!1,[1,1]),d.value,L),V||(K(),V=!0);const J=yo(W,A,c.value,ne(t),ne(e),s.value?"target":"source",H,R,g.value,x);if(N=J.connection,C=J.isValid,$=J.handleDomNode,G(A&&C?va({x:A.x,y:A.y},D.value):T,J.endHandle,$a(!!A,C)),!A&&!C&&!$)return on(I);N&&N.source!==N.target&&$&&(on(I),I=$,$.classList.add("connecting","vue-flow__handle-connecting"),$.classList.toggle("valid",C),$.classList.toggle("vue-flow__handle-valid",C))},U=function(W){(A||$)&&N&&C&&(i?i(W,N):P.connect(N)),P.connectEnd(W),r&&(l==null||l(W)),on(I),cancelAnimationFrame(Z),w(W),V=!1,C=!1,N=null,$=null,R.removeEventListener("mousemove",F),R.removeEventListener("mouseup",U),R.removeEventListener("touchmove",F),R.removeEventListener("touchend",U)};const O=x(ne(t));let H=o||_.value||pt;!H&&O&&(H=(s?O.isValidSourcePos:O.isValidTargetPos)||pt);let A,Z=0;const{x:Q,y:te}=Ae(y),M=R==null?void 0:R.elementFromPoint(Q,te),h=vo(ne(r),M),m=(z=u.value)==null?void 0:z.getBoundingClientRect();if(!m||!h)return;let I,T=Ae(y,m),V=!1;const L=Ia({nodes:E.value,nodeId:ne(t),handleId:ne(e),handleType:h}),K=()=>{if(!v)return;const[W,J]=bo(T,m);k({x:W,y:J}),Z=requestAnimationFrame(K)};B({nodeId:ne(t),handleId:ne(e),type:h},{x:Q-m.left,y:te-m.top},y),P.connectStart({event:y,nodeId:ne(t),handleId:ne(e),handleType:h}),R.addEventListener("mousemove",F),R.addEventListener("mouseup",U),R.addEventListener("touchmove",F),R.addEventListener("touchend",U)}}function ee(y){if(f.value)if(!p.value)P.clickConnectStart({event:y,nodeId:ne(t),handleId:ne(e)}),B({nodeId:ne(t),type:ne(n),handleId:ne(e)},void 0,y,!0);else{let z=o||_.value||pt;const S=x(ne(t));if(!z&&S&&(z=(s?S.isValidSourcePos:S.isValidTargetPos)||pt),S&&(typeof S.connectable>"u"?b.value:S.connectable)===!1)return;const R=to(y.target),{connection:F,isValid:U}=yo(y,{nodeId:ne(t),id:ne(e),type:ne(n)},c.value,p.value.nodeId,p.value.handleId||null,p.value.type,z,R,g.value,x),O=F.source===F.target;U&&!O&&P.connect(F),P.clickConnectEnd(y),w(y,!0)}}return{handlePointerDown:q,handleClick:ee}}function Ta(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}const Ra=["data-id","data-handleid","data-nodeid","data-handlepos"],Oa={name:"Handle",compatConfig:{MODE:3}},Ve=a.defineComponent({...Oa,props:{id:null,type:null,position:{default:j.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e){const t=Ta(e,["position","connectable","connectableStart","connectableEnd","id","isValidConnection"]),n=a.toRef(t,"type","source"),{connectionStartHandle:o,connectionClickStartHandle:r,connectionEndHandle:i,vueFlowRef:l,nodesConnectable:s,noDragClassName:u,noPanClassName:c}=re(),{id:d,node:f,nodeEl:p,connectedEdges:b}=Na(),v=a.ref(),x=a.computed(()=>e.id??`${d}__handle-${e.position}`),k=a.computed(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),E=a.computed(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),{handlePointerDown:B,handleClick:G}=xo({nodeId:d,handleId:x,isValidConnection:e.isValidConnection,type:n}),w=a.computed(()=>be(e.connectable)&&e.connectable==="single"?!b.value.some(N=>{const C=N[`${n.value}Handle`];return N[n.value]!==d?!1:C?C===x.value:!0}):ve(e.connectable)?e.connectable(f,b.value):oe(e.connectable)?e.connectable:s.value),P=a.computed(()=>{var N,C,$,q,ee,y;return((N=o.value)==null?void 0:N.nodeId)===d&&((C=o.value)==null?void 0:C.handleId)===x.value&&(($=o.value)==null?void 0:$.type)===n.value||((q=i.value)==null?void 0:q.nodeId)===d&&((ee=i.value)==null?void 0:ee.handleId)===x.value&&((y=i.value)==null?void 0:y.type)===n.value}),D=a.computed(()=>{var N,C,$;return((N=r.value)==null?void 0:N.nodeId)===d&&((C=r.value)==null?void 0:C.handleId)===x.value&&(($=r.value)==null?void 0:$.type)===n.value});ue(()=>f.initialized).toBe(!0,{flush:"post"}).then(()=>{var N;const C=(N=f.handleBounds[n.value])==null?void 0:N.find(R=>R.id===x.value);if(!l.value||C)return;const $=l.value.querySelector(".vue-flow__transformationpane");if(!p||!v.value||!$||!x.value)return;const q=p.value.getBoundingClientRect(),ee=v.value.getBoundingClientRect(),y=window.getComputedStyle($),{m22:z}=new window.DOMMatrixReadOnly(y.transform),S={id:x.value,position:e.position,x:(ee.left-q.left)/z,y:(ee.top-q.top)/z,...st(v.value)};f.handleBounds[n.value]=[...f.handleBounds[n.value]??[],S]});function g(N){const C=nn(N);w.value&&k.value&&(C&&N.button===0||!C)&&B(N)}function _(N){!d||!r.value&&!k.value||w.value&&G(N)}return(N,C)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"handle",ref:v,"data-id":`${a.unref(d)}-${a.unref(x)}-${a.unref(n)}`,"data-handleid":a.unref(x),"data-nodeid":a.unref(d),"data-handlepos":e.position,class:a.normalizeClass(["vue-flow__handle",[`vue-flow__handle-${e.position}`,`vue-flow__handle-${a.unref(x)}`,a.unref(u),a.unref(c),a.unref(n),{connectable:a.unref(w),connecting:a.unref(D),connectablestart:a.unref(k),connectableend:a.unref(E),connectionindicator:a.unref(w)&&(a.unref(k)&&!a.unref(P)||a.unref(E)&&a.unref(P))}]]),onMousedown:g,onTouchstartPassive:g,onClick:_},[a.renderSlot(N.$slots,"default",{id:e.id})],42,Ra))}}),gt=function({sourcePosition:e=j.Bottom,targetPosition:t=j.Top,label:n,connectable:o=!0,isValidTargetPos:r,isValidSourcePos:i}){return[a.h(Ve,{type:"target",position:t,connectable:o,isValidConnection:r}),typeof n!="string"&&n?a.h(n):a.h("div",{innerHTML:n}),a.h(Ve,{type:"source",position:e,connectable:o,isValidConnection:i})]};gt.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable"],gt.inheritAttrs=!1,gt.compatConfig={MODE:3};const Da=gt,mt=function({sourcePosition:e=j.Bottom,label:t,connectable:n=!0,isValidSourcePos:o}){return[typeof t!="string"&&t?a.h(t):a.h("div",{innerHTML:t}),a.h(Ve,{type:"source",position:e,connectable:n,isValidConnection:o})]};mt.props=["sourcePosition","label","isValidSourcePos","connectable"],mt.inheritAttrs=!1,mt.compatConfig={MODE:3};const za=mt,yt=function({targetPosition:e=j.Top,label:t,connectable:n=!0,isValidTargetPos:o}){return[a.h(Ve,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof t!="string"&&t?a.h(t):a.h("div",{innerHTML:t})]};yt.props=["targetPosition","label","isValidTargetPos","connectable"],yt.inheritAttrs=!1,yt.compatConfig={MODE:3};const Aa=yt;function _o(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Va(e,t,n,o,r){return e.filter(i=>(i.selected||i.id===r)&&(!i.parentNode||!uo(i,o))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var l,s;return a.markRaw({id:i.id,position:i.position||{x:0,y:0},distance:{x:n.x-((l=i.computedPosition)==null?void 0:l.x)||0,y:n.y-((s=i.computedPosition)==null?void 0:s.y)||0},from:i.computedPosition,extent:i.extent,parentNode:i.parentNode,dimensions:i.dimensions})})}function rn({id:e,dragItems:t,findNode:n}){const o=t.reduce((r,i)=>{const l=n(i.id);return l&&r.push(l),r},[]);return[e?o.find(r=>r.id===e):o[0],o]}function Eo(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function La(e,t,n){const[o,r,i,l]=typeof e!="string"?Eo(e.padding):[0,0,0,0];return n&&we(n.computedPosition.x)&&we(n.computedPosition.y)&&we(n.dimensions.width)&&we(n.dimensions.height)?[[n.computedPosition.x+l,n.computedPosition.y+o],[n.computedPosition.x+(n.dimensions.width-t.dimensions.width)-r,n.computedPosition.y+(n.dimensions.height-t.dimensions.height)-i]]:!1}function Ya(e,t,n,o){let r=e.extent||n;if(r==="parent"||!Array.isArray(r)&&(r==null?void 0:r.range)==="parent")if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const i=La(r,e,o);i&&(r=i)}else t(new le(ie.NODE_EXTENT_INVALID,e.id)),r=n;else if(Array.isArray(r)){const i=(o==null?void 0:o.computedPosition.x)||0,l=(o==null?void 0:o.computedPosition.y)||0;r=[[r[0][0]+i,r[0][1]+l],[r[1][0]+i,r[1][1]+l]]}else if(r!=null&&r.range&&Array.isArray(r.range)){const[i,l,s,u]=Eo(r.padding),c=(o==null?void 0:o.computedPosition.x)||0,d=(o==null?void 0:o.computedPosition.y)||0;r=[[r.range[0][0]+c+u,r.range[0][1]+d+i],[r.range[1][0]+c-l,r.range[1][1]+d-s]]}return r}function an(e,t,n,o,r){const i=Ya(e,n,o,r),l=eo(t,i);return{position:{x:l.x-((r==null?void 0:r.computedPosition.x)||0),y:l.y-((r==null?void 0:r.computedPosition.y)||0)},computedPosition:l}}function ko(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:r,snapToGrid:i,nodesDraggable:l,emits:s}=re();return(u,c=!1)=>{const d=i.value?r.value[0]:5,f=i.value?r.value[1]:5,p=c?4:1,b=u.x*d*p,v=u.y*f*p,x=e.value.filter(k=>k.draggable||l&&typeof k.draggable>"u").map(k=>{const E={x:k.computedPosition.x+b,y:k.computedPosition.y+v},{computedPosition:B}=an(k,E,s.error,t.value,k.parentNode?o(k.parentNode):void 0);return{id:k.id,position:B,from:k.position,distance:{x:u.x,y:u.y},dimensions:k.dimensions}});n(x,!0,!1)}}function Xa(){return{doubleClick:X(),click:X(),mouseEnter:X(),mouseMove:X(),mouseLeave:X(),contextMenu:X(),dragStart:X(),drag:X(),dragStop:X()}}function Ga(e,t){const n=Xa();return n.doubleClick.on(o=>{var r,i;t.nodeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.nodeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.nodeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.nodeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.nodeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.nodeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.dragStart.on(o=>{var r,i;t.nodeDragStart(o),(i=(r=e.events)==null?void 0:r.dragStart)==null||i.call(r,o)}),n.drag.on(o=>{var r,i;t.nodeDrag(o),(i=(r=e.events)==null?void 0:r.drag)==null||i.call(r,o)}),n.dragStop.on(o=>{var r,i;t.nodeDragStop(o),(i=(r=e.events)==null?void 0:r.dragStop)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function Fa(){const{viewport:e,snapGrid:t,snapToGrid:n}=re();return({sourceEvent:o})=>{const r=o.touches?o.touches[0].clientX:o.clientX,i=o.touches?o.touches[0].clientY:o.clientY,l={x:(r-e.value.x)/e.value.zoom,y:(i-e.value.y)/e.value.zoom};return{xSnapped:n.value?t.value[0]*Math.round(l.x/t.value[0]):l.x,ySnapped:n.value?t.value[1]*Math.round(l.y/t.value[1]):l.y,...l}}}function So(e,t,n){const o=t.querySelectorAll(`.vue-flow__handle${e}`);if(!o||!o.length)return;const r=Array.from(o),i=t.getBoundingClientRect();return r.map(l=>{const s=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(s.left-i.left)/n,y:(s.top-i.top)/n,...st(l)}})}function ln(e,t,n,o,r,i=!1,l){r.value=!1,e.selected?(i||e.selected&&t)&&(o([e]),a.nextTick(l.blur)):n([e])}var Ha={value:()=>{}};function vt(){for(var e=0,t=arguments.length,n={},o;e=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}wt.prototype=vt.prototype={constructor:wt,on:function(e,t){var n=this._,o=Ua(e+"",n),r,i=-1,l=o.length;if(arguments.length<2){for(;++i0)for(var n=new Array(r),o=0,r,i;o=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Co.hasOwnProperty(t)?{space:Co[t],local:e}:e}function Za(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===sn&&t.documentElement.namespaceURI===sn?t.createElement(e):t.createElementNS(n,e)}}function Ka(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Mo(e){var t=bt(e);return(t.local?Ka:Za)(t)}function Wa(){}function un(e){return e==null?Wa:function(){return this.querySelector(e)}}function qa(e){typeof e!="function"&&(e=un(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r=G&&(G=B+1);!(P=k[G])&&++G=0;)(l=o[r])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function _i(e){e||(e=Ei);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;it?1:e>=t?0:NaN}function ki(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Si(){return Array.from(this)}function Ni(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?zi:typeof t=="function"?Vi:Ai)(e,t,n??"")):Le(this.node(),e)}function Le(e,t){return e.style.getPropertyValue(t)||To(e).getComputedStyle(e,null).getPropertyValue(t)}function Yi(e){return function(){delete this[e]}}function Xi(e,t){return function(){this[e]=t}}function Gi(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Fi(e,t){return arguments.length>1?this.each((t==null?Yi:typeof t=="function"?Gi:Xi)(e,t)):this.node()[e]}function Ro(e){return e.trim().split(/^|\s+/)}function cn(e){return e.classList||new Oo(e)}function Oo(e){this._node=e,this._names=Ro(e.getAttribute("class")||"")}Oo.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Do(e,t){for(var n=cn(e),o=-1,r=t.length;++o=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function vl(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n()=>e;function fn(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:l,y:s,dx:u,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}fn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ml(e){return!e.ctrlKey&&!e.button}function Bl(){return this.parentNode}function Pl(e,t){return t??{x:e.x,y:e.y}}function Il(){return navigator.maxTouchPoints||"ontouchstart"in this}function $l(){var e=Ml,t=Bl,n=Pl,o=Il,r={},i=vt("start","drag","end"),l=0,s,u,c,d,f=0;function p(w){w.on("mousedown.drag",b).filter(o).on("touchstart.drag",k).on("touchmove.drag",E,Cl).on("touchend.drag touchcancel.drag",B).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(w,P){if(!(d||!e.call(this,w,P))){var D=G(this,t.call(this,w,P),w,P,"mouse");D&&(de(w.view).on("mousemove.drag",v,We).on("mouseup.drag",x,We),Lo(w.view),dn(w),c=!1,s=w.clientX,u=w.clientY,D("start",w))}}function v(w){if(Ye(w),!c){var P=w.clientX-s,D=w.clientY-u;c=P*P+D*D>f}r.mouse("drag",w)}function x(w){de(w.view).on("mousemove.drag mouseup.drag",null),Yo(w.view,c),Ye(w),r.mouse("end",w)}function k(w,P){if(e.call(this,w,P)){var D=w.changedTouches,g=t.call(this,w,P),_=D.length,N,C;for(N=0;N<_;++N)(C=G(this,g,w,P,D[N].identifier,D[N]))&&(dn(w),C("start",w,D[N]))}}function E(w){var P=w.changedTouches,D=P.length,g,_;for(g=0;g{z.value={x:Z,y:Q};let te=!1;if(q.value=q.value.map(M=>{const h={x:Z-M.distance.x,y:Q-M.distance.y};o.value&&(h.x=r.value[0]*Math.round(h.x/r.value[0]),h.y=r.value[1]*Math.round(h.y/r.value[1]));const{computedPosition:m}=an(M,h,G.value.error,s.value,M.parentNode?p.value(M.parentNode):void 0);return te=te||M.position.x!==m.x||M.position.y!==m.y,M.position=m,M}),!!te&&(B.value(q.value,!0,!0),$.value=!0,R.value)){const[M,h]=rn({id:N,dragItems:q.value,findNode:p.value});P({event:R.value,node:M,nodes:h})}},A=()=>{if(!y.value)return;const[Z,Q]=bo(S.value,y.value);if(Z!==0||Q!==0){const te={x:(z.value.x??0)-Z/u.value.zoom,y:(z.value.y??0)-Q/u.value.zoom};f.value({x:Z,y:Q})&&H(te)}F.value=requestAnimationFrame(A)};return a.watch([()=>ne(_),g],([Z,Q])=>{if(Q){const te=de(Q);if(Z)te.on(".drag",null);else{const M=p.value(N);ee.value=$l().on("start",h=>{var m;!x.value&&!b.value&&M&&(M.selected||k.value()),M&&ne(C)&&x.value&&ln(M,b.value,E.value,k.value,v,!1,Q);const I=O(h);if(z.value=I,q.value=Va(l.value,d.value,I,p.value,N),q.value.length){const[T,V]=rn({id:N,dragItems:q.value,findNode:p.value});w({event:h.sourceEvent,node:T,nodes:V})}y.value=((m=n.value)==null?void 0:m.getBoundingClientRect())||null,S.value=Ae(h.sourceEvent,y.value)}).on("drag",h=>{const m=O(h);!U.value&&c.value&&(U.value=!0,A()),(z.value.x!==m.xSnapped||z.value.y!==m.ySnapped)&&q.value.length&&(R.value=h.sourceEvent,S.value=Ae(h.sourceEvent,y.value),H(m))}).on("end",h=>{if($.value=!1,U.value=!1,cancelAnimationFrame(F.value),q.value.length){B.value(q.value,!1,!1);const[m,I]=rn({id:N,dragItems:q.value,findNode:p.value});D({event:h.sourceEvent,node:m,nodes:I})}}).filter(h=>{const m=h.target;return!h.button&&(!i.value||!_o(m,`.${i.value}`,Q)&&(!(M!=null&&M.dragHandle)||_o(m,M.dragHandle,Q)))}),te.call(ee.value)}}}),$}const Go="vue-flow__node-desc",Fo="vue-flow__edge-desc",Tl="vue-flow__aria-live",Ho=["Enter"," ","Escape"],Xe={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function hn(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,r=ve(o.hasAttribute)?o.hasAttribute("contenteditable"):!1,i=ve(o.closest)?o.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(o==null?void 0:o.nodeName)||r||!!i}function Rl(e){return e.ctrlKey||e.metaKey||e.shiftKey}function Ol(e,t){return n=>e.some(o=>{const r=o.split("+").map(i=>i.trim().toLowerCase());return r.length===1?n.key===o:(t.add(n.key.toLowerCase()),r.every(i=>t.has(i)))})}const qe=(e,t)=>{const n=Qt(),o=a.ref(ne(e)===!0),r=a.ref(!1),i=a.ref(new Set);return a.watch(o,()=>{t==null||t(o.value)}),a.watch(()=>ne(e),l=>{if(n&&typeof n.addEventListener<"u"&&qt(n,"blur",()=>{o.value=!1}),Ar(l)){o.value=l;return}Array.isArray(l)&&(l=Ol(l,i.value)),l&&(Fn(l,s=>{r.value=Rl(s),!(!r.value&&hn(s))&&(s.preventDefault(),o.value=!0)},{eventName:"keydown"}),Fn(l,s=>{if(o.value){if(!r.value&&hn(s))return;r.value=!1,i.value.clear(),o.value=!1}},{eventName:"keyup"}))},{immediate:!0}),o},Dl=a.defineComponent({name:"Node",compatConfig:{MODE:3},props:["name","type","id","draggable","selectable","focusable","connectable","node","resizeObserver"],setup(e){a.provide(ho,e.id);const t=re(),n=a.toRef(t,"id"),o=a.toRef(t,"edges"),r=a.toRef(t,"noPanClassName"),i=a.toRef(t,"selectNodesOnDrag"),l=a.toRef(t,"nodesSelectionActive"),s=a.toRef(t,"multiSelectionActive"),u=a.toRef(t,"emits"),c=a.toRef(t,"findNode"),d=a.toRef(t,"removeSelectedNodes"),f=a.toRef(t,"addSelectedNodes"),p=a.toRef(t,"updateNodeDimensions"),b=a.toRef(t,"onUpdateNodeInternals"),v=a.toRef(t,"getIntersectingNodes"),x=a.toRef(t,"getNodeTypes"),k=a.toRef(t,"nodeExtent"),E=a.toRef(t,"elevateNodesOnSelect"),B=a.toRef(t,"disableKeyboardA11y"),G=a.toRef(t,"ariaLiveMessage"),w=a.toRef(t,"snapToGrid"),P=a.toRef(t,"snapGrid"),D=ko(),g=Ze(e,"node"),_=a.computed(()=>c.value(g.value.parentNode)),N=a.computed(()=>ct([g.value],o.value)),C=a.ref();a.provide(po,C);const{emit:$,on:q}=Ga(g.value,u.value),ee=Xo({id:e.id,el:C,disabled:()=>!e.draggable,selectable:()=>e.selectable,onStart(M){$.dragStart({...M,intersections:v.value(g.value)})},onDrag(M){$.drag({...M,intersections:v.value(g.value)})},onStop(M){$.dragStop({...M,intersections:v.value(g.value)})}}),y=a.computed(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),z=a.computed(()=>{const M=(g.value.style instanceof Function?g.value.style(g.value):g.value.style)||{},h=g.value.width instanceof Function?g.value.width(g.value):g.value.width,m=g.value.height instanceof Function?g.value.height(g.value):g.value.height;return h&&(M.width=typeof h=="string"?h:`${h}px`),m&&(M.height=typeof m=="string"?m:`${m}px`),M}),S=()=>Number(g.value.zIndex??z.value.zIndex??0);return b.value(M=>{M.includes(e.id)&&F()}),a.onMounted(()=>{e.resizeObserver.observe(C.value)}),a.onBeforeUnmount(()=>{e.resizeObserver.unobserve(C.value)}),a.watch([()=>g.value.type,()=>g.value.sourcePosition,()=>g.value.targetPosition],()=>{p.value([{id:e.id,nodeElement:C.value,forceUpdate:!0}])},{flush:"pre"}),a.watch([()=>g.value.position.x,()=>g.value.position.y,()=>{var M;return(M=_.value)==null?void 0:M.computedPosition.x},()=>{var M;return(M=_.value)==null?void 0:M.computedPosition.y},()=>{var M;return(M=_.value)==null?void 0:M.computedPosition.z},()=>S(),()=>g.value.selected,()=>g.value.dimensions.height,()=>g.value.dimensions.width,()=>{var M;return(M=_.value)==null?void 0:M.dimensions.height},()=>{var M;return(M=_.value)==null?void 0:M.dimensions.width}],([M,h,m,I,T,V])=>{const L={x:M,y:h,z:V+(E.value&&g.value.selected?1e3:0)};we(m)&&we(I)?g.value.computedPosition=xa({x:m,y:I,z:T},L):g.value.computedPosition=L},{flush:"pre",immediate:!0}),a.watch([()=>g.value.extent,()=>k.value],([M,h],[m,I])=>{(M!==m||h!==I)&&R()}),g.value.extent==="parent"||typeof g.value.extent=="object"&&"range"in g.value.extent&&g.value.extent.range==="parent"?ue(()=>g.value.initialized).toBe(!0).then(R):R(),()=>a.h("div",{ref:C,"data-id":g.value.id,class:["vue-flow__node",`vue-flow__node-${e.type===!1?"default":e.name}`,{[r.value]:e.draggable,dragging:ee==null?void 0:ee.value,selected:g.value.selected,selectable:e.selectable},y.value],style:{zIndex:g.value.computedPosition.z??S(),transform:`translate(${g.value.computedPosition.x}px,${g.value.computedPosition.y}px)`,pointerEvents:e.selectable||e.draggable?"all":"none",visibility:g.value.initialized?"visible":"hidden",...z.value},tabIndex:e.focusable?0:void 0,role:e.focusable?"button":void 0,"aria-describedby":B.value?void 0:`${Go}-${n.value}`,"aria-label":g.value.ariaLabel,onMouseenter:U,onMousemove:O,onMouseleave:H,onContextmenu:A,onClick:Q,onDblclick:Z,onKeydown:te},[a.h(e.type===!1?x.value.default:e.type,{id:g.value.id,type:g.value.type,data:g.value.data,events:{...g.value.events,...q},selected:!!g.value.selected,resizing:!!g.value.resizing,dragging:ee.value,connectable:e.connectable,position:g.value.position,dimensions:g.value.dimensions,isValidTargetPos:g.value.isValidTargetPos,isValidSourcePos:g.value.isValidSourcePos,parent:g.value.parentNode,zIndex:g.value.computedPosition.z,targetPosition:g.value.targetPosition,sourcePosition:g.value.sourcePosition,label:g.value.label,dragHandle:g.value.dragHandle,onUpdateNodeInternals:F})]);function R(){const M=g.value.computedPosition;w.value&&(M.x=P.value[0]*Math.round(M.x/P.value[0]),M.y=P.value[1]*Math.round(M.y/P.value[1]));const{computedPosition:h,position:m}=an(g.value,M,u.value.error,k.value,_.value);(g.value.computedPosition.x!==h.x||g.value.computedPosition.y!==h.y)&&(g.value.computedPosition={...g.value.computedPosition,...h}),(g.value.position.x!==m.x||g.value.position.y!==m.y)&&(g.value.position=m)}function F(){C.value&&p.value([{id:e.id,nodeElement:C.value,forceUpdate:!0}])}function U(M){ee!=null&&ee.value||$.mouseEnter({event:M,node:g.value,connectedEdges:N.value})}function O(M){ee!=null&&ee.value||$.mouseMove({event:M,node:g.value,connectedEdges:N.value})}function H(M){ee!=null&&ee.value||$.mouseLeave({event:M,node:g.value,connectedEdges:N.value})}function A(M){return $.contextMenu({event:M,node:g.value,connectedEdges:N.value})}function Z(M){return $.doubleClick({event:M,node:g.value,connectedEdges:N.value})}function Q(M){e.selectable&&(!i.value||!e.draggable)&&ln(g.value,s.value,f.value,d.value,l,!1,C.value),$.click({event:M,node:g.value,connectedEdges:N.value})}function te(M){var h;if(!hn(M))if(Ho.includes(M.key)&&e.selectable){const m=M.key==="Escape";m&&((h=C.value)==null||h.blur()),ln(g.value,s.value,f.value,d.value,l,m,C.value)}else!B.value&&e.draggable&&g.value.selected&&Xe[M.key]&&(G.value=`Moved selected node ${M.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~g.value.position.x}, y: ${~~g.value.position.y}`,D({x:Xe[M.key].x,y:Xe[M.key].y},M.shiftKey))}}}),zl=Dl,Al=["transform"],Vl=["width","height","x","y","rx","ry"],Ll=["y"],Yl={name:"EdgeText",compatConfig:{MODE:3}},Xl=a.defineComponent({...Yl,props:{x:null,y:null,label:null,labelStyle:{default:{}},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:{}},labelBgPadding:{default:[2,4]},labelBgBorderRadius:{default:2}},setup(e){let t=a.ref({x:0,y:0,width:0,height:0});const n=a.ref(null),o=a.computed(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);a.onMounted(r),a.watch([()=>e.x,()=>e.y,n,()=>e.label],r);function r(){if(!n.value)return;const i=n.value.getBBox();(i.width!==t.value.width||i.height!==t.value.height)&&(t.value=i)}return(i,l)=>(a.openBlock(),a.createElementBlock("g",{transform:a.unref(o),class:"vue-flow__edge-textwrapper"},[e.labelShowBg?(a.openBlock(),a.createElementBlock("rect",{key:0,class:"vue-flow__edge-textbg",width:`${a.unref(t).width+2*e.labelBgPadding[0]}px`,height:`${a.unref(t).height+2*e.labelBgPadding[1]}px`,x:-e.labelBgPadding[0],y:-e.labelBgPadding[1],style:a.normalizeStyle(e.labelBgStyle),rx:e.labelBgBorderRadius,ry:e.labelBgBorderRadius},null,12,Vl)):a.createCommentVNode("",!0),a.createElementVNode("text",a.mergeProps(i.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:a.unref(t).height/2,dy:"0.3em",style:e.labelStyle}),[a.renderSlot(i.$slots,"default",{},()=>[a.unref(be)(e.label)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(e.label),1)],64)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.label),{key:0}))])],16,Ll)],8,Al))}}),Et=function({path:e,label:t,labelX:n,labelY:o,labelBgBorderRadius:r,labelBgPadding:i,labelBgStyle:l,labelShowBg:s=!0,labelStyle:u,markerStart:c,markerEnd:d,interactionWidth:f=20},{attrs:p}){return[a.h("path",{style:p.style,class:["vue-flow__edge-path",p.class].join(" "),d:e,"marker-end":d,"marker-start":c}),f?a.h("path",{d:e,fill:"none","stroke-opacity":0,"stroke-width":f}):null,t&&we(n)&&we(o)?a.h(Xl,{x:n,y:o,label:t,labelStyle:u,labelShowBg:s,labelBgStyle:l,labelBgPadding:i,labelBgBorderRadius:r}):null]};Et.props=["path","labelX","labelY","label","labelBgBorderRadius","labelBgPadding","labelBgStyle","labelShowBg","labelStyle","markerStart","markerEnd","interactionWidth"],Et.inheritAttrs=!1,Et.compatConfig={MODE:3};const kt=Et;function Uo({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n=0?.5*e:t*25*Math.sqrt(-e)}function Zo({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){let l,s;switch(e){case j.Left:l=t-St(t-o,i),s=n;break;case j.Right:l=t+St(o-t,i),s=n;break;case j.Top:l=t,s=n-St(n-r,i);break;case j.Bottom:l=t,s=n+St(r-n,i);break}return[l,s]}function Nt({sourceX:e,sourceY:t,sourcePosition:n=j.Bottom,targetX:o,targetY:r,targetPosition:i=j.Top,curvature:l=.25}){const[s,u]=Zo({pos:n,x1:e,y1:t,x2:o,y2:r,c:l}),[c,d]=Zo({pos:i,x1:o,y1:r,x2:e,y2:t,c:l}),[f,p,b,v]=jo({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${e},${t} C${s},${u} ${c},${d} ${o},${r}`,f,p,b,v]}const Ct=function({sourcePosition:e=j.Bottom,targetPosition:t=j.Top,...n},{attrs:o}){const[r,i,l]=Nt({sourcePosition:e,targetPosition:t,...n});return a.h(kt,{path:r,labelX:i,labelY:l,...n,...o})};Ct.props=["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],Ct.inheritAttrs=!1,Ct.compatConfig={MODE:3};const Gl=Ct;function Ko({pos:e,x1:t,y1:n,x2:o,y2:r}){let i,l;switch(e){case j.Left:case j.Right:i=.5*(t+o),l=n;break;case j.Top:case j.Bottom:i=t,l=.5*(n+r);break}return[i,l]}function Wo({sourceX:e,sourceY:t,sourcePosition:n=j.Bottom,targetX:o,targetY:r,targetPosition:i=j.Top}){const[l,s]=Ko({pos:n,x1:e,y1:t,x2:o,y2:r}),[u,c]=Ko({pos:i,x1:o,y1:r,x2:e,y2:t}),[d,f,p,b]=jo({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:l,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${s} ${u},${c} ${o},${r}`,d,f,p,b]}const Mt=function({sourcePosition:e=j.Bottom,targetPosition:t=j.Top,...n},{attrs:o}){const[r,i,l]=Wo({sourcePosition:e,targetPosition:t,...n});return a.h(kt,{path:r,labelX:i,labelY:l,...n,...o})};Mt.props=["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],Mt.inheritAttrs=!1,Mt.compatConfig={MODE:3};const Fl=Mt,qo={[j.Left]:{x:-1,y:0},[j.Right]:{x:1,y:0},[j.Top]:{x:0,y:-1},[j.Bottom]:{x:0,y:1}};function Hl({source:e,sourcePosition:t=j.Bottom,target:n}){return t===j.Left||t===j.Right?e.xc[D],N=u[D]{let B;return E>0&&E{var r,i;t.edgeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.edgeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.edgeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.edgeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.edgeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.edgeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.updateStart.on(o=>{var r,i;t.edgeUpdateStart(o),(i=(r=e.events)==null?void 0:r.updateStart)==null||i.call(r,o)}),n.update.on(o=>{var r,i;t.edgeUpdate(o),(i=(r=e.events)==null?void 0:r.update)==null||i.call(r,o)}),n.updateEnd.on(o=>{var r,i;t.edgeUpdateEnd(o),(i=(r=e.events)==null?void 0:r.updateEnd)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}const es=a.defineComponent({name:"Edge",compatConfig:{MODE:3},props:["name","type","id","updatable","selectable","focusable","edge"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:r,emits:i,nodesSelectionActive:l,noPanClassName:s,getEdgeTypes:u,removeSelectedEdges:c,findEdge:d,findNode:f,isValidConnection:p}=re(),b=Jl(e.edge,i),v=Ze(e,"edge");let x=a.ref(!1),k=a.ref(!1);const E=a.ref(""),B=a.ref(null),G=a.ref("source"),w=a.ref();a.provide(ka,e.id),a.provide(Sa,w);const P=a.computed(()=>v.value.class instanceof Function?v.value.class(v.value):v.value.class),D=a.computed(()=>v.value.style instanceof Function?v.value.style(v.value):v.value.style),{handlePointerDown:g}=xo({nodeId:E,handleId:B,type:G,isValidConnection:p.value,edgeUpdaterType:G,onEdgeUpdate:C,onEdgeUpdateEnd:$});return()=>{const A=f(v.value.source),Z=f(v.value.target);if(!A||!Z||!v.value)return null;let Q;o.value===Pe.Strict?Q=A.handleBounds.source:Q=[...A.handleBounds.source||[],...A.handleBounds.target||[]];const te=go(Q,v.value.sourceHandle);let M;o.value===Pe.Strict?M=Z.handleBounds.target:M=[...Z.handleBounds.target||[],...Z.handleBounds.source||[]];const h=go(M,v.value.targetHandle),m=te?te.position:j.Bottom,I=h?h.position:j.Top,{sourceX:T,sourceY:V,targetY:L,targetX:K}=Ca(A,te,m,Z,h,I);return v.value.sourceX=T,v.value.sourceY=V,v.value.targetX=K,v.value.targetY=L,a.h("g",{ref:w,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${e.type===!1?"default":e.name}`,s.value,P.value,{updating:x.value,selected:v.value.selected,animated:v.value.animated,inactive:!e.selectable}],onClick:ee,onContextmenu:y,onDblclick:z,onMouseenter:S,onMousemove:R,onMouseleave:F,onKeyDown:e.focusable?H:void 0,tabIndex:e.focusable?0:void 0,"aria-label":v.value.ariaLabel===null?void 0:v.value.ariaLabel||`Edge from ${v.value.source} to ${v.value.target}`,"aria-describedby":e.focusable?`${Fo}-${t}`:void 0,role:e.focusable?"button":void 0},[k.value?null:a.h(e.type===!1?u.value.default:e.type,{id:e.id,sourceNode:A,targetNode:Z,source:v.value.source,target:v.value.target,type:v.value.type,updatable:e.updatable,selected:v.value.selected,animated:v.value.animated,label:v.value.label,labelStyle:v.value.labelStyle,labelShowBg:v.value.labelShowBg,labelBgStyle:v.value.labelBgStyle,labelBgPadding:v.value.labelBgPadding,labelBgBorderRadius:v.value.labelBgBorderRadius,data:v.value.data,events:{...v.value.events,...b.on},style:D.value,markerStart:`url(#${Me(v.value.markerStart,t)})`,markerEnd:`url(#${Me(v.value.markerEnd,t)})`,sourcePosition:m,targetPosition:I,sourceX:T,sourceY:V,targetX:K,targetY:L,sourceHandleId:v.value.sourceHandle,targetHandleId:v.value.targetHandle,interactionWidth:v.value.interactionWidth}),[e.updatable==="source"||e.updatable===!0?[a.h("g",{onMousedown:U,onMouseenter:_,onMouseout:N},a.h(tr,{position:m,centerX:T,centerY:V,radius:r.value,type:"source","data-type":"source"}))]:null,e.updatable==="target"||e.updatable===!0?[a.h("g",{onMousedown:O,onMouseenter:_,onMouseout:N},a.h(tr,{position:I,centerX:K,centerY:L,radius:r.value,type:"target","data-type":"target"}))]:null]])};function _(){x.value=!0}function N(){x.value=!1}function C(A,Z){b.emit.update({event:A,edge:v.value,connection:Z})}function $(A){b.emit.updateEnd({event:A,edge:v.value}),k.value=!1}function q(A,Z){A.button===0&&(k.value=!0,E.value=Z?v.value.target:v.value.source,B.value=(Z?v.value.targetHandle:v.value.sourceHandle)??"",G.value=Z?"target":"source",b.emit.updateStart({event:A,edge:v.value}),g(A))}function ee(A){const Z={event:A,edge:v.value};e.selectable&&(l.value=!1,n([v.value])),b.emit.click(Z)}function y(A){b.emit.contextMenu({event:A,edge:v.value})}function z(A){b.emit.doubleClick({event:A,edge:v.value})}function S(A){b.emit.mouseEnter({event:A,edge:v.value})}function R(A){b.emit.mouseMove({event:A,edge:v.value})}function F(A){b.emit.mouseLeave({event:A,edge:v.value})}function U(A){q(A,!0)}function O(A){q(A,!1)}function H(A){var Z;Ho.includes(A.key)&&e.selectable&&(A.key==="Escape"?((Z=w.value)==null||Z.blur(),c([d(e.id)])):n([d(e.id)]))}}}),ts=es,ns={height:"0",width:"0"},os={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},rs=a.defineComponent({...os,setup(e){const{viewportRef:t}=re(),n=a.computed(()=>{var o;return(o=t.value)==null?void 0:o.getElementsByClassName("vue-flow__edge-labels")[0]});return(o,r)=>(a.openBlock(),a.createElementBlock("svg",null,[(a.openBlock(),a.createElementBlock("foreignObject",ns,[(a.openBlock(),a.createBlock(a.Teleport,{to:a.unref(n),disabled:!a.unref(n)},[a.renderSlot(o.$slots,"default")],8,["to","disabled"]))]))]))}}),as={class:"vue-flow__connection"},is=["d","marker-end","marker-start"],ls={name:"ConnectionLine",compatConfig:{MODE:3}},ss=a.defineComponent({...ls,props:{sourceNode:null},setup(e){var t;const n=re(),o=a.toRef(n,"connectionMode"),r=a.toRef(n,"connectionStartHandle"),i=a.toRef(n,"connectionEndHandle"),l=a.toRef(n,"connectionPosition"),s=a.toRef(n,"connectionLineType"),u=a.toRef(n,"connectionLineStyle"),c=a.toRef(n,"connectionLineOptions"),d=a.toRef(n,"connectionStatus"),f=a.toRef(n,"viewport"),p=a.toRef(n,"findNode"),b={[j.Left]:j.Right,[j.Right]:j.Left,[j.Top]:j.Bottom,[j.Bottom]:j.Top},v=(t=a.inject(ft))==null?void 0:t["connection-line"],x=a.computed(()=>r.value.handleId),k=a.computed(()=>r.value.type),E=a.computed(()=>{var C;return((C=i.value)==null?void 0:C.handleId)&&p.value(i.value.nodeId)||null}),B=a.computed(()=>{var C,$;return(o.value===Pe.Strict?(C=e.sourceNode.handleBounds[k.value])==null?void 0:C.find(q=>q.id===x.value):[...e.sourceNode.handleBounds.source||[],...e.sourceNode.handleBounds.target||[]].find(q=>q.id===x.value))||(($=e.sourceNode.handleBounds[k.value??"source"])==null?void 0:$[0])}),G=a.computed(()=>{var C,$,q;return E.value&&((C=i.value)==null?void 0:C.handleId)&&((o.value===Pe.Strict?($=E.value.handleBounds[k.value==="source"?"target":"source"])==null?void 0:$.find(ee=>{var y;return ee.id===((y=i.value)==null?void 0:y.handleId)}):[...E.value.handleBounds.source||[],...E.value.handleBounds.target||[]].find(ee=>{var y;return ee.id===((y=i.value)==null?void 0:y.handleId)}))||((q=E.value.handleBounds[k.value??"target"])==null?void 0:q[0]))||null}),w=a.computed(()=>{var C;return(C=B.value)==null?void 0:C.position}),P=a.computed(()=>B.value?ht(w.value||j.Top,{...e.sourceNode.dimensions,...e.sourceNode.computedPosition},B.value):{x:e.sourceNode.dimensions.width/2,y:e.sourceNode.dimensions.height/2}),D=a.computed(()=>w.value?b[w.value]:void 0),g=a.computed(()=>(l.value.x-f.value.x)/f.value.zoom),_=a.computed(()=>(l.value.y-f.value.y)/f.value.zoom),N=a.computed(()=>{let C;const $={sourceX:P.value.x,sourceY:P.value.y,sourcePosition:w.value,targetX:g.value,targetY:_.value,targetPosition:D.value};switch(s.value??c.value.type){case Be.Bezier:[C]=Nt($);break;case Be.Step:[C]=pn({...$,borderRadius:0});break;case Be.SmoothStep:[C]=pn($);break;case Be.SimpleBezier:[C]=Wo($);break;case Be.Straight:[C]=er($);break;default:[C]=Nt($);break}return C});return(C,$)=>{var q;return a.openBlock(),a.createElementBlock("g",as,[a.unref(v)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(v)),a.normalizeProps(a.mergeProps({key:0},{sourceX:a.unref(P).x,sourceY:a.unref(P).y,sourcePosition:(q=a.unref(B))==null?void 0:q.position,targetX:a.unref(g),targetY:a.unref(_),targetPosition:a.unref(D),sourceNode:e.sourceNode,sourceHandle:a.unref(B),targetNode:a.unref(E),targetHandle:a.unref(G),markerEnd:`url(#${a.unref(Me)(a.unref(c).markerEnd)})`,markerStart:`url(#${a.unref(Me)(a.unref(c).markerStart)})`,connectionStatus:a.unref(d)})),null,16)):(a.openBlock(),a.createElementBlock("path",{key:1,d:a.unref(N),class:a.normalizeClass(["vue-flow__connection-path",[a.unref(c).class,a.unref(d)]]),style:a.normalizeStyle(a.unref(u)||a.unref(c).style||{}),"marker-end":`url(#${a.unref(Me)(a.unref(c).markerEnd)})`,"marker-start":`url(#${a.unref(Me)(a.unref(c).markerStart)})`},null,14,is))])}}}),us=["tabIndex"],cs={name:"NodesSelection",compatConfig:{MODE:3}},ds=a.defineComponent({...cs,setup(e){const t=re(),n=a.toRef(t,"emits"),o=a.toRef(t,"viewport"),r=a.toRef(t,"getSelectedNodes"),i=a.toRef(t,"noPanClassName"),l=a.toRef(t,"disableKeyboardA11y"),s=a.toRef(t,"userSelectionActive"),u=ko(),c=a.ref(),d=Xo({el:c,onStart(x){n.value.selectionDragStart(x)},onDrag(x){n.value.selectionDrag(x)},onStop(x){n.value.selectionDragStop(x)}});a.onMounted(()=>{var x;l.value||(x=c.value)==null||x.focus({preventScroll:!0})});const f=a.computed(()=>io(r.value)),p=a.computed(()=>({width:`${f.value.width}px`,height:`${f.value.height}px`,top:`${f.value.y}px`,left:`${f.value.x}px`}));function b(x){n.value.selectionContextMenu({event:x,nodes:r.value})}function v(x){l.value||Xe[x.key]&&u({x:Xe[x.key].x,y:Xe[x.key].y},x.shiftKey)}return(x,k)=>!a.unref(s)&&a.unref(f).width&&a.unref(f).height?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["vue-flow__nodesselection vue-flow__container",a.unref(i)]),style:a.normalizeStyle({transform:`translate(${a.unref(o).x}px,${a.unref(o).y}px) scale(${a.unref(o).zoom})`})},[a.createElementVNode("div",{ref_key:"el",ref:c,class:a.normalizeClass([{dragging:a.unref(d)},"vue-flow__nodesselection-rect"]),style:a.normalizeStyle(a.unref(p)),tabIndex:a.unref(l)?void 0:-1,onContextmenu:b,onKeydown:v},null,46,us)],6)):a.createCommentVNode("",!0)}}),fs={name:"UserSelection",compatConfig:{MODE:3}},hs=a.defineComponent({...fs,setup(e){const{userSelectionRect:t}=re();return(n,o)=>{var r,i,l,s;return a.openBlock(),a.createElementBlock("div",{class:"vue-flow__selection vue-flow__container",style:a.normalizeStyle({width:`${(r=a.unref(t))==null?void 0:r.width}px`,height:`${(i=a.unref(t))==null?void 0:i.height}px`,transform:`translate(${(l=a.unref(t))==null?void 0:l.x}px, ${(s=a.unref(t))==null?void 0:s.y}px)`})},null,4)}}}),ps={input:za,default:Da,output:Aa},gs={default:Gl,straight:Kl,step:Zl,smoothstep:Jo,simplebezier:Fl};function ms(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:en.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:dt.Free,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Be.Bezier,style:{}},connectionMode:Pe.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:"Meta",zoomActivationKeyCode:"Meta",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:fa(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,disableKeyboardA11y:!1,ariaLiveMessage:"",__experimentalFeatures:{nestedFlow:!1}}}function nr(e){const t=ms();return e&&Object.keys(e).forEach(n=>{const o=e[n];oe(o)&&(t[n]=o)}),t}function ys(e,t,n){const o=a.computed(()=>x=>e.nodes&&!t.value.length?e.nodes.find(k=>k.id===x):e.nodes[t.value.indexOf(x)]),r=a.computed(()=>x=>e.edges&&!n.value.length?e.edges.find(k=>k.id===x):e.edges[n.value.indexOf(x)]),i=a.computed(()=>{var x;const k={...gs,...e.edgeTypes},E=Object.keys(k);return(x=e.edges)==null||x.forEach(B=>B.type&&!E.includes(B.type)&&(k[B.type]=B.type)),k}),l=a.computed(()=>{var x;const k={...ps,...e.nodeTypes},E=Object.keys(k);return(x=e.nodes)==null||x.forEach(B=>B.type&&!E.includes(B.type)&&(k[B.type]=B.type)),k}),s=a.computed(()=>{const x=e.nodes.filter(k=>!k.hidden);return e.onlyRenderVisibleElements?x&&lo(x,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):x??[]}),u=(x,k,E)=>{if(k=k??o.value(x.source),E=E??o.value(x.target),!k||!E){e.hooks.error.trigger(new le(ie.EDGE_ORPHANED,x.id));return}return!x.hidden&&!E.hidden&&!k.hidden},c=a.computed(()=>e.onlyRenderVisibleElements?e.edges.filter(x=>{const k=o.value(x.source),E=o.value(x.target);return u(x,k,E)&&Ma({sourcePos:k.computedPosition||{x:0,y:0},targetPos:E.computedPosition||{x:0,y:0},sourceWidth:k.dimensions.width,sourceHeight:k.dimensions.height,targetWidth:E.dimensions.width,targetHeight:E.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})}):e.edges.filter(x=>u(x))),d=a.computed(()=>[...s.value,...c.value]),f=a.computed(()=>e.nodes.filter(x=>x.selected)),p=a.computed(()=>e.edges.filter(x=>x.selected)),b=a.computed(()=>[...f.value??[],...p.value??[]]),v=a.computed(()=>s.value.filter(x=>x.initialized&&x.handleBounds!==void 0));return{getNode:o,getEdge:r,getElements:d,getEdgeTypes:i,getNodeTypes:l,getEdges:c,getNodes:s,getSelectedElements:b,getSelectedNodes:f,getSelectedEdges:p,getNodesInitialized:v}}function mn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function or(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Qe(){}var Je=.7,$t=1/Je,Ge="\\s*([+-]?\\d+)\\s*",et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vs=/^#([0-9a-f]{3,8})$/,ws=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),bs=new RegExp(`^rgb\\(${ge},${ge},${ge}\\)$`),xs=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${et}\\)$`),_s=new RegExp(`^rgba\\(${ge},${ge},${ge},${et}\\)$`),Es=new RegExp(`^hsl\\(${et},${ge},${ge}\\)$`),ks=new RegExp(`^hsla\\(${et},${ge},${ge},${et}\\)$`),rr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};mn(Qe,tt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ar,formatHex:ar,formatHex8:Ss,formatHsl:Ns,formatRgb:ir,toString:ir});function ar(){return this.rgb().formatHex()}function Ss(){return this.rgb().formatHex8()}function Ns(){return dr(this).formatHsl()}function ir(){return this.rgb().formatRgb()}function tt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=vs.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?lr(t):n===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ws.exec(e))?new se(t[1],t[2],t[3],1):(t=bs.exec(e))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xs.exec(e))?Tt(t[1],t[2],t[3],t[4]):(t=_s.exec(e))?Tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Es.exec(e))?cr(t[1],t[2]/100,t[3]/100,1):(t=ks.exec(e))?cr(t[1],t[2]/100,t[3]/100,t[4]):rr.hasOwnProperty(e)?lr(rr[e]):e==="transparent"?new se(NaN,NaN,NaN,0):null}function lr(e){return new se(e>>16&255,e>>8&255,e&255,1)}function Tt(e,t,n,o){return o<=0&&(e=t=n=NaN),new se(e,t,n,o)}function Cs(e){return e instanceof Qe||(e=tt(e)),e?(e=e.rgb(),new se(e.r,e.g,e.b,e.opacity)):new se}function yn(e,t,n,o){return arguments.length===1?Cs(e):new se(e,t,n,o??1)}function se(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}mn(se,yn,or(Qe,{brighter(e){return e=e==null?$t:Math.pow($t,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Je:Math.pow(Je,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new se(Ie(this.r),Ie(this.g),Ie(this.b),Rt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sr,formatHex:sr,formatHex8:Ms,formatRgb:ur,toString:ur}));function sr(){return`#${$e(this.r)}${$e(this.g)}${$e(this.b)}`}function Ms(){return`#${$e(this.r)}${$e(this.g)}${$e(this.b)}${$e((isNaN(this.opacity)?1:this.opacity)*255)}`}function ur(){const e=Rt(this.opacity);return`${e===1?"rgb(":"rgba("}${Ie(this.r)}, ${Ie(this.g)}, ${Ie(this.b)}${e===1?")":`, ${e})`}`}function Rt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ie(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $e(e){return e=Ie(e),(e<16?"0":"")+e.toString(16)}function cr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,n,o)}function dr(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof Qe||(e=tt(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),l=NaN,s=i-r,u=(i+r)/2;return s?(t===i?l=(n-o)/s+(n0&&u<1?0:l,new fe(l,s,u,e.opacity)}function Bs(e,t,n,o){return arguments.length===1?dr(e):new fe(e,t,n,o??1)}function fe(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}mn(fe,Bs,or(Qe,{brighter(e){return e=e==null?$t:Math.pow($t,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Je:Math.pow(Je,e),new fe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new se(vn(e>=240?e-240:e+120,r,o),vn(e,r,o),vn(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new fe(fr(this.h),Ot(this.s),Ot(this.l),Rt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rt(this.opacity);return`${e===1?"hsl(":"hsla("}${fr(this.h)}, ${Ot(this.s)*100}%, ${Ot(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fr(e){return e=(e||0)%360,e<0?e+360:e}function Ot(e){return Math.max(0,Math.min(1,e||0))}function vn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const hr=e=>()=>e;function Ps(e,t){return function(n){return e+n*t}}function Is(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function $s(e){return(e=+e)==1?pr:function(t,n){return n-t?Is(t,n,e):hr(isNaN(t)?n:t)}}function pr(e,t){var n=t-e;return n?Ps(e,n):hr(isNaN(e)?t:e)}const gr=function e(t){var n=$s(t);function o(r,i){var l=n((r=yn(r)).r,(i=yn(i)).r),s=n(r.g,i.g),u=n(r.b,i.b),c=pr(r.opacity,i.opacity);return function(d){return r.r=l(d),r.g=s(d),r.b=u(d),r.opacity=c(d),r+""}}return o.gamma=e,o}(1);function Ne(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bn=new RegExp(wn.source,"g");function Ts(e){return function(){return e}}function Rs(e){return function(t){return e(t)+""}}function Os(e,t){var n=wn.lastIndex=bn.lastIndex=0,o,r,i,l=-1,s=[],u=[];for(e=e+"",t=t+"";(o=wn.exec(e))&&(r=bn.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),s[l]?s[l]+=i:s[++l]=i),(o=o[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,u.push({i:l,x:Ne(o,r)})),n=bn.lastIndex;return n180?d+=360:d-c>180&&(c+=360),p.push({i:f.push(r(f)+"rotate(",null,o)-2,x:Ne(c,d)})):d&&f.push(r(f)+"rotate("+d+o)}function s(c,d,f,p){c!==d?p.push({i:f.push(r(f)+"skewX(",null,o)-2,x:Ne(c,d)}):d&&f.push(r(f)+"skewX("+d+o)}function u(c,d,f,p,b,v){if(c!==f||d!==p){var x=b.push(r(b)+"scale(",null,",",null,")");v.push({i:x-4,x:Ne(c,f)},{i:x-2,x:Ne(d,p)})}else(f!==1||p!==1)&&b.push(r(b)+"scale("+f+","+p+")")}return function(c,d){var f=[],p=[];return c=e(c),d=e(d),i(c.translateX,c.translateY,d.translateX,d.translateY,f,p),l(c.rotate,d.rotate,f,p),s(c.skewX,d.skewX,f,p),u(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,p),c=d=null,function(b){for(var v=-1,x=p.length,k;++v=0&&e._call.call(void 0,t),e=e._next;--Fe}function kr(){Te=(At=at.now())+Vt,Fe=nt=0;try{Hs()}finally{Fe=0,js(),Te=0}}function Us(){var e=at.now(),t=e-At;t>xr&&(Vt-=t,At=e)}function js(){for(var e,t=zt,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:zt=n);rt=e,_n(o)}function _n(e){if(!Fe){nt&&(nt=clearTimeout(nt));var t=e-Te;t>24?(e<1/0&&(nt=setTimeout(kr,e-at.now()-Vt)),ot&&(ot=clearInterval(ot))):(ot||(At=at.now(),ot=setInterval(Us,xr)),Fe=1,_r(kr))}}function Sr(e,t,n){var o=new Lt;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Zs=vt("start","end","cancel","interrupt"),Ks=[],Nr=0,Cr=1,En=2,Yt=3,Mr=4,kn=5,Xt=6;function Gt(e,t,n,o,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;Ws(e,n,{name:t,index:o,group:r,on:Zs,tween:Ks,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Nr})}function Sn(e,t){var n=he(e,t);if(n.state>Nr)throw new Error("too late; already scheduled");return n}function me(e,t){var n=he(e,t);if(n.state>Yt)throw new Error("too late; already running");return n}function he(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ws(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=Er(i,0,n.time);function i(c){n.state=Cr,n.timer.restart(l,n.delay,n.time),n.delay<=c&&l(c-n.delay)}function l(c){var d,f,p,b;if(n.state!==Cr)return u();for(d in o)if(b=o[d],b.name===n.name){if(b.state===Yt)return Sr(l);b.state===Mr?(b.state=Xt,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete o[d]):+dEn&&o.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function Nu(e,t,n){var o,r,i=Su(t)?Sn:me;return function(){var l=i(this,e),s=l.on;s!==o&&(r=(o=s).copy()).on(t,n),l.on=r}}function Cu(e,t){var n=this._id;return arguments.length<2?he(this.node(),n).on.on(e):this.each(Nu(n,e,t))}function Mu(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Bu(){return this.on("end.remove",Mu(this._id))}function Pu(e){var t=this._name,n=this._id;typeof e!="function"&&(e=un(e));for(var o=this._groups,r=o.length,i=new Array(r),l=0;l()=>e;function tc(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Ee(e,t,n){this.k=e,this.x=t,this.y=n}Ee.prototype={constructor:Ee,scale:function(e){return e===1?this:new Ee(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ee(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var He=new Ee(1,0,0);Ee.prototype;function Cn(e){e.stopImmediatePropagation()}function it(e){e.preventDefault(),e.stopImmediatePropagation()}function nc(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function oc(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function $r(){return this.__zoom||He}function rc(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ac(){return navigator.maxTouchPoints||"ontouchstart"in this}function ic(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function lc(){var e=nc,t=oc,n=ic,o=rc,r=ac,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Gs,c=vt("start","zoom","end"),d,f,p,b=500,v=150,x=0,k=10;function E(y){y.property("__zoom",$r).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",C).filter(r).on("touchstart.zoom",$).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",ee).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(y,z,S,R){var F=y.selection?y.selection():y;F.property("__zoom",$r),y!==F?P(y,z,S,R):F.interrupt().each(function(){D(this,arguments).event(R).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},E.scaleBy=function(y,z,S,R){E.scaleTo(y,function(){var F=this.__zoom.k,U=typeof z=="function"?z.apply(this,arguments):z;return F*U},S,R)},E.scaleTo=function(y,z,S,R){E.transform(y,function(){var F=t.apply(this,arguments),U=this.__zoom,O=S==null?w(F):typeof S=="function"?S.apply(this,arguments):S,H=U.invert(O),A=typeof z=="function"?z.apply(this,arguments):z;return n(G(B(U,A),O,H),F,l)},S,R)},E.translateBy=function(y,z,S,R){E.transform(y,function(){return n(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof S=="function"?S.apply(this,arguments):S),t.apply(this,arguments),l)},null,R)},E.translateTo=function(y,z,S,R,F){E.transform(y,function(){var U=t.apply(this,arguments),O=this.__zoom,H=R==null?w(U):typeof R=="function"?R.apply(this,arguments):R;return n(He.translate(H[0],H[1]).scale(O.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof S=="function"?-S.apply(this,arguments):-S),U,l)},R,F)};function B(y,z){return z=Math.max(i[0],Math.min(i[1],z)),z===y.k?y:new Ee(z,y.x,y.y)}function G(y,z,S){var R=z[0]-S[0]*y.k,F=z[1]-S[1]*y.k;return R===y.x&&F===y.y?y:new Ee(y.k,R,F)}function w(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function P(y,z,S,R){y.on("start.zoom",function(){D(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(R).end()}).tween("zoom",function(){var F=this,U=arguments,O=D(F,U).event(R),H=t.apply(F,U),A=S==null?w(H):typeof S=="function"?S.apply(F,U):S,Z=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),Q=F.__zoom,te=typeof z=="function"?z.apply(F,U):z,M=u(Q.invert(A).concat(Z/Q.k),te.invert(A).concat(Z/te.k));return function(h){if(h===1)h=te;else{var m=M(h),I=Z/m[2];h=new Ee(I,A[0]-m[0]*I,A[1]-m[1]*I)}O.zoom(null,h)}})}function D(y,z,S){return!S&&y.__zooming||new g(y,z)}function g(y,z){this.that=y,this.args=z,this.active=0,this.sourceEvent=null,this.extent=t.apply(y,z),this.taps=0}g.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,z){return this.mouse&&y!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&y!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(y){var z=de(this.that).datum();c.call(y,this.that,new tc(y,{sourceEvent:this.sourceEvent,target:E,type:y,transform:this.that.__zoom,dispatch:c}),z)}};function _(y,...z){if(!e.apply(this,arguments))return;var S=D(this,z).event(y),R=this.__zoom,F=Math.max(i[0],Math.min(i[1],R.k*Math.pow(2,o.apply(this,arguments)))),U=pe(y);if(S.wheel)(S.mouse[0][0]!==U[0]||S.mouse[0][1]!==U[1])&&(S.mouse[1]=R.invert(S.mouse[0]=U)),clearTimeout(S.wheel);else{if(R.k===F)return;S.mouse=[U,R.invert(U)],Ft(this),S.start()}it(y),S.wheel=setTimeout(O,v),S.zoom("mouse",n(G(B(R,F),S.mouse[0],S.mouse[1]),S.extent,l));function O(){S.wheel=null,S.end()}}function N(y,...z){if(p||!e.apply(this,arguments))return;var S=y.currentTarget,R=D(this,z,!0).event(y),F=de(y.view).on("mousemove.zoom",A,!0).on("mouseup.zoom",Z,!0),U=pe(y,S),O=y.clientX,H=y.clientY;Lo(y.view),Cn(y),R.mouse=[U,this.__zoom.invert(U)],Ft(this),R.start();function A(Q){if(it(Q),!R.moved){var te=Q.clientX-O,M=Q.clientY-H;R.moved=te*te+M*M>x}R.event(Q).zoom("mouse",n(G(R.that.__zoom,R.mouse[0]=pe(Q,S),R.mouse[1]),R.extent,l))}function Z(Q){F.on("mousemove.zoom mouseup.zoom",null),Yo(Q.view,R.moved),it(Q),R.event(Q).end()}}function C(y,...z){if(e.apply(this,arguments)){var S=this.__zoom,R=pe(y.changedTouches?y.changedTouches[0]:y,this),F=S.invert(R),U=S.k*(y.shiftKey?.5:2),O=n(G(B(S,U),R,F),t.apply(this,z),l);it(y),s>0?de(this).transition().duration(s).call(P,O,R,y):de(this).call(E.transform,O,R,y)}}function $(y,...z){if(e.apply(this,arguments)){var S=y.touches,R=S.length,F=D(this,z,y.changedTouches.length===R).event(y),U,O,H,A;for(Cn(y),O=0;Oe,setTransform:Re,getTransform:()=>({x:0,y:0,zoom:1}),initialized:!1},uc=(e,t)=>{const n=e,o=a.toRef(n,"nodes"),r=a.toRef(n,"d3Zoom"),i=a.toRef(n,"d3Selection"),l=a.toRef(n,"dimensions"),s=a.toRef(n,"translateExtent"),u=a.toRef(n,"minZoom"),c=a.toRef(n,"maxZoom"),d=a.toRef(n,"viewport"),f=a.toRef(n,"snapToGrid"),p=a.toRef(n,"snapGrid"),b=a.toRef(n,"hooks"),v=t,x=a.toRef(v,"getNodes"),k=a.ref(!1);b.value.nodesInitialized.on(()=>{k.value=!0});const E=a.computed(()=>!!r.value&&!!i.value&&!!l.value.width&&!!l.value.height&&k.value);function B(w,P){i.value&&r.value&&r.value.scaleBy(Bn(i.value,P),w)}function G(w,P,D,g){const{x:_,y:N}=eo({x:-w,y:-P},s.value),C=He.translate(-_,-N).scale(D);i.value&&r.value&&r.value.transform(Bn(i.value,g),C)}return a.computed(()=>E.value?{initialized:!0,zoomIn:w=>{B(1.2,w==null?void 0:w.duration)},zoomOut:w=>{B(1/1.2,w==null?void 0:w.duration)},zoomTo:(w,P)=>{i.value&&r.value&&r.value.scaleTo(Bn(i.value,P==null?void 0:P.duration),w)},setTransform:(w,P)=>{G(w.x,w.y,w.zoom,P==null?void 0:P.duration)},getTransform:()=>({x:d.value.x,y:d.value.y,zoom:d.value.zoom}),fitView:(w={padding:Mn,includeHiddenNodes:!1,duration:0})=>{if(!o.value.length)return;const P=(w.includeHiddenNodes?o.value:x.value).filter(C=>{var $;const q=C.initialized&&C.dimensions.width&&C.dimensions.height;let ee=!0;return($=w.nodes)!=null&&$.length&&(ee=w.nodes.includes(C.id)),q&&ee}),D=io(P),{x:g,y:_,zoom:N}=so(D,l.value.width,l.value.height,w.minZoom??u.value,w.maxZoom??c.value,w.padding??Mn,w.offset);G(g,_,N,w==null?void 0:w.duration)},setCenter:(w,P,D)=>{const g=typeof(D==null?void 0:D.zoom)<"u"?D.zoom:c.value,_=l.value.width/2-w*g,N=l.value.height/2-P*g;G(_,N,g,D==null?void 0:D.duration)},fitBounds:(w,P={padding:Mn})=>{const{x:D,y:g,zoom:_}=so(w,l.value.width,l.value.height,u.value,c.value,P.padding);G(D,g,_,P==null?void 0:P.duration)},project:w=>ro(w,d.value,f.value,p.value)}:sc)};function Bn(e,t=0){return e.transition().duration(t)}function Pn(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let r={};if(ve(t.style)?r={...t.style(t)}:t.style&&(r={...t.style}),r.width=r.width??`${t.dimensions.width}px`,r.height=r.height??`${t.dimensions.height}px`,n>0)if(be(r.width)){const i=Number(r.width.replace("px",""));r.width=`${i+n}px`}else r.width+=n;if(o>0)if(be(r.height)){const i=Number(r.height.replace("px",""));r.height=`${i+o}px`}else r.height+=o;if(e.position.x<0){const i=Math.abs(e.position.x);if(t.position.x=t.position.x-i,be(r.width)){const l=Number(r.width.replace("px",""));r.width=`${l+i}px`}else r.width+=i;e.position.x=0}if(e.position.y<0){const i=Math.abs(e.position.y);if(t.position.y=t.position.y-i,be(r.height)){const l=Number(r.height.replace("px",""));r.height=`${l+i}px`}else r.height+=i;e.position.y=0}t.dimensions.width=Number(r.width.toString().replace("px","")),t.dimensions.height=Number(r.height.toString().replace("px","")),ve(t.style)?t.style=i=>{const l=t.style;return{...l(i),...r}}:t.style={...t.style,...r}}}}function Tr(e,t){e.filter(o=>o.type==="add"||o.type==="remove").forEach(o=>{if(o.type==="add")t.findIndex(r=>r.id===o.item.id)===-1&&t.push(o.item);else if(o.type==="remove"){const r=t.findIndex(i=>i.id===o.id);r!==-1&&t.splice(r,1)}});const n=t.map(o=>o.id);return t.forEach(o=>{var r,i;const l=e.filter(s=>s.id===o.id);for(const s of l)switch(s.type){case"select":o.selected=s.selected;break;case"position":if(ze(o)&&(typeof s.position<"u"&&(o.position=s.position),typeof s.dragging<"u"&&(o.dragging=s.dragging),o.expandParent&&o.parentNode)){const u=t[n.indexOf(o.parentNode)];u&&ze(u)&&Pn(o,u)}break;case"dimensions":if(ze(o)){if(typeof s.dimensions<"u"&&(o.dimensions=s.dimensions),typeof s.updateStyle<"u"&&(o.style={...o.style||{},width:`${(r=s.dimensions)==null?void 0:r.width}px`,height:`${(i=s.dimensions)==null?void 0:i.height}px`}),typeof s.resizing<"u"&&(o.resizing=s.resizing),o.expandParent&&o.parentNode){const u=t[n.indexOf(o.parentNode)];u&&ze(u)&&(u.initialized?Pn(o,u):a.nextTick(()=>{Pn(o,u)}))}o.initialized||(o.initialized=!0)}break}}),t}function ke(e,t){return{id:e,type:"select",selected:t}}function Rr(e){return{item:e,type:"add"}}function In(e){return{id:e,type:"remove"}}function $n(e,t){return e.reduce((n,o)=>{let r=t.includes(o.id);oe(o.selectable)&&!o.selectable&&(r=!1);const i=ze(o)?"changedNodes":"changedEdges";return!o.selected&&r?n[i].push(ke(o.id,!0)):o.selected&&!r&&n[i].push(ke(o.id,!1)),n},{changedNodes:[],changedEdges:[]})}function cc(e,t,n,o){let r=!1;const i=uc(e,t),l=h=>{const m=h??n.value??[];e.hooks.updateNodeInternals.trigger(m)},s=h=>{if(h)return e.nodes&&!n.value.length?e.nodes.find(m=>m.id===h):e.nodes[n.value.indexOf(h)]},u=h=>{if(h)return e.edges&&!o.value.length?e.edges.find(m=>m.id===h):e.edges[o.value.indexOf(h)]},c=(h,m,I)=>{const T=[];h.forEach(V=>{var L,K;const W={id:V.id,type:"position",dragging:I,from:V.from};if(m&&(W.position=V.position,V.parentNode)){const J=s(V.parentNode);W.position={x:W.position.x-(((L=J==null?void 0:J.computedPosition)==null?void 0:L.x)??0),y:W.position.y-(((K=J==null?void 0:J.computedPosition)==null?void 0:K.y)??0)}}T.push(W)}),T!=null&&T.length&&e.hooks.nodesChange.trigger(T)},d=h=>{var m;if(!e.vueFlowRef)return;const I=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!I)return;let T;if((m=e.__experimentalFeatures)!=null&&m.nestedFlow){let L=[I],K=I,W;for(;!W&&K;)K=K.parentElement,W=K==null?void 0:K.classList.contains("vue-flow__transformationpane"),W&&(L=[K,...L]);L.forEach(J=>{const Y=window.getComputedStyle(J),{m22:ae}=new window.DOMMatrixReadOnly(Y.transform);T?T*=ae:T=ae})}else{const L=window.getComputedStyle(I),{m22:K}=new window.DOMMatrixReadOnly(L.transform);T=K}const V=h.reduce((L,K)=>{const W=s(K.id);if(W){const J=st(K.nodeElement);J.width&&J.height&&(W.dimensions.width!==J.width||W.dimensions.height!==J.height||K.forceUpdate)&&(W.handleBounds.source=So(".source",K.nodeElement,T),W.handleBounds.target=So(".target",K.nodeElement,T),W.dimensions=J,W.initialized=!0,L.push({id:W.id,type:"dimensions",dimensions:J}))}return L},[]);e.fitViewOnInit&&!r&&(ue(()=>i.value.initialized).toBe(!0).then(()=>{i.value.fitView()}),r=!0),V.length&&e.hooks.nodesChange.trigger(V)},f=(h,m)=>{const I=h.map(L=>L.id);let T,V=[];if(e.multiSelectionActive)T=I.map(L=>ke(L,m));else{const L=$n([...e.nodes,...e.edges],I);T=L.changedNodes,V=L.changedEdges}T.length&&e.hooks.nodesChange.trigger(T),V.length&&e.hooks.edgesChange.trigger(V)},p=(h,m)=>{const I=h.map(L=>L.id);let T=[],V;if(e.multiSelectionActive)V=I.map(L=>ke(L,m));else{const L=$n([...e.nodes,...e.edges],I);T=L.changedNodes,V=L.changedEdges}T.length&&e.hooks.nodesChange.trigger(T),V.length&&e.hooks.edgesChange.trigger(V)},b=(h,m)=>{const I=h.filter(ut).map(K=>K.id),T=h.filter(De).map(K=>K.id);let{changedNodes:V,changedEdges:L}=$n([...e.nodes,...e.edges],[...I,...T]);e.multiSelectionActive&&(V=I.map(K=>ke(K,m)),L=T.map(K=>ke(K,m))),V.length&&e.hooks.nodesChange.trigger(V),L.length&&e.hooks.edgesChange.trigger(L)},v=h=>{f(h,!0)},x=h=>{p(h,!0)},k=h=>{b(h,!0)},E=h=>{if(!h.length)return f(h,!1);const m=h.map(I=>I.id).map(I=>ke(I,!1));m.length&&e.hooks.nodesChange.trigger(m)},B=h=>{if(!h.length)return p(h,!1);const m=h.map(I=>I.id).map(I=>ke(I,!1));m.length&&e.hooks.edgesChange.trigger(m)},G=h=>{if(!h||!h.length)return b([],!1);const{changedNodes:m,changedEdges:I}=h.reduce((T,V)=>{const L=ke(V.id,!1);return ut(V)?T.changedNodes.push(L):T.changedEdges.push(L),T},{changedNodes:[],changedEdges:[]});m.length&&e.hooks.nodesChange.trigger(m),I.length&&e.hooks.edgesChange.trigger(I)},w=h=>{var m;(m=e.d3Zoom)==null||m.scaleExtent([h,e.maxZoom]),e.minZoom=h},P=h=>{var m;(m=e.d3Zoom)==null||m.scaleExtent([e.minZoom,h]),e.maxZoom=h},D=h=>{var m;(m=e.d3Zoom)==null||m.translateExtent(h),e.translateExtent=h},g=h=>{e.nodeExtent=h,l(n.value)},_=h=>{e.nodesDraggable=h,e.nodesConnectable=h,e.elementsSelectable=h},N=h=>{const m=h instanceof Function?h(e.nodes):h;!e.initialized&&!m.length||(e.nodes=co(m,e.nodes,s,e.hooks.error.trigger))},C=h=>{const m=h instanceof Function?h(e.edges):h;if(!e.initialized&&!m.length)return;const I=e.isValidConnection?m.filter(T=>e.isValidConnection(T,{edges:e.edges,sourceNode:s(T.source),targetNode:s(T.target)})):m;e.edges=I.reduce((T,V)=>{const L=s(V.source),K=s(V.target),W=!L||typeof L>"u",J=!K||typeof K>"u";if(W&&J?e.hooks.error.trigger(new le(ie.EDGE_SOURCE_TARGET_MISSING,V.id,V.source,V.target)):(W&&e.hooks.error.trigger(new le(ie.EDGE_SOURCE_MISSING,V.id,V.source)),J&&e.hooks.error.trigger(new le(ie.EDGE_TARGET_MISSING,V.id,V.target))),W||J)return T;const Y=u(V.id);return T.push({...no(V,Object.assign({},Y,e.defaultEdgeOptions)),sourceNode:L,targetNode:K}),T},[])},$=h=>{const m=h instanceof Function?h([...e.nodes,...e.edges]):h;!e.initialized&&!m.length||(N(m.filter(ut)),C(m.filter(De)))},q=h=>{const m=h instanceof Function?h(e.nodes):h,I=co(m,e.nodes,s,e.hooks.error.trigger).map(Rr);I.length&&e.hooks.nodesChange.trigger(I)},ee=h=>{const m=h instanceof Function?h(e.edges):h,I=(e.isValidConnection?m.filter(T=>e.isValidConnection(T,{edges:e.edges,sourceNode:s(T.source),targetNode:s(T.target)})):m).reduce((T,V)=>{const L=_a({...V,...e.defaultEdgeOptions},e.edges,e.hooks.error.trigger);if(L){const K=s(L.source),W=s(L.target),J=!K||typeof K>"u",Y=!W||typeof W>"u";if(J&&Y?e.hooks.error.trigger(new le(ie.EDGE_SOURCE_TARGET_MISSING,L.id,L.source,L.target)):(J&&e.hooks.error.trigger(new le(ie.EDGE_SOURCE_MISSING,L.id,L.source)),Y&&e.hooks.error.trigger(new le(ie.EDGE_TARGET_MISSING,L.id,L.target))),J||Y)return T;T.push(Rr({...L,sourceNode:K,targetNode:W}))}return T},[]);I.length&&e.hooks.edgesChange.trigger(I)},y=(h,m=!0)=>{const I=h instanceof Function?h(e.nodes):h,T=[],V=[];I.forEach(L=>{const K=typeof L=="string"?s(L):L;if(!(oe(K.deletable)&&!K.deletable)&&(T.push(In(K.id)),m)){const W=ct([K],e.edges).filter(J=>oe(J.deletable)?J.deletable:!0);V.push(...W.map(J=>In(J.id)))}}),V.length&&e.hooks.edgesChange.trigger(V),T.length&&e.hooks.nodesChange.trigger(T)},z=h=>{const m=h instanceof Function?h(e.edges):h,I=[];m.forEach(T=>{const V=typeof T=="string"?u(T):T;oe(V.deletable)&&!V.deletable||I.push(In(typeof T=="string"?T:T.id))}),e.hooks.edgesChange.trigger(I)},S=(h,m,I=!0)=>Ea(h,m,e.edges,u,I,e.hooks.error.trigger),R=h=>Tr(h,e.nodes),F=h=>Tr(h,e.edges),U=(h,m,I,T=!1)=>{T?e.connectionClickStartHandle=h:e.connectionStartHandle=h,e.connectionEndHandle=null,e.connectionStatus=null,m&&(e.connectionPosition=m)},O=(h,m=null,I=null)=>{e.connectionStartHandle&&(e.connectionPosition=h,e.connectionEndHandle=m,e.connectionStatus=I)},H=(h,m)=>{e.connectionPosition={x:NaN,y:NaN},e.connectionStatus=null,m?e.connectionClickStartHandle=null:e.connectionStartHandle=null},A=h=>{const m=ga(h),I=m?null:s(h.id);return!m&&!I?[null,null,m]:[m?h:Jn(I),I,m]},Z=(h,m=!0,I)=>{const[T,V,L]=A(h);return T?(I||e.nodes).filter(K=>{if(!L&&(K.id===V.id||!K.computedPosition))return!1;const W=Jn(K),J=Jt(W,T);return m&&J>0||J>=Number(h.width)*Number(h.height)}):[]},Q=(h,m,I=!0)=>{const[T]=A(h);if(!T)return!1;const V=Jt(T,m);return I&&V>0||V>=Number(h.width)*Number(h.height)},te=h=>{const{viewport:m,dimensions:I,d3Zoom:T,d3Selection:V,translateExtent:L}=e;if(!T||!V||!h.x&&!h.y)return!1;const K=He.translate(m.x+h.x,m.y+h.y).scale(m.zoom),W=[[0,0],[I.width,I.height]],J=T.constrain()(K,W,L),Y=e.viewport.x!==J.x||e.viewport.y!==J.y||e.viewport.zoom!==J.k;return T.transform(V,J),Y},M=h=>{const m=h instanceof Function?h(e):h,I=["modelValue","nodes","edges","maxZoom","minZoom","translateExtent","nodeExtent","hooks","defaultEdgeOptions"],T=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];oe(m.defaultEdgeOptions)&&(e.defaultEdgeOptions=m.defaultEdgeOptions);const V=m.modelValue||m.nodes||m.edges?[]:void 0;V&&(m.modelValue&&V.push(...m.modelValue),m.nodes&&V.push(...m.nodes),m.edges&&V.push(...m.edges),$(V));const L=()=>{oe(m.maxZoom)&&P(m.maxZoom),oe(m.minZoom)&&w(m.minZoom),oe(m.translateExtent)&&D(m.translateExtent),oe(m.nodeExtent)&&g(m.nodeExtent)};Object.keys(m).forEach(K=>{const W=K,J=m[W];![...I,...T].includes(W)&&oe(J)&&(e[W]=J)}),e.d3Zoom?L():ue(()=>e.d3Zoom).not.toBeUndefined().then(L),e.initialized||(e.initialized=!0)};return{updateNodePositions:c,updateNodeDimensions:d,setElements:$,setNodes:N,setEdges:C,addNodes:q,addEdges:ee,removeNodes:y,removeEdges:z,findNode:s,findEdge:u,updateEdge:S,applyEdgeChanges:F,applyNodeChanges:R,addSelectedElements:k,addSelectedNodes:v,addSelectedEdges:x,setMinZoom:w,setMaxZoom:P,setTranslateExtent:D,setNodeExtent:g,removeSelectedElements:G,removeSelectedNodes:E,removeSelectedEdges:B,startConnection:U,updateConnection:O,endConnection:H,setInteractive:_,setState:M,getIntersectingNodes:Z,isNodeIntersecting:Q,panBy:te,fitView:async(h={padding:.1})=>{await ue(()=>i.value.initialized).toBe(!0),i.value.fitView(h)},zoomIn:async h=>{await ue(()=>i.value.initialized).toBe(!0),i.value.zoomIn(h)},zoomOut:async h=>{await ue(()=>i.value.initialized).toBe(!0),i.value.zoomOut(h)},zoomTo:async(h,m)=>{await ue(()=>i.value.initialized).toBe(!0),i.value.zoomTo(h,m)},setTransform:async(h,m)=>{await ue(()=>i.value.initialized).toBe(!0),i.value.setTransform(h,m)},getTransform:()=>i.value.getTransform(),setCenter:async(h,m,I)=>{await ue(()=>i.value.initialized).toBe(!0),i.value.setCenter(h,m,I)},fitBounds:async(h,m)=>{await ue(()=>i.value.initialized).toBe(!0),i.value.fitBounds(h,m)},project:h=>i.value.project(h),toObject:()=>JSON.parse(JSON.stringify({nodes:e.nodes.map(h=>{const{computedPosition:m,handleBounds:I,selected:T,dimensions:V,isParent:L,resizing:K,dragging:W,initialized:J,...Y}=h;return Y}),edges:e.edges.map(h=>{const{selected:m,sourceNode:I,targetNode:T,...V}=h;return V}),position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom})),updateNodeInternals:l,$reset:()=>{const h=nr();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const m=He.translate(h.defaultViewport.x??0,h.defaultViewport.y??0).scale(Ce(h.defaultViewport.zoom??1,h.minZoom,h.maxZoom)),I=e.viewportRef.getBoundingClientRect(),T=[[0,0],[I.width,I.height]],V=e.d3Zoom.constrain()(m,T,h.translateExtent);e.d3Zoom.transform(e.d3Selection,V)}M(h)},$destroy:()=>{}}}class Ue{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){return Ue.instance||(Ue.instance=new Ue),Ue.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=nr(n),r=a.reactive(o),i=a.computed(()=>r.nodes.map(p=>p.id)),l=a.computed(()=>r.edges.map(p=>p.id)),s=ys(r,i,l),u=cc(r,s,i,l),c={};Object.entries(r.hooks).forEach(([p,b])=>{const v=`on${p.charAt(0).toUpperCase()+p.slice(1)}`;c[v]=b.on});const d={};Object.entries(r.hooks).forEach(([p,b])=>{d[p]=b.trigger}),u.setState(r);const f={...c,...s,...u,...a.toRefs(r),emits:d,id:t,vueFlowVersion:"1.19.4",$destroy:()=>{this.remove(t)}};return this.set(t,f),f}getId(){return`vue-flow-${this.currentId++}`}}const re=e=>{const t=Ue.getInstance(),n=a.getCurrentScope(),o=e==null?void 0:e.id,r=(n==null?void 0:n.vueFlowId)||o;let i,l=!1;if(n){const s=a.inject(fo,null);typeof s<"u"&&s!==null&&(i=s)}if(i||r&&(i=t.get(r)),!i||i&&o&&o!==i.id){const s=o??t.getId();i=t.create(s,e),n&&(l=!0)}else e&&i.setState(e);return n&&(a.provide(fo,i),n.vueFlowId=i.id,l&&je(()=>{if(i){const s=t.get(i.id);s?s.$destroy():qn(`No store instance found for id ${i.id} in storage.`)}})),i};function dc(e,t,n){const o=a.effectScope();return o.run(()=>{[()=>{o.run(()=>{let r,i,l=!!(n.nodes.value.length||n.edges.value.length);r=Oe([e.modelValue,()=>{var s,u;return(u=(s=e.modelValue)==null?void 0:s.value)==null?void 0:u.length}],([s])=>{s&&Array.isArray(s)&&(i==null||i.pause(),n.setElements(s),!i&&!l&&s.length?l=!0:i==null||i.resume())}),i=Oe([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([s,u])=>{var c;(c=e.modelValue)!=null&&c.value&&Array.isArray(e.modelValue.value)&&(r==null||r.pause(),e.modelValue.value=[...s,...u],a.nextTick(()=>{r==null||r.resume()}))},{immediate:l}),a.onScopeDispose(()=>{r==null||r.stop(),i==null||i.stop()})})},()=>{o.run(()=>{let r,i,l=!!n.nodes.value.length;r=Oe([e.nodes,()=>{var s,u;return(u=(s=e.nodes)==null?void 0:s.value)==null?void 0:u.length}],([s])=>{s&&Array.isArray(s)&&(i==null||i.pause(),n.setNodes(s),!i&&!l&&s.length?l=!0:i==null||i.resume())}),i=Oe([n.nodes,()=>n.nodes.value.length],([s])=>{var u;(u=e.nodes)!=null&&u.value&&Array.isArray(e.nodes.value)&&(r==null||r.pause(),e.nodes.value=[...s],a.nextTick(()=>{r==null||r.resume()}))},{immediate:l}),a.onScopeDispose(()=>{r==null||r.stop(),i==null||i.stop()})})},()=>{o.run(()=>{let r,i,l=!!n.edges.value.length;r=Oe([e.edges,()=>{var s,u;return(u=(s=e.edges)==null?void 0:s.value)==null?void 0:u.length}],([s])=>{s&&Array.isArray(s)&&(i==null||i.pause(),n.setEdges(s),!i&&!l&&s.length?l=!0:i==null||i.resume())}),i=Oe([n.edges,()=>n.edges.value.length],([s])=>{var u;(u=e.edges)!=null&&u.value&&Array.isArray(e.edges.value)&&(r==null||r.pause(),e.edges.value=[...s],a.nextTick(()=>{r==null||r.resume()}))},{immediate:l}),a.onScopeDispose(()=>{r==null||r.stop(),i==null||i.stop()})})},()=>{o.run(()=>{a.watch(()=>t.minZoom,()=>{t.minZoom&&oe(t.minZoom)&&n.setMinZoom(t.minZoom)})})},()=>{o.run(()=>{a.watch(()=>t.maxZoom,()=>{t.maxZoom&&oe(t.maxZoom)&&n.setMaxZoom(t.maxZoom)})})},()=>{o.run(()=>{a.watch(()=>t.translateExtent,()=>{t.translateExtent&&oe(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)})})},()=>{o.run(()=>{a.watch(()=>t.nodeExtent,()=>{t.nodeExtent&&oe(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)})})},()=>{o.run(()=>{a.watch(()=>t.applyDefault,()=>{oe(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)}),a.watch(n.applyDefault,(r,i,l)=>{n.applyDefault.value?(n.onNodesChange(n.applyNodeChanges),n.onEdgesChange(n.applyEdgeChanges)):(n.hooks.value.nodesChange.off(n.applyNodeChanges),n.hooks.value.edgesChange.off(n.applyEdgeChanges)),l(()=>{n.hooks.value.nodesChange.off(n.applyNodeChanges),n.hooks.value.edgesChange.off(n.applyEdgeChanges)})},{immediate:!0})})},()=>{o.run(()=>{const r=async i=>{let l=i;ve(t.autoConnect)&&(l=await t.autoConnect(i)),l!==!1&&n.addEdges([l])};a.watch(()=>t.autoConnect,()=>{oe(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)}),a.watch(n.autoConnect,(i,l,s)=>{i?n.onConnect(r):n.hooks.value.connect.off(r),s(()=>{n.hooks.value.connect.off(r)})},{immediate:!0})})},()=>{const r=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];Object.keys(t).forEach(i=>{if(!r.includes(i)){const l=a.toRef(t,i),s=n[i];o.run(()=>{a.watch(l,u=>{oe(u)&&(s.value=u)},{flush:"pre"})})}})}].forEach(r=>r())}),()=>o.stop()}function Or(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const fc={name:"Pane",compatConfig:{MODE:3}},hc=a.defineComponent({...fc,props:{isSelecting:{type:Boolean}},setup(e){const{id:t,vueFlowRef:n,getNodes:o,getEdges:r,viewport:i,emits:l,userSelectionActive:s,removeSelectedElements:u,panOnDrag:c,userSelectionRect:d,elementsSelectable:f,nodesSelectionActive:p,addSelectedElements:b,getSelectedEdges:v,getSelectedNodes:x,removeNodes:k,removeEdges:E,selectionMode:B,deleteKeyCode:G,multiSelectionKeyCode:w,multiSelectionActive:P}=re(),D=a.ref(null),g=a.ref(0),_=a.ref(0),N=a.ref(),C=a.computed(()=>f.value&&(e.isSelecting||s.value));qe(G,O=>{if(!O)return;const H=o.value.reduce((A,Z)=>((!Z.selected&&Z.parentNode&&A.find(Q=>Q.id===Z.parentNode)||Z.selected)&&A.push(Z),A),[]);(H||v.value)&&(v.value.length>0&&E(v.value),H.length>0&&k(H),p.value=!1,u())}),qe(w,O=>{P.value=O});function $(){s.value=!1,d.value=null,g.value=0,_.value=0}function q(O){O.target!==D.value||C.value||(l.paneClick(O),u(),p.value=!1)}function ee(O){var H;if(O.target===D.value){if(Array.isArray(c.value)&&(H=c.value)!=null&&H.includes(2)){O.preventDefault();return}l.paneContextMenu(O)}}function y(O){O.target===D.value&&l.paneScroll(O)}function z(O){if(N.value=n.value.getBoundingClientRect(),!C.value||!f||!e.isSelecting||O.button!==0||O.target!==D.value||!N.value)return;const{x:H,y:A}=Or(O,N.value);u(),d.value={width:0,height:0,startX:H,startY:A,x:H,y:A},s.value=!0,l.selectionStart(O)}function S(O){if(!C.value)return l.paneMouseMove(O);if(!e.isSelecting||!N.value||!d.value)return;s.value||(s.value=!0),p.value&&(p.value=!1);const H=Or(O,N.value),A=d.value.startX??0,Z=d.value.startY??0,Q={...d.value,x:H.x0,$(),l.selectionEnd(O))}function F(O){var H;if(!C.value)return l.paneMouseLeave(O);s.value&&(p.value=g.value>0,(H=l.selectionEnd)==null||H.call(l,O)),$()}function U(O){C.value||l.paneMouseEnter(O)}return(O,H)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"container",ref:D,key:`pane-${a.unref(t)}`,class:a.normalizeClass(["vue-flow__pane vue-flow__container",{selection:e.isSelecting}]),onClick:q,onContextmenu:ee,onWheelPassive:y,onMouseenter:U,onMousedown:z,onMousemove:S,onMouseup:R,onMouseleave:F},[a.renderSlot(O.$slots,"default"),a.unref(s)&&a.unref(d)?(a.openBlock(),a.createBlock(hs,{key:0})):a.createCommentVNode("",!0),a.unref(p)&&a.unref(x).length?(a.openBlock(),a.createBlock(ds,{key:1})):a.createCommentVNode("",!0)],34))}}),pc={class:"vue-flow__nodes vue-flow__container"},gc={name:"Nodes",compatConfig:{MODE:3}},mc=a.defineComponent({...gc,setup(e){const t=a.inject(ft),n=re(),o=a.toRef(n,"nodesDraggable"),r=a.toRef(n,"nodesFocusable"),i=a.toRef(n,"elementsSelectable"),l=a.toRef(n,"nodesConnectable"),s=a.toRef(n,"getNodes"),u=a.toRef(n,"getNodesInitialized"),c=a.toRef(n,"getNodeTypes"),d=a.toRef(n,"updateNodeDimensions"),f=a.toRef(n,"emits");let p=a.ref();ue(()=>s.value.length>0&&u.value.length===s.value.length).toBe(!0).then(()=>{a.nextTick(()=>{f.value.nodesInitialized(u.value)})}),a.onMounted(()=>{p.value=new ResizeObserver(B=>{const G=B.map(w=>({id:w.target.getAttribute("data-id"),nodeElement:w.target,forceUpdate:!0}));d.value(G)})}),a.onBeforeUnmount(()=>{var B;return(B=p.value)==null?void 0:B.disconnect()});function b(B){return typeof B>"u"?o.value:B}function v(B){return typeof B>"u"?i.value:B}function x(B){return typeof B>"u"?l.value:B}function k(B){return typeof B>"u"?r.value:B}function E(B,G){const w=B||"default";let P=G??c.value[w];const D=a.getCurrentInstance();if(typeof P=="string"&&D){const _=Object.keys(D.appContext.components);_&&_.includes(w)&&(P=a.resolveComponent(w,!1))}return typeof P!="string"?P:(t==null?void 0:t[`node-${w}`])||(f.value.error(new le(ie.NODE_TYPE_MISSING,P)),!1)}return(B,G)=>(a.openBlock(),a.createElementBlock("div",pc,[a.unref(p)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(a.unref(s),w=>(a.openBlock(),a.createBlock(a.unref(zl),{id:w.id,key:w.id,"resize-observer":a.unref(p),type:E(w.type,w.template),name:w.type||"default",draggable:b(w.draggable),selectable:v(w.selectable),connectable:x(w.connectable),focusable:k(w.focusable),node:w},null,8,["id","resize-observer","type","name","draggable","selectable","connectable","focusable","node"]))),128)):a.createCommentVNode("",!0)]))}}),yc=["id","markerWidth","markerHeight","markerUnits","orient"],vc=["stroke","stroke-width","fill"],wc=["stroke","stroke-width"],bc={name:"MarkerType",compatConfig:{MODE:3}},xc=a.defineComponent({...bc,props:{id:null,type:null,color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(a.openBlock(),a.createElementBlock("marker",{id:e.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${e.width}`,markerHeight:`${e.height}`,markerUnits:e.markerUnits,orient:e.orient},[e.type===a.unref(tn).ArrowClosed?(a.openBlock(),a.createElementBlock("polyline",{key:0,stroke:e.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":e.strokeWidth,fill:e.color,points:"-5,-4 0,0 -5,4 -5,-4"},null,8,vc)):a.createCommentVNode("",!0),e.type===a.unref(tn).Arrow?(a.openBlock(),a.createElementBlock("polyline",{key:1,stroke:e.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":e.strokeWidth,fill:"none",points:"-5,-4 0,0 -5,4"},null,8,wc)):a.createCommentVNode("",!0)],8,yc))}}),_c={name:"MarkerDefinitions",compatConfig:{MODE:3}},Ec=a.defineComponent({..._c,setup(e){const t=re(),n=a.toRef(t,"id"),o=a.toRef(t,"edges"),r=a.toRef(t,"connectionLineOptions"),i=a.toRef(t,"defaultMarkerColor"),l=a.computed(()=>{const s=[],u=[],c=d=>{if(d){const f=Me(d,n.value);s.includes(f)||(typeof d=="object"?u.push({...d,id:f,color:d.color||i.value}):u.push({id:f,color:i.value,type:d}),s.push(f))}};return[r.value.markerEnd,r.value.markerStart].forEach(c),o.value.reduce((d,f)=>([f.markerStart,f.markerEnd].forEach(c),d.sort((p,b)=>p.id.localeCompare(b.id))),u),u});return(s,u)=>(a.openBlock(),a.createElementBlock("defs",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(l),c=>(a.openBlock(),a.createBlock(xc,{id:c.id,key:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,"stroke-width":c.strokeWidth,orient:c.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))]))}}),kc={key:0,class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Sc={name:"Edges",compatConfig:{MODE:3}},Nc=a.defineComponent({...Sc,setup(e){const t=a.inject(ft),n=re(),o=a.toRef(n,"connectionStartHandle"),r=a.toRef(n,"nodesConnectable"),i=a.toRef(n,"edgesUpdatable"),l=a.toRef(n,"edgesFocusable"),s=a.toRef(n,"elementsSelectable"),u=a.toRef(n,"getSelectedNodes"),c=a.toRef(n,"findNode"),d=a.toRef(n,"edges"),f=a.toRef(n,"getEdges"),p=a.toRef(n,"getNodesInitialized"),b=a.toRef(n,"getEdgeTypes"),v=a.toRef(n,"elevateEdgesOnSelect"),x=a.toRef(n,"dimensions"),k=a.toRef(n,"emits"),E=Zt(()=>{var _;return(_=o.value)==null?void 0:_.nodeId},()=>{var _;return(_=o.value)!=null&&_.nodeId?c.value(o.value.nodeId):!1}),B=Zt(()=>{var _;return(_=o.value)==null?void 0:_.nodeId},()=>{var _,N;return!!(E.value&&(typeof E.value.connectable>"u"?r.value:E.value.connectable)&&(_=o.value)!=null&&_.nodeId&&(N=o.value)!=null&&N.type)}),G=Zt([()=>d.value.map(_=>_.zIndex),()=>v.value?[u.value.length]:[0],()=>v.value?p.value.map(_=>_.computedPosition.z):[]],()=>Ba(f.value,c.value,v.value));function w(_){return typeof _>"u"?s.value:_}function P(_){return typeof _>"u"?i.value:_}function D(_){return typeof _>"u"?l.value:_}function g(_,N){const C=_||"default";let $=N??b.value[C];const q=a.getCurrentInstance();if(typeof $=="string"&&q){const y=Object.keys(q.appContext.components);y&&y.includes(C)&&($=a.resolveComponent(C,!1))}return $&&typeof $!="string"?$:(t==null?void 0:t[`edge-${C}`])||(k.value.error(new le(ie.EDGE_TYPE_MISSING,$)),!1)}return(_,N)=>a.unref(x).width&&a.unref(x).height?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(G),C=>(a.openBlock(),a.createElementBlock("svg",{key:C.level,class:"vue-flow__edges vue-flow__container",style:a.normalizeStyle(`z-index: ${C.level}`)},[C.isMaxLevel?(a.openBlock(),a.createBlock(Ec,{key:0})):a.createCommentVNode("",!0),a.createElementVNode("g",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.edges,$=>(a.openBlock(),a.createBlock(a.unref(ts),{id:$.id,key:$.id,edge:$,type:g($.type,$.template),name:$.type||"default",selectable:w($.selectable),updatable:P($.updatable),focusable:D($.focusable)},null,8,["id","edge","type","name","selectable","updatable","focusable"]))),128))])],4))),128)),a.unref(B)&&a.unref(E)?(a.openBlock(),a.createElementBlock("svg",kc,[a.createVNode(ss,{"source-node":a.unref(E)},null,8,["source-node"])])):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)}}),Cc=a.createElementVNode("div",{class:"vue-flow__edge-labels"},null,-1),Mc={name:"Transform",compatConfig:{MODE:3}},Bc=a.defineComponent({...Mc,setup(e){const{id:t,viewport:n,emits:o,d3Zoom:r,d3Selection:i,dimensions:l,...s}=re(),u=a.ref(!jt);return ue(()=>r.value&&i.value&&l.value.width>0&&l.value.height>0).toBeTruthy().then(()=>{o.paneReady({id:t,viewport:n,emits:o,d3Zoom:r,d3Selection:i,dimensions:l,...s}),setTimeout(()=>{u.value=!0},0)}),(c,d)=>(a.openBlock(),a.createElementBlock("div",{key:`transform-${a.unref(t)}`,class:"vue-flow__transformationpane vue-flow__container",style:a.normalizeStyle({transform:`translate(${a.unref(n).x}px,${a.unref(n).y}px) scale(${a.unref(n).zoom})`,opacity:a.unref(u)?void 0:0})},[a.createVNode(Nc),Cc,a.createVNode(mc),a.renderSlot(c.$slots,"default")],4))}}),Pc={name:"Viewport",compatConfig:{MODE:3}},Ic=a.defineComponent({...Pc,setup(e){const{id:t,minZoom:n,maxZoom:o,defaultViewport:r,translateExtent:i,dimensions:l,zoomActivationKeyCode:s,selectionKeyCode:u,panActivationKeyCode:c,panOnScroll:d,panOnScrollMode:f,panOnScrollSpeed:p,panOnDrag:b,zoomOnDoubleClick:v,zoomOnPinch:x,zoomOnScroll:k,preventScrolling:E,noWheelClassName:B,noPanClassName:G,emits:w,connectionStartHandle:P,userSelectionActive:D,paneDragging:g,d3Zoom:_,d3Selection:N,d3ZoomHandler:C,viewport:$,viewportRef:q}=re(),ee=a.ref(),y=a.ref(!1),z=a.ref(!1);let S=!1,R=0,F={x:0,y:0,zoom:0};const U=qe(c),O=a.computed(()=>!y.value&&b.value&&U.value),H=a.computed(()=>u.value!==!0&&y.value||u.value===!0&&!O.value);a.onMounted(()=>{ia(ee,te);const h=Qt();qt(h,"resize",te)}),a.onMounted(()=>{const h=ee.value,m=h.getBoundingClientRect(),I=lc().scaleExtent([n.value,o.value]).translateExtent(i.value),T=de(h).call(I),V=T.on("wheel.zoom"),L=He.translate(r.value.x??0,r.value.y??0).scale(Ce(r.value.zoom??1,n.value,o.value)),K=[[0,0],[m.width,m.height]],W=I.constrain()(L,K,i.value);I.transform(T,W),_.value=I,N.value=T,C.value=V,$.value={x:W.x,y:W.y,zoom:W.k},q.value=h,qe(u,Y=>{y.value=Y});const J=qe(s);a.watchEffect(()=>{y.value&&D.value&&!z.value?I.on("zoom",null):!y.value&&!D.value&&I.on("zoom",Y=>{$.value={x:Y.transform.x,y:Y.transform.y,zoom:Y.transform.k};const ae=Q(Y.transform);S=A(b.value,R??0),w.viewportChange(ae),w.move({event:Y,flowTransform:ae})})}),I.on("start",Y=>{var ae;if(!Y.sourceEvent)return null;R=Y.sourceEvent.button,z.value=!0;const Se=Q(Y.transform);((ae=Y.sourceEvent)==null?void 0:ae.type)==="mousedown"&&(g.value=!0),F=Se,w.viewportChangeStart(Se),w.moveStart({event:Y,flowTransform:Se})}),I.on("end",Y=>{if(!Y.sourceEvent)return null;if(z.value=!1,g.value=!1,A(b.value,R??0)&&!S&&w.paneContextMenu(Y.sourceEvent),S=!1,Z(F,Y.transform)){const ae=Q(Y.transform);F=ae,w.viewportChangeEnd(ae),w.moveEnd({event:Y,flowTransform:ae})}}),a.watchEffect(()=>{d.value&&!J.value&&!D.value?T.on("wheel.zoom",Y=>{if(M(Y,B.value))return!1;Y.preventDefault(),Y.stopImmediatePropagation();const ae=T.property("__zoom").k||1;if(Y.ctrlKey&&x.value){const On=pe(Y),Jc=-Y.deltaY*(Y.deltaMode===1?.05:Y.deltaMode?1:.002)*10,ed=ae*2**Jc;I.scaleTo(T,ed,On);return}const Se=Y.deltaMode===1?20:1,Ut=f.value===dt.Vertical?0:Y.deltaX*Se,Rn=f.value===dt.Horizontal?0:Y.deltaY*Se;I.translateBy(T,-(Ut/ae)*p.value,-(Rn/ae)*p.value)},{passive:!1}):typeof V<"u"&&T.on("wheel.zoom",function(Y,ae){if(!E.value||M(Y,B.value))return null;Y.preventDefault(),V.call(this,Y,ae)},{passive:!1})}),I.filter(Y=>{var ae,Se;const Ut=J.value||k.value,Rn=x.value&&Y.ctrlKey;if(Y.button===1&&Y.type==="mousedown"&&((ae=Y.target)!=null&&ae.closest(".vue-flow__node")||(Se=Y.target)!=null&&Se.closest(".vue-flow__edge")))return!0;if(!b.value&&!Ut&&!d.value&&!v.value&&!x.value||D.value||!v.value&&Y.type==="dblclick"||M(Y,B.value)&&Y.type==="wheel"||M(Y,G.value)&&Y.type!=="wheel"||!x.value&&Y.ctrlKey&&Y.type==="wheel"||!Ut&&!d.value&&!Rn&&Y.type==="wheel"||!b.value&&(Y.type==="mousedown"||Y.type==="touchstart")||Array.isArray(b.value)&&!b.value.includes(Y.button)&&(Y.type==="mousedown"||Y.type==="touchstart"))return!1;const On=Array.isArray(b.value)&&b.value.includes(Y.button)||!Y.button||Y.button<=1;return(!Y.ctrlKey||Y.type==="wheel")&&On})});function A(h,m){return m===2&&Array.isArray(h)&&h.includes(2)}function Z(h,m){return h.x!==m.x&&!isNaN(m.x)||h.y!==m.y&&!isNaN(m.y)||h.zoom!==m.k&&!isNaN(m.k)}function Q(h){return{x:h.x,y:h.y,zoom:h.k}}function te(){if(!ee.value)return;const{width:h,height:m}=st(ee.value);(h===0||m===0)&&w.error(new le(ie.MISSING_VIEWPORT_DIMENSIONS)),l.value.width=h||500,l.value.height=m||500}function M(h,m){return h.target.closest(`.${m}`)}return(h,m)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createElementBlock("div",{ref_key:"viewportEl",ref:ee,key:`viewport-${a.unref(t)}`,class:"vue-flow__viewport vue-flow__container"},[a.createVNode(hc,{"is-selecting":a.unref(H),class:a.normalizeClass({connecting:!!a.unref(P),dragging:a.unref(g),draggable:!!a.unref(b)})},{default:a.withCtx(()=>[a.createVNode(Bc,null,{default:a.withCtx(()=>[a.renderSlot(h.$slots,"zoom-pane")]),_:3})]),_:3},8,["is-selecting","class"])])),a.renderSlot(h.$slots,"default")],64))}}),$c=["id"],Tc=["id"],Rc=["id"],Oc={name:"A11yDescriptions",compatConfig:{MODE:3}},Dc=a.defineComponent({...Oc,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=re(),r={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"};return(i,l)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{id:`${a.unref(Go)}-${a.unref(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+a.toDisplayString(a.unref(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,$c),a.createElementVNode("div",{id:`${a.unref(Fo)}-${a.unref(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Tc),a.unref(n)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,id:`${a.unref(Tl)}-${a.unref(t)}`,"aria-live":"assertive","aria-atomic":"true",style:r},a.toDisplayString(a.unref(o)),9,Rc))],64))}}),zc={name:"VueFlow",compatConfig:{MODE:3}},Ac=a.defineComponent({...zc,props:{id:null,modelValue:null,nodes:null,edges:null,edgeTypes:null,nodeTypes:null,connectionMode:null,connectionLineType:null,connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:null,isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:null,selectionKeyCode:null,multiSelectionKeyCode:null,zoomActivationKeyCode:null,panActivationKeyCode:null,snapToGrid:{type:Boolean,default:void 0},snapGrid:null,onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:null,maxZoom:null,defaultViewport:null,translateExtent:null,nodeExtent:null,defaultMarkerColor:null,zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:null,panOnScrollMode:null,zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:null,edgeUpdaterRadius:null,fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:null,noWheelClassName:null,noPanClassName:null,defaultEdgeOptions:null,elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},__experimentalFeatures:null},emits:["nodesChange","edgesChange","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","nodesInitialized","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","updateNodeInternals","error","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,r=Ze(o,"modelValue",n),i=Ze(o,"nodes",n),l=Ze(o,"edges",n),{vueFlowRef:s,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f}=re(o),p=dc({modelValue:r,nodes:i,edges:l},o,{vueFlowRef:s,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f});ha(n,u);const b=a.ref();return a.provide(ft,a.useSlots()),a.onUnmounted(()=>{p()}),a.onMounted(()=>{s.value=b.value}),t({vueFlowRef:s,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f}),(v,x)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"el",ref:b,class:"vue-flow"},[a.createVNode(Ic,null,{nodes:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Object.keys(a.unref(c)),k=>a.renderSlot(v.$slots,`node-${k}`)),256))]),edges:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Object.keys(a.unref(d)),k=>a.renderSlot(v.$slots,`edge-${k}`)),256))]),"connection-name":a.withCtx(()=>[a.renderSlot(v.$slots,"connection-line")]),"zoom-pane":a.withCtx(()=>[a.renderSlot(v.$slots,"zoom-pane")]),default:a.withCtx(()=>[a.renderSlot(v.$slots,"default")]),_:3}),a.createVNode(Dc)],512))}}),Vc={key:0,class:"label-input-wrapper"},Lc=a.defineComponent({__name:"EditableNode",props:{id:{},label:{},sourcePosition:{},targetPosition:{},data:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,String,Function]},position:{},dimensions:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},dragHandle:{},events:{}},emits:["change"],setup(e,{emit:t}){const n=e,o=t,r={top:j.Top,right:j.Right,bottom:j.Bottom,left:j.Left},i=a.computed(()=>r[n.sourcePosition]),l=a.computed(()=>r[n.targetPosition]),s=a.ref(),u=a.ref(""),c=a.ref(!1);let d=0;const f=()=>{let v=Date.now();v-d<500&&!c.value&&p(),d=v},p=async()=>{u.value=n.label,c.value=!0,await a.nextTick(),s.value.focus()},b=()=>{c.value=!1,o("change",u.value)};return(v,x)=>(a.openBlock(),a.createElementBlock("div",{onClick:x[2]||(x[2]=k=>f())},[a.createElementVNode("div",null,a.toDisplayString(n.label),1),c.value?(a.openBlock(),a.createElementBlock("div",Vc,[a.withDirectives(a.createElementVNode("input",{ref_key:"labelInput",ref:s,class:"label-input","onUpdate:modelValue":x[0]||(x[0]=k=>u.value=k),onBlur:x[1]||(x[1]=k=>c.value=!1),onKeypress:a.withKeys(b,["enter"])},null,544),[[a.vModelText,u.value]])])):a.createCommentVNode("",!0),n.data.hasInput?(a.openBlock(),a.createBlock(a.unref(Ve),{key:1,id:"a",type:"target",position:l.value},null,8,["position"])):a.createCommentVNode("",!0),n.data.hasOutput?(a.openBlock(),a.createBlock(a.unref(Ve),{key:2,id:"b",type:"source",position:i.value},null,8,["position"])):a.createCommentVNode("",!0)]))}}),Yc=["id","d","marker-end"],Xc={class:"vue-flow__edge-label"},Gc={key:0,class:"label-input-wrapper"},Fc={inheritAttrs:!1},Hc=a.defineComponent({...Fc,__name:"EditableEdge",props:{id:{},sourceX:{},sourceY:{},targetX:{},targetY:{},sourcePosition:{},targetPosition:{},data:{},markerEnd:{},style:{},label:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},selected:{type:Boolean},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},curvature:{},interactionWidth:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},emits:["change"],setup(e,{emit:t}){const n=e;re();const o=t,r=a.ref(),i=a.ref(""),l=a.ref(!1);let s=0;const u=()=>{let p=Date.now();p-s<500&&!l.value&&c(),s=p},c=async()=>{i.value=n.label,l.value=!0,await a.nextTick(),r.value.focus()},d=()=>{l.value=!1,o("change",i.value)},f=a.computed(()=>Nt(n));return(p,b)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("path",{id:p.id,style:a.normalizeStyle(p.style),class:"vue-flow__edge-path",d:f.value[0],"marker-end":p.markerEnd},null,12,Yc),a.createVNode(a.unref(rs),null,{default:a.withCtx(()=>[a.createElementVNode("div",{style:a.normalizeStyle({pointerEvents:"all",position:"absolute",transform:`translate(-50%, -50%) translate(${f.value[1]}px,${f.value[2]}px)`}),class:"nodrag nopan editable-edge-label",onClick:b[2]||(b[2]=v=>u())},[a.createElementVNode("div",Xc,a.toDisplayString(n.label),1),l.value?(a.openBlock(),a.createElementBlock("div",Gc,[a.withDirectives(a.createElementVNode("input",{ref_key:"labelInput",ref:r,class:"label-input","onUpdate:modelValue":b[0]||(b[0]=v=>i.value=v),onBlur:b[1]||(b[1]=v=>l.value=!1),onKeypress:a.withKeys(d,["enter"])},null,544),[[a.vModelText,i.value]])])):a.createCommentVNode("",!0)],4)]),_:1})],64))}}),Uc={class:"chart-controls"},jc={class:"chart-controls-left"},Zc=a.createElementVNode("b",null,"Selected Node:",-1),Kc={class:"chart-controls-right"},Wc={key:0},qc={key:1},Tn=a.defineComponent({__name:"NodeEditor",props:{modelValue:{},nodeContainerClass:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=a.ref(""),i=a.ref({}),l=a.ref(!1);a.ref({x:0,y:0});const s=a.ref(""),u=a.ref([]),c=a.computed(()=>{for(let g=0;g{let g=n.modelValue;n.nodeContainerClass?r.value=n.nodeContainerClass:r.value="defaultContainerClass";for(let _=0;_{s.value=N}}}return g},set:g=>{o("update:modelValue",JSON.parse(JSON.stringify(g)))}}),{getNodes:f,onPaneReady:p}=re({});p(g=>{i.value=g}),u.value=d.value,a.onMounted(()=>{document.removeEventListener("keypress",E),document.addEventListener("keypress",E)}),a.onBeforeUnmount(()=>{document.removeEventListener("keypress",E)});const b=g=>({top:"right",right:"bottom",bottom:"left",left:"top"})[g],v=()=>{c.value>-1&&(u.value[c.value].sourcePosition=b(u.value[c.value].sourcePosition))},x=()=>{c.value>-1&&(u.value[c.value].targetPosition=b(u.value[c.value].targetPosition))},k=g=>{window.scrollBy(0,g.deltaY)},E=g=>{l.value&&g.ctrlKey==!0&&((g.key=="+"||g.key=="=")&&i.value.zoomIn(),g.key=="-"&&i.value.zoomOut())},B=()=>{i.value.fitView()},G=()=>{let g={x:Math.random()*200,y:Math.random()*200},_=!1;if(c.value>-1){const $=u.value[c.value];$.data.hasOutput&&(g={x:$.position.x+200,y:$.position.y+50},_=!0)}let N=u.value.length,C=`node-${N}`;if(u.value.push({id:C,label:"Node "+N,sourcePosition:"right",targetPosition:"left",class:"vue-flow__node-default",type:"editable",data:{hasInput:!0,hasOutput:!0},events:{click:()=>{s.value=C}},position:g}),_){let $=`edge-${N+1}`;u.value.push({id:$,source:s.value,target:C,type:"editable",label:`EDGE ${N+1}`,animated:!0,events:{click:()=>{s.value=$}}})}},w=g=>{console.log("edge connect",g)},P=g=>{console.log("edge double click",g)},D=(g,_)=>{for(let N=0;N(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["node-editor-wrapper",r.value]),onMouseover:_[8]||(_[8]=N=>l.value=!0),onMouseleave:_[9]||(_[9]=N=>l.value=!1)},[a.createElementVNode("div",Uc,[a.createElementVNode("div",jc,[a.createElementVNode("div",null,[Zc,a.createTextVNode(" "+a.toDisplayString(s.value?s.value:"none"),1)])]),a.createElementVNode("div",Kc,[a.createElementVNode("div",null,[a.createElementVNode("button",{class:"button-default",onClick:_[0]||(_[0]=N=>G())},"Add Node")]),a.createElementVNode("div",null,[a.createElementVNode("button",{class:"button-default",onClick:_[1]||(_[1]=N=>B())},"Center")]),c.value>-1?(a.openBlock(),a.createElementBlock("div",Wc,[a.createElementVNode("button",{class:"button-default",onClick:_[2]||(_[2]=N=>x())},"Shift Input Position")])):a.createCommentVNode("",!0),c.value>-1?(a.openBlock(),a.createElementBlock("div",qc,[a.createElementVNode("button",{class:"button-default",onClick:_[3]||(_[3]=N=>v())},"Shift Output Position")])):a.createCommentVNode("",!0)])]),u.value&&u.value.length?(a.openBlock(),a.createBlock(a.unref(Ac),{key:0,onWheel:_[4]||(_[4]=a.withModifiers(N=>k(N),["prevent"])),class:"nowheel","prevent-scrolling":!0,"zoom-on-scroll":!1,"fit-view-on-init":!0,modelValue:u.value,"onUpdate:modelValue":_[5]||(_[5]=N=>u.value=N),onConnect:_[6]||(_[6]=N=>w(N)),onEdgeDoubleClick:_[7]||(_[7]=N=>P(N))},{"node-editable":a.withCtx(N=>[a.createVNode(Lc,a.mergeProps(N,{onChange:C=>D(C,N.id)}),null,16,["onChange"])]),"edge-editable":a.withCtx(N=>[a.createVNode(Hc,a.mergeProps(N,{onChange:C=>D(C,N.id)}),null,16,["onChange"])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0)],34))}}),Dr=a.defineComponent({__name:"StateEditor",props:["layout","nodeContainerClass","modelValue"],emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=a.computed({get:()=>{let l=n.modelValue,s={},u={},c=0,d=[];for(let f in l){d.length;let p={id:f,label:f,position:n.layout[f]&&n.layout[f].position?n.layout[f].position:{x:200*c,y:100},targetPosition:n.layout[f]&&n.layout[f].targetPosition?n.layout[f].targetPosition:"left",sourcePosition:n.layout[f]&&n.layout[f].sourcePosition?n.layout[f].sourcePosition:"right"};l[f].type&&l[f].type=="final"&&(p.type="output",p.class="default-output-node"),s[f]=p;let b=l[f].on;for(let v in l[f].on){let x=b[v];typeof x=="object"&&x.constructor===Object&&(x=x.target),d.push({id:`${f}-${b[v]}-${v}`,target:x,source:f,label:v,animated:!0}),u[x]=!0}c++}for(let f in s)u[f]||(s[f].type="input",s[f].class="default-input-node"),d.push(s[f]);return d},set:l=>{i(l)}}),i=l=>{let s={},u={},c={};for(let d=0;d(a.openBlock(),a.createElementBlock("div",null,[a.createVNode(Tn,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=u=>r.value=u),"node-container-class":e.nodeContainerClass},null,8,["modelValue","node-container-class"])]))}});function Qc(e){e.component("NodeEditor",Tn),e.component("StateEditor",Dr)}ye.NodeEditor=Tn,ye.StateEditor=Dr,ye.install=Qc,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=node-editor.umd.cjs.map diff --git a/node_editor/dist/node-editor.umd.cjs.map b/node_editor/dist/node-editor.umd.cjs.map deleted file mode 100644 index 84678247..00000000 --- a/node_editor/dist/node-editor.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node-editor.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.23/node_modules/@vue-flow/core/dist/vue-flow-core.mjs","../src/components/EditableNode.vue","../src/components/EditableEdge.vue","../src/components/NodeEditor.vue","../src/components/StateEditor.vue","../src/index.ts"],"sourcesContent":["import { unref as C, ref as ie, watch as de, customRef as br, getCurrentScope as hi, onScopeDispose as Vt, getCurrentInstance as on, onMounted as Ve, nextTick as Ue, readonly as Er, isRef as Sr, computed as J, onBeforeMount as Nr, markRaw as it, inject as He, defineComponent as ge, toRef as M, openBlock as oe, createElementBlock as se, normalizeClass as Ke, renderSlot as xe, h as ue, provide as ut, onBeforeUnmount as gi, normalizeStyle as Le, createCommentVNode as Ee, createElementVNode as ct, mergeProps as vi, createBlock as ze, resolveDynamicComponent as mi, Fragment as Ce, createTextVNode as Cr, toDisplayString as Vn, Teleport as Mr, normalizeProps as $r, reactive as kr, toRefs as Or, effectScope as Tr, renderList as dt, resolveComponent as pi, createVNode as qe, watchEffect as bo, withCtx as Fe, useSlots as Ir, onUnmounted as Pr } from \"vue\";\nvar Eo;\nconst oo = typeof window < \"u\", Dr = (e) => typeof e < \"u\", zr = (e) => typeof e == \"boolean\", Ae = (e) => typeof e == \"function\", Ie = (e) => typeof e == \"number\", Pe = (e) => typeof e == \"string\", Ar = () => {\n};\noo && ((Eo = window == null ? void 0 : window.navigator) != null && Eo.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction le(e) {\n return typeof e == \"function\" ? e() : C(e);\n}\nfunction Br(e, t) {\n function n(...o) {\n return new Promise((i, r) => {\n Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(i).catch(r);\n });\n }\n return n;\n}\nconst yi = (e) => e();\nfunction Rr(e = yi) {\n const t = ie(!0);\n function n() {\n t.value = !1;\n }\n function o() {\n t.value = !0;\n }\n const i = (...r) => {\n t.value && e(...r);\n };\n return { isActive: Er(t), pause: n, resume: o, eventFilter: i };\n}\nfunction So(e, t = !1, n = \"Timeout\") {\n return new Promise((o, i) => {\n setTimeout(t ? () => i(n) : o, e);\n });\n}\nfunction Vr(e) {\n return e;\n}\nfunction Sn(e, t) {\n let n, o, i;\n const r = ie(!0), a = () => {\n r.value = !0, i();\n };\n de(e, a, { flush: \"sync\" });\n const s = Ae(t) ? t : t.get, l = Ae(t) ? void 0 : t.set, u = br((c, v) => (o = c, i = v, {\n get() {\n return r.value && (n = s(), r.value = !1), o(), n;\n },\n set(g) {\n l == null || l(g);\n }\n }));\n return Object.isExtensible(u) && (u.trigger = a), u;\n}\nfunction Mt(e) {\n return hi() ? (Vt(e), !0) : !1;\n}\nfunction Hr(e, t = !0) {\n on() ? Ve(e) : t ? e() : Ue(e);\n}\nfunction Hn(e, t = !1) {\n function n(v, { flush: g = \"sync\", deep: x = !1, timeout: h, throwOnTimeout: d } = {}) {\n let w = null;\n const S = [new Promise((V) => {\n w = de(e, (p) => {\n v(p) !== t && (w == null || w(), V(p));\n }, {\n flush: g,\n deep: x,\n immediate: !0\n });\n })];\n return h != null && S.push(So(h, d).then(() => le(e)).finally(() => w == null ? void 0 : w())), Promise.race(S);\n }\n function o(v, g) {\n if (!Sr(v))\n return n((p) => p === v, g);\n const { flush: x = \"sync\", deep: h = !1, timeout: d, throwOnTimeout: w } = g ?? {};\n let y = null;\n const V = [new Promise((p) => {\n y = de([e, v], ([N, T]) => {\n t !== (N === T) && (y == null || y(), p(N));\n }, {\n flush: x,\n deep: h,\n immediate: !0\n });\n })];\n return d != null && V.push(So(d, w).then(() => le(e)).finally(() => (y == null || y(), le(e)))), Promise.race(V);\n }\n function i(v) {\n return n((g) => Boolean(g), v);\n }\n function r(v) {\n return o(null, v);\n }\n function a(v) {\n return o(void 0, v);\n }\n function s(v) {\n return n(Number.isNaN, v);\n }\n function l(v, g) {\n return n((x) => {\n const h = Array.from(x);\n return h.includes(v) || h.includes(le(v));\n }, g);\n }\n function u(v) {\n return c(1, v);\n }\n function c(v = 1, g) {\n let x = -1;\n return n(() => (x += 1, x >= v), g);\n }\n return Array.isArray(le(e)) ? {\n toMatch: n,\n toContains: l,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n } : {\n toMatch: n,\n toBe: o,\n toBeTruthy: i,\n toBeNull: r,\n toBeNaN: s,\n toBeUndefined: a,\n changed: u,\n changedTimes: c,\n get not() {\n return Hn(e, !t);\n }\n };\n}\nfunction ye(e) {\n return Hn(e);\n}\nvar No = Object.getOwnPropertySymbols, Lr = Object.prototype.hasOwnProperty, Gr = Object.prototype.propertyIsEnumerable, Fr = (e, t) => {\n var n = {};\n for (var o in e)\n Lr.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && No)\n for (var o of No(e))\n t.indexOf(o) < 0 && Gr.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction Yr(e, t, n = {}) {\n const o = n, {\n eventFilter: i = yi\n } = o, r = Fr(o, [\n \"eventFilter\"\n ]);\n return de(e, Br(i, t), r);\n}\nvar Xr = Object.defineProperty, Zr = Object.defineProperties, Ur = Object.getOwnPropertyDescriptors, Yt = Object.getOwnPropertySymbols, xi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, Co = (e, t, n) => t in e ? Xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wr = (e, t) => {\n for (var n in t || (t = {}))\n xi.call(t, n) && Co(e, n, t[n]);\n if (Yt)\n for (var n of Yt(t))\n _i.call(t, n) && Co(e, n, t[n]);\n return e;\n}, Kr = (e, t) => Zr(e, Ur(t)), qr = (e, t) => {\n var n = {};\n for (var o in e)\n xi.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && Yt)\n for (var o of Yt(e))\n t.indexOf(o) < 0 && _i.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction tt(e, t, n = {}) {\n const o = n, {\n eventFilter: i\n } = o, r = qr(o, [\n \"eventFilter\"\n ]), { eventFilter: a, pause: s, resume: l, isActive: u } = Rr(i);\n return { stop: Yr(e, t, Kr(Wr({}, r), {\n eventFilter: a\n })), pause: s, resume: l, isActive: u };\n}\nfunction wi(e) {\n var t;\n const n = le(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst io = oo ? window : void 0;\nfunction ro(...e) {\n let t, n, o, i;\n if (Pe(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = io) : [t, n, o, i] = e, !t)\n return Ar;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const r = [], a = () => {\n r.forEach((c) => c()), r.length = 0;\n }, s = (c, v, g, x) => (c.addEventListener(v, g, x), () => c.removeEventListener(v, g, x)), l = de(() => [wi(t), le(i)], ([c, v]) => {\n a(), c && r.push(...n.flatMap((g) => o.map((x) => s(c, g, x, v))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n l(), a();\n };\n return Mt(u), u;\n}\nconst jr = (e) => typeof e == \"function\" ? e : typeof e == \"string\" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;\nfunction Mo(...e) {\n let t, n, o = {};\n e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == \"object\" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);\n const { target: i = io, eventName: r = \"keydown\", passive: a = !1 } = o, s = jr(t);\n return ro(i, r, (u) => {\n s(u) && n(u);\n }, a);\n}\nfunction Qr(e, t = !1) {\n const n = ie(), o = () => n.value = Boolean(e());\n return o(), Hr(o, t), n;\n}\nfunction Jr(e) {\n return JSON.parse(JSON.stringify(e));\n}\nconst Ln = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Gn = \"__vueuse_ssr_handlers__\";\nLn[Gn] = Ln[Gn] || {};\nLn[Gn];\nvar $o = Object.getOwnPropertySymbols, ea = Object.prototype.hasOwnProperty, ta = Object.prototype.propertyIsEnumerable, na = (e, t) => {\n var n = {};\n for (var o in e)\n ea.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);\n if (e != null && $o)\n for (var o of $o(e))\n t.indexOf(o) < 0 && ta.call(e, o) && (n[o] = e[o]);\n return n;\n};\nfunction oa(e, t, n = {}) {\n const o = n, { window: i = io } = o, r = na(o, [\"window\"]);\n let a;\n const s = Qr(() => i && \"ResizeObserver\" in i), l = () => {\n a && (a.disconnect(), a = void 0);\n }, u = de(() => wi(e), (v) => {\n l(), s.value && i && v && (a = new ResizeObserver(t), a.observe(v, r));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n l(), u();\n };\n return Mt(c), {\n isSupported: s,\n stop: c\n };\n}\nvar ko;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(ko || (ko = {}));\nvar ia = Object.defineProperty, Oo = Object.getOwnPropertySymbols, ra = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, To = (e, t, n) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t) => {\n for (var n in t || (t = {}))\n ra.call(t, n) && To(e, n, t[n]);\n if (Oo)\n for (var n of Oo(t))\n aa.call(t, n) && To(e, n, t[n]);\n return e;\n};\nconst la = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nsa({\n linear: Vr\n}, la);\nfunction yt(e, t, n, o = {}) {\n var i, r, a;\n const {\n clone: s = !1,\n passive: l = !1,\n eventName: u,\n deep: c = !1,\n defaultValue: v\n } = o, g = on(), x = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((a = (r = g == null ? void 0 : g.proxy) == null ? void 0 : r.$emit) == null ? void 0 : a.bind(g == null ? void 0 : g.proxy));\n let h = u;\n t || (t = \"modelValue\"), h = u || h || `update:${t.toString()}`;\n const d = (y) => s ? Ae(s) ? s(y) : Jr(y) : y, w = () => Dr(e[t]) ? d(e[t]) : v;\n if (l) {\n const y = w(), S = ie(y);\n return de(() => e[t], (V) => S.value = d(V)), de(S, (V) => {\n (V !== e[t] || c) && x(h, V);\n }, { deep: c }), S;\n } else\n return J({\n get() {\n return w();\n },\n set(y) {\n x(h, y);\n }\n });\n}\nfunction X(e = () => {\n}) {\n const t = ie(/* @__PURE__ */ new Set());\n e && t.value.add(e);\n const n = (r) => {\n t.value.delete(r);\n };\n return {\n on: (r) => {\n t.value.has(e) && t.value.delete(e), t.value.add(r);\n const a = () => n(r);\n return Mt(a), {\n off: a\n };\n },\n off: n,\n trigger: (r) => Promise.all(Array.from(t.value).map((a) => a(r))),\n fns: t\n };\n}\nconst ua = [\"production\", \"prod\"];\nfunction wt(e, ...t) {\n ua.includes(process.env.NODE_ENV || \"\") || console.warn(`[Vue Flow]: ${e}`, ...t);\n}\nfunction ca() {\n return {\n edgesChange: X(),\n nodesChange: X(),\n nodeDoubleClick: X(),\n nodeClick: X(),\n nodeMouseEnter: X(),\n nodeMouseMove: X(),\n nodeMouseLeave: X(),\n nodeContextMenu: X(),\n nodeDragStart: X(),\n nodeDrag: X(),\n nodeDragStop: X(),\n nodesInitialized: X(),\n miniMapNodeClick: X(),\n miniMapNodeDoubleClick: X(),\n miniMapNodeMouseEnter: X(),\n miniMapNodeMouseMove: X(),\n miniMapNodeMouseLeave: X(),\n connect: X(),\n connectStart: X(),\n connectEnd: X(),\n clickConnectStart: X(),\n clickConnectEnd: X(),\n paneReady: X(),\n move: X(),\n moveStart: X(),\n moveEnd: X(),\n selectionDragStart: X(),\n selectionDrag: X(),\n selectionDragStop: X(),\n selectionContextMenu: X(),\n selectionStart: X(),\n selectionEnd: X(),\n viewportChangeStart: X(),\n viewportChange: X(),\n viewportChangeEnd: X(),\n paneScroll: X(),\n paneClick: X(),\n paneContextMenu: X(),\n paneMouseEnter: X(),\n paneMouseMove: X(),\n paneMouseLeave: X(),\n edgeContextMenu: X(),\n edgeMouseEnter: X(),\n edgeMouseMove: X(),\n edgeMouseLeave: X(),\n edgeDoubleClick: X(),\n edgeClick: X(),\n edgeUpdateStart: X(),\n edgeUpdate: X(),\n edgeUpdateEnd: X(),\n updateNodeInternals: X(),\n error: X((e) => wt(e.message))\n };\n}\nfunction da(e, t) {\n Nr(() => {\n for (const [n, o] of Object.entries(t.value)) {\n const i = (r) => {\n e(n, r);\n };\n o.on(i), Mt(() => {\n o.off(i);\n });\n }\n });\n}\nvar he = /* @__PURE__ */ ((e) => (e.MISSING_VIEWPORT_DIMENSIONS = \"MISSING_VIEWPORT_DIMENSIONS\", e.NODE_NOT_FOUND = \"NODE_NOT_FOUND\", e.NODE_MISSING_PARENT = \"NODE_MISSING_PARENT\", e.NODE_TYPE_MISSING = \"NODE_TYPE_MISSING\", e.NODE_EXTENT_INVALID = \"NODE_EXTENT_INVALID\", e.EDGE_INVALID = \"EDGE_INVALID\", e.EDGE_NOT_FOUND = \"EDGE_NOT_FOUND\", e.EDGE_SOURCE_MISSING = \"EDGE_SOURCE_MISSING\", e.EDGE_TARGET_MISSING = \"EDGE_TARGET_MISSING\", e.EDGE_TYPE_MISSING = \"EDGE_TYPE_MISSING\", e.EDGE_SOURCE_TARGET_SAME = \"EDGE_SOURCE_TARGET_SAME\", e.EDGE_SOURCE_TARGET_MISSING = \"EDGE_SOURCE_TARGET_MISSING\", e.EDGE_ORPHANED = \"EDGE_ORPHANED\", e))(he || {});\nconst Nn = {\n MISSING_VIEWPORT_DIMENSIONS: () => \"The Vue Flow parent container needs a width and a height to render the graph\",\n NODE_NOT_FOUND: (e) => `Node not found\nNode: ${e}`,\n NODE_MISSING_PARENT: (e, t) => `Node is missing a parent\nNode: ${e}\nParent: ${t}`,\n NODE_TYPE_MISSING: (e) => `Node type is missing\nType: ${e}`,\n NODE_EXTENT_INVALID: (e) => `Only child nodes can use a parent extent\nNode: ${e}`,\n EDGE_INVALID: (e) => `An edge needs a source and a target\nEdge: ${e}`,\n EDGE_SOURCE_MISSING: (e, t) => `Edge source is missing\nEdge: ${e} \nSource: ${t}`,\n EDGE_TARGET_MISSING: (e, t) => `Edge target is missing\nEdge: ${e} \nTarget: ${t}`,\n EDGE_TYPE_MISSING: (e) => `Edge type is missing\nType: ${e}`,\n EDGE_SOURCE_TARGET_SAME: (e, t, n) => `Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_SOURCE_TARGET_MISSING: (e, t, n) => `Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,\n EDGE_ORPHANED: (e) => `Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,\n EDGE_NOT_FOUND: (e) => `Edge not found\nEdge: ${e}`\n};\nclass ve extends Error {\n constructor(t, ...n) {\n var o;\n super((o = Nn[t]) == null ? void 0 : o.call(Nn, ...n)), this.code = t;\n }\n}\nconst ao = () => typeof window < \"u\" ? window : { chrome: !1 };\nfunction Io(e) {\n return {\n ...e.computedPosition || { x: 0, y: 0 },\n width: e.dimensions.width || 0,\n height: e.dimensions.height || 0\n };\n}\nfunction Fn(e, t) {\n const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), o = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));\n return Math.ceil(n * o);\n}\nfunction rn(e) {\n return {\n width: e.offsetWidth,\n height: e.offsetHeight\n };\n}\nfunction je(e, t = 0, n = 1) {\n return Math.min(Math.max(e, t), n);\n}\nfunction so(e, t) {\n return {\n x: je(e.x, t[0][0], t[1][0]),\n y: je(e.y, t[0][1], t[1][1])\n };\n}\nfunction Po(e) {\n const t = e.getRootNode(), n = ao();\n return \"elementFromPoint\" in t ? t : n.document;\n}\nfunction $e(e) {\n return e && \"id\" in e && \"source\" in e && \"target\" in e;\n}\nfunction fa(e) {\n return $e(e) && \"sourceNode\" in e && \"targetNode\" in e;\n}\nfunction xt(e) {\n return e && \"id\" in e && !$e(e);\n}\nfunction nt(e) {\n return xt(e) && \"computedPosition\" in e;\n}\nfunction ha(e) {\n return !!e.width && !!e.height && !!e.x && !!e.y;\n}\nfunction ga(e, t = {}) {\n let n = t;\n return nt(e) || (n = {\n type: e.type ?? t.type ?? \"default\",\n dimensions: it({\n width: 0,\n height: 0\n }),\n handleBounds: {\n source: [],\n target: []\n },\n computedPosition: it({\n z: 0,\n ...e.position\n }),\n draggable: void 0,\n selectable: void 0,\n connectable: void 0,\n focusable: void 0,\n selected: !1,\n dragging: !1,\n resizing: !1,\n initialized: !1,\n ...t,\n data: ce(e.data) ? e.data : {},\n events: it(ce(e.events) ? e.events : {})\n }), Object.assign({}, n, e, { id: e.id.toString() });\n}\nfunction lo(e, t = {}) {\n const n = ce(e.events) ? e.events : t.events && ce(t.events) ? t.events : {}, o = ce(e.data) ? e.data : t.data && ce(t.data) ? t.data : {};\n return t = fa(e) ? t : {\n ...t,\n sourceHandle: (e.sourceHandle ? e.sourceHandle.toString() : void 0) || t.sourceHandle,\n targetHandle: (e.targetHandle ? e.targetHandle.toString() : void 0) || t.targetHandle,\n type: e.type ?? t.type ?? \"default\",\n source: e.source.toString() || t.source,\n target: e.target.toString() || t.target,\n updatable: e.updatable ?? t.updatable,\n selectable: e.selectable ?? t.selectable,\n focusable: e.focusable ?? t.focusable,\n data: o,\n events: it(n),\n label: (e.label && !Pe(e.label) ? it(e.label) : e.label) || t.label,\n interactionWidth: e.interactionWidth || t.interactionWidth\n }, Object.assign({}, t, e, { id: e.id.toString() });\n}\nfunction bi(e, t, n) {\n if (!xt(e))\n return [];\n const o = n === \"source\" ? \"target\" : \"source\", i = t.filter((r) => $e(r) && r[o] === e.id).map((r) => $e(r) && r[n]);\n return t.filter((r) => i.includes(r.id));\n}\nfunction Pd(e, t) {\n return bi(e, t, \"target\");\n}\nfunction Dd(e, t) {\n return bi(e, t, \"source\");\n}\nfunction an({ source: e, sourceHandle: t, target: n, targetHandle: o }) {\n return `vueflow__edge-${e}${t ?? \"\"}-${n}${o ?? \"\"}`;\n}\nfunction Ei(e, t) {\n return t.some(\n (n) => $e(n) && n.source === e.source && n.target === e.target && (n.sourceHandle === e.sourceHandle || !n.sourceHandle && !e.sourceHandle) && (n.targetHandle === e.targetHandle || !n.targetHandle && !e.targetHandle)\n );\n}\nfunction zd(e, t, n) {\n if (!e.source || !e.target)\n return wt(\"Can't create edge. An edge needs a source and a target.\"), t;\n let o;\n return $e(e) ? o = { ...e } : o = {\n ...e,\n id: an(e)\n }, o = lo(o, n), Ei(o, t) || t.push(o), t;\n}\nfunction Ad(e, t, n) {\n if (!t.source || !t.target)\n return wt(\"Can't create new edge. An edge needs a source and a target.\"), n;\n const o = n.find((r) => $e(r) && r.id === e.id);\n if (!o)\n return wt(`The old edge with id=${e.id} does not exist.`), n;\n const i = {\n ...e,\n id: an(t),\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(o), 1, i), n.filter((r) => r.id !== e.id);\n}\nfunction va({ x: e, y: t }, { x: n, y: o, zoom: i }) {\n return {\n x: e * i + n,\n y: t * i + o\n };\n}\nfunction uo({ x: e, y: t }, { x: n, y: o, zoom: i }, r, [a, s]) {\n const l = {\n x: (e - n) / i,\n y: (t - o) / i\n };\n return r ? {\n x: a * Math.round(l.x / a),\n y: s * Math.round(l.y / s)\n } : l;\n}\nfunction Si(e, t) {\n return {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x2, t.x2),\n y2: Math.max(e.y2, t.y2)\n };\n}\nfunction Xt({ x: e, y: t, width: n, height: o }) {\n return {\n x: e,\n y: t,\n x2: e + n,\n y2: t + o\n };\n}\nfunction Ni({ x: e, y: t, x2: n, y2: o }) {\n return {\n x: e,\n y: t,\n width: n - e,\n height: o - t\n };\n}\nfunction Bd(e, t) {\n return Ni(Si(Xt(e), Xt(t)));\n}\nfunction co(e) {\n const t = e.reduce(\n (n, { computedPosition: o = { x: 0, y: 0 }, dimensions: i = { width: 0, height: 0 } } = {}) => Si(\n n,\n Xt({\n ...o,\n ...i\n })\n ),\n { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }\n );\n return Ni(t);\n}\nfunction Ci(e, t, { x: n, y: o, zoom: i } = { x: 0, y: 0, zoom: 1 }, r = !1, a = !1) {\n const s = {\n x: (t.x - n) / i,\n y: (t.y - o) / i,\n width: t.width / i,\n height: t.height / i\n };\n return e.filter((l) => {\n const { computedPosition: u = { x: 0, y: 0 }, dimensions: c = { width: 0, height: 0 }, selectable: v } = l;\n if (a && !v)\n return !1;\n const g = { ...u, width: c.width || 0, height: c.height || 0 }, x = Fn(s, g), h = typeof c.width > \"u\" || typeof c.height > \"u\" || c.width === 0 || c.height === 0, d = r && x > 0, w = c.width * c.height;\n return h || d || x >= w;\n });\n}\nfunction sn(e, t) {\n const n = e.map((o) => Pe(o) ? o : o.id);\n return t.filter((o) => n.includes(o.source) || n.includes(o.target));\n}\nfunction Zt(e, t, n, o, i, r = 0.1, a = { x: 0, y: 0 }) {\n const s = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), u = Math.min(s, l), c = je(u, o, i), v = e.x + e.width / 2, g = e.y + e.height / 2, x = t / 2 - v * c + (a.x ?? 0), h = n / 2 - g * c + (a.y ?? 0);\n return { x, y: h, zoom: c };\n}\nfunction ma(e, t) {\n return {\n x: t.x + e.x,\n y: t.y + e.y,\n z: (e.z > t.z ? e.z : t.z) + 1\n };\n}\nfunction Mi(e, t) {\n if (!e.parentNode)\n return !1;\n const n = t(e.parentNode);\n return n ? n.selected ? !0 : Mi(n, t) : !1;\n}\nfunction Xe(e, t) {\n return typeof e > \"u\" ? \"\" : typeof e == \"string\" ? e : `${t ? `${t}__` : \"\"}${Object.keys(e).sort().map((o) => `${o}=${e[o]}`).join(\"&\")}`;\n}\nfunction ce(e) {\n return typeof C(e) < \"u\";\n}\nfunction pa(e, t, n) {\n if (!e.source || !e.target)\n return n(new ve(he.EDGE_INVALID, e.id)), !1;\n let o;\n return $e(e) ? o = e : o = {\n ...e,\n id: an(e)\n }, o = lo(o), Ei(o, t) ? !1 : o;\n}\nfunction ya(e, t, n, o, i, r) {\n if (!t.source || !t.target)\n return r(new ve(he.EDGE_INVALID, e.id)), !1;\n const a = o(e.id);\n if (!a)\n return r(new ve(he.EDGE_NOT_FOUND, e.id)), !1;\n const { id: s, ...l } = e, u = {\n ...l,\n id: i ? an(t) : s,\n source: t.source,\n target: t.target,\n sourceHandle: t.sourceHandle,\n targetHandle: t.targetHandle\n };\n return n.splice(n.indexOf(a), 1, u), u;\n}\nfunction Do(e, t, n, o) {\n const i = {}, r = e.map((s) => {\n const l = ga(s, {\n ...n(s.id),\n parentNode: s.parentNode\n });\n return s.parentNode && (i[s.parentNode] = !0), l;\n }), a = [...r, ...t];\n return r.forEach((s) => {\n const l = a.find((u) => u.id === s.parentNode);\n s.parentNode && !l && o(new ve(he.NODE_MISSING_PARENT, s.id, s.parentNode)), (s.parentNode || i[s.id]) && (i[s.id] && (s.isParent = !0), l && (l.isParent = !0));\n }), r;\n}\nvar j = /* @__PURE__ */ ((e) => (e.Left = \"left\", e.Top = \"top\", e.Right = \"right\", e.Bottom = \"bottom\", e))(j || {}), fo = /* @__PURE__ */ ((e) => (e.Partial = \"partial\", e.Full = \"full\", e))(fo || {}), Ye = /* @__PURE__ */ ((e) => (e.Bezier = \"default\", e.SimpleBezier = \"simple-bezier\", e.Straight = \"straight\", e.Step = \"step\", e.SmoothStep = \"smoothstep\", e))(Ye || {}), Qe = /* @__PURE__ */ ((e) => (e.Strict = \"strict\", e.Loose = \"loose\", e))(Qe || {}), Yn = /* @__PURE__ */ ((e) => (e.Arrow = \"arrow\", e.ArrowClosed = \"arrowclosed\", e))(Yn || {}), Ut = /* @__PURE__ */ ((e) => (e.Free = \"free\", e.Vertical = \"vertical\", e.Horizontal = \"horizontal\", e))(Ut || {}), xa = /* @__PURE__ */ ((e) => (e.TopLeft = \"top-left\", e.TopCenter = \"top-center\", e.TopRight = \"top-right\", e.BottomLeft = \"bottom-left\", e.BottomCenter = \"bottom-center\", e.BottomRight = \"bottom-right\", e))(xa || {});\nconst zo = Symbol(\"vueFlow\"), $i = Symbol(\"nodeId\"), ki = Symbol(\"nodeRef\"), Oi = Symbol(\"edgeId\"), Ti = Symbol(\"edgeRef\"), ln = Symbol(\"slots\");\nfunction _a(e) {\n const t = e ?? He($i, \"\"), n = He(ki, null), { findNode: o, edges: i, emits: r } = fe(), a = o(t);\n return a || r.error(new ve(he.NODE_NOT_FOUND, t)), {\n id: t,\n nodeEl: n,\n node: a,\n parentNode: J(() => o(a.parentNode)),\n connectedEdges: J(() => sn([a], i.value))\n };\n}\nfunction ho(e) {\n return \"clientX\" in e;\n}\nfunction rt(e, t) {\n var r, a;\n const n = ho(e), o = n ? e.clientX : (r = e.touches) == null ? void 0 : r[0].clientX, i = n ? e.clientY : (a = e.touches) == null ? void 0 : a[0].clientY;\n return {\n x: o - ((t == null ? void 0 : t.left) ?? 0),\n y: i - ((t == null ? void 0 : t.top) ?? 0)\n };\n}\nfunction Wt(e, t, n) {\n const o = ((n == null ? void 0 : n.x) ?? 0) + t.x, i = ((n == null ? void 0 : n.y) ?? 0) + t.y, r = (n == null ? void 0 : n.width) ?? t.width, a = (n == null ? void 0 : n.height) ?? t.height;\n switch (e) {\n case j.Top:\n return {\n x: o + r / 2,\n y: i\n };\n case j.Right:\n return {\n x: o + r,\n y: i + a / 2\n };\n case j.Bottom:\n return {\n x: o + r / 2,\n y: i + a\n };\n case j.Left:\n return {\n x: o,\n y: i + a / 2\n };\n }\n}\nfunction Ao(e = [], t) {\n return e.length ? !t || e.length === 1 ? e[0] : t && e.find((n) => n.id === t) || null : null;\n}\nfunction wa(e, t, n, o, i, r) {\n const a = Wt(\n n,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n t\n ), s = Wt(\n r,\n {\n ...o.dimensions,\n ...o.computedPosition\n },\n i\n );\n return {\n sourceX: a.x,\n sourceY: a.y,\n targetX: s.x,\n targetY: s.y\n };\n}\nfunction ba({\n sourcePos: e,\n targetPos: t,\n sourceWidth: n,\n sourceHeight: o,\n targetWidth: i,\n targetHeight: r,\n width: a,\n height: s,\n viewport: l\n}) {\n const u = {\n x: Math.min(e.x, t.x),\n y: Math.min(e.y, t.y),\n x2: Math.max(e.x + n, t.x + i),\n y2: Math.max(e.y + o, t.y + r)\n };\n u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);\n const c = Xt({\n x: (0 - l.x) / l.zoom,\n y: (0 - l.y) / l.zoom,\n width: a / l.zoom,\n height: s / l.zoom\n }), v = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), g = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));\n return Math.ceil(v * g) > 0;\n}\nfunction Ea(e, t, n = !1) {\n let o = -1;\n const i = e.reduce((r, a) => {\n const s = Ie(a.zIndex);\n let l = s ? a.zIndex : 0;\n const u = t(a.source), c = t(a.target);\n return !u || !c || (n && (l = s ? a.zIndex : Math.max(u.computedPosition.z || 0, c.computedPosition.z || 0)), r[l] ? r[l].push(a) : r[l] = [a], o = l > o ? l : o), r;\n }, {});\n return Object.entries(Object.keys(i).length ? i : { 0: [] }).map(([r, a]) => {\n const s = +r;\n return {\n edges: a,\n level: s,\n isMaxLevel: s === o\n };\n });\n}\nfunction Cn(e) {\n e == null || e.classList.remove(\"valid\", \"connecting\", \"vue-flow__handle-valid\", \"vue-flow__handle-connecting\");\n}\nfunction Bo(e, t, n, o) {\n return (t[n] || []).reduce((i, r) => (`${e.id}-${r.id}-${n}` !== o && i.push({\n id: r.id || null,\n type: n,\n nodeId: e.id,\n ...Wt(\n r.position,\n {\n ...e.dimensions,\n ...e.computedPosition\n },\n r\n )\n }), i), []);\n}\nfunction Sa(e, t, n) {\n let o = null, i = 1 / 0;\n return n.forEach((r) => {\n const a = Math.sqrt((r.x - e.x) ** 2 + (r.y - e.y) ** 2);\n a <= t && a < i && (i = a, o = r);\n }), o;\n}\nfunction Ro(e, t, n, o, i, r, a, s, l, u) {\n const c = r === \"target\", v = s.querySelector(`.vue-flow__handle[data-id=\"${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}\"]`), { x: g, y: x } = rt(e), h = s.elementFromPoint(g, x), d = h != null && h.classList.contains(\"vue-flow__handle\") ? h : v, w = {\n handleDomNode: d,\n isValid: !1,\n connection: { source: \"\", target: \"\", sourceHandle: null, targetHandle: null },\n endHandle: null\n };\n if (d) {\n const y = Ii(void 0, d), S = d.getAttribute(\"data-nodeid\"), V = d.getAttribute(\"data-handleid\"), p = d.classList.contains(\"connectable\"), N = d.classList.contains(\"connectableend\"), T = {\n source: c ? S : o,\n sourceHandle: c ? V : i,\n target: c ? o : S,\n targetHandle: c ? i : V\n };\n w.connection = T, p && N && (n === Qe.Strict ? c && y === \"source\" || !c && y === \"target\" : S !== o || V !== i) && (w.endHandle = {\n nodeId: S,\n handleId: V,\n type: y\n }, w.isValid = a(T, {\n edges: l,\n sourceNode: u(T.source),\n targetNode: u(T.target)\n }));\n }\n return w;\n}\nfunction Na({ nodes: e, nodeId: t, handleId: n, handleType: o }) {\n return e.reduce((i, r) => {\n const { handleBounds: a } = r;\n let s = [], l = [];\n return a && (s = Bo(r, a, \"source\", `${t}-${n}-${o}`), l = Bo(r, a, \"target\", `${t}-${n}-${o}`)), i.push(...s, ...l), i;\n }, []);\n}\nfunction Ii(e, t) {\n return e || (t != null && t.classList.contains(\"target\") ? \"target\" : t != null && t.classList.contains(\"source\") ? \"source\" : null);\n}\nfunction Ca(e, t) {\n let n = null;\n return t ? n = \"valid\" : e && !t && (n = \"invalid\"), n;\n}\nfunction Vo(e, t, n) {\n return e < t ? je(Math.abs(e - t), 1, 50) / 50 : e > n ? -je(Math.abs(e - n), 1, 50) / 50 : 0;\n}\nfunction Pi(e, t) {\n const n = Vo(e.x, 35, t.width - 35) * 20, o = Vo(e.y, 35, t.height - 35) * 20;\n return [n, o];\n}\nfunction It() {\n return !0;\n}\nfunction Di({\n handleId: e,\n nodeId: t,\n type: n,\n isValidConnection: o,\n edgeUpdaterType: i,\n onEdgeUpdate: r,\n onEdgeUpdateEnd: a\n}) {\n const s = J(() => le(n) === \"target\"), {\n vueFlowRef: l,\n connectionMode: u,\n connectionRadius: c,\n connectOnClick: v,\n connectionClickStartHandle: g,\n nodesConnectable: x,\n autoPanOnConnect: h,\n findNode: d,\n panBy: w,\n getNodes: y,\n startConnection: S,\n updateConnection: V,\n endConnection: p,\n emits: N,\n viewport: T,\n edges: _,\n isValidConnection: P\n } = fe();\n let R = null, $ = !1, D = null;\n function Q(m) {\n var G;\n const A = ho(m), E = Po(m.target);\n if (A && m.button === 0 || !A) {\n let Z = function(Y) {\n L = rt(Y, f), B = Sa(\n uo(L, T.value, !1, [1, 1]),\n c.value,\n F\n ), I || (U(), I = !0);\n const ne = Ro(\n Y,\n B,\n u.value,\n le(t),\n le(e),\n s.value ? \"target\" : \"source\",\n W,\n E,\n _.value,\n d\n );\n if (R = ne.connection, $ = ne.isValid, D = ne.handleDomNode, V(\n B && $ ? va(\n {\n x: B.x,\n y: B.y\n },\n T.value\n ) : L,\n ne.endHandle,\n Ca(!!B, $)\n ), !B && !$ && !D)\n return Cn(b);\n R && R.source !== R.target && D && (Cn(b), b = D, D.classList.add(\"connecting\", \"vue-flow__handle-connecting\"), D.classList.toggle(\"valid\", $), D.classList.toggle(\"vue-flow__handle-valid\", $));\n }, K = function(Y) {\n (B || D) && R && $ && (r ? r(Y, R) : N.connect(R)), N.connectEnd(Y), i && (a == null || a(Y)), Cn(b), cancelAnimationFrame(q), p(Y), I = !1, $ = !1, R = null, D = null, E.removeEventListener(\"mousemove\", Z), E.removeEventListener(\"mouseup\", K), E.removeEventListener(\"touchmove\", Z), E.removeEventListener(\"touchend\", K);\n };\n const z = d(le(t));\n let W = o || P.value || It;\n !W && z && (W = (s ? z.isValidSourcePos : z.isValidTargetPos) || It);\n let B, q = 0;\n const { x: te, y: re } = rt(m), k = E == null ? void 0 : E.elementFromPoint(te, re), H = Ii(le(i), k), f = (G = l.value) == null ? void 0 : G.getBoundingClientRect();\n if (!f || !H)\n return;\n let b, L = rt(m, f), I = !1;\n const F = Na({\n nodes: y.value,\n nodeId: le(t),\n handleId: le(e),\n handleType: H\n }), U = () => {\n if (!h)\n return;\n const [Y, ne] = Pi(L, f);\n w({ x: Y, y: ne }), q = requestAnimationFrame(U);\n };\n S(\n {\n nodeId: le(t),\n handleId: le(e),\n type: H\n },\n {\n x: te - f.left,\n y: re - f.top\n },\n m\n ), N.connectStart({ event: m, nodeId: le(t), handleId: le(e), handleType: H }), E.addEventListener(\"mousemove\", Z), E.addEventListener(\"mouseup\", K), E.addEventListener(\"touchmove\", Z), E.addEventListener(\"touchend\", K);\n }\n }\n function ee(m) {\n if (v.value)\n if (!g.value)\n N.clickConnectStart({ event: m, nodeId: le(t), handleId: le(e) }), S(\n { nodeId: le(t), type: le(n), handleId: le(e) },\n void 0,\n m,\n !0\n );\n else {\n let A = o || P.value || It;\n const E = d(le(t));\n if (!A && E && (A = (s ? E.isValidSourcePos : E.isValidTargetPos) || It), E && (typeof E.connectable > \"u\" ? x.value : E.connectable) === !1)\n return;\n const G = Po(m.target), { connection: Z, isValid: K } = Ro(\n m,\n {\n nodeId: le(t),\n id: le(e),\n type: le(n)\n },\n u.value,\n g.value.nodeId,\n g.value.handleId || null,\n g.value.type,\n A,\n G,\n _.value,\n d\n ), z = Z.source === Z.target;\n K && !z && N.connect(Z), N.clickConnectEnd(m), p(m, !0);\n }\n }\n return {\n handlePointerDown: Q,\n handleClick: ee\n };\n}\nfunction Ma(e, t) {\n const n = {};\n for (const o in e)\n t.includes(o) || Object.defineProperty(n, o, {\n enumerable: !0,\n get: () => e[o]\n });\n return n;\n}\nconst $a = [\"data-id\", \"data-handleid\", \"data-nodeid\", \"data-handlepos\"], ka = {\n name: \"Handle\",\n compatConfig: { MODE: 3 }\n}, Kt = /* @__PURE__ */ ge({\n ...ka,\n props: {\n id: null,\n type: null,\n position: { default: j.Top },\n isValidConnection: { type: Function },\n connectable: { type: [Boolean, String, Function], default: void 0 },\n connectableStart: { type: Boolean, default: !0 },\n connectableEnd: { type: Boolean, default: !0 }\n },\n setup(e) {\n const t = Ma(e, [\"position\", \"connectable\", \"connectableStart\", \"connectableEnd\", \"id\", \"isValidConnection\"]), n = M(t, \"type\", \"source\"), {\n connectionStartHandle: o,\n connectionClickStartHandle: i,\n connectionEndHandle: r,\n vueFlowRef: a,\n nodesConnectable: s,\n noDragClassName: l,\n noPanClassName: u\n } = fe(), { id: c, node: v, nodeEl: g, connectedEdges: x } = _a(), h = ie(), d = J(() => e.id ?? `${c}__handle-${e.position}`), w = J(() => typeof e.connectableStart < \"u\" ? e.connectableStart : !0), y = J(() => typeof e.connectableEnd < \"u\" ? e.connectableEnd : !0), { handlePointerDown: S, handleClick: V } = Di({\n nodeId: c,\n handleId: d,\n isValidConnection: e.isValidConnection,\n type: n\n }), p = J(() => Pe(e.connectable) && e.connectable === \"single\" ? !x.value.some((R) => {\n const $ = R[`${n.value}Handle`];\n return R[n.value] !== c ? !1 : $ ? $ === d.value : !0;\n }) : Ae(e.connectable) ? e.connectable(v, x.value) : ce(e.connectable) ? e.connectable : s.value), N = J(\n () => {\n var R, $, D, Q, ee, m;\n return ((R = o.value) == null ? void 0 : R.nodeId) === c && (($ = o.value) == null ? void 0 : $.handleId) === d.value && ((D = o.value) == null ? void 0 : D.type) === n.value || ((Q = r.value) == null ? void 0 : Q.nodeId) === c && ((ee = r.value) == null ? void 0 : ee.handleId) === d.value && ((m = r.value) == null ? void 0 : m.type) === n.value;\n }\n ), T = J(\n () => {\n var R, $, D;\n return ((R = i.value) == null ? void 0 : R.nodeId) === c && (($ = i.value) == null ? void 0 : $.handleId) === d.value && ((D = i.value) == null ? void 0 : D.type) === n.value;\n }\n );\n ye(() => v.initialized).toBe(!0, { flush: \"post\" }).then(() => {\n var E;\n const R = (E = v.handleBounds[n.value]) == null ? void 0 : E.find((G) => G.id === d.value);\n if (!a.value || R)\n return;\n const $ = a.value.querySelector(\".vue-flow__transformationpane\");\n if (!g || !h.value || !$ || !d.value)\n return;\n const D = g.value.getBoundingClientRect(), Q = h.value.getBoundingClientRect(), ee = window.getComputedStyle($), { m22: m } = new window.DOMMatrixReadOnly(ee.transform), A = {\n id: d.value,\n position: e.position,\n x: (Q.left - D.left) / m,\n y: (Q.top - D.top) / m,\n ...rn(h.value)\n };\n v.handleBounds[n.value] = [...v.handleBounds[n.value] ?? [], A];\n });\n function _(R) {\n const $ = ho(R);\n p.value && w.value && ($ && R.button === 0 || !$) && S(R);\n }\n function P(R) {\n !c || !i.value && !w.value || p.value && V(R);\n }\n return (R, $) => (oe(), se(\"div\", {\n ref_key: \"handle\",\n ref: h,\n \"data-id\": `${C(c)}-${C(d)}-${C(n)}`,\n \"data-handleid\": C(d),\n \"data-nodeid\": C(c),\n \"data-handlepos\": e.position,\n class: Ke([\"vue-flow__handle\", [\n `vue-flow__handle-${e.position}`,\n `vue-flow__handle-${C(d)}`,\n C(l),\n C(u),\n C(n),\n {\n connectable: C(p),\n connecting: C(T),\n connectablestart: C(w),\n connectableend: C(y),\n connectionindicator: C(p) && (C(w) && !C(N) || C(y) && C(N))\n }\n ]]),\n onMousedown: _,\n onTouchstartPassive: _,\n onClick: P\n }, [\n xe(R.$slots, \"default\", { id: e.id })\n ], 42, $a));\n }\n}), un = function({\n sourcePosition: e = j.Bottom,\n targetPosition: t = j.Top,\n label: n,\n connectable: o = !0,\n isValidTargetPos: i,\n isValidSourcePos: r\n}) {\n return [\n ue(Kt, { type: \"target\", position: t, connectable: o, isValidConnection: i }),\n typeof n != \"string\" && n ? ue(n) : ue(\"div\", { innerHTML: n }),\n ue(Kt, { type: \"source\", position: e, connectable: o, isValidConnection: r })\n ];\n};\nun.props = [\"sourcePosition\", \"targetPosition\", \"label\", \"isValidTargetPos\", \"isValidSourcePos\", \"connectable\"];\nun.inheritAttrs = !1;\nun.compatConfig = { MODE: 3 };\nconst Oa = un, cn = function({\n sourcePosition: e = j.Bottom,\n label: t,\n connectable: n = !0,\n isValidSourcePos: o\n}) {\n return [\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t }),\n ue(Kt, { type: \"source\", position: e, connectable: n, isValidConnection: o })\n ];\n};\ncn.props = [\"sourcePosition\", \"label\", \"isValidSourcePos\", \"connectable\"];\ncn.inheritAttrs = !1;\ncn.compatConfig = { MODE: 3 };\nconst Ta = cn, dn = function({\n targetPosition: e = j.Top,\n label: t,\n connectable: n = !0,\n isValidTargetPos: o\n}) {\n return [\n ue(Kt, { type: \"target\", position: e, connectable: n, isValidConnection: o }),\n typeof t != \"string\" && t ? ue(t) : ue(\"div\", { innerHTML: t })\n ];\n};\ndn.props = [\"targetPosition\", \"label\", \"isValidTargetPos\", \"connectable\"];\ndn.inheritAttrs = !1;\ndn.compatConfig = { MODE: 3 };\nconst Ia = dn;\nfunction Ho(e, t, n) {\n let o = e;\n do {\n if (o && o.matches(t))\n return !0;\n if (o === n)\n return !1;\n o = o.parentElement;\n } while (o);\n return !1;\n}\nfunction Pa(e, t, n, o, i) {\n return e.filter(\n (r) => (r.selected || r.id === i) && (!r.parentNode || !Mi(r, o)) && (r.draggable || t && typeof r.draggable > \"u\")\n ).map(\n (r) => {\n var a, s;\n return it({\n id: r.id,\n position: r.position || { x: 0, y: 0 },\n distance: {\n x: n.x - ((a = r.computedPosition) == null ? void 0 : a.x) || 0,\n y: n.y - ((s = r.computedPosition) == null ? void 0 : s.y) || 0\n },\n from: r.computedPosition,\n extent: r.extent,\n parentNode: r.parentNode,\n dimensions: r.dimensions\n });\n }\n );\n}\nfunction Mn({\n id: e,\n dragItems: t,\n findNode: n\n}) {\n const o = t.reduce((i, r) => {\n const a = n(r.id);\n return a && i.push(a), i;\n }, []);\n return [e ? o.find((i) => i.id === e) : o[0], o];\n}\nfunction zi(e) {\n if (Array.isArray(e))\n switch (e.length) {\n case 1:\n return [e[0], e[0], e[0], e[0]];\n case 2:\n return [e[0], e[1], e[0], e[1]];\n case 3:\n return [e[0], e[1], e[2], e[1]];\n case 4:\n return e;\n default:\n return [0, 0, 0, 0];\n }\n return [e, e, e, e];\n}\nfunction Da(e, t, n) {\n const [o, i, r, a] = typeof e != \"string\" ? zi(e.padding) : [0, 0, 0, 0];\n return n && Ie(n.computedPosition.x) && Ie(n.computedPosition.y) && Ie(n.dimensions.width) && Ie(n.dimensions.height) ? [\n [n.computedPosition.x + a, n.computedPosition.y + o],\n [\n n.computedPosition.x + (n.dimensions.width - t.dimensions.width) - i,\n n.computedPosition.y + (n.dimensions.height - t.dimensions.height) - r\n ]\n ] : !1;\n}\nfunction za(e, t, n, o) {\n let i = e.extent || n;\n if (i === \"parent\" || !Array.isArray(i) && (i == null ? void 0 : i.range) === \"parent\")\n if (e.parentNode && o && e.dimensions.width && e.dimensions.height) {\n const r = Da(i, e, o);\n r && (i = r);\n } else\n t(new ve(he.NODE_EXTENT_INVALID, e.id)), i = n;\n else if (Array.isArray(i)) {\n const r = (o == null ? void 0 : o.computedPosition.x) || 0, a = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i[0][0] + r, i[0][1] + a],\n [i[1][0] + r, i[1][1] + a]\n ];\n } else if (i != null && i.range && Array.isArray(i.range)) {\n const [r, a, s, l] = zi(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;\n i = [\n [i.range[0][0] + u + l, i.range[0][1] + c + r],\n [i.range[1][0] + u - a, i.range[1][1] + c - s]\n ];\n }\n return i;\n}\nfunction go(e, t, n, o, i) {\n const r = za(e, n, o, i), a = so(t, r);\n return {\n position: {\n x: a.x - ((i == null ? void 0 : i.computedPosition.x) || 0),\n y: a.y - ((i == null ? void 0 : i.computedPosition.y) || 0)\n },\n computedPosition: a\n };\n}\nfunction Ai() {\n const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: a, emits: s } = fe();\n return (l, u = !1) => {\n const c = r.value ? i.value[0] : 5, v = r.value ? i.value[1] : 5, g = u ? 4 : 1, x = l.x * c * g, h = l.y * v * g, d = e.value.filter((w) => w.draggable || a && typeof w.draggable > \"u\").map((w) => {\n const y = { x: w.computedPosition.x + x, y: w.computedPosition.y + h }, { computedPosition: S } = go(\n w,\n y,\n s.error,\n t.value,\n w.parentNode ? o(w.parentNode) : void 0\n );\n return {\n id: w.id,\n position: S,\n from: w.position,\n distance: { x: l.x, y: l.y },\n dimensions: w.dimensions\n };\n });\n n(d, !0, !1);\n };\n}\nfunction Aa() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n dragStart: X(),\n drag: X(),\n dragStop: X()\n };\n}\nfunction Ba(e, t) {\n const n = Aa();\n return n.doubleClick.on((o) => {\n var i, r;\n t.nodeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.nodeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.nodeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.nodeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.nodeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.nodeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.dragStart.on((o) => {\n var i, r;\n t.nodeDragStart(o), (r = (i = e.events) == null ? void 0 : i.dragStart) == null || r.call(i, o);\n }), n.drag.on((o) => {\n var i, r;\n t.nodeDrag(o), (r = (i = e.events) == null ? void 0 : i.drag) == null || r.call(i, o);\n }), n.dragStop.on((o) => {\n var i, r;\n t.nodeDragStop(o), (r = (i = e.events) == null ? void 0 : i.dragStop) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nfunction Ra() {\n const { viewport: e, snapGrid: t, snapToGrid: n } = fe();\n return ({ sourceEvent: o }) => {\n const i = o.touches ? o.touches[0].clientX : o.clientX, r = o.touches ? o.touches[0].clientY : o.clientY, a = {\n x: (i - e.value.x) / e.value.zoom,\n y: (r - e.value.y) / e.value.zoom\n };\n return {\n xSnapped: n.value ? t.value[0] * Math.round(a.x / t.value[0]) : a.x,\n ySnapped: n.value ? t.value[1] * Math.round(a.y / t.value[1]) : a.y,\n ...a\n };\n };\n}\nfunction Lo(e, t, n) {\n const o = t.querySelectorAll(`.vue-flow__handle${e}`);\n if (!o || !o.length)\n return;\n const i = Array.from(o), r = t.getBoundingClientRect();\n return i.map((a) => {\n const s = a.getBoundingClientRect();\n return {\n id: a.getAttribute(\"data-handleid\"),\n position: a.getAttribute(\"data-handlepos\"),\n x: (s.left - r.left) / n,\n y: (s.top - r.top) / n,\n ...rn(a)\n };\n });\n}\nfunction Xn(e, t, n, o, i, r = !1, a) {\n i.value = !1, e.selected ? (r || e.selected && t) && (o([e]), Ue(a.blur)) : n([e]);\n}\nvar Va = { value: () => {\n} };\nfunction fn() {\n for (var e = 0, t = arguments.length, n = {}, o; e < t; ++e) {\n if (!(o = arguments[e] + \"\") || o in n || /[\\s.]/.test(o))\n throw new Error(\"illegal type: \" + o);\n n[o] = [];\n }\n return new Ht(n);\n}\nfunction Ht(e) {\n this._ = e;\n}\nfunction Ha(e, t) {\n return e.trim().split(/^|\\s+/).map(function(n) {\n var o = \"\", i = n.indexOf(\".\");\n if (i >= 0 && (o = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n))\n throw new Error(\"unknown type: \" + n);\n return { type: n, name: o };\n });\n}\nHt.prototype = fn.prototype = {\n constructor: Ht,\n on: function(e, t) {\n var n = this._, o = Ha(e + \"\", n), i, r = -1, a = o.length;\n if (arguments.length < 2) {\n for (; ++r < a; )\n if ((i = (e = o[r]).type) && (i = La(n[i], e.name)))\n return i;\n return;\n }\n if (t != null && typeof t != \"function\")\n throw new Error(\"invalid callback: \" + t);\n for (; ++r < a; )\n if (i = (e = o[r]).type)\n n[i] = Go(n[i], e.name, t);\n else if (t == null)\n for (i in n)\n n[i] = Go(n[i], e.name, null);\n return this;\n },\n copy: function() {\n var e = {}, t = this._;\n for (var n in t)\n e[n] = t[n].slice();\n return new Ht(e);\n },\n call: function(e, t) {\n if ((i = arguments.length - 2) > 0)\n for (var n = new Array(i), o = 0, i, r; o < i; ++o)\n n[o] = arguments[o + 2];\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (r = this._[e], o = 0, i = r.length; o < i; ++o)\n r[o].value.apply(t, n);\n },\n apply: function(e, t, n) {\n if (!this._.hasOwnProperty(e))\n throw new Error(\"unknown type: \" + e);\n for (var o = this._[e], i = 0, r = o.length; i < r; ++i)\n o[i].value.apply(t, n);\n }\n};\nfunction La(e, t) {\n for (var n = 0, o = e.length, i; n < o; ++n)\n if ((i = e[n]).name === t)\n return i.value;\n}\nfunction Go(e, t, n) {\n for (var o = 0, i = e.length; o < i; ++o)\n if (e[o].name === t) {\n e[o] = Va, e = e.slice(0, o).concat(e.slice(o + 1));\n break;\n }\n return n != null && e.push({ name: t, value: n }), e;\n}\nvar Zn = \"http://www.w3.org/1999/xhtml\";\nconst Fo = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: Zn,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nfunction hn(e) {\n var t = e += \"\", n = t.indexOf(\":\");\n return n >= 0 && (t = e.slice(0, n)) !== \"xmlns\" && (e = e.slice(n + 1)), Fo.hasOwnProperty(t) ? { space: Fo[t], local: e } : e;\n}\nfunction Ga(e) {\n return function() {\n var t = this.ownerDocument, n = this.namespaceURI;\n return n === Zn && t.documentElement.namespaceURI === Zn ? t.createElement(e) : t.createElementNS(n, e);\n };\n}\nfunction Fa(e) {\n return function() {\n return this.ownerDocument.createElementNS(e.space, e.local);\n };\n}\nfunction Bi(e) {\n var t = hn(e);\n return (t.local ? Fa : Ga)(t);\n}\nfunction Ya() {\n}\nfunction vo(e) {\n return e == null ? Ya : function() {\n return this.querySelector(e);\n };\n}\nfunction Xa(e) {\n typeof e != \"function\" && (e = vo(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = new Array(a), l, u, c = 0; c < a; ++c)\n (l = r[c]) && (u = e.call(l, l.__data__, c, r)) && (\"__data__\" in l && (u.__data__ = l.__data__), s[c] = u);\n return new _e(o, this._parents);\n}\nfunction Za(e) {\n return e == null ? [] : Array.isArray(e) ? e : Array.from(e);\n}\nfunction Ua() {\n return [];\n}\nfunction Ri(e) {\n return e == null ? Ua : function() {\n return this.querySelectorAll(e);\n };\n}\nfunction Wa(e) {\n return function() {\n return Za(e.apply(this, arguments));\n };\n}\nfunction Ka(e) {\n typeof e == \"function\" ? e = Wa(e) : e = Ri(e);\n for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)\n for (var a = t[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && (o.push(e.call(l, l.__data__, u, a)), i.push(l));\n return new _e(o, i);\n}\nfunction Vi(e) {\n return function() {\n return this.matches(e);\n };\n}\nfunction Hi(e) {\n return function(t) {\n return t.matches(e);\n };\n}\nvar qa = Array.prototype.find;\nfunction ja(e) {\n return function() {\n return qa.call(this.children, e);\n };\n}\nfunction Qa() {\n return this.firstElementChild;\n}\nfunction Ja(e) {\n return this.select(e == null ? Qa : ja(typeof e == \"function\" ? e : Hi(e)));\n}\nvar es = Array.prototype.filter;\nfunction ts() {\n return Array.from(this.children);\n}\nfunction ns(e) {\n return function() {\n return es.call(this.children, e);\n };\n}\nfunction os(e) {\n return this.selectAll(e == null ? ts : ns(typeof e == \"function\" ? e : Hi(e)));\n}\nfunction is(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new _e(o, this._parents);\n}\nfunction Li(e) {\n return new Array(e.length);\n}\nfunction rs() {\n return new _e(this._enter || this._groups.map(Li), this._parents);\n}\nfunction qt(e, t) {\n this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;\n}\nqt.prototype = {\n constructor: qt,\n appendChild: function(e) {\n return this._parent.insertBefore(e, this._next);\n },\n insertBefore: function(e, t) {\n return this._parent.insertBefore(e, t);\n },\n querySelector: function(e) {\n return this._parent.querySelector(e);\n },\n querySelectorAll: function(e) {\n return this._parent.querySelectorAll(e);\n }\n};\nfunction as(e) {\n return function() {\n return e;\n };\n}\nfunction ss(e, t, n, o, i, r) {\n for (var a = 0, s, l = t.length, u = r.length; a < u; ++a)\n (s = t[a]) ? (s.__data__ = r[a], o[a] = s) : n[a] = new qt(e, r[a]);\n for (; a < l; ++a)\n (s = t[a]) && (i[a] = s);\n}\nfunction ls(e, t, n, o, i, r, a) {\n var s, l, u = /* @__PURE__ */ new Map(), c = t.length, v = r.length, g = new Array(c), x;\n for (s = 0; s < c; ++s)\n (l = t[s]) && (g[s] = x = a.call(l, l.__data__, s, t) + \"\", u.has(x) ? i[s] = l : u.set(x, l));\n for (s = 0; s < v; ++s)\n x = a.call(e, r[s], s, r) + \"\", (l = u.get(x)) ? (o[s] = l, l.__data__ = r[s], u.delete(x)) : n[s] = new qt(e, r[s]);\n for (s = 0; s < c; ++s)\n (l = t[s]) && u.get(g[s]) === l && (i[s] = l);\n}\nfunction us(e) {\n return e.__data__;\n}\nfunction cs(e, t) {\n if (!arguments.length)\n return Array.from(this, us);\n var n = t ? ls : ss, o = this._parents, i = this._groups;\n typeof e != \"function\" && (e = as(e));\n for (var r = i.length, a = new Array(r), s = new Array(r), l = new Array(r), u = 0; u < r; ++u) {\n var c = o[u], v = i[u], g = v.length, x = ds(e.call(c, c && c.__data__, u, o)), h = x.length, d = s[u] = new Array(h), w = a[u] = new Array(h), y = l[u] = new Array(g);\n n(c, v, d, w, y, x, t);\n for (var S = 0, V = 0, p, N; S < h; ++S)\n if (p = d[S]) {\n for (S >= V && (V = S + 1); !(N = w[V]) && ++V < h; )\n ;\n p._next = N || null;\n }\n }\n return a = new _e(a, o), a._enter = s, a._exit = l, a;\n}\nfunction ds(e) {\n return typeof e == \"object\" && \"length\" in e ? e : Array.from(e);\n}\nfunction fs() {\n return new _e(this._exit || this._groups.map(Li), this._parents);\n}\nfunction hs(e, t, n) {\n var o = this.enter(), i = this, r = this.exit();\n return typeof e == \"function\" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + \"\"), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;\n}\nfunction gs(e) {\n for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, a = Math.min(i, r), s = new Array(i), l = 0; l < a; ++l)\n for (var u = n[l], c = o[l], v = u.length, g = s[l] = new Array(v), x, h = 0; h < v; ++h)\n (x = u[h] || c[h]) && (g[h] = x);\n for (; l < i; ++l)\n s[l] = n[l];\n return new _e(s, this._parents);\n}\nfunction vs() {\n for (var e = this._groups, t = -1, n = e.length; ++t < n; )\n for (var o = e[t], i = o.length - 1, r = o[i], a; --i >= 0; )\n (a = o[i]) && (r && a.compareDocumentPosition(r) ^ 4 && r.parentNode.insertBefore(a, r), r = a);\n return this;\n}\nfunction ms(e) {\n e || (e = ps);\n function t(v, g) {\n return v && g ? e(v.__data__, g.__data__) : !v - !g;\n }\n for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {\n for (var a = n[r], s = a.length, l = i[r] = new Array(s), u, c = 0; c < s; ++c)\n (u = a[c]) && (l[c] = u);\n l.sort(t);\n }\n return new _e(i, this._parents).order();\n}\nfunction ps(e, t) {\n return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;\n}\nfunction ys() {\n var e = arguments[0];\n return arguments[0] = this, e.apply(null, arguments), this;\n}\nfunction xs() {\n return Array.from(this);\n}\nfunction _s() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length; i < r; ++i) {\n var a = o[i];\n if (a)\n return a;\n }\n return null;\n}\nfunction ws() {\n let e = 0;\n for (const t of this)\n ++e;\n return e;\n}\nfunction bs() {\n return !this.node();\n}\nfunction Es(e) {\n for (var t = this._groups, n = 0, o = t.length; n < o; ++n)\n for (var i = t[n], r = 0, a = i.length, s; r < a; ++r)\n (s = i[r]) && e.call(s, s.__data__, r, i);\n return this;\n}\nfunction Ss(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ns(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction Cs(e, t) {\n return function() {\n this.setAttribute(e, t);\n };\n}\nfunction Ms(e, t) {\n return function() {\n this.setAttributeNS(e.space, e.local, t);\n };\n}\nfunction $s(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttribute(e) : this.setAttribute(e, n);\n };\n}\nfunction ks(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);\n };\n}\nfunction Os(e, t) {\n var n = hn(e);\n if (arguments.length < 2) {\n var o = this.node();\n return n.local ? o.getAttributeNS(n.space, n.local) : o.getAttribute(n);\n }\n return this.each((t == null ? n.local ? Ns : Ss : typeof t == \"function\" ? n.local ? ks : $s : n.local ? Ms : Cs)(n, t));\n}\nfunction Gi(e) {\n return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;\n}\nfunction Ts(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction Is(e, t, n) {\n return function() {\n this.style.setProperty(e, t, n);\n };\n}\nfunction Ps(e, t, n) {\n return function() {\n var o = t.apply(this, arguments);\n o == null ? this.style.removeProperty(e) : this.style.setProperty(e, o, n);\n };\n}\nfunction Ds(e, t, n) {\n return arguments.length > 1 ? this.each((t == null ? Ts : typeof t == \"function\" ? Ps : Is)(e, t, n ?? \"\")) : ft(this.node(), e);\n}\nfunction ft(e, t) {\n return e.style.getPropertyValue(t) || Gi(e).getComputedStyle(e, null).getPropertyValue(t);\n}\nfunction zs(e) {\n return function() {\n delete this[e];\n };\n}\nfunction As(e, t) {\n return function() {\n this[e] = t;\n };\n}\nfunction Bs(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n n == null ? delete this[e] : this[e] = n;\n };\n}\nfunction Rs(e, t) {\n return arguments.length > 1 ? this.each((t == null ? zs : typeof t == \"function\" ? Bs : As)(e, t)) : this.node()[e];\n}\nfunction Fi(e) {\n return e.trim().split(/^|\\s+/);\n}\nfunction mo(e) {\n return e.classList || new Yi(e);\n}\nfunction Yi(e) {\n this._node = e, this._names = Fi(e.getAttribute(\"class\") || \"\");\n}\nYi.prototype = {\n add: function(e) {\n var t = this._names.indexOf(e);\n t < 0 && (this._names.push(e), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n remove: function(e) {\n var t = this._names.indexOf(e);\n t >= 0 && (this._names.splice(t, 1), this._node.setAttribute(\"class\", this._names.join(\" \")));\n },\n contains: function(e) {\n return this._names.indexOf(e) >= 0;\n }\n};\nfunction Xi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.add(t[o]);\n}\nfunction Zi(e, t) {\n for (var n = mo(e), o = -1, i = t.length; ++o < i; )\n n.remove(t[o]);\n}\nfunction Vs(e) {\n return function() {\n Xi(this, e);\n };\n}\nfunction Hs(e) {\n return function() {\n Zi(this, e);\n };\n}\nfunction Ls(e, t) {\n return function() {\n (t.apply(this, arguments) ? Xi : Zi)(this, e);\n };\n}\nfunction Gs(e, t) {\n var n = Fi(e + \"\");\n if (arguments.length < 2) {\n for (var o = mo(this.node()), i = -1, r = n.length; ++i < r; )\n if (!o.contains(n[i]))\n return !1;\n return !0;\n }\n return this.each((typeof t == \"function\" ? Ls : t ? Vs : Hs)(n, t));\n}\nfunction Fs() {\n this.textContent = \"\";\n}\nfunction Ys(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Xs(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.textContent = t ?? \"\";\n };\n}\nfunction Zs(e) {\n return arguments.length ? this.each(e == null ? Fs : (typeof e == \"function\" ? Xs : Ys)(e)) : this.node().textContent;\n}\nfunction Us() {\n this.innerHTML = \"\";\n}\nfunction Ws(e) {\n return function() {\n this.innerHTML = e;\n };\n}\nfunction Ks(e) {\n return function() {\n var t = e.apply(this, arguments);\n this.innerHTML = t ?? \"\";\n };\n}\nfunction qs(e) {\n return arguments.length ? this.each(e == null ? Us : (typeof e == \"function\" ? Ks : Ws)(e)) : this.node().innerHTML;\n}\nfunction js() {\n this.nextSibling && this.parentNode.appendChild(this);\n}\nfunction Qs() {\n return this.each(js);\n}\nfunction Js() {\n this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nfunction el() {\n return this.each(Js);\n}\nfunction tl(e) {\n var t = typeof e == \"function\" ? e : Bi(e);\n return this.select(function() {\n return this.appendChild(t.apply(this, arguments));\n });\n}\nfunction nl() {\n return null;\n}\nfunction ol(e, t) {\n var n = typeof e == \"function\" ? e : Bi(e), o = t == null ? nl : typeof t == \"function\" ? t : vo(t);\n return this.select(function() {\n return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);\n });\n}\nfunction il() {\n var e = this.parentNode;\n e && e.removeChild(this);\n}\nfunction rl() {\n return this.each(il);\n}\nfunction al() {\n var e = this.cloneNode(!1), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction sl() {\n var e = this.cloneNode(!0), t = this.parentNode;\n return t ? t.insertBefore(e, this.nextSibling) : e;\n}\nfunction ll(e) {\n return this.select(e ? sl : al);\n}\nfunction ul(e) {\n return arguments.length ? this.property(\"__data__\", e) : this.node().__data__;\n}\nfunction cl(e) {\n return function(t) {\n e.call(this, t, this.__data__);\n };\n}\nfunction dl(e) {\n return e.trim().split(/^|\\s+/).map(function(t) {\n var n = \"\", o = t.indexOf(\".\");\n return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };\n });\n}\nfunction fl(e) {\n return function() {\n var t = this.__on;\n if (t) {\n for (var n = 0, o = -1, i = t.length, r; n < i; ++n)\n r = t[n], (!e.type || r.type === e.type) && r.name === e.name ? this.removeEventListener(r.type, r.listener, r.options) : t[++o] = r;\n ++o ? t.length = o : delete this.__on;\n }\n };\n}\nfunction hl(e, t, n) {\n return function() {\n var o = this.__on, i, r = cl(t);\n if (o) {\n for (var a = 0, s = o.length; a < s; ++a)\n if ((i = o[a]).type === e.type && i.name === e.name) {\n this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;\n return;\n }\n }\n this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];\n };\n}\nfunction gl(e, t, n) {\n var o = dl(e + \"\"), i, r = o.length, a;\n if (arguments.length < 2) {\n var s = this.node().__on;\n if (s) {\n for (var l = 0, u = s.length, c; l < u; ++l)\n for (i = 0, c = s[l]; i < r; ++i)\n if ((a = o[i]).type === c.type && a.name === c.name)\n return c.value;\n }\n return;\n }\n for (s = t ? hl : fl, i = 0; i < r; ++i)\n this.each(s(o[i], t, n));\n return this;\n}\nfunction Ui(e, t, n) {\n var o = Gi(e), i = o.CustomEvent;\n typeof i == \"function\" ? i = new i(t, n) : (i = o.document.createEvent(\"Event\"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);\n}\nfunction vl(e, t) {\n return function() {\n return Ui(this, e, t);\n };\n}\nfunction ml(e, t) {\n return function() {\n return Ui(this, e, t.apply(this, arguments));\n };\n}\nfunction pl(e, t) {\n return this.each((typeof t == \"function\" ? ml : vl)(e, t));\n}\nfunction* yl() {\n for (var e = this._groups, t = 0, n = e.length; t < n; ++t)\n for (var o = e[t], i = 0, r = o.length, a; i < r; ++i)\n (a = o[i]) && (yield a);\n}\nvar Wi = [null];\nfunction _e(e, t) {\n this._groups = e, this._parents = t;\n}\nfunction $t() {\n return new _e([[document.documentElement]], Wi);\n}\nfunction xl() {\n return this;\n}\n_e.prototype = $t.prototype = {\n constructor: _e,\n select: Xa,\n selectAll: Ka,\n selectChild: Ja,\n selectChildren: os,\n filter: is,\n data: cs,\n enter: rs,\n exit: fs,\n join: hs,\n merge: gs,\n selection: xl,\n order: vs,\n sort: ms,\n call: ys,\n nodes: xs,\n node: _s,\n size: ws,\n empty: bs,\n each: Es,\n attr: Os,\n style: Ds,\n property: Rs,\n classed: Gs,\n text: Zs,\n html: qs,\n raise: Qs,\n lower: el,\n append: tl,\n insert: ol,\n remove: rl,\n clone: ll,\n datum: ul,\n on: gl,\n dispatch: pl,\n [Symbol.iterator]: yl\n};\nfunction we(e) {\n return typeof e == \"string\" ? new _e([[document.querySelector(e)]], [document.documentElement]) : new _e([[e]], Wi);\n}\nfunction _l(e) {\n let t;\n for (; t = e.sourceEvent; )\n e = t;\n return e;\n}\nfunction Ne(e, t) {\n if (e = _l(e), t === void 0 && (t = e.currentTarget), t) {\n var n = t.ownerSVGElement || t;\n if (n.createSVGPoint) {\n var o = n.createSVGPoint();\n return o.x = e.clientX, o.y = e.clientY, o = o.matrixTransform(t.getScreenCTM().inverse()), [o.x, o.y];\n }\n if (t.getBoundingClientRect) {\n var i = t.getBoundingClientRect();\n return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];\n }\n }\n return [e.pageX, e.pageY];\n}\nconst wl = { passive: !1 }, bt = { capture: !0, passive: !1 };\nfunction $n(e) {\n e.stopImmediatePropagation();\n}\nfunction at(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Ki(e) {\n var t = e.document.documentElement, n = we(e).on(\"dragstart.drag\", at, bt);\n \"onselectstart\" in t ? n.on(\"selectstart.drag\", at, bt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = \"none\");\n}\nfunction qi(e, t) {\n var n = e.document.documentElement, o = we(e).on(\"dragstart.drag\", null);\n t && (o.on(\"click.drag\", at, bt), setTimeout(function() {\n o.on(\"click.drag\", null);\n }, 0)), \"onselectstart\" in n ? o.on(\"selectstart.drag\", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);\n}\nconst Pt = (e) => () => e;\nfunction Un(e, {\n sourceEvent: t,\n subject: n,\n target: o,\n identifier: i,\n active: r,\n x: a,\n y: s,\n dx: l,\n dy: u,\n dispatch: c\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n subject: { value: n, enumerable: !0, configurable: !0 },\n target: { value: o, enumerable: !0, configurable: !0 },\n identifier: { value: i, enumerable: !0, configurable: !0 },\n active: { value: r, enumerable: !0, configurable: !0 },\n x: { value: a, enumerable: !0, configurable: !0 },\n y: { value: s, enumerable: !0, configurable: !0 },\n dx: { value: l, enumerable: !0, configurable: !0 },\n dy: { value: u, enumerable: !0, configurable: !0 },\n _: { value: c }\n });\n}\nUn.prototype.on = function() {\n var e = this._.on.apply(this._, arguments);\n return e === this._ ? this : e;\n};\nfunction bl(e) {\n return !e.ctrlKey && !e.button;\n}\nfunction El() {\n return this.parentNode;\n}\nfunction Sl(e, t) {\n return t ?? { x: e.x, y: e.y };\n}\nfunction Nl() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Cl() {\n var e = bl, t = El, n = Sl, o = Nl, i = {}, r = fn(\"start\", \"drag\", \"end\"), a = 0, s, l, u, c, v = 0;\n function g(p) {\n p.on(\"mousedown.drag\", x).filter(o).on(\"touchstart.drag\", w).on(\"touchmove.drag\", y, wl).on(\"touchend.drag touchcancel.drag\", S).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n function x(p, N) {\n if (!(c || !e.call(this, p, N))) {\n var T = V(this, t.call(this, p, N), p, N, \"mouse\");\n T && (we(p.view).on(\"mousemove.drag\", h, bt).on(\"mouseup.drag\", d, bt), Ki(p.view), $n(p), u = !1, s = p.clientX, l = p.clientY, T(\"start\", p));\n }\n }\n function h(p) {\n if (at(p), !u) {\n var N = p.clientX - s, T = p.clientY - l;\n u = N * N + T * T > v;\n }\n i.mouse(\"drag\", p);\n }\n function d(p) {\n we(p.view).on(\"mousemove.drag mouseup.drag\", null), qi(p.view, u), at(p), i.mouse(\"end\", p);\n }\n function w(p, N) {\n if (e.call(this, p, N)) {\n var T = p.changedTouches, _ = t.call(this, p, N), P = T.length, R, $;\n for (R = 0; R < P; ++R)\n ($ = V(this, _, p, N, T[R].identifier, T[R])) && ($n(p), $(\"start\", p, T[R]));\n }\n }\n function y(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (_ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && (at(p), P(\"drag\", p, N[_]));\n }\n function S(p) {\n var N = p.changedTouches, T = N.length, _, P;\n for (c && clearTimeout(c), c = setTimeout(function() {\n c = null;\n }, 500), _ = 0; _ < T; ++_)\n (P = i[N[_].identifier]) && ($n(p), P(\"end\", p, N[_]));\n }\n function V(p, N, T, _, P, R) {\n var $ = r.copy(), D = Ne(R || T, N), Q, ee, m;\n if ((m = n.call(p, new Un(\"beforestart\", {\n sourceEvent: T,\n target: g,\n identifier: P,\n active: a,\n x: D[0],\n y: D[1],\n dx: 0,\n dy: 0,\n dispatch: $\n }), _)) != null)\n return Q = m.x - D[0] || 0, ee = m.y - D[1] || 0, function A(E, G, Z) {\n var K = D, z;\n switch (E) {\n case \"start\":\n i[P] = A, z = a++;\n break;\n case \"end\":\n delete i[P], --a;\n case \"drag\":\n D = Ne(Z || G, N), z = a;\n break;\n }\n $.call(\n E,\n p,\n new Un(E, {\n sourceEvent: G,\n subject: m,\n target: g,\n identifier: P,\n active: z,\n x: D[0] + Q,\n y: D[1] + ee,\n dx: D[0] - K[0],\n dy: D[1] - K[1],\n dispatch: $\n }),\n _\n );\n };\n }\n return g.filter = function(p) {\n return arguments.length ? (e = typeof p == \"function\" ? p : Pt(!!p), g) : e;\n }, g.container = function(p) {\n return arguments.length ? (t = typeof p == \"function\" ? p : Pt(p), g) : t;\n }, g.subject = function(p) {\n return arguments.length ? (n = typeof p == \"function\" ? p : Pt(p), g) : n;\n }, g.touchable = function(p) {\n return arguments.length ? (o = typeof p == \"function\" ? p : Pt(!!p), g) : o;\n }, g.on = function() {\n var p = r.on.apply(r, arguments);\n return p === r ? g : p;\n }, g.clickDistance = function(p) {\n return arguments.length ? (v = (p = +p) * p, g) : Math.sqrt(v);\n }, g;\n}\nfunction ji(e) {\n const t = fe(), n = M(t, \"vueFlowRef\"), o = M(t, \"snapToGrid\"), i = M(t, \"snapGrid\"), r = M(t, \"noDragClassName\"), a = M(t, \"nodes\"), s = M(t, \"nodeExtent\"), l = M(t, \"viewport\"), u = M(t, \"autoPanOnNodeDrag\"), c = M(t, \"nodesDraggable\"), v = M(t, \"panBy\"), g = M(t, \"findNode\"), x = M(t, \"multiSelectionActive\"), h = M(t, \"nodesSelectionActive\"), d = M(t, \"selectNodesOnDrag\"), w = M(t, \"removeSelectedElements\"), y = M(t, \"addSelectedNodes\"), S = M(t, \"updateNodePositions\"), V = M(t, \"emits\"), { onStart: p, onDrag: N, onStop: T, el: _, disabled: P, id: R, selectable: $ } = e, D = ie(!1);\n let Q = ie([]), ee = ie(), m = ie(null), A = ie({ x: void 0, y: void 0 }), E = ie({ x: 0, y: 0 }), G = ie(null), Z = ie(0), K = ie(!1);\n const z = Ra(), W = ({ x: q, y: te }) => {\n A.value = { x: q, y: te };\n let re = !1;\n if (Q.value = Q.value.map((k) => {\n const H = { x: q - k.distance.x, y: te - k.distance.y };\n o.value && (H.x = i.value[0] * Math.round(H.x / i.value[0]), H.y = i.value[1] * Math.round(H.y / i.value[1]));\n const { computedPosition: f } = go(\n k,\n H,\n V.value.error,\n s.value,\n k.parentNode ? g.value(k.parentNode) : void 0\n );\n return re = re || k.position.x !== f.x || k.position.y !== f.y, k.position = f, k;\n }), !!re && (S.value(Q.value, !0, !0), D.value = !0, G.value)) {\n const [k, H] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n N({ event: G.value, node: k, nodes: H });\n }\n }, B = () => {\n if (!m.value)\n return;\n const [q, te] = Pi(E.value, m.value);\n if (q !== 0 || te !== 0) {\n const re = {\n x: (A.value.x ?? 0) - q / l.value.zoom,\n y: (A.value.y ?? 0) - te / l.value.zoom\n };\n v.value({ x: q, y: te }) && W(re);\n }\n Z.value = requestAnimationFrame(B);\n };\n return de([() => le(P), _], ([q, te]) => {\n if (te) {\n const re = we(te);\n if (q)\n re.on(\".drag\", null);\n else {\n const k = g.value(R);\n ee.value = Cl().on(\"start\", (H) => {\n var b;\n !d.value && !x.value && k && (k.selected || w.value()), k && le($) && d.value && Xn(\n k,\n x.value,\n y.value,\n w.value,\n h,\n !1,\n te\n );\n const f = z(H);\n if (A.value = f, Q.value = Pa(a.value, c.value, f, g.value, R), Q.value.length) {\n const [L, I] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n p({ event: H.sourceEvent, node: L, nodes: I });\n }\n m.value = ((b = n.value) == null ? void 0 : b.getBoundingClientRect()) || null, E.value = rt(H.sourceEvent, m.value);\n }).on(\"drag\", (H) => {\n const f = z(H);\n !K.value && u.value && (K.value = !0, B()), (A.value.x !== f.xSnapped || A.value.y !== f.ySnapped) && Q.value.length && (G.value = H.sourceEvent, E.value = rt(H.sourceEvent, m.value), W(f));\n }).on(\"end\", (H) => {\n if (D.value = !1, K.value = !1, cancelAnimationFrame(Z.value), Q.value.length) {\n S.value(Q.value, !1, !1);\n const [f, b] = Mn({\n id: R,\n dragItems: Q.value,\n findNode: g.value\n });\n T({ event: H.sourceEvent, node: f, nodes: b });\n }\n }).filter((H) => {\n const f = H.target;\n return !H.button && (!r.value || !Ho(f, `.${r.value}`, te) && (!(k != null && k.dragHandle) || Ho(f, k.dragHandle, te)));\n }), re.call(ee.value);\n }\n }\n }), D;\n}\nconst Qi = \"vue-flow__node-desc\", Ji = \"vue-flow__edge-desc\", Ml = \"vue-flow__aria-live\", er = [\"Enter\", \" \", \"Escape\"], st = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 }\n};\nfunction Wn(e) {\n var i, r;\n const t = ((r = (i = e.composedPath) == null ? void 0 : i.call(e)) == null ? void 0 : r[0]) || e.target, n = Ae(t.hasAttribute) ? t.hasAttribute(\"contenteditable\") : !1, o = Ae(t.closest) ? t.closest(\".nokey\") : null;\n return [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(t == null ? void 0 : t.nodeName) || n || !!o;\n}\nfunction $l(e) {\n return e.ctrlKey || e.metaKey || e.shiftKey;\n}\nfunction kl(e, t) {\n return (n) => e.some((o) => {\n const i = o.split(\"+\").map((r) => r.trim().toLowerCase());\n return i.length === 1 ? n.key === o : (t.add(n.key.toLowerCase()), i.every((r) => t.has(r)));\n });\n}\nconst _t = (e, t) => {\n const n = ao(), o = ie(le(e) === !0), i = ie(!1), r = ie(/* @__PURE__ */ new Set());\n return de(o, () => {\n t == null || t(o.value);\n }), de(\n () => le(e),\n (a) => {\n if (n && typeof n.addEventListener < \"u\" && ro(n, \"blur\", () => {\n o.value = !1;\n }), zr(a)) {\n o.value = a;\n return;\n }\n Array.isArray(a) && (a = kl(a, r.value)), a && (Mo(\n a,\n (s) => {\n i.value = $l(s), !(!i.value && Wn(s)) && (s.preventDefault(), o.value = !0);\n },\n { eventName: \"keydown\" }\n ), Mo(\n a,\n (s) => {\n if (o.value) {\n if (!i.value && Wn(s))\n return;\n i.value = !1, r.value.clear(), o.value = !1;\n }\n },\n { eventName: \"keyup\" }\n ));\n },\n {\n immediate: !0\n }\n ), o;\n}, Ol = ge({\n name: \"Node\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"draggable\", \"selectable\", \"focusable\", \"connectable\", \"node\", \"resizeObserver\"],\n setup(e) {\n ut($i, e.id);\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"noPanClassName\"), r = M(t, \"selectNodesOnDrag\"), a = M(t, \"nodesSelectionActive\"), s = M(t, \"multiSelectionActive\"), l = M(t, \"emits\"), u = M(t, \"findNode\"), c = M(t, \"removeSelectedNodes\"), v = M(t, \"addSelectedNodes\"), g = M(t, \"updateNodeDimensions\"), x = M(t, \"onUpdateNodeInternals\"), h = M(t, \"getIntersectingNodes\"), d = M(t, \"getNodeTypes\"), w = M(t, \"nodeExtent\"), y = M(t, \"elevateNodesOnSelect\"), S = M(t, \"disableKeyboardA11y\"), V = M(t, \"ariaLiveMessage\"), p = M(t, \"snapToGrid\"), N = M(t, \"snapGrid\"), T = Ai(), _ = yt(e, \"node\"), P = J(() => u.value(_.value.parentNode)), R = J(() => sn([_.value], o.value)), $ = ie();\n ut(ki, $);\n const { emit: D, on: Q } = Ba(_.value, l.value), ee = ji({\n id: e.id,\n el: $,\n disabled: () => !e.draggable,\n selectable: () => e.selectable,\n onStart(k) {\n D.dragStart({ ...k, intersections: h.value(_.value) });\n },\n onDrag(k) {\n D.drag({ ...k, intersections: h.value(_.value) });\n },\n onStop(k) {\n D.dragStop({ ...k, intersections: h.value(_.value) });\n }\n }), m = J(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = J(() => {\n const k = (_.value.style instanceof Function ? _.value.style(_.value) : _.value.style) || {}, H = _.value.width instanceof Function ? _.value.width(_.value) : _.value.width, f = _.value.height instanceof Function ? _.value.height(_.value) : _.value.height;\n return H && (k.width = typeof H == \"string\" ? H : `${H}px`), f && (k.height = typeof f == \"string\" ? f : `${f}px`), k;\n }), E = () => Number(_.value.zIndex ?? A.value.zIndex ?? 0);\n return x.value((k) => {\n k.includes(e.id) && Z();\n }), Ve(() => {\n e.resizeObserver.observe($.value);\n }), gi(() => {\n e.resizeObserver.unobserve($.value);\n }), de(\n [() => _.value.type, () => _.value.sourcePosition, () => _.value.targetPosition],\n () => {\n g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n },\n { flush: \"pre\" }\n ), de(\n [\n () => _.value.position.x,\n () => _.value.position.y,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.x;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.y;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.computedPosition.z;\n },\n () => E(),\n () => _.value.selected,\n () => _.value.dimensions.height,\n () => _.value.dimensions.width,\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.height;\n },\n () => {\n var k;\n return (k = P.value) == null ? void 0 : k.dimensions.width;\n }\n ],\n ([k, H, f, b, L, I]) => {\n const F = {\n x: k,\n y: H,\n z: I + (y.value && _.value.selected ? 1e3 : 0)\n };\n Ie(f) && Ie(b) ? _.value.computedPosition = ma({ x: f, y: b, z: L }, F) : _.value.computedPosition = F;\n },\n { flush: \"pre\", immediate: !0 }\n ), de([() => _.value.extent, () => w.value], ([k, H], [f, b]) => {\n (k !== f || H !== b) && G();\n }), _.value.extent === \"parent\" || typeof _.value.extent == \"object\" && \"range\" in _.value.extent && _.value.extent.range === \"parent\" ? ye(() => _.value.initialized).toBe(!0).then(G) : G(), () => ue(\n \"div\",\n {\n ref: $,\n \"data-id\": _.value.id,\n class: [\n \"vue-flow__node\",\n `vue-flow__node-${e.type === !1 ? \"default\" : e.name}`,\n {\n [i.value]: e.draggable,\n dragging: ee == null ? void 0 : ee.value,\n selected: _.value.selected,\n selectable: e.selectable\n },\n m.value\n ],\n style: {\n zIndex: _.value.computedPosition.z ?? E(),\n transform: `translate(${_.value.computedPosition.x}px,${_.value.computedPosition.y}px)`,\n pointerEvents: e.selectable || e.draggable ? \"all\" : \"none\",\n visibility: _.value.initialized ? \"visible\" : \"hidden\",\n ...A.value\n },\n tabIndex: e.focusable ? 0 : void 0,\n role: e.focusable ? \"button\" : void 0,\n \"aria-describedby\": S.value ? void 0 : `${Qi}-${n.value}`,\n \"aria-label\": _.value.ariaLabel,\n onMouseenter: K,\n onMousemove: z,\n onMouseleave: W,\n onContextmenu: B,\n onClick: te,\n onDblclick: q,\n onKeydown: re\n },\n [\n ue(e.type === !1 ? d.value.default : e.type, {\n id: _.value.id,\n type: _.value.type,\n data: _.value.data,\n events: { ..._.value.events, ...Q },\n selected: !!_.value.selected,\n resizing: !!_.value.resizing,\n dragging: ee.value,\n connectable: e.connectable,\n position: _.value.position,\n dimensions: _.value.dimensions,\n isValidTargetPos: _.value.isValidTargetPos,\n isValidSourcePos: _.value.isValidSourcePos,\n parent: _.value.parentNode,\n zIndex: _.value.computedPosition.z,\n targetPosition: _.value.targetPosition,\n sourcePosition: _.value.sourcePosition,\n label: _.value.label,\n dragHandle: _.value.dragHandle,\n onUpdateNodeInternals: Z\n })\n ]\n );\n function G() {\n const k = _.value.computedPosition;\n p.value && (k.x = N.value[0] * Math.round(k.x / N.value[0]), k.y = N.value[1] * Math.round(k.y / N.value[1]));\n const { computedPosition: H, position: f } = go(_.value, k, l.value.error, w.value, P.value);\n (_.value.computedPosition.x !== H.x || _.value.computedPosition.y !== H.y) && (_.value.computedPosition = { ..._.value.computedPosition, ...H }), (_.value.position.x !== f.x || _.value.position.y !== f.y) && (_.value.position = f);\n }\n function Z() {\n $.value && g.value([{ id: e.id, nodeElement: $.value, forceUpdate: !0 }]);\n }\n function K(k) {\n ee != null && ee.value || D.mouseEnter({ event: k, node: _.value, connectedEdges: R.value });\n }\n function z(k) {\n ee != null && ee.value || D.mouseMove({ event: k, node: _.value, connectedEdges: R.value });\n }\n function W(k) {\n ee != null && ee.value || D.mouseLeave({ event: k, node: _.value, connectedEdges: R.value });\n }\n function B(k) {\n return D.contextMenu({ event: k, node: _.value, connectedEdges: R.value });\n }\n function q(k) {\n return D.doubleClick({ event: k, node: _.value, connectedEdges: R.value });\n }\n function te(k) {\n e.selectable && (!r.value || !e.draggable) && Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n !1,\n $.value\n ), D.click({ event: k, node: _.value, connectedEdges: R.value });\n }\n function re(k) {\n var H;\n if (!Wn(k))\n if (er.includes(k.key) && e.selectable) {\n const f = k.key === \"Escape\";\n f && ((H = $.value) == null || H.blur()), Xn(\n _.value,\n s.value,\n v.value,\n c.value,\n a,\n f,\n $.value\n );\n } else\n !S.value && e.draggable && _.value.selected && st[k.key] && (V.value = `Moved selected node ${k.key.replace(\"Arrow\", \"\").toLowerCase()}. New position, x: ${~~_.value.position.x}, y: ${~~_.value.position.y}`, T(\n {\n x: st[k.key].x,\n y: st[k.key].y\n },\n k.shiftKey\n ));\n }\n }\n}), Tl = Ol, Il = [\"transform\"], Pl = [\"width\", \"height\", \"x\", \"y\", \"rx\", \"ry\"], Dl = [\"y\"], zl = {\n name: \"EdgeText\",\n compatConfig: { MODE: 3 }\n}, Al = /* @__PURE__ */ ge({\n ...zl,\n props: {\n x: null,\n y: null,\n label: null,\n labelStyle: { default: {} },\n labelShowBg: { type: Boolean, default: !0 },\n labelBgStyle: { default: {} },\n labelBgPadding: { default: [2, 4] },\n labelBgBorderRadius: { default: 2 }\n },\n setup(e) {\n let t = ie({ x: 0, y: 0, width: 0, height: 0 });\n const n = ie(null), o = J(() => `translate(${e.x - t.value.width / 2} ${e.y - t.value.height / 2})`);\n Ve(i), de([() => e.x, () => e.y, n, () => e.label], i);\n function i() {\n if (!n.value)\n return;\n const r = n.value.getBBox();\n (r.width !== t.value.width || r.height !== t.value.height) && (t.value = r);\n }\n return (r, a) => (oe(), se(\"g\", {\n transform: C(o),\n class: \"vue-flow__edge-textwrapper\"\n }, [\n e.labelShowBg ? (oe(), se(\"rect\", {\n key: 0,\n class: \"vue-flow__edge-textbg\",\n width: `${C(t).width + 2 * e.labelBgPadding[0]}px`,\n height: `${C(t).height + 2 * e.labelBgPadding[1]}px`,\n x: -e.labelBgPadding[0],\n y: -e.labelBgPadding[1],\n style: Le(e.labelBgStyle),\n rx: e.labelBgBorderRadius,\n ry: e.labelBgBorderRadius\n }, null, 12, Pl)) : Ee(\"\", !0),\n ct(\"text\", vi(r.$attrs, {\n ref_key: \"el\",\n ref: n,\n class: \"vue-flow__edge-text\",\n y: C(t).height / 2,\n dy: \"0.3em\",\n style: e.labelStyle\n }), [\n xe(r.$slots, \"default\", {}, () => [\n C(Pe)(e.label) ? (oe(), se(Ce, { key: 1 }, [\n Cr(Vn(e.label), 1)\n ], 64)) : (oe(), ze(mi(e.label), { key: 0 }))\n ])\n ], 16, Dl)\n ], 8, Il));\n }\n}), gn = function({\n path: e,\n label: t,\n labelX: n,\n labelY: o,\n labelBgBorderRadius: i,\n labelBgPadding: r,\n labelBgStyle: a,\n labelShowBg: s = !0,\n labelStyle: l,\n markerStart: u,\n markerEnd: c,\n interactionWidth: v = 20\n}, { attrs: g }) {\n return [\n ue(\"path\", {\n style: g.style,\n class: [\"vue-flow__edge-path\", g.class].join(\" \"),\n d: e,\n \"marker-end\": c,\n \"marker-start\": u\n }),\n v ? ue(\"path\", {\n d: e,\n fill: \"none\",\n \"stroke-opacity\": 0,\n \"stroke-width\": v\n }) : null,\n t && Ie(n) && Ie(o) ? ue(Al, {\n x: n,\n y: o,\n label: t,\n labelStyle: l,\n labelShowBg: s,\n labelBgStyle: a,\n labelBgPadding: r,\n labelBgBorderRadius: i\n }) : null\n ];\n};\ngn.props = [\n \"path\",\n \"labelX\",\n \"labelY\",\n \"label\",\n \"labelBgBorderRadius\",\n \"labelBgPadding\",\n \"labelBgStyle\",\n \"labelShowBg\",\n \"labelStyle\",\n \"markerStart\",\n \"markerEnd\",\n \"interactionWidth\"\n];\ngn.inheritAttrs = !1;\ngn.compatConfig = { MODE: 3 };\nconst vn = gn;\nfunction tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, a = Math.abs(o - t) / 2, s = o < t ? o + a : o - a;\n return [r, s, i, a];\n}\nfunction nr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o,\n sourceControlX: i,\n sourceControlY: r,\n targetControlX: a,\n targetControlY: s\n}) {\n const l = e * 0.125 + i * 0.375 + a * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(l - e), v = Math.abs(u - t);\n return [l, u, c, v];\n}\nfunction Dt(e, t) {\n return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);\n}\nfunction Yo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {\n let a, s;\n switch (e) {\n case j.Left:\n a = t - Dt(t - o, r), s = n;\n break;\n case j.Right:\n a = t + Dt(o - t, r), s = n;\n break;\n case j.Top:\n a = t, s = n - Dt(n - i, r);\n break;\n case j.Bottom:\n a = t, s = n + Dt(i - n, r);\n break;\n }\n return [a, s];\n}\nfunction Kn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n curvature: a = 0.25\n}) {\n const [s, l] = Yo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i,\n c: a\n }), [u, c] = Yo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t,\n c: a\n }), [v, g, x, h] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: s,\n sourceControlY: l,\n targetControlX: u,\n targetControlY: c\n });\n return [\n `M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,\n v,\n g,\n x,\n h\n ];\n}\nconst mn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = Kn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nmn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"curvature\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nmn.inheritAttrs = !1;\nmn.compatConfig = { MODE: 3 };\nconst Bl = mn;\nfunction Xo({ pos: e, x1: t, y1: n, x2: o, y2: i }) {\n let r, a;\n switch (e) {\n case j.Left:\n case j.Right:\n r = 0.5 * (t + o), a = n;\n break;\n case j.Top:\n case j.Bottom:\n r = t, a = 0.5 * (n + i);\n break;\n }\n return [r, a];\n}\nfunction or({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top\n}) {\n const [a, s] = Xo({\n pos: n,\n x1: e,\n y1: t,\n x2: o,\n y2: i\n }), [l, u] = Xo({\n pos: r,\n x1: o,\n y1: i,\n x2: e,\n y2: t\n }), [c, v, g, x] = nr({\n sourceX: e,\n sourceY: t,\n targetX: o,\n targetY: i,\n sourceControlX: a,\n sourceControlY: s,\n targetControlX: l,\n targetControlY: u\n });\n return [\n `M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,\n c,\n v,\n g,\n x\n ];\n}\nconst pn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = or({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\npn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\npn.inheritAttrs = !1;\npn.compatConfig = { MODE: 3 };\nconst Rl = pn, Zo = {\n [j.Left]: { x: -1, y: 0 },\n [j.Right]: { x: 1, y: 0 },\n [j.Top]: { x: 0, y: -1 },\n [j.Bottom]: { x: 0, y: 1 }\n};\nfunction Vl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n\n}) {\n return t === j.Left || t === j.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n}\nfunction Uo(e, t) {\n return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);\n}\nfunction Hl({\n source: e,\n sourcePosition: t = j.Bottom,\n target: n,\n targetPosition: o = j.Top,\n center: i,\n offset: r\n}) {\n const a = Zo[t], s = Zo[o], l = { x: e.x + a.x * r, y: e.y + a.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Vl({\n source: l,\n sourcePosition: t,\n target: u\n }), v = c.x !== 0 ? \"x\" : \"y\", g = c[v];\n let x, h, d;\n const [w, y, S, V] = tr({\n sourceX: e.x,\n sourceY: e.y,\n targetX: n.x,\n targetY: n.y\n });\n if (a[v] * s[v] === -1) {\n h = i.x || w, d = i.y || y;\n const N = [\n { x: h, y: l.y },\n { x: h, y: u.y }\n ], T = [\n { x: l.x, y: d },\n { x: u.x, y: d }\n ];\n a[v] === g ? x = v === \"x\" ? N : T : x = v === \"x\" ? T : N;\n } else {\n const N = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];\n if (v === \"x\" ? x = a.x === g ? T : N : x = a.y === g ? N : T, t !== o) {\n const _ = v === \"x\" ? \"y\" : \"x\", P = a[v] === s[_], R = l[_] > u[_], $ = l[_] < u[_];\n (a[v] === 1 && (!P && R || P && $) || a[v] !== 1 && (!P && $ || P && R)) && (x = v === \"x\" ? N : T);\n }\n h = x[0].x, d = x[0].y;\n }\n return [[e, l, ...x, u, n], h, d, S, V];\n}\nfunction Ll(e, t, n, o) {\n const i = Math.min(Uo(e, t) / 2, Uo(t, n) / 2, o), { x: r, y: a } = t;\n if (e.x === r && r === n.x || e.y === a && a === n.y)\n return `L${r} ${a}`;\n if (e.y === a) {\n const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;\n return `L ${r + i * u},${a}Q ${r},${a} ${r},${a + i * c}`;\n }\n const s = e.x < n.x ? 1 : -1, l = e.y < n.y ? -1 : 1;\n return `L ${r},${a + i * l}Q ${r},${a} ${r + i * s},${a}`;\n}\nfunction qn({\n sourceX: e,\n sourceY: t,\n sourcePosition: n = j.Bottom,\n targetX: o,\n targetY: i,\n targetPosition: r = j.Top,\n borderRadius: a = 5,\n centerX: s,\n centerY: l,\n offset: u = 20\n}) {\n const [c, v, g, x, h] = Hl({\n source: { x: e, y: t },\n sourcePosition: n,\n target: { x: o, y: i },\n targetPosition: r,\n center: { x: s, y: l },\n offset: u\n });\n return [c.reduce((w, y, S) => {\n let V;\n return S > 0 && S < c.length - 1 ? V = Ll(c[S - 1], y, c[S + 1], a) : V = `${S === 0 ? \"M\" : \"L\"}${y.x} ${y.y}`, w += V, w;\n }, \"\"), v, g, x, h];\n}\nconst yn = function({ sourcePosition: e = j.Bottom, targetPosition: t = j.Top, ...n }, { attrs: o }) {\n const [i, r, a] = qn({\n sourcePosition: e,\n targetPosition: t,\n ...n\n });\n return ue(vn, {\n path: i,\n labelX: r,\n labelY: a,\n ...n,\n ...o\n });\n};\nyn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"borderRadius\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\",\n \"offset\"\n];\nyn.inheritAttrs = !1;\nyn.compatConfig = { MODE: 3 };\nconst ir = yn, xn = function(e, { attrs: t }) {\n return ue(ir, { ...e, ...t, borderRadius: 0 });\n};\nxn.props = [\n \"sourcePosition\",\n \"targetPosition\",\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\nxn.inheritAttrs = !1;\nxn.compatConfig = { MODE: 3 };\nconst Gl = xn;\nfunction rr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n}) {\n const [i, r, a, s] = tr({\n sourceX: e,\n sourceY: t,\n targetX: n,\n targetY: o\n });\n return [`M ${e},${t}L ${n},${o}`, i, r, a, s];\n}\nconst _n = function(e, { attrs: t }) {\n const [n, o, i] = rr(e);\n return ue(vn, {\n path: n,\n labelX: o,\n labelY: i,\n ...e,\n ...t\n });\n};\n_n.props = [\n \"label\",\n \"labelStyle\",\n \"labelShowBg\",\n \"labelBgStyle\",\n \"labelBgPadding\",\n \"labelBgBorderRadius\",\n \"sourceY\",\n \"sourceX\",\n \"targetX\",\n \"targetY\",\n \"markerEnd\",\n \"markerStart\",\n \"interactionWidth\"\n];\n_n.inheritAttrs = !1;\n_n.compatConfig = { MODE: 3 };\nconst Fl = _n;\nfunction Yl(e, t, n) {\n return n === j.Left ? e - t : n === j.Right ? e + t : e;\n}\nfunction Xl(e, t, n) {\n return n === j.Top ? e - t : n === j.Bottom ? e + t : e;\n}\nconst po = function({\n radius: e = 10,\n centerX: t = 0,\n centerY: n = 0,\n position: o = j.Top,\n type: i\n}) {\n return ue(\"circle\", {\n class: `vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,\n cx: Yl(t, e, o),\n cy: Xl(n, e, o),\n r: e,\n stroke: \"transparent\",\n fill: \"transparent\"\n });\n};\npo.props = [\"radius\", \"centerX\", \"centerY\", \"position\", \"type\"];\npo.compatConfig = { MODE: 3 };\nconst Wo = po;\nfunction Zl() {\n return {\n doubleClick: X(),\n click: X(),\n mouseEnter: X(),\n mouseMove: X(),\n mouseLeave: X(),\n contextMenu: X(),\n updateStart: X(),\n update: X(),\n updateEnd: X()\n };\n}\nfunction Ul(e, t) {\n const n = Zl();\n return n.doubleClick.on((o) => {\n var i, r;\n t.edgeDoubleClick(o), (r = (i = e.events) == null ? void 0 : i.doubleClick) == null || r.call(i, o);\n }), n.click.on((o) => {\n var i, r;\n t.edgeClick(o), (r = (i = e.events) == null ? void 0 : i.click) == null || r.call(i, o);\n }), n.mouseEnter.on((o) => {\n var i, r;\n t.edgeMouseEnter(o), (r = (i = e.events) == null ? void 0 : i.mouseEnter) == null || r.call(i, o);\n }), n.mouseMove.on((o) => {\n var i, r;\n t.edgeMouseMove(o), (r = (i = e.events) == null ? void 0 : i.mouseMove) == null || r.call(i, o);\n }), n.mouseLeave.on((o) => {\n var i, r;\n t.edgeMouseLeave(o), (r = (i = e.events) == null ? void 0 : i.mouseLeave) == null || r.call(i, o);\n }), n.contextMenu.on((o) => {\n var i, r;\n t.edgeContextMenu(o), (r = (i = e.events) == null ? void 0 : i.contextMenu) == null || r.call(i, o);\n }), n.updateStart.on((o) => {\n var i, r;\n t.edgeUpdateStart(o), (r = (i = e.events) == null ? void 0 : i.updateStart) == null || r.call(i, o);\n }), n.update.on((o) => {\n var i, r;\n t.edgeUpdate(o), (r = (i = e.events) == null ? void 0 : i.update) == null || r.call(i, o);\n }), n.updateEnd.on((o) => {\n var i, r;\n t.edgeUpdateEnd(o), (r = (i = e.events) == null ? void 0 : i.updateEnd) == null || r.call(i, o);\n }), Object.entries(n).reduce(\n (o, [i, r]) => (o.emit[i] = r.trigger, o.on[i] = r.on, o),\n { emit: {}, on: {} }\n );\n}\nconst Wl = ge({\n name: \"Edge\",\n compatConfig: { MODE: 3 },\n props: [\"name\", \"type\", \"id\", \"updatable\", \"selectable\", \"focusable\", \"edge\"],\n setup(e) {\n const {\n id: t,\n addSelectedEdges: n,\n connectionMode: o,\n edgeUpdaterRadius: i,\n emits: r,\n nodesSelectionActive: a,\n noPanClassName: s,\n getEdgeTypes: l,\n removeSelectedEdges: u,\n findEdge: c,\n findNode: v,\n isValidConnection: g\n } = fe(), x = Ul(e.edge, r), h = yt(e, \"edge\");\n let d = ie(!1), w = ie(!1);\n const y = ie(\"\"), S = ie(null), V = ie(\"source\"), p = ie();\n ut(Oi, e.id), ut(Ti, p);\n const N = J(() => h.value.class instanceof Function ? h.value.class(h.value) : h.value.class), T = J(() => h.value.style instanceof Function ? h.value.style(h.value) : h.value.style), { handlePointerDown: _ } = Di({\n nodeId: y,\n handleId: S,\n type: V,\n isValidConnection: g.value,\n edgeUpdaterType: V,\n onEdgeUpdate: $,\n onEdgeUpdateEnd: D\n });\n return () => {\n const B = v(h.value.source), q = v(h.value.target);\n if (!B || !q || !h.value)\n return null;\n let te;\n o.value === Qe.Strict ? te = B.handleBounds.source : te = [...B.handleBounds.source || [], ...B.handleBounds.target || []];\n const re = Ao(te, h.value.sourceHandle);\n let k;\n o.value === Qe.Strict ? k = q.handleBounds.target : k = [...q.handleBounds.target || [], ...q.handleBounds.source || []];\n const H = Ao(k, h.value.targetHandle), f = re ? re.position : j.Bottom, b = H ? H.position : j.Top, { sourceX: L, sourceY: I, targetY: F, targetX: U } = wa(\n B,\n re,\n f,\n q,\n H,\n b\n );\n return h.value.sourceX = L, h.value.sourceY = I, h.value.targetX = U, h.value.targetY = F, ue(\n \"g\",\n {\n ref: p,\n key: e.id,\n \"data-id\": e.id,\n class: [\n \"vue-flow__edge\",\n `vue-flow__edge-${e.type === !1 ? \"default\" : e.name}`,\n s.value,\n N.value,\n {\n updating: d.value,\n selected: h.value.selected,\n animated: h.value.animated,\n inactive: !e.selectable\n }\n ],\n onClick: ee,\n onContextmenu: m,\n onDblclick: A,\n onMouseenter: E,\n onMousemove: G,\n onMouseleave: Z,\n onKeyDown: e.focusable ? W : void 0,\n tabIndex: e.focusable ? 0 : void 0,\n \"aria-label\": h.value.ariaLabel === null ? void 0 : h.value.ariaLabel || `Edge from ${h.value.source} to ${h.value.target}`,\n \"aria-describedby\": e.focusable ? `${Ji}-${t}` : void 0,\n role: e.focusable ? \"button\" : void 0\n },\n [\n w.value ? null : ue(e.type === !1 ? l.value.default : e.type, {\n id: e.id,\n sourceNode: B,\n targetNode: q,\n source: h.value.source,\n target: h.value.target,\n type: h.value.type,\n updatable: e.updatable,\n selected: h.value.selected,\n animated: h.value.animated,\n label: h.value.label,\n labelStyle: h.value.labelStyle,\n labelShowBg: h.value.labelShowBg,\n labelBgStyle: h.value.labelBgStyle,\n labelBgPadding: h.value.labelBgPadding,\n labelBgBorderRadius: h.value.labelBgBorderRadius,\n data: h.value.data,\n events: { ...h.value.events, ...x.on },\n style: T.value,\n markerStart: `url(#${Xe(h.value.markerStart, t)})`,\n markerEnd: `url(#${Xe(h.value.markerEnd, t)})`,\n sourcePosition: f,\n targetPosition: b,\n sourceX: L,\n sourceY: I,\n targetX: U,\n targetY: F,\n sourceHandleId: h.value.sourceHandle,\n targetHandleId: h.value.targetHandle,\n interactionWidth: h.value.interactionWidth\n }),\n [\n e.updatable === \"source\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: K,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: f,\n centerX: L,\n centerY: I,\n radius: i.value,\n type: \"source\",\n \"data-type\": \"source\"\n })\n )\n ] : null,\n e.updatable === \"target\" || e.updatable === !0 ? [\n ue(\n \"g\",\n {\n onMousedown: z,\n onMouseenter: P,\n onMouseout: R\n },\n ue(Wo, {\n position: b,\n centerX: U,\n centerY: F,\n radius: i.value,\n type: \"target\",\n \"data-type\": \"target\"\n })\n )\n ] : null\n ]\n ]\n );\n };\n function P() {\n d.value = !0;\n }\n function R() {\n d.value = !1;\n }\n function $(B, q) {\n x.emit.update({ event: B, edge: h.value, connection: q });\n }\n function D(B) {\n x.emit.updateEnd({ event: B, edge: h.value }), w.value = !1;\n }\n function Q(B, q) {\n B.button === 0 && (w.value = !0, y.value = q ? h.value.target : h.value.source, S.value = (q ? h.value.targetHandle : h.value.sourceHandle) ?? \"\", V.value = q ? \"target\" : \"source\", x.emit.updateStart({ event: B, edge: h.value }), _(B));\n }\n function ee(B) {\n const q = { event: B, edge: h.value };\n e.selectable && (a.value = !1, n([h.value])), x.emit.click(q);\n }\n function m(B) {\n x.emit.contextMenu({ event: B, edge: h.value });\n }\n function A(B) {\n x.emit.doubleClick({ event: B, edge: h.value });\n }\n function E(B) {\n x.emit.mouseEnter({ event: B, edge: h.value });\n }\n function G(B) {\n x.emit.mouseMove({ event: B, edge: h.value });\n }\n function Z(B) {\n x.emit.mouseLeave({ event: B, edge: h.value });\n }\n function K(B) {\n Q(B, !0);\n }\n function z(B) {\n Q(B, !1);\n }\n function W(B) {\n var q;\n er.includes(B.key) && e.selectable && (B.key === \"Escape\" ? ((q = p.value) == null || q.blur(), u([c(e.id)])) : n([c(e.id)]));\n }\n }\n}), Kl = Wl, ql = {\n height: \"0\",\n width: \"0\"\n}, jl = {\n name: \"EdgeLabelRenderer\",\n compatConfig: { MODE: 3 }\n}, Rd = /* @__PURE__ */ ge({\n ...jl,\n setup(e) {\n const { viewportRef: t } = fe(), n = J(() => {\n var o;\n return (o = t.value) == null ? void 0 : o.getElementsByClassName(\"vue-flow__edge-labels\")[0];\n });\n return (o, i) => (oe(), se(\"svg\", null, [\n (oe(), se(\"foreignObject\", ql, [\n (oe(), ze(Mr, {\n to: C(n),\n disabled: !C(n)\n }, [\n xe(o.$slots, \"default\")\n ], 8, [\"to\", \"disabled\"]))\n ]))\n ]));\n }\n}), Ql = { class: \"vue-flow__connection\" }, Jl = [\"d\", \"marker-end\", \"marker-start\"], eu = {\n name: \"ConnectionLine\",\n compatConfig: { MODE: 3 }\n}, tu = /* @__PURE__ */ ge({\n ...eu,\n props: {\n sourceNode: null\n },\n setup(e) {\n var R;\n const t = fe(), n = M(t, \"connectionMode\"), o = M(t, \"connectionStartHandle\"), i = M(t, \"connectionEndHandle\"), r = M(t, \"connectionPosition\"), a = M(t, \"connectionLineType\"), s = M(t, \"connectionLineStyle\"), l = M(t, \"connectionLineOptions\"), u = M(t, \"connectionStatus\"), c = M(t, \"viewport\"), v = M(t, \"findNode\"), g = {\n [j.Left]: j.Right,\n [j.Right]: j.Left,\n [j.Top]: j.Bottom,\n [j.Bottom]: j.Top\n }, x = (R = He(ln)) == null ? void 0 : R[\"connection-line\"], h = J(() => o.value.handleId), d = J(() => o.value.type), w = J(() => {\n var $;\n return (($ = i.value) == null ? void 0 : $.handleId) && v.value(i.value.nodeId) || null;\n }), y = J(\n () => {\n var $, D;\n return (n.value === Qe.Strict ? ($ = e.sourceNode.handleBounds[d.value]) == null ? void 0 : $.find((Q) => Q.id === h.value) : [...e.sourceNode.handleBounds.source || [], ...e.sourceNode.handleBounds.target || []].find((Q) => Q.id === h.value)) || ((D = e.sourceNode.handleBounds[d.value ?? \"source\"]) == null ? void 0 : D[0]);\n }\n ), S = J(() => {\n var $, D, Q;\n return w.value && (($ = i.value) == null ? void 0 : $.handleId) && ((n.value === Qe.Strict ? (D = w.value.handleBounds[d.value === \"source\" ? \"target\" : \"source\"]) == null ? void 0 : D.find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n ) : [...w.value.handleBounds.source || [], ...w.value.handleBounds.target || []].find(\n (ee) => {\n var m;\n return ee.id === ((m = i.value) == null ? void 0 : m.handleId);\n }\n )) || ((Q = w.value.handleBounds[d.value ?? \"target\"]) == null ? void 0 : Q[0])) || null;\n }), V = J(() => {\n var $;\n return ($ = y.value) == null ? void 0 : $.position;\n }), p = J(() => y.value ? Wt(\n V.value || j.Top,\n { ...e.sourceNode.dimensions, ...e.sourceNode.computedPosition },\n y.value\n ) : {\n x: e.sourceNode.dimensions.width / 2,\n y: e.sourceNode.dimensions.height / 2\n }), N = J(() => V.value ? g[V.value] : void 0), T = J(() => (r.value.x - c.value.x) / c.value.zoom), _ = J(() => (r.value.y - c.value.y) / c.value.zoom), P = J(() => {\n let $;\n const D = {\n sourceX: p.value.x,\n sourceY: p.value.y,\n sourcePosition: V.value,\n targetX: T.value,\n targetY: _.value,\n targetPosition: N.value\n };\n switch (a.value ?? l.value.type) {\n case Ye.Bezier:\n [$] = Kn(D);\n break;\n case Ye.Step:\n [$] = qn({\n ...D,\n borderRadius: 0\n });\n break;\n case Ye.SmoothStep:\n [$] = qn(D);\n break;\n case Ye.SimpleBezier:\n [$] = or(D);\n break;\n case Ye.Straight:\n [$] = rr(D);\n break;\n default:\n [$] = Kn(D);\n break;\n }\n return $;\n });\n return ($, D) => {\n var Q;\n return oe(), se(\"g\", Ql, [\n C(x) ? (oe(), ze(mi(C(x)), $r(vi({ key: 0 }, {\n sourceX: C(p).x,\n sourceY: C(p).y,\n sourcePosition: (Q = C(y)) == null ? void 0 : Q.position,\n targetX: C(T),\n targetY: C(_),\n targetPosition: C(N),\n sourceNode: e.sourceNode,\n sourceHandle: C(y),\n targetNode: C(w),\n targetHandle: C(S),\n markerEnd: `url(#${C(Xe)(C(l).markerEnd)})`,\n markerStart: `url(#${C(Xe)(C(l).markerStart)})`,\n connectionStatus: C(u)\n })), null, 16)) : (oe(), se(\"path\", {\n key: 1,\n d: C(P),\n class: Ke([\"vue-flow__connection-path\", [C(l).class, C(u)]]),\n style: Le(C(s) || C(l).style || {}),\n \"marker-end\": `url(#${C(Xe)(C(l).markerEnd)})`,\n \"marker-start\": `url(#${C(Xe)(C(l).markerStart)})`\n }, null, 14, Jl))\n ]);\n };\n }\n}), nu = [\"tabIndex\"], ou = {\n name: \"NodesSelection\",\n compatConfig: { MODE: 3 }\n}, iu = /* @__PURE__ */ ge({\n ...ou,\n setup(e) {\n const t = fe(), n = M(t, \"emits\"), o = M(t, \"viewport\"), i = M(t, \"getSelectedNodes\"), r = M(t, \"noPanClassName\"), a = M(t, \"disableKeyboardA11y\"), s = M(t, \"userSelectionActive\"), l = Ai(), u = ie(), c = ji({\n el: u,\n onStart(d) {\n n.value.selectionDragStart(d);\n },\n onDrag(d) {\n n.value.selectionDrag(d);\n },\n onStop(d) {\n n.value.selectionDragStop(d);\n }\n });\n Ve(() => {\n var d;\n a.value || (d = u.value) == null || d.focus({ preventScroll: !0 });\n });\n const v = J(() => co(i.value)), g = J(() => ({\n width: `${v.value.width}px`,\n height: `${v.value.height}px`,\n top: `${v.value.y}px`,\n left: `${v.value.x}px`\n }));\n function x(d) {\n n.value.selectionContextMenu({ event: d, nodes: i.value });\n }\n function h(d) {\n a.value || st[d.key] && l(\n {\n x: st[d.key].x,\n y: st[d.key].y\n },\n d.shiftKey\n );\n }\n return (d, w) => !C(s) && C(v).width && C(v).height ? (oe(), se(\"div\", {\n key: 0,\n class: Ke([\"vue-flow__nodesselection vue-flow__container\", C(r)]),\n style: Le({ transform: `translate(${C(o).x}px,${C(o).y}px) scale(${C(o).zoom})` })\n }, [\n ct(\"div\", {\n ref_key: \"el\",\n ref: u,\n class: Ke([{ dragging: C(c) }, \"vue-flow__nodesselection-rect\"]),\n style: Le(C(g)),\n tabIndex: C(a) ? void 0 : -1,\n onContextmenu: x,\n onKeydown: h\n }, null, 46, nu)\n ], 6)) : Ee(\"\", !0);\n }\n}), ru = {\n name: \"UserSelection\",\n compatConfig: { MODE: 3 }\n}, au = /* @__PURE__ */ ge({\n ...ru,\n setup(e) {\n const { userSelectionRect: t } = fe();\n return (n, o) => {\n var i, r, a, s;\n return oe(), se(\"div\", {\n class: \"vue-flow__selection vue-flow__container\",\n style: Le({\n width: `${(i = C(t)) == null ? void 0 : i.width}px`,\n height: `${(r = C(t)) == null ? void 0 : r.height}px`,\n transform: `translate(${(a = C(t)) == null ? void 0 : a.x}px, ${(s = C(t)) == null ? void 0 : s.y}px)`\n })\n }, null, 4);\n };\n }\n}), su = {\n input: Ta,\n default: Oa,\n output: Ia\n}, lu = {\n default: Bl,\n straight: Fl,\n step: Gl,\n smoothstep: ir,\n simplebezier: Rl\n};\nfunction uu() {\n return {\n vueFlowRef: null,\n viewportRef: null,\n nodes: [],\n edges: [],\n nodeTypes: {},\n edgeTypes: {},\n initialized: !1,\n dimensions: {\n width: 0,\n height: 0\n },\n viewport: { x: 0, y: 0, zoom: 1 },\n d3Zoom: null,\n d3Selection: null,\n d3ZoomHandler: null,\n minZoom: 0.5,\n maxZoom: 2,\n translateExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n nodeExtent: [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]\n ],\n selectionMode: fo.Full,\n paneDragging: !1,\n preventScrolling: !0,\n zoomOnScroll: !0,\n zoomOnPinch: !0,\n zoomOnDoubleClick: !0,\n panOnScroll: !1,\n panOnScrollSpeed: 0.5,\n panOnScrollMode: Ut.Free,\n panOnDrag: !0,\n edgeUpdaterRadius: 10,\n onlyRenderVisibleElements: !1,\n defaultViewport: { x: 0, y: 0, zoom: 1 },\n nodesSelectionActive: !1,\n userSelectionActive: !1,\n userSelectionRect: null,\n defaultMarkerColor: \"#b1b1b7\",\n connectionLineStyle: {},\n connectionLineType: null,\n connectionLineOptions: {\n type: Ye.Bezier,\n style: {}\n },\n connectionMode: Qe.Loose,\n connectionStartHandle: null,\n connectionEndHandle: null,\n connectionClickStartHandle: null,\n connectionPosition: { x: NaN, y: NaN },\n connectionRadius: 20,\n connectOnClick: !0,\n connectionStatus: null,\n isValidConnection: null,\n snapGrid: [15, 15],\n snapToGrid: !1,\n edgesUpdatable: !1,\n edgesFocusable: !0,\n nodesFocusable: !0,\n nodesConnectable: !0,\n nodesDraggable: !0,\n elementsSelectable: !0,\n selectNodesOnDrag: !0,\n multiSelectionActive: !1,\n selectionKeyCode: \"Shift\",\n multiSelectionKeyCode: \"Meta\",\n zoomActivationKeyCode: \"Meta\",\n deleteKeyCode: \"Backspace\",\n panActivationKeyCode: \"Space\",\n hooks: ca(),\n applyDefault: !0,\n autoConnect: !1,\n fitViewOnInit: !1,\n noDragClassName: \"nodrag\",\n noWheelClassName: \"nowheel\",\n noPanClassName: \"nopan\",\n defaultEdgeOptions: void 0,\n elevateEdgesOnSelect: !1,\n elevateNodesOnSelect: !0,\n autoPanOnNodeDrag: !0,\n autoPanOnConnect: !0,\n disableKeyboardA11y: !1,\n ariaLiveMessage: \"\",\n __experimentalFeatures: {\n nestedFlow: !1\n }\n };\n}\nfunction ar(e) {\n const t = uu();\n return e && Object.keys(e).forEach((n) => {\n const o = e[n];\n ce(o) && (t[n] = o);\n }), t;\n}\nfunction cu(e, t, n) {\n const o = J(() => (d) => e.nodes && !t.value.length ? e.nodes.find((w) => w.id === d) : e.nodes[t.value.indexOf(d)]), i = J(() => (d) => e.edges && !n.value.length ? e.edges.find((w) => w.id === d) : e.edges[n.value.indexOf(d)]), r = J(() => {\n var y;\n const d = {\n ...lu,\n ...e.edgeTypes\n }, w = Object.keys(d);\n return (y = e.edges) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), a = J(() => {\n var y;\n const d = {\n ...su,\n ...e.nodeTypes\n }, w = Object.keys(d);\n return (y = e.nodes) == null || y.forEach((S) => S.type && !w.includes(S.type) && (d[S.type] = S.type)), d;\n }), s = J(() => {\n const d = e.nodes.filter((w) => !w.hidden);\n return e.onlyRenderVisibleElements ? d && Ci(\n d,\n {\n x: 0,\n y: 0,\n width: e.dimensions.width,\n height: e.dimensions.height\n },\n e.viewport,\n !0\n ) : d ?? [];\n }), l = (d, w, y) => {\n if (w = w ?? o.value(d.source), y = y ?? o.value(d.target), !w || !y) {\n e.hooks.error.trigger(new ve(he.EDGE_ORPHANED, d.id));\n return;\n }\n return !d.hidden && !y.hidden && !w.hidden;\n }, u = J(() => e.onlyRenderVisibleElements ? e.edges.filter((d) => {\n const w = o.value(d.source), y = o.value(d.target);\n return l(d, w, y) && ba({\n sourcePos: w.computedPosition || { x: 0, y: 0 },\n targetPos: y.computedPosition || { x: 0, y: 0 },\n sourceWidth: w.dimensions.width,\n sourceHeight: w.dimensions.height,\n targetWidth: y.dimensions.width,\n targetHeight: y.dimensions.height,\n width: e.dimensions.width,\n height: e.dimensions.height,\n viewport: e.viewport\n });\n }) : e.edges.filter((d) => l(d))), c = J(() => [...s.value, ...u.value]), v = J(() => e.nodes.filter((d) => d.selected)), g = J(() => e.edges.filter((d) => d.selected)), x = J(() => [\n ...v.value ?? [],\n ...g.value ?? []\n ]), h = J(\n () => s.value.filter((d) => d.initialized && d.handleBounds !== void 0)\n );\n return {\n getNode: o,\n getEdge: i,\n getElements: c,\n getEdgeTypes: r,\n getNodeTypes: a,\n getEdges: u,\n getNodes: s,\n getSelectedElements: x,\n getSelectedNodes: v,\n getSelectedEdges: g,\n getNodesInitialized: h\n };\n}\nfunction yo(e, t, n) {\n e.prototype = t.prototype = n, n.constructor = e;\n}\nfunction sr(e, t) {\n var n = Object.create(e.prototype);\n for (var o in t)\n n[o] = t[o];\n return n;\n}\nfunction kt() {\n}\nvar Et = 0.7, jt = 1 / Et, lt = \"\\\\s*([+-]?\\\\d+)\\\\s*\", St = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\", Me = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\", du = /^#([0-9a-f]{3,8})$/, fu = new RegExp(`^rgb\\\\(${lt},${lt},${lt}\\\\)$`), hu = new RegExp(`^rgb\\\\(${Me},${Me},${Me}\\\\)$`), gu = new RegExp(`^rgba\\\\(${lt},${lt},${lt},${St}\\\\)$`), vu = new RegExp(`^rgba\\\\(${Me},${Me},${Me},${St}\\\\)$`), mu = new RegExp(`^hsl\\\\(${St},${Me},${Me}\\\\)$`), pu = new RegExp(`^hsla\\\\(${St},${Me},${Me},${St}\\\\)$`), Ko = {\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n};\nyo(kt, Nt, {\n copy(e) {\n return Object.assign(new this.constructor(), this, e);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: qo,\n // Deprecated! Use color.formatHex.\n formatHex: qo,\n formatHex8: yu,\n formatHsl: xu,\n formatRgb: jo,\n toString: jo\n});\nfunction qo() {\n return this.rgb().formatHex();\n}\nfunction yu() {\n return this.rgb().formatHex8();\n}\nfunction xu() {\n return lr(this).formatHsl();\n}\nfunction jo() {\n return this.rgb().formatRgb();\n}\nfunction Nt(e) {\n var t, n;\n return e = (e + \"\").trim().toLowerCase(), (t = du.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qo(t) : n === 3 ? new pe(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? zt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? zt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = fu.exec(e)) ? new pe(t[1], t[2], t[3], 1) : (t = hu.exec(e)) ? new pe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = gu.exec(e)) ? zt(t[1], t[2], t[3], t[4]) : (t = vu.exec(e)) ? zt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = mu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, 1) : (t = pu.exec(e)) ? ti(t[1], t[2] / 100, t[3] / 100, t[4]) : Ko.hasOwnProperty(e) ? Qo(Ko[e]) : e === \"transparent\" ? new pe(NaN, NaN, NaN, 0) : null;\n}\nfunction Qo(e) {\n return new pe(e >> 16 & 255, e >> 8 & 255, e & 255, 1);\n}\nfunction zt(e, t, n, o) {\n return o <= 0 && (e = t = n = NaN), new pe(e, t, n, o);\n}\nfunction _u(e) {\n return e instanceof kt || (e = Nt(e)), e ? (e = e.rgb(), new pe(e.r, e.g, e.b, e.opacity)) : new pe();\n}\nfunction jn(e, t, n, o) {\n return arguments.length === 1 ? _u(e) : new pe(e, t, n, o ?? 1);\n}\nfunction pe(e, t, n, o) {\n this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;\n}\nyo(pe, jn, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new pe(this.r * e, this.g * e, this.b * e, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new pe(We(this.r), We(this.g), We(this.b), Qt(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: Jo,\n // Deprecated! Use color.formatHex.\n formatHex: Jo,\n formatHex8: wu,\n formatRgb: ei,\n toString: ei\n}));\nfunction Jo() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`;\n}\nfunction wu() {\n return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction ei() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"rgb(\" : \"rgba(\"}${We(this.r)}, ${We(this.g)}, ${We(this.b)}${e === 1 ? \")\" : `, ${e})`}`;\n}\nfunction Qt(e) {\n return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));\n}\nfunction We(e) {\n return Math.max(0, Math.min(255, Math.round(e) || 0));\n}\nfunction Ze(e) {\n return e = We(e), (e < 16 ? \"0\" : \"\") + e.toString(16);\n}\nfunction ti(e, t, n, o) {\n return o <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, n, o);\n}\nfunction lr(e) {\n if (e instanceof be)\n return new be(e.h, e.s, e.l, e.opacity);\n if (e instanceof kt || (e = Nt(e)), !e)\n return new be();\n if (e instanceof be)\n return e;\n e = e.rgb();\n var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), a = NaN, s = r - i, l = (r + i) / 2;\n return s ? (t === r ? a = (n - o) / s + (n < o) * 6 : n === r ? a = (o - t) / s + 2 : a = (t - n) / s + 4, s /= l < 0.5 ? r + i : 2 - r - i, a *= 60) : s = l > 0 && l < 1 ? 0 : a, new be(a, s, l, e.opacity);\n}\nfunction bu(e, t, n, o) {\n return arguments.length === 1 ? lr(e) : new be(e, t, n, o ?? 1);\n}\nfunction be(e, t, n, o) {\n this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;\n}\nyo(be, bu, sr(kt, {\n brighter(e) {\n return e = e == null ? jt : Math.pow(jt, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n darker(e) {\n return e = e == null ? Et : Math.pow(Et, e), new be(this.h, this.s, this.l * e, this.opacity);\n },\n rgb() {\n var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, o = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - o;\n return new pe(\n kn(e >= 240 ? e - 240 : e + 120, i, o),\n kn(e, i, o),\n kn(e < 120 ? e + 240 : e - 120, i, o),\n this.opacity\n );\n },\n clamp() {\n return new be(ni(this.h), At(this.s), At(this.l), Qt(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const e = Qt(this.opacity);\n return `${e === 1 ? \"hsl(\" : \"hsla(\"}${ni(this.h)}, ${At(this.s) * 100}%, ${At(this.l) * 100}%${e === 1 ? \")\" : `, ${e})`}`;\n }\n}));\nfunction ni(e) {\n return e = (e || 0) % 360, e < 0 ? e + 360 : e;\n}\nfunction At(e) {\n return Math.max(0, Math.min(1, e || 0));\n}\nfunction kn(e, t, n) {\n return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;\n}\nconst ur = (e) => () => e;\nfunction Eu(e, t) {\n return function(n) {\n return e + n * t;\n };\n}\nfunction Su(e, t, n) {\n return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {\n return Math.pow(e + o * t, n);\n };\n}\nfunction Nu(e) {\n return (e = +e) == 1 ? cr : function(t, n) {\n return n - t ? Su(t, n, e) : ur(isNaN(t) ? n : t);\n };\n}\nfunction cr(e, t) {\n var n = t - e;\n return n ? Eu(e, n) : ur(isNaN(e) ? t : e);\n}\nconst oi = function e(t) {\n var n = Nu(t);\n function o(i, r) {\n var a = n((i = jn(i)).r, (r = jn(r)).r), s = n(i.g, r.g), l = n(i.b, r.b), u = cr(i.opacity, r.opacity);\n return function(c) {\n return i.r = a(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + \"\";\n };\n }\n return o.gamma = e, o;\n}(1);\nfunction Re(e, t) {\n return e = +e, t = +t, function(n) {\n return e * (1 - n) + t * n;\n };\n}\nvar Qn = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, On = new RegExp(Qn.source, \"g\");\nfunction Cu(e) {\n return function() {\n return e;\n };\n}\nfunction Mu(e) {\n return function(t) {\n return e(t) + \"\";\n };\n}\nfunction $u(e, t) {\n var n = Qn.lastIndex = On.lastIndex = 0, o, i, r, a = -1, s = [], l = [];\n for (e = e + \"\", t = t + \"\"; (o = Qn.exec(e)) && (i = On.exec(t)); )\n (r = i.index) > n && (r = t.slice(n, r), s[a] ? s[a] += r : s[++a] = r), (o = o[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, l.push({ i: a, x: Re(o, i) })), n = On.lastIndex;\n return n < t.length && (r = t.slice(n), s[a] ? s[a] += r : s[++a] = r), s.length < 2 ? l[0] ? Mu(l[0].x) : Cu(t) : (t = l.length, function(u) {\n for (var c = 0, v; c < t; ++c)\n s[(v = l[c]).i] = v.x(u);\n return s.join(\"\");\n });\n}\nvar ii = 180 / Math.PI, Jn = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction dr(e, t, n, o, i, r) {\n var a, s, l;\n return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * o) && (n -= e * l, o -= t * l), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, l /= s), e * o < t * n && (e = -e, t = -t, l = -l, a = -a), {\n translateX: i,\n translateY: r,\n rotate: Math.atan2(t, e) * ii,\n skewX: Math.atan(l) * ii,\n scaleX: a,\n scaleY: s\n };\n}\nvar Bt;\nfunction ku(e) {\n const t = new (typeof DOMMatrix == \"function\" ? DOMMatrix : WebKitCSSMatrix)(e + \"\");\n return t.isIdentity ? Jn : dr(t.a, t.b, t.c, t.d, t.e, t.f);\n}\nfunction Ou(e) {\n return e == null || (Bt || (Bt = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\")), Bt.setAttribute(\"transform\", e), !(e = Bt.transform.baseVal.consolidate())) ? Jn : (e = e.matrix, dr(e.a, e.b, e.c, e.d, e.e, e.f));\n}\nfunction fr(e, t, n, o) {\n function i(u) {\n return u.length ? u.pop() + \" \" : \"\";\n }\n function r(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(\"translate(\", null, t, null, n);\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v || g) && x.push(\"translate(\" + v + t + g + n);\n }\n function a(u, c, v, g) {\n u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), g.push({ i: v.push(i(v) + \"rotate(\", null, o) - 2, x: Re(u, c) })) : c && v.push(i(v) + \"rotate(\" + c + o);\n }\n function s(u, c, v, g) {\n u !== c ? g.push({ i: v.push(i(v) + \"skewX(\", null, o) - 2, x: Re(u, c) }) : c && v.push(i(v) + \"skewX(\" + c + o);\n }\n function l(u, c, v, g, x, h) {\n if (u !== v || c !== g) {\n var d = x.push(i(x) + \"scale(\", null, \",\", null, \")\");\n h.push({ i: d - 4, x: Re(u, v) }, { i: d - 2, x: Re(c, g) });\n } else\n (v !== 1 || g !== 1) && x.push(i(x) + \"scale(\" + v + \",\" + g + \")\");\n }\n return function(u, c) {\n var v = [], g = [];\n return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, v, g), a(u.rotate, c.rotate, v, g), s(u.skewX, c.skewX, v, g), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, v, g), u = c = null, function(x) {\n for (var h = -1, d = g.length, w; ++h < d; )\n v[(w = g[h]).i] = w.x(x);\n return v.join(\"\");\n };\n };\n}\nvar Tu = fr(ku, \"px, \", \"px)\", \"deg)\"), Iu = fr(Ou, \", \", \")\", \")\"), Pu = 1e-12;\nfunction ri(e) {\n return ((e = Math.exp(e)) + 1 / e) / 2;\n}\nfunction Du(e) {\n return ((e = Math.exp(e)) - 1 / e) / 2;\n}\nfunction zu(e) {\n return ((e = Math.exp(2 * e)) - 1) / (e + 1);\n}\nconst Au = function e(t, n, o) {\n function i(r, a) {\n var s = r[0], l = r[1], u = r[2], c = a[0], v = a[1], g = a[2], x = c - s, h = v - l, d = x * x + h * h, w, y;\n if (d < Pu)\n y = Math.log(g / u) / t, w = function(_) {\n return [\n s + _ * x,\n l + _ * h,\n u * Math.exp(t * _ * y)\n ];\n };\n else {\n var S = Math.sqrt(d), V = (g * g - u * u + o * d) / (2 * u * n * S), p = (g * g - u * u - o * d) / (2 * g * n * S), N = Math.log(Math.sqrt(V * V + 1) - V), T = Math.log(Math.sqrt(p * p + 1) - p);\n y = (T - N) / t, w = function(_) {\n var P = _ * y, R = ri(N), $ = u / (n * S) * (R * zu(t * P + N) - Du(N));\n return [\n s + $ * x,\n l + $ * h,\n u * R / ri(t * P + N)\n ];\n };\n }\n return w.duration = y * 1e3 * t / Math.SQRT2, w;\n }\n return i.rho = function(r) {\n var a = Math.max(1e-3, +r), s = a * a, l = s * s;\n return e(a, s, l);\n }, i;\n}(Math.SQRT2, 2, 4);\nvar ht = 0, mt = 0, gt = 0, hr = 1e3, Jt, pt, en = 0, Je = 0, wn = 0, Ct = typeof performance == \"object\" && performance.now ? performance : Date, gr = typeof window == \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {\n setTimeout(e, 17);\n};\nfunction xo() {\n return Je || (gr(Bu), Je = Ct.now() + wn);\n}\nfunction Bu() {\n Je = 0;\n}\nfunction tn() {\n this._call = this._time = this._next = null;\n}\ntn.prototype = vr.prototype = {\n constructor: tn,\n restart: function(e, t, n) {\n if (typeof e != \"function\")\n throw new TypeError(\"callback is not a function\");\n n = (n == null ? xo() : +n) + (t == null ? 0 : +t), !this._next && pt !== this && (pt ? pt._next = this : Jt = this, pt = this), this._call = e, this._time = n, eo();\n },\n stop: function() {\n this._call && (this._call = null, this._time = 1 / 0, eo());\n }\n};\nfunction vr(e, t, n) {\n var o = new tn();\n return o.restart(e, t, n), o;\n}\nfunction Ru() {\n xo(), ++ht;\n for (var e = Jt, t; e; )\n (t = Je - e._time) >= 0 && e._call.call(void 0, t), e = e._next;\n --ht;\n}\nfunction ai() {\n Je = (en = Ct.now()) + wn, ht = mt = 0;\n try {\n Ru();\n } finally {\n ht = 0, Hu(), Je = 0;\n }\n}\nfunction Vu() {\n var e = Ct.now(), t = e - en;\n t > hr && (wn -= t, en = e);\n}\nfunction Hu() {\n for (var e, t = Jt, n, o = 1 / 0; t; )\n t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Jt = n);\n pt = e, eo(o);\n}\nfunction eo(e) {\n if (!ht) {\n mt && (mt = clearTimeout(mt));\n var t = e - Je;\n t > 24 ? (e < 1 / 0 && (mt = setTimeout(ai, e - Ct.now() - wn)), gt && (gt = clearInterval(gt))) : (gt || (en = Ct.now(), gt = setInterval(Vu, hr)), ht = 1, gr(ai));\n }\n}\nfunction si(e, t, n) {\n var o = new tn();\n return t = t == null ? 0 : +t, o.restart((i) => {\n o.stop(), e(i + t);\n }, t, n), o;\n}\nvar Lu = fn(\"start\", \"end\", \"cancel\", \"interrupt\"), Gu = [], mr = 0, li = 1, to = 2, Lt = 3, ui = 4, no = 5, Gt = 6;\nfunction bn(e, t, n, o, i, r) {\n var a = e.__transition;\n if (!a)\n e.__transition = {};\n else if (n in a)\n return;\n Fu(e, n, {\n name: t,\n index: o,\n // For context during callback.\n group: i,\n // For context during callback.\n on: Lu,\n tween: Gu,\n time: r.time,\n delay: r.delay,\n duration: r.duration,\n ease: r.ease,\n timer: null,\n state: mr\n });\n}\nfunction _o(e, t) {\n var n = Se(e, t);\n if (n.state > mr)\n throw new Error(\"too late; already scheduled\");\n return n;\n}\nfunction ke(e, t) {\n var n = Se(e, t);\n if (n.state > Lt)\n throw new Error(\"too late; already running\");\n return n;\n}\nfunction Se(e, t) {\n var n = e.__transition;\n if (!n || !(n = n[t]))\n throw new Error(\"transition not found\");\n return n;\n}\nfunction Fu(e, t, n) {\n var o = e.__transition, i;\n o[t] = n, n.timer = vr(r, 0, n.time);\n function r(u) {\n n.state = li, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);\n }\n function a(u) {\n var c, v, g, x;\n if (n.state !== li)\n return l();\n for (c in o)\n if (x = o[c], x.name === n.name) {\n if (x.state === Lt)\n return si(a);\n x.state === ui ? (x.state = Gt, x.timer.stop(), x.on.call(\"interrupt\", e, e.__data__, x.index, x.group), delete o[c]) : +c < t && (x.state = Gt, x.timer.stop(), x.on.call(\"cancel\", e, e.__data__, x.index, x.group), delete o[c]);\n }\n if (si(function() {\n n.state === Lt && (n.state = ui, n.timer.restart(s, n.delay, n.time), s(u));\n }), n.state = to, n.on.call(\"start\", e, e.__data__, n.index, n.group), n.state === to) {\n for (n.state = Lt, i = new Array(g = n.tween.length), c = 0, v = -1; c < g; ++c)\n (x = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++v] = x);\n i.length = v + 1;\n }\n }\n function s(u) {\n for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(l), n.state = no, 1), v = -1, g = i.length; ++v < g; )\n i[v].call(e, c);\n n.state === no && (n.on.call(\"end\", e, e.__data__, n.index, n.group), l());\n }\n function l() {\n n.state = Gt, n.timer.stop(), delete o[t];\n for (var u in o)\n return;\n delete e.__transition;\n }\n}\nfunction Ft(e, t) {\n var n = e.__transition, o, i, r = !0, a;\n if (n) {\n t = t == null ? null : t + \"\";\n for (a in n) {\n if ((o = n[a]).name !== t) {\n r = !1;\n continue;\n }\n i = o.state > to && o.state < no, o.state = Gt, o.timer.stop(), o.on.call(i ? \"interrupt\" : \"cancel\", e, e.__data__, o.index, o.group), delete n[a];\n }\n r && delete e.__transition;\n }\n}\nfunction Yu(e) {\n return this.each(function() {\n Ft(this, e);\n });\n}\nfunction Xu(e, t) {\n var n, o;\n return function() {\n var i = ke(this, e), r = i.tween;\n if (r !== n) {\n o = n = r;\n for (var a = 0, s = o.length; a < s; ++a)\n if (o[a].name === t) {\n o = o.slice(), o.splice(a, 1);\n break;\n }\n }\n i.tween = o;\n };\n}\nfunction Zu(e, t, n) {\n var o, i;\n if (typeof n != \"function\")\n throw new Error();\n return function() {\n var r = ke(this, e), a = r.tween;\n if (a !== o) {\n i = (o = a).slice();\n for (var s = { name: t, value: n }, l = 0, u = i.length; l < u; ++l)\n if (i[l].name === t) {\n i[l] = s;\n break;\n }\n l === u && i.push(s);\n }\n r.tween = i;\n };\n}\nfunction Uu(e, t) {\n var n = this._id;\n if (e += \"\", arguments.length < 2) {\n for (var o = Se(this.node(), n).tween, i = 0, r = o.length, a; i < r; ++i)\n if ((a = o[i]).name === e)\n return a.value;\n return null;\n }\n return this.each((t == null ? Xu : Zu)(n, e, t));\n}\nfunction wo(e, t, n) {\n var o = e._id;\n return e.each(function() {\n var i = ke(this, o);\n (i.value || (i.value = {}))[t] = n.apply(this, arguments);\n }), function(i) {\n return Se(i, o).value[t];\n };\n}\nfunction pr(e, t) {\n var n;\n return (typeof t == \"number\" ? Re : t instanceof Nt ? oi : (n = Nt(t)) ? (t = n, oi) : $u)(e, t);\n}\nfunction Wu(e) {\n return function() {\n this.removeAttribute(e);\n };\n}\nfunction Ku(e) {\n return function() {\n this.removeAttributeNS(e.space, e.local);\n };\n}\nfunction qu(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttribute(e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction ju(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = this.getAttributeNS(e.space, e.local);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction Qu(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttribute(e) : (a = this.getAttribute(e), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction Ju(e, t, n) {\n var o, i, r;\n return function() {\n var a, s = n(this), l;\n return s == null ? void this.removeAttributeNS(e.space, e.local) : (a = this.getAttributeNS(e.space, e.local), l = s + \"\", a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s)));\n };\n}\nfunction ec(e, t) {\n var n = hn(e), o = n === \"transform\" ? Iu : pr;\n return this.attrTween(e, typeof t == \"function\" ? (n.local ? Ju : Qu)(n, o, wo(this, \"attr.\" + e, t)) : t == null ? (n.local ? Ku : Wu)(n) : (n.local ? ju : qu)(n, o, t));\n}\nfunction tc(e, t) {\n return function(n) {\n this.setAttribute(e, t.call(this, n));\n };\n}\nfunction nc(e, t) {\n return function(n) {\n this.setAttributeNS(e.space, e.local, t.call(this, n));\n };\n}\nfunction oc(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && nc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction ic(e, t) {\n var n, o;\n function i() {\n var r = t.apply(this, arguments);\n return r !== o && (n = (o = r) && tc(e, r)), n;\n }\n return i._value = t, i;\n}\nfunction rc(e, t) {\n var n = \"attr.\" + e;\n if (arguments.length < 2)\n return (n = this.tween(n)) && n._value;\n if (t == null)\n return this.tween(n, null);\n if (typeof t != \"function\")\n throw new Error();\n var o = hn(e);\n return this.tween(n, (o.local ? oc : ic)(o, t));\n}\nfunction ac(e, t) {\n return function() {\n _o(this, e).delay = +t.apply(this, arguments);\n };\n}\nfunction sc(e, t) {\n return t = +t, function() {\n _o(this, e).delay = t;\n };\n}\nfunction lc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? ac : sc)(t, e)) : Se(this.node(), t).delay;\n}\nfunction uc(e, t) {\n return function() {\n ke(this, e).duration = +t.apply(this, arguments);\n };\n}\nfunction cc(e, t) {\n return t = +t, function() {\n ke(this, e).duration = t;\n };\n}\nfunction dc(e) {\n var t = this._id;\n return arguments.length ? this.each((typeof e == \"function\" ? uc : cc)(t, e)) : Se(this.node(), t).duration;\n}\nfunction fc(e, t) {\n if (typeof t != \"function\")\n throw new Error();\n return function() {\n ke(this, e).ease = t;\n };\n}\nfunction hc(e) {\n var t = this._id;\n return arguments.length ? this.each(fc(t, e)) : Se(this.node(), t).ease;\n}\nfunction gc(e, t) {\n return function() {\n var n = t.apply(this, arguments);\n if (typeof n != \"function\")\n throw new Error();\n ke(this, e).ease = n;\n };\n}\nfunction vc(e) {\n if (typeof e != \"function\")\n throw new Error();\n return this.each(gc(this._id, e));\n}\nfunction mc(e) {\n typeof e != \"function\" && (e = Vi(e));\n for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)\n for (var r = t[i], a = r.length, s = o[i] = [], l, u = 0; u < a; ++u)\n (l = r[u]) && e.call(l, l.__data__, u, r) && s.push(l);\n return new Be(o, this._parents, this._name, this._id);\n}\nfunction pc(e) {\n if (e._id !== this._id)\n throw new Error();\n for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), a = new Array(o), s = 0; s < r; ++s)\n for (var l = t[s], u = n[s], c = l.length, v = a[s] = new Array(c), g, x = 0; x < c; ++x)\n (g = l[x] || u[x]) && (v[x] = g);\n for (; s < o; ++s)\n a[s] = t[s];\n return new Be(a, this._parents, this._name, this._id);\n}\nfunction yc(e) {\n return (e + \"\").trim().split(/^|\\s+/).every(function(t) {\n var n = t.indexOf(\".\");\n return n >= 0 && (t = t.slice(0, n)), !t || t === \"start\";\n });\n}\nfunction xc(e, t, n) {\n var o, i, r = yc(t) ? _o : ke;\n return function() {\n var a = r(this, e), s = a.on;\n s !== o && (i = (o = s).copy()).on(t, n), a.on = i;\n };\n}\nfunction _c(e, t) {\n var n = this._id;\n return arguments.length < 2 ? Se(this.node(), n).on.on(e) : this.each(xc(n, e, t));\n}\nfunction wc(e) {\n return function() {\n var t = this.parentNode;\n for (var n in this.__transition)\n if (+n !== e)\n return;\n t && t.removeChild(this);\n };\n}\nfunction bc() {\n return this.on(\"end.remove\", wc(this._id));\n}\nfunction Ec(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = vo(e));\n for (var o = this._groups, i = o.length, r = new Array(i), a = 0; a < i; ++a)\n for (var s = o[a], l = s.length, u = r[a] = new Array(l), c, v, g = 0; g < l; ++g)\n (c = s[g]) && (v = e.call(c, c.__data__, g, s)) && (\"__data__\" in c && (v.__data__ = c.__data__), u[g] = v, bn(u[g], t, n, g, u, Se(c, n)));\n return new Be(r, this._parents, t, n);\n}\nfunction Sc(e) {\n var t = this._name, n = this._id;\n typeof e != \"function\" && (e = Ri(e));\n for (var o = this._groups, i = o.length, r = [], a = [], s = 0; s < i; ++s)\n for (var l = o[s], u = l.length, c, v = 0; v < u; ++v)\n if (c = l[v]) {\n for (var g = e.call(c, c.__data__, v, l), x, h = Se(c, n), d = 0, w = g.length; d < w; ++d)\n (x = g[d]) && bn(x, t, n, d, g, h);\n r.push(g), a.push(c);\n }\n return new Be(r, a, t, n);\n}\nvar Nc = $t.prototype.constructor;\nfunction Cc() {\n return new Nc(this._groups, this._parents);\n}\nfunction Mc(e, t) {\n var n, o, i;\n return function() {\n var r = ft(this, e), a = (this.style.removeProperty(e), ft(this, e));\n return r === a ? null : r === n && a === o ? i : i = t(n = r, o = a);\n };\n}\nfunction yr(e) {\n return function() {\n this.style.removeProperty(e);\n };\n}\nfunction $c(e, t, n) {\n var o, i = n + \"\", r;\n return function() {\n var a = ft(this, e);\n return a === i ? null : a === o ? r : r = t(o = a, n);\n };\n}\nfunction kc(e, t, n) {\n var o, i, r;\n return function() {\n var a = ft(this, e), s = n(this), l = s + \"\";\n return s == null && (l = s = (this.style.removeProperty(e), ft(this, e))), a === l ? null : a === o && l === i ? r : (i = l, r = t(o = a, s));\n };\n}\nfunction Oc(e, t) {\n var n, o, i, r = \"style.\" + t, a = \"end.\" + r, s;\n return function() {\n var l = ke(this, e), u = l.on, c = l.value[r] == null ? s || (s = yr(t)) : void 0;\n (u !== n || i !== c) && (o = (n = u).copy()).on(a, i = c), l.on = o;\n };\n}\nfunction Tc(e, t, n) {\n var o = (e += \"\") == \"transform\" ? Tu : pr;\n return t == null ? this.styleTween(e, Mc(e, o)).on(\"end.style.\" + e, yr(e)) : typeof t == \"function\" ? this.styleTween(e, kc(e, o, wo(this, \"style.\" + e, t))).each(Oc(this._id, e)) : this.styleTween(e, $c(e, o, t), n).on(\"end.style.\" + e, null);\n}\nfunction Ic(e, t, n) {\n return function(o) {\n this.style.setProperty(e, t.call(this, o), n);\n };\n}\nfunction Pc(e, t, n) {\n var o, i;\n function r() {\n var a = t.apply(this, arguments);\n return a !== i && (o = (i = a) && Ic(e, a, n)), o;\n }\n return r._value = t, r;\n}\nfunction Dc(e, t, n) {\n var o = \"style.\" + (e += \"\");\n if (arguments.length < 2)\n return (o = this.tween(o)) && o._value;\n if (t == null)\n return this.tween(o, null);\n if (typeof t != \"function\")\n throw new Error();\n return this.tween(o, Pc(e, t, n ?? \"\"));\n}\nfunction zc(e) {\n return function() {\n this.textContent = e;\n };\n}\nfunction Ac(e) {\n return function() {\n var t = e(this);\n this.textContent = t ?? \"\";\n };\n}\nfunction Bc(e) {\n return this.tween(\"text\", typeof e == \"function\" ? Ac(wo(this, \"text\", e)) : zc(e == null ? \"\" : e + \"\"));\n}\nfunction Rc(e) {\n return function(t) {\n this.textContent = e.call(this, t);\n };\n}\nfunction Vc(e) {\n var t, n;\n function o() {\n var i = e.apply(this, arguments);\n return i !== n && (t = (n = i) && Rc(i)), t;\n }\n return o._value = e, o;\n}\nfunction Hc(e) {\n var t = \"text\";\n if (arguments.length < 1)\n return (t = this.tween(t)) && t._value;\n if (e == null)\n return this.tween(t, null);\n if (typeof e != \"function\")\n throw new Error();\n return this.tween(t, Vc(e));\n}\nfunction Lc() {\n for (var e = this._name, t = this._id, n = xr(), o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n if (l = a[u]) {\n var c = Se(l, t);\n bn(l, e, n, u, a, {\n time: c.time + c.delay + c.duration,\n delay: 0,\n duration: c.duration,\n ease: c.ease\n });\n }\n return new Be(o, this._parents, e, n);\n}\nfunction Gc() {\n var e, t, n = this, o = n._id, i = n.size();\n return new Promise(function(r, a) {\n var s = { value: a }, l = { value: function() {\n --i === 0 && r();\n } };\n n.each(function() {\n var u = ke(this, o), c = u.on;\n c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(l)), u.on = t;\n }), i === 0 && r();\n });\n}\nvar Fc = 0;\nfunction Be(e, t, n, o) {\n this._groups = e, this._parents = t, this._name = n, this._id = o;\n}\nfunction xr() {\n return ++Fc;\n}\nvar Oe = $t.prototype;\nBe.prototype = {\n constructor: Be,\n select: Ec,\n selectAll: Sc,\n selectChild: Oe.selectChild,\n selectChildren: Oe.selectChildren,\n filter: mc,\n merge: pc,\n selection: Cc,\n transition: Lc,\n call: Oe.call,\n nodes: Oe.nodes,\n node: Oe.node,\n size: Oe.size,\n empty: Oe.empty,\n each: Oe.each,\n on: _c,\n attr: ec,\n attrTween: rc,\n style: Tc,\n styleTween: Dc,\n text: Bc,\n textTween: Hc,\n remove: bc,\n tween: Uu,\n delay: lc,\n duration: dc,\n ease: hc,\n easeVarying: vc,\n end: Gc,\n [Symbol.iterator]: Oe[Symbol.iterator]\n};\nfunction Yc(e) {\n return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;\n}\nvar Xc = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: Yc\n};\nfunction Zc(e, t) {\n for (var n; !(n = e.__transition) || !(n = n[t]); )\n if (!(e = e.parentNode))\n throw new Error(`transition ${t} not found`);\n return n;\n}\nfunction Uc(e) {\n var t, n;\n e instanceof Be ? (t = e._id, e = e._name) : (t = xr(), (n = Xc).time = xo(), e = e == null ? null : e + \"\");\n for (var o = this._groups, i = o.length, r = 0; r < i; ++r)\n for (var a = o[r], s = a.length, l, u = 0; u < s; ++u)\n (l = a[u]) && bn(l, e, t, u, a, n || Zc(l, t));\n return new Be(o, this._parents, e, t);\n}\n$t.prototype.interrupt = Yu;\n$t.prototype.transition = Uc;\nconst Rt = (e) => () => e;\nfunction Wc(e, {\n sourceEvent: t,\n target: n,\n transform: o,\n dispatch: i\n}) {\n Object.defineProperties(this, {\n type: { value: e, enumerable: !0, configurable: !0 },\n sourceEvent: { value: t, enumerable: !0, configurable: !0 },\n target: { value: n, enumerable: !0, configurable: !0 },\n transform: { value: o, enumerable: !0, configurable: !0 },\n _: { value: i }\n });\n}\nfunction De(e, t, n) {\n this.k = e, this.x = t, this.y = n;\n}\nDe.prototype = {\n constructor: De,\n scale: function(e) {\n return e === 1 ? this : new De(this.k * e, this.x, this.y);\n },\n translate: function(e, t) {\n return e === 0 & t === 0 ? this : new De(this.k, this.x + this.k * e, this.y + this.k * t);\n },\n apply: function(e) {\n return [e[0] * this.k + this.x, e[1] * this.k + this.y];\n },\n applyX: function(e) {\n return e * this.k + this.x;\n },\n applyY: function(e) {\n return e * this.k + this.y;\n },\n invert: function(e) {\n return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];\n },\n invertX: function(e) {\n return (e - this.x) / this.k;\n },\n invertY: function(e) {\n return (e - this.y) / this.k;\n },\n rescaleX: function(e) {\n return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));\n },\n rescaleY: function(e) {\n return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nvar et = new De(1, 0, 0);\nDe.prototype;\nfunction Tn(e) {\n e.stopImmediatePropagation();\n}\nfunction vt(e) {\n e.preventDefault(), e.stopImmediatePropagation();\n}\nfunction Kc(e) {\n return (!e.ctrlKey || e.type === \"wheel\") && !e.button;\n}\nfunction qc() {\n var e = this;\n return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute(\"viewBox\") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];\n}\nfunction ci() {\n return this.__zoom || et;\n}\nfunction jc(e) {\n return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);\n}\nfunction Qc() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\nfunction Jc(e, t, n) {\n var o = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], r = e.invertY(t[0][1]) - n[0][1], a = e.invertY(t[1][1]) - n[1][1];\n return e.translate(\n i > o ? (o + i) / 2 : Math.min(0, o) || Math.max(0, i),\n a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a)\n );\n}\nfunction ed() {\n var e = Kc, t = qc, n = Jc, o = jc, i = Qc, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Au, u = fn(\"start\", \"zoom\", \"end\"), c, v, g, x = 500, h = 150, d = 0, w = 10;\n function y(m) {\n m.property(\"__zoom\", ci).on(\"wheel.zoom\", P, { passive: !1 }).on(\"mousedown.zoom\", R).on(\"dblclick.zoom\", $).filter(i).on(\"touchstart.zoom\", D).on(\"touchmove.zoom\", Q).on(\"touchend.zoom touchcancel.zoom\", ee).style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n y.transform = function(m, A, E, G) {\n var Z = m.selection ? m.selection() : m;\n Z.property(\"__zoom\", ci), m !== Z ? N(m, A, E, G) : Z.interrupt().each(function() {\n T(this, arguments).event(G).start().zoom(null, typeof A == \"function\" ? A.apply(this, arguments) : A).end();\n });\n }, y.scaleBy = function(m, A, E, G) {\n y.scaleTo(m, function() {\n var Z = this.__zoom.k, K = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return Z * K;\n }, E, G);\n }, y.scaleTo = function(m, A, E, G) {\n y.transform(m, function() {\n var Z = t.apply(this, arguments), K = this.__zoom, z = E == null ? p(Z) : typeof E == \"function\" ? E.apply(this, arguments) : E, W = K.invert(z), B = typeof A == \"function\" ? A.apply(this, arguments) : A;\n return n(V(S(K, B), z, W), Z, a);\n }, E, G);\n }, y.translateBy = function(m, A, E, G) {\n y.transform(m, function() {\n return n(this.__zoom.translate(\n typeof A == \"function\" ? A.apply(this, arguments) : A,\n typeof E == \"function\" ? E.apply(this, arguments) : E\n ), t.apply(this, arguments), a);\n }, null, G);\n }, y.translateTo = function(m, A, E, G, Z) {\n y.transform(m, function() {\n var K = t.apply(this, arguments), z = this.__zoom, W = G == null ? p(K) : typeof G == \"function\" ? G.apply(this, arguments) : G;\n return n(et.translate(W[0], W[1]).scale(z.k).translate(\n typeof A == \"function\" ? -A.apply(this, arguments) : -A,\n typeof E == \"function\" ? -E.apply(this, arguments) : -E\n ), K, a);\n }, G, Z);\n };\n function S(m, A) {\n return A = Math.max(r[0], Math.min(r[1], A)), A === m.k ? m : new De(A, m.x, m.y);\n }\n function V(m, A, E) {\n var G = A[0] - E[0] * m.k, Z = A[1] - E[1] * m.k;\n return G === m.x && Z === m.y ? m : new De(m.k, G, Z);\n }\n function p(m) {\n return [(+m[0][0] + +m[1][0]) / 2, (+m[0][1] + +m[1][1]) / 2];\n }\n function N(m, A, E, G) {\n m.on(\"start.zoom\", function() {\n T(this, arguments).event(G).start();\n }).on(\"interrupt.zoom end.zoom\", function() {\n T(this, arguments).event(G).end();\n }).tween(\"zoom\", function() {\n var Z = this, K = arguments, z = T(Z, K).event(G), W = t.apply(Z, K), B = E == null ? p(W) : typeof E == \"function\" ? E.apply(Z, K) : E, q = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), te = Z.__zoom, re = typeof A == \"function\" ? A.apply(Z, K) : A, k = l(te.invert(B).concat(q / te.k), re.invert(B).concat(q / re.k));\n return function(H) {\n if (H === 1)\n H = re;\n else {\n var f = k(H), b = q / f[2];\n H = new De(b, B[0] - f[0] * b, B[1] - f[1] * b);\n }\n z.zoom(null, H);\n };\n });\n }\n function T(m, A, E) {\n return !E && m.__zooming || new _(m, A);\n }\n function _(m, A) {\n this.that = m, this.args = A, this.active = 0, this.sourceEvent = null, this.extent = t.apply(m, A), this.taps = 0;\n }\n _.prototype = {\n event: function(m) {\n return m && (this.sourceEvent = m), this;\n },\n start: function() {\n return ++this.active === 1 && (this.that.__zooming = this, this.emit(\"start\")), this;\n },\n zoom: function(m, A) {\n return this.mouse && m !== \"mouse\" && (this.mouse[1] = A.invert(this.mouse[0])), this.touch0 && m !== \"touch\" && (this.touch0[1] = A.invert(this.touch0[0])), this.touch1 && m !== \"touch\" && (this.touch1[1] = A.invert(this.touch1[0])), this.that.__zoom = A, this.emit(\"zoom\"), this;\n },\n end: function() {\n return --this.active === 0 && (delete this.that.__zooming, this.emit(\"end\")), this;\n },\n emit: function(m) {\n var A = we(this.that).datum();\n u.call(\n m,\n this.that,\n new Wc(m, {\n sourceEvent: this.sourceEvent,\n target: y,\n type: m,\n transform: this.that.__zoom,\n dispatch: u\n }),\n A\n );\n }\n };\n function P(m, ...A) {\n if (!e.apply(this, arguments))\n return;\n var E = T(this, A).event(m), G = this.__zoom, Z = Math.max(r[0], Math.min(r[1], G.k * Math.pow(2, o.apply(this, arguments)))), K = Ne(m);\n if (E.wheel)\n (E.mouse[0][0] !== K[0] || E.mouse[0][1] !== K[1]) && (E.mouse[1] = G.invert(E.mouse[0] = K)), clearTimeout(E.wheel);\n else {\n if (G.k === Z)\n return;\n E.mouse = [K, G.invert(K)], Ft(this), E.start();\n }\n vt(m), E.wheel = setTimeout(z, h), E.zoom(\"mouse\", n(V(S(G, Z), E.mouse[0], E.mouse[1]), E.extent, a));\n function z() {\n E.wheel = null, E.end();\n }\n }\n function R(m, ...A) {\n if (g || !e.apply(this, arguments))\n return;\n var E = m.currentTarget, G = T(this, A, !0).event(m), Z = we(m.view).on(\"mousemove.zoom\", B, !0).on(\"mouseup.zoom\", q, !0), K = Ne(m, E), z = m.clientX, W = m.clientY;\n Ki(m.view), Tn(m), G.mouse = [K, this.__zoom.invert(K)], Ft(this), G.start();\n function B(te) {\n if (vt(te), !G.moved) {\n var re = te.clientX - z, k = te.clientY - W;\n G.moved = re * re + k * k > d;\n }\n G.event(te).zoom(\"mouse\", n(V(G.that.__zoom, G.mouse[0] = Ne(te, E), G.mouse[1]), G.extent, a));\n }\n function q(te) {\n Z.on(\"mousemove.zoom mouseup.zoom\", null), qi(te.view, G.moved), vt(te), G.event(te).end();\n }\n }\n function $(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = this.__zoom, G = Ne(m.changedTouches ? m.changedTouches[0] : m, this), Z = E.invert(G), K = E.k * (m.shiftKey ? 0.5 : 2), z = n(V(S(E, K), G, Z), t.apply(this, A), a);\n vt(m), s > 0 ? we(this).transition().duration(s).call(N, z, G, m) : we(this).call(y.transform, z, G, m);\n }\n }\n function D(m, ...A) {\n if (e.apply(this, arguments)) {\n var E = m.touches, G = E.length, Z = T(this, A, m.changedTouches.length === G).event(m), K, z, W, B;\n for (Tn(m), z = 0; z < G; ++z)\n W = E[z], B = Ne(W, this), B = [B, this.__zoom.invert(B), W.identifier], Z.touch0 ? !Z.touch1 && Z.touch0[2] !== B[2] && (Z.touch1 = B, Z.taps = 0) : (Z.touch0 = B, K = !0, Z.taps = 1 + !!c);\n c && (c = clearTimeout(c)), K && (Z.taps < 2 && (v = B[0], c = setTimeout(function() {\n c = null;\n }, x)), Ft(this), Z.start());\n }\n }\n function Q(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z, W, B;\n for (vt(m), K = 0; K < Z; ++K)\n z = G[K], W = Ne(z, this), E.touch0 && E.touch0[2] === z.identifier ? E.touch0[0] = W : E.touch1 && E.touch1[2] === z.identifier && (E.touch1[0] = W);\n if (z = E.that.__zoom, E.touch1) {\n var q = E.touch0[0], te = E.touch0[1], re = E.touch1[0], k = E.touch1[1], H = (H = re[0] - q[0]) * H + (H = re[1] - q[1]) * H, f = (f = k[0] - te[0]) * f + (f = k[1] - te[1]) * f;\n z = S(z, Math.sqrt(H / f)), W = [(q[0] + re[0]) / 2, (q[1] + re[1]) / 2], B = [(te[0] + k[0]) / 2, (te[1] + k[1]) / 2];\n } else if (E.touch0)\n W = E.touch0[0], B = E.touch0[1];\n else\n return;\n E.zoom(\"touch\", n(V(z, W, B), E.extent, a));\n }\n }\n function ee(m, ...A) {\n if (this.__zooming) {\n var E = T(this, A).event(m), G = m.changedTouches, Z = G.length, K, z;\n for (Tn(m), g && clearTimeout(g), g = setTimeout(function() {\n g = null;\n }, x), K = 0; K < Z; ++K)\n z = G[K], E.touch0 && E.touch0[2] === z.identifier ? delete E.touch0 : E.touch1 && E.touch1[2] === z.identifier && delete E.touch1;\n if (E.touch1 && !E.touch0 && (E.touch0 = E.touch1, delete E.touch1), E.touch0)\n E.touch0[1] = this.__zoom.invert(E.touch0[0]);\n else if (E.end(), E.taps === 2 && (z = Ne(z, this), Math.hypot(v[0] - z[0], v[1] - z[1]) < w)) {\n var W = we(this).on(\"dblclick.zoom\");\n W && W.apply(this, arguments);\n }\n }\n }\n return y.wheelDelta = function(m) {\n return arguments.length ? (o = typeof m == \"function\" ? m : Rt(+m), y) : o;\n }, y.filter = function(m) {\n return arguments.length ? (e = typeof m == \"function\" ? m : Rt(!!m), y) : e;\n }, y.touchable = function(m) {\n return arguments.length ? (i = typeof m == \"function\" ? m : Rt(!!m), y) : i;\n }, y.extent = function(m) {\n return arguments.length ? (t = typeof m == \"function\" ? m : Rt([[+m[0][0], +m[0][1]], [+m[1][0], +m[1][1]]]), y) : t;\n }, y.scaleExtent = function(m) {\n return arguments.length ? (r[0] = +m[0], r[1] = +m[1], y) : [r[0], r[1]];\n }, y.translateExtent = function(m) {\n return arguments.length ? (a[0][0] = +m[0][0], a[1][0] = +m[1][0], a[0][1] = +m[0][1], a[1][1] = +m[1][1], y) : [[a[0][0], a[0][1]], [a[1][0], a[1][1]]];\n }, y.constrain = function(m) {\n return arguments.length ? (n = m, y) : n;\n }, y.duration = function(m) {\n return arguments.length ? (s = +m, y) : s;\n }, y.interpolate = function(m) {\n return arguments.length ? (l = m, y) : l;\n }, y.on = function() {\n var m = u.on.apply(u, arguments);\n return m === u ? y : m;\n }, y.clickDistance = function(m) {\n return arguments.length ? (d = (m = +m) * m, y) : Math.sqrt(d);\n }, y.tapDistance = function(m) {\n return arguments.length ? (w = +m, y) : w;\n }, y;\n}\nconst In = 0.1;\nfunction Ge() {\n}\nconst td = {\n zoomIn: Ge,\n zoomOut: Ge,\n zoomTo: Ge,\n fitView: Ge,\n setCenter: Ge,\n fitBounds: Ge,\n project: (e) => e,\n setTransform: Ge,\n getTransform: () => ({ x: 0, y: 0, zoom: 1 }),\n initialized: !1\n}, nd = (e, t) => {\n const n = e, o = M(n, \"nodes\"), i = M(n, \"d3Zoom\"), r = M(n, \"d3Selection\"), a = M(n, \"dimensions\"), s = M(n, \"translateExtent\"), l = M(n, \"minZoom\"), u = M(n, \"maxZoom\"), c = M(n, \"viewport\"), v = M(n, \"snapToGrid\"), g = M(n, \"snapGrid\"), x = M(n, \"hooks\"), h = t, d = M(h, \"getNodes\"), w = ie(!1);\n x.value.nodesInitialized.on(() => {\n w.value = !0;\n });\n const y = J(() => !!i.value && !!r.value && !!a.value.width && !!a.value.height && w.value);\n function S(p, N) {\n r.value && i.value && i.value.scaleBy(Pn(r.value, N), p);\n }\n function V(p, N, T, _) {\n const { x: P, y: R } = so({ x: -p, y: -N }, s.value), $ = et.translate(-P, -R).scale(T);\n r.value && i.value && i.value.transform(Pn(r.value, _), $);\n }\n return J(() => y.value ? {\n initialized: !0,\n zoomIn: (p) => {\n S(1.2, p == null ? void 0 : p.duration);\n },\n zoomOut: (p) => {\n S(1 / 1.2, p == null ? void 0 : p.duration);\n },\n zoomTo: (p, N) => {\n r.value && i.value && i.value.scaleTo(Pn(r.value, N == null ? void 0 : N.duration), p);\n },\n setTransform: (p, N) => {\n V(p.x, p.y, p.zoom, N == null ? void 0 : N.duration);\n },\n getTransform: () => ({\n x: c.value.x,\n y: c.value.y,\n zoom: c.value.zoom\n }),\n fitView: (p = {\n padding: In,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!o.value.length)\n return;\n const N = (p.includeHiddenNodes ? o.value : d.value).filter(($) => {\n var ee;\n const D = $.initialized && $.dimensions.width && $.dimensions.height;\n let Q = !0;\n return (ee = p.nodes) != null && ee.length && (Q = p.nodes.includes($.id)), D && Q;\n }), T = co(N), { x: _, y: P, zoom: R } = Zt(\n T,\n a.value.width,\n a.value.height,\n p.minZoom ?? l.value,\n p.maxZoom ?? u.value,\n p.padding ?? In,\n p.offset\n );\n V(_, P, R, p == null ? void 0 : p.duration);\n },\n setCenter: (p, N, T) => {\n const _ = typeof (T == null ? void 0 : T.zoom) < \"u\" ? T.zoom : u.value, P = a.value.width / 2 - p * _, R = a.value.height / 2 - N * _;\n V(P, R, _, T == null ? void 0 : T.duration);\n },\n fitBounds: (p, N = { padding: In }) => {\n const { x: T, y: _, zoom: P } = Zt(\n p,\n a.value.width,\n a.value.height,\n l.value,\n u.value,\n N.padding\n );\n V(T, _, P, N == null ? void 0 : N.duration);\n },\n project: (p) => uo(p, c.value, v.value, g.value)\n } : td);\n};\nfunction Pn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Dn(e, t) {\n if (t) {\n const n = e.position.x + e.dimensions.width - t.dimensions.width, o = e.position.y + e.dimensions.height - t.dimensions.height;\n if (n > 0 || o > 0 || e.position.x < 0 || e.position.y < 0) {\n let i = {};\n if (Ae(t.style) ? i = { ...t.style(t) } : t.style && (i = { ...t.style }), i.width = i.width ?? `${t.dimensions.width}px`, i.height = i.height ?? `${t.dimensions.height}px`, n > 0)\n if (Pe(i.width)) {\n const r = Number(i.width.replace(\"px\", \"\"));\n i.width = `${r + n}px`;\n } else\n i.width += n;\n if (o > 0)\n if (Pe(i.height)) {\n const r = Number(i.height.replace(\"px\", \"\"));\n i.height = `${r + o}px`;\n } else\n i.height += o;\n if (e.position.x < 0) {\n const r = Math.abs(e.position.x);\n if (t.position.x = t.position.x - r, Pe(i.width)) {\n const a = Number(i.width.replace(\"px\", \"\"));\n i.width = `${a + r}px`;\n } else\n i.width += r;\n e.position.x = 0;\n }\n if (e.position.y < 0) {\n const r = Math.abs(e.position.y);\n if (t.position.y = t.position.y - r, Pe(i.height)) {\n const a = Number(i.height.replace(\"px\", \"\"));\n i.height = `${a + r}px`;\n } else\n i.height += r;\n e.position.y = 0;\n }\n t.dimensions.width = Number(i.width.toString().replace(\"px\", \"\")), t.dimensions.height = Number(i.height.toString().replace(\"px\", \"\")), Ae(t.style) ? t.style = (r) => {\n const a = t.style;\n return {\n ...a(r),\n ...i\n };\n } : t.style = {\n ...t.style,\n ...i\n };\n }\n }\n}\nfunction nn(e, t) {\n e.filter((i) => i.type === \"add\" || i.type === \"remove\").forEach((i) => {\n if (i.type === \"add\")\n t.findIndex((a) => a.id === i.item.id) === -1 && t.push(i.item);\n else if (i.type === \"remove\") {\n const r = t.findIndex((a) => a.id === i.id);\n r !== -1 && t.splice(r, 1);\n }\n });\n const o = t.map((i) => i.id);\n return t.forEach((i) => {\n var a, s;\n const r = e.filter((l) => l.id === i.id);\n for (const l of r)\n switch (l.type) {\n case \"select\":\n i.selected = l.selected;\n break;\n case \"position\":\n if (nt(i) && (typeof l.position < \"u\" && (i.position = l.position), typeof l.dragging < \"u\" && (i.dragging = l.dragging), i.expandParent && i.parentNode)) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && Dn(i, u);\n }\n break;\n case \"dimensions\":\n if (nt(i)) {\n if (typeof l.dimensions < \"u\" && (i.dimensions = l.dimensions), typeof l.updateStyle < \"u\" && (i.style = {\n ...i.style || {},\n width: `${(a = l.dimensions) == null ? void 0 : a.width}px`,\n height: `${(s = l.dimensions) == null ? void 0 : s.height}px`\n }), typeof l.resizing < \"u\" && (i.resizing = l.resizing), i.expandParent && i.parentNode) {\n const u = t[o.indexOf(i.parentNode)];\n u && nt(u) && (u.initialized ? Dn(i, u) : Ue(() => {\n Dn(i, u);\n }));\n }\n i.initialized || (i.initialized = !0);\n }\n break;\n }\n }), t;\n}\nfunction Vd(e, t) {\n return nn(e, t);\n}\nfunction Hd(e, t) {\n return nn(e, t);\n}\nfunction Te(e, t) {\n return {\n id: e,\n type: \"select\",\n selected: t\n };\n}\nfunction di(e) {\n return {\n item: e,\n type: \"add\"\n };\n}\nfunction zn(e) {\n return {\n id: e,\n type: \"remove\"\n };\n}\nfunction An(e, t) {\n return e.reduce(\n (n, o) => {\n let i = t.includes(o.id);\n ce(o.selectable) && !o.selectable && (i = !1);\n const r = nt(o) ? \"changedNodes\" : \"changedEdges\";\n return !o.selected && i ? n[r].push(Te(o.id, !0)) : o.selected && !i && n[r].push(Te(o.id, !1)), n;\n },\n { changedNodes: [], changedEdges: [] }\n );\n}\nfunction od(e, t, n, o) {\n let i = !1;\n const r = nd(e, t), a = (f) => {\n const b = f ?? n.value ?? [];\n e.hooks.updateNodeInternals.trigger(b);\n }, s = (f) => {\n if (f)\n return e.nodes && !n.value.length ? e.nodes.find((b) => b.id === f) : e.nodes[n.value.indexOf(f)];\n }, l = (f) => {\n if (f)\n return e.edges && !o.value.length ? e.edges.find((b) => b.id === f) : e.edges[o.value.indexOf(f)];\n }, u = (f, b, L) => {\n const I = [];\n f.forEach((F) => {\n var Y, ne;\n const U = {\n id: F.id,\n type: \"position\",\n dragging: L,\n from: F.from\n };\n if (b && (U.position = F.position, F.parentNode)) {\n const O = s(F.parentNode);\n U.position = {\n x: U.position.x - (((Y = O == null ? void 0 : O.computedPosition) == null ? void 0 : Y.x) ?? 0),\n y: U.position.y - (((ne = O == null ? void 0 : O.computedPosition) == null ? void 0 : ne.y) ?? 0)\n };\n }\n I.push(U);\n }), I != null && I.length && e.hooks.nodesChange.trigger(I);\n }, c = (f) => {\n var F;\n if (!e.vueFlowRef)\n return;\n const b = e.vueFlowRef.querySelector(\".vue-flow__transformationpane\");\n if (!b)\n return;\n let L;\n if ((F = e.__experimentalFeatures) != null && F.nestedFlow) {\n let U = [b], Y = b, ne;\n for (; !ne && Y; )\n Y = Y.parentElement, ne = Y == null ? void 0 : Y.classList.contains(\"vue-flow__transformationpane\"), ne && (U = [Y, ...U]);\n U.forEach((O) => {\n const ae = window.getComputedStyle(O), { m22: me } = new window.DOMMatrixReadOnly(ae.transform);\n L ? L *= me : L = me;\n });\n } else {\n const U = window.getComputedStyle(b), { m22: Y } = new window.DOMMatrixReadOnly(U.transform);\n L = Y;\n }\n const I = f.reduce((U, Y) => {\n const ne = s(Y.id);\n if (ne) {\n const O = rn(Y.nodeElement);\n !!(O.width && O.height && (ne.dimensions.width !== O.width || ne.dimensions.height !== O.height || Y.forceUpdate)) && (ne.handleBounds.source = Lo(\".source\", Y.nodeElement, L), ne.handleBounds.target = Lo(\".target\", Y.nodeElement, L), ne.dimensions = O, ne.initialized = !0, U.push({\n id: ne.id,\n type: \"dimensions\",\n dimensions: O\n }));\n }\n return U;\n }, []);\n e.fitViewOnInit && !i && (ye(() => r.value.initialized).toBe(!0).then(() => {\n r.value.fitView();\n }), i = !0), I.length && e.hooks.nodesChange.trigger(I);\n }, v = (f, b) => {\n const L = f.map((U) => U.id);\n let I, F = [];\n if (e.multiSelectionActive)\n I = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, g = (f, b) => {\n const L = f.map((U) => U.id);\n let I = [], F;\n if (e.multiSelectionActive)\n F = L.map((U) => Te(U, b));\n else {\n const U = An([...e.nodes, ...e.edges], L);\n I = U.changedNodes, F = U.changedEdges;\n }\n I.length && e.hooks.nodesChange.trigger(I), F.length && e.hooks.edgesChange.trigger(F);\n }, x = (f, b) => {\n const L = f.filter(xt).map((Y) => Y.id), I = f.filter($e).map((Y) => Y.id);\n let { changedNodes: F, changedEdges: U } = An([...e.nodes, ...e.edges], [...L, ...I]);\n e.multiSelectionActive && (F = L.map((Y) => Te(Y, b)), U = I.map((Y) => Te(Y, b))), F.length && e.hooks.nodesChange.trigger(F), U.length && e.hooks.edgesChange.trigger(U);\n }, h = (f) => {\n v(f, !0);\n }, d = (f) => {\n g(f, !0);\n }, w = (f) => {\n x(f, !0);\n }, y = (f) => {\n if (!f.length)\n return v(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.nodesChange.trigger(L);\n }, S = (f) => {\n if (!f.length)\n return g(f, !1);\n const L = f.map((I) => I.id).map((I) => Te(I, !1));\n L.length && e.hooks.edgesChange.trigger(L);\n }, V = (f) => {\n if (!f || !f.length)\n return x([], !1);\n const { changedNodes: b, changedEdges: L } = f.reduce(\n (I, F) => {\n const U = Te(F.id, !1);\n return xt(F) ? I.changedNodes.push(U) : I.changedEdges.push(U), I;\n },\n { changedNodes: [], changedEdges: [] }\n );\n b.length && e.hooks.nodesChange.trigger(b), L.length && e.hooks.edgesChange.trigger(L);\n }, p = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([f, e.maxZoom]), e.minZoom = f;\n }, N = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.scaleExtent([e.minZoom, f]), e.maxZoom = f;\n }, T = (f) => {\n var b;\n (b = e.d3Zoom) == null || b.translateExtent(f), e.translateExtent = f;\n }, _ = (f) => {\n e.nodeExtent = f, a(n.value);\n }, P = (f) => {\n e.nodesDraggable = f, e.nodesConnectable = f, e.elementsSelectable = f;\n }, R = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f;\n !e.initialized && !b.length || (e.nodes = Do(b, e.nodes, s, e.hooks.error.trigger));\n }, $ = (f) => {\n const b = f instanceof Function ? f(e.edges) : f;\n if (!e.initialized && !b.length)\n return;\n const L = e.isValidConnection ? b.filter(\n (I) => e.isValidConnection(I, {\n edges: e.edges,\n sourceNode: s(I.source),\n targetNode: s(I.target)\n })\n ) : b;\n e.edges = L.reduce((I, F) => {\n const U = s(F.source), Y = s(F.target), ne = !U || typeof U > \"u\", O = !Y || typeof Y > \"u\";\n if (ne && O ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, F.id, F.source, F.target)) : (ne && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, F.id, F.source)), O && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, F.id, F.target))), ne || O)\n return I;\n const ae = l(F.id);\n return I.push({\n ...lo(F, Object.assign({}, ae, e.defaultEdgeOptions)),\n sourceNode: U,\n targetNode: Y\n }), I;\n }, []);\n }, D = (f) => {\n const b = f instanceof Function ? f([...e.nodes, ...e.edges]) : f;\n !e.initialized && !b.length || (R(b.filter(xt)), $(b.filter($e)));\n }, Q = (f) => {\n const b = f instanceof Function ? f(e.nodes) : f, I = Do(b, e.nodes, s, e.hooks.error.trigger).map(di);\n I.length && e.hooks.nodesChange.trigger(I);\n }, ee = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, I = (e.isValidConnection ? b.filter(\n (F) => e.isValidConnection(F, {\n edges: e.edges,\n sourceNode: s(F.source),\n targetNode: s(F.target)\n })\n ) : b).reduce((F, U) => {\n const Y = pa(\n {\n ...U,\n ...e.defaultEdgeOptions\n },\n e.edges,\n e.hooks.error.trigger\n );\n if (Y) {\n const ne = s(Y.source), O = s(Y.target), ae = !ne || typeof ne > \"u\", me = !O || typeof O > \"u\";\n if (ae && me ? e.hooks.error.trigger(new ve(he.EDGE_SOURCE_TARGET_MISSING, Y.id, Y.source, Y.target)) : (ae && e.hooks.error.trigger(new ve(he.EDGE_SOURCE_MISSING, Y.id, Y.source)), me && e.hooks.error.trigger(new ve(he.EDGE_TARGET_MISSING, Y.id, Y.target))), ae || me)\n return F;\n F.push(\n di({\n ...Y,\n sourceNode: ne,\n targetNode: O\n })\n );\n }\n return F;\n }, []);\n I.length && e.hooks.edgesChange.trigger(I);\n }, m = (f, b = !0) => {\n const L = f instanceof Function ? f(e.nodes) : f, I = [], F = [];\n L.forEach((U) => {\n const Y = typeof U == \"string\" ? s(U) : U;\n if (!(ce(Y.deletable) && !Y.deletable) && (I.push(zn(Y.id)), b)) {\n const ne = sn([Y], e.edges).filter((O) => ce(O.deletable) ? O.deletable : !0);\n F.push(...ne.map((O) => zn(O.id)));\n }\n }), F.length && e.hooks.edgesChange.trigger(F), I.length && e.hooks.nodesChange.trigger(I);\n }, A = (f) => {\n const b = f instanceof Function ? f(e.edges) : f, L = [];\n b.forEach((I) => {\n const F = typeof I == \"string\" ? l(I) : I;\n ce(F.deletable) && !F.deletable || L.push(zn(typeof I == \"string\" ? I : I.id));\n }), e.hooks.edgesChange.trigger(L);\n }, E = (f, b, L = !0) => ya(f, b, e.edges, l, L, e.hooks.error.trigger), G = (f) => nn(f, e.nodes), Z = (f) => nn(f, e.edges), K = (f, b, L, I = !1) => {\n I ? e.connectionClickStartHandle = f : e.connectionStartHandle = f, e.connectionEndHandle = null, e.connectionStatus = null, b && (e.connectionPosition = b);\n }, z = (f, b = null, L = null) => {\n e.connectionStartHandle && (e.connectionPosition = f, e.connectionEndHandle = b, e.connectionStatus = L);\n }, W = (f, b) => {\n e.connectionPosition = { x: NaN, y: NaN }, e.connectionStatus = null, b ? e.connectionClickStartHandle = null : e.connectionStartHandle = null;\n }, B = (f) => {\n const b = ha(f), L = b ? null : s(f.id);\n return !b && !L ? [null, null, b] : [b ? f : Io(L), L, b];\n }, q = (f, b = !0, L) => {\n const [I, F, U] = B(f);\n return I ? (L || e.nodes).filter((Y) => {\n if (!U && (Y.id === F.id || !Y.computedPosition))\n return !1;\n const ne = Io(Y), O = Fn(ne, I);\n return b && O > 0 || O >= Number(f.width) * Number(f.height);\n }) : [];\n }, te = (f, b, L = !0) => {\n const [I] = B(f);\n if (!I)\n return !1;\n const F = Fn(I, b);\n return L && F > 0 || F >= Number(f.width) * Number(f.height);\n }, re = (f) => {\n const { viewport: b, dimensions: L, d3Zoom: I, d3Selection: F, translateExtent: U } = e;\n if (!I || !F || !f.x && !f.y)\n return !1;\n const Y = et.translate(b.x + f.x, b.y + f.y).scale(b.zoom), ne = [\n [0, 0],\n [L.width, L.height]\n ], O = I.constrain()(Y, ne, U), ae = e.viewport.x !== O.x || e.viewport.y !== O.y || e.viewport.zoom !== O.k;\n return I.transform(F, O), ae;\n }, k = (f) => {\n const b = f instanceof Function ? f(e) : f, L = [\n \"modelValue\",\n \"nodes\",\n \"edges\",\n \"maxZoom\",\n \"minZoom\",\n \"translateExtent\",\n \"nodeExtent\",\n \"hooks\",\n \"defaultEdgeOptions\"\n ], I = [\n \"d3Zoom\",\n \"d3Selection\",\n \"d3ZoomHandler\",\n \"viewportRef\",\n \"vueFlowRef\",\n \"dimensions\",\n \"hooks\"\n ];\n ce(b.defaultEdgeOptions) && (e.defaultEdgeOptions = b.defaultEdgeOptions);\n const F = b.modelValue || b.nodes || b.edges ? [] : void 0;\n F && (b.modelValue && F.push(...b.modelValue), b.nodes && F.push(...b.nodes), b.edges && F.push(...b.edges), D(F));\n const U = () => {\n ce(b.maxZoom) && N(b.maxZoom), ce(b.minZoom) && p(b.minZoom), ce(b.translateExtent) && T(b.translateExtent), ce(b.nodeExtent) && _(b.nodeExtent);\n };\n Object.keys(b).forEach((Y) => {\n const ne = Y, O = b[ne];\n ![...L, ...I].includes(ne) && ce(O) && (e[ne] = O);\n }), e.d3Zoom ? U() : ye(() => e.d3Zoom).not.toBeUndefined().then(U), e.initialized || (e.initialized = !0);\n };\n return {\n updateNodePositions: u,\n updateNodeDimensions: c,\n setElements: D,\n setNodes: R,\n setEdges: $,\n addNodes: Q,\n addEdges: ee,\n removeNodes: m,\n removeEdges: A,\n findNode: s,\n findEdge: l,\n updateEdge: E,\n applyEdgeChanges: Z,\n applyNodeChanges: G,\n addSelectedElements: w,\n addSelectedNodes: h,\n addSelectedEdges: d,\n setMinZoom: p,\n setMaxZoom: N,\n setTranslateExtent: T,\n setNodeExtent: _,\n removeSelectedElements: V,\n removeSelectedNodes: y,\n removeSelectedEdges: S,\n startConnection: K,\n updateConnection: z,\n endConnection: W,\n setInteractive: P,\n setState: k,\n getIntersectingNodes: q,\n isNodeIntersecting: te,\n panBy: re,\n fitView: async (f = { padding: 0.1 }) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitView(f);\n },\n zoomIn: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomIn(f);\n },\n zoomOut: async (f) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomOut(f);\n },\n zoomTo: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.zoomTo(f, b);\n },\n setTransform: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setTransform(f, b);\n },\n getTransform: () => r.value.getTransform(),\n setCenter: async (f, b, L) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.setCenter(f, b, L);\n },\n fitBounds: async (f, b) => {\n await ye(() => r.value.initialized).toBe(!0), r.value.fitBounds(f, b);\n },\n project: (f) => r.value.project(f),\n toObject: () => JSON.parse(\n JSON.stringify({\n nodes: e.nodes.map((f) => {\n const {\n computedPosition: b,\n handleBounds: L,\n selected: I,\n dimensions: F,\n isParent: U,\n resizing: Y,\n dragging: ne,\n initialized: O,\n ...ae\n } = f;\n return ae;\n }),\n edges: e.edges.map((f) => {\n const { selected: b, sourceNode: L, targetNode: I, ...F } = f;\n return F;\n }),\n position: [e.viewport.x, e.viewport.y],\n zoom: e.viewport.zoom\n })\n ),\n updateNodeInternals: a,\n $reset: () => {\n const f = ar();\n if (e.edges = [], e.nodes = [], e.d3Zoom && e.d3Selection) {\n const b = et.translate(f.defaultViewport.x ?? 0, f.defaultViewport.y ?? 0).scale(je(f.defaultViewport.zoom ?? 1, f.minZoom, f.maxZoom)), L = e.viewportRef.getBoundingClientRect(), I = [\n [0, 0],\n [L.width, L.height]\n ], F = e.d3Zoom.constrain()(b, I, f.translateExtent);\n e.d3Zoom.transform(e.d3Selection, F);\n }\n k(f);\n },\n $destroy: () => {\n }\n };\n}\nclass ot {\n constructor() {\n this.currentId = 0, this.flows = /* @__PURE__ */ new Map();\n }\n static getInstance() {\n return ot.instance || (ot.instance = new ot()), ot.instance;\n }\n set(t, n) {\n return this.flows.set(t, n);\n }\n get(t) {\n return this.flows.get(t);\n }\n remove(t) {\n return this.flows.delete(t);\n }\n create(t, n) {\n const o = ar(n), i = kr(o), r = J(() => i.nodes.map((g) => g.id)), a = J(() => i.edges.map((g) => g.id)), s = cu(i, r, a), l = od(i, s, r, a), u = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n const h = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;\n u[h] = x.on;\n });\n const c = {};\n Object.entries(i.hooks).forEach(([g, x]) => {\n c[g] = x.trigger;\n }), l.setState(i);\n const v = {\n ...u,\n ...s,\n ...l,\n ...Or(i),\n emits: c,\n id: t,\n vueFlowVersion: \"1.19.4\",\n $destroy: () => {\n this.remove(t);\n }\n };\n return this.set(t, v), v;\n }\n getId() {\n return `vue-flow-${this.currentId++}`;\n }\n}\nconst fe = (e) => {\n const t = ot.getInstance(), n = hi(), o = e == null ? void 0 : e.id, i = (n == null ? void 0 : n.vueFlowId) || o;\n let r, a = !1;\n if (n) {\n const s = He(zo, null);\n typeof s < \"u\" && s !== null && (r = s);\n }\n if (r || i && (r = t.get(i)), !r || r && o && o !== r.id) {\n const s = o ?? t.getId();\n r = t.create(s, e), n && (a = !0);\n } else\n e && r.setState(e);\n return n && (ut(zo, r), n.vueFlowId = r.id, a && Mt(() => {\n if (r) {\n const s = t.get(r.id);\n s ? s.$destroy() : wt(`No store instance found for id ${r.id} in storage.`);\n }\n })), r;\n};\nfunction id(e, t, n) {\n const o = Tr();\n return o.run(() => {\n [\n () => {\n o.run(() => {\n let h, d, w = !!(n.nodes.value.length || n.edges.value.length);\n h = tt([e.modelValue, () => {\n var y, S;\n return (S = (y = e.modelValue) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setElements(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],\n ([y, S]) => {\n var V;\n (V = e.modelValue) != null && V.value && Array.isArray(e.modelValue.value) && (h == null || h.pause(), e.modelValue.value = [...y, ...S], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.nodes.value.length;\n h = tt([e.nodes, () => {\n var y, S;\n return (S = (y = e.nodes) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setNodes(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.nodes, () => n.nodes.value.length],\n ([y]) => {\n var S;\n (S = e.nodes) != null && S.value && Array.isArray(e.nodes.value) && (h == null || h.pause(), e.nodes.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n let h, d, w = !!n.edges.value.length;\n h = tt([e.edges, () => {\n var y, S;\n return (S = (y = e.edges) == null ? void 0 : y.value) == null ? void 0 : S.length;\n }], ([y]) => {\n y && Array.isArray(y) && (d == null || d.pause(), n.setEdges(y), !d && !w && y.length ? w = !0 : d == null || d.resume());\n }), d = tt(\n [n.edges, () => n.edges.value.length],\n ([y]) => {\n var S;\n (S = e.edges) != null && S.value && Array.isArray(e.edges.value) && (h == null || h.pause(), e.edges.value = [...y], Ue(() => {\n h == null || h.resume();\n }));\n },\n { immediate: w }\n ), Vt(() => {\n h == null || h.stop(), d == null || d.stop();\n });\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.minZoom,\n () => {\n t.minZoom && ce(t.minZoom) && n.setMinZoom(t.minZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.maxZoom,\n () => {\n t.maxZoom && ce(t.maxZoom) && n.setMaxZoom(t.maxZoom);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.translateExtent,\n () => {\n t.translateExtent && ce(t.translateExtent) && n.setTranslateExtent(t.translateExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.nodeExtent,\n () => {\n t.nodeExtent && ce(t.nodeExtent) && n.setNodeExtent(t.nodeExtent);\n }\n );\n });\n },\n () => {\n o.run(() => {\n de(\n () => t.applyDefault,\n () => {\n ce(t.applyDefault) && (n.applyDefault.value = t.applyDefault);\n }\n ), de(\n n.applyDefault,\n (h, d, w) => {\n n.applyDefault.value ? (n.onNodesChange(n.applyNodeChanges), n.onEdgesChange(n.applyEdgeChanges)) : (n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges)), w(() => {\n n.hooks.value.nodesChange.off(n.applyNodeChanges), n.hooks.value.edgesChange.off(n.applyEdgeChanges);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n o.run(() => {\n const h = async (d) => {\n let w = d;\n Ae(t.autoConnect) && (w = await t.autoConnect(d)), w !== !1 && n.addEdges([w]);\n };\n de(\n () => t.autoConnect,\n () => {\n ce(t.autoConnect) && (n.autoConnect.value = t.autoConnect);\n }\n ), de(\n n.autoConnect,\n (d, w, y) => {\n d ? n.onConnect(h) : n.hooks.value.connect.off(h), y(() => {\n n.hooks.value.connect.off(h);\n });\n },\n { immediate: !0 }\n );\n });\n },\n () => {\n const h = [\n \"id\",\n \"modelValue\",\n \"translateExtent\",\n \"nodeExtent\",\n \"edges\",\n \"nodes\",\n \"maxZoom\",\n \"minZoom\",\n \"applyDefault\",\n \"autoConnect\"\n ];\n Object.keys(t).forEach((d) => {\n if (!h.includes(d)) {\n const w = M(t, d), y = n[d];\n o.run(() => {\n de(\n w,\n (S) => {\n ce(S) && (y.value = S);\n },\n { flush: \"pre\" }\n );\n });\n }\n });\n }\n ].forEach((h) => h());\n }), () => o.stop();\n}\nfunction fi(e, t) {\n return {\n x: e.clientX - t.left,\n y: e.clientY - t.top\n };\n}\nconst rd = {\n name: \"Pane\",\n compatConfig: { MODE: 3 }\n}, ad = /* @__PURE__ */ ge({\n ...rd,\n props: {\n isSelecting: { type: Boolean }\n },\n setup(e) {\n const {\n id: t,\n vueFlowRef: n,\n getNodes: o,\n getEdges: i,\n viewport: r,\n emits: a,\n userSelectionActive: s,\n removeSelectedElements: l,\n panOnDrag: u,\n userSelectionRect: c,\n elementsSelectable: v,\n nodesSelectionActive: g,\n addSelectedElements: x,\n getSelectedEdges: h,\n getSelectedNodes: d,\n removeNodes: w,\n removeEdges: y,\n selectionMode: S,\n deleteKeyCode: V,\n multiSelectionKeyCode: p,\n multiSelectionActive: N\n } = fe(), T = ie(null), _ = ie(0), P = ie(0), R = ie(), $ = J(() => v.value && (e.isSelecting || s.value));\n _t(V, (z) => {\n if (!z)\n return;\n const W = o.value.reduce((B, q) => ((!q.selected && q.parentNode && B.find((te) => te.id === q.parentNode) || q.selected) && B.push(q), B), []);\n (W || h.value) && (h.value.length > 0 && y(h.value), W.length > 0 && w(W), g.value = !1, l());\n }), _t(p, (z) => {\n N.value = z;\n });\n function D() {\n s.value = !1, c.value = null, _.value = 0, P.value = 0;\n }\n function Q(z) {\n z.target !== T.value || $.value || (a.paneClick(z), l(), g.value = !1);\n }\n function ee(z) {\n var W;\n if (z.target === T.value) {\n if (Array.isArray(u.value) && ((W = u.value) != null && W.includes(2))) {\n z.preventDefault();\n return;\n }\n a.paneContextMenu(z);\n }\n }\n function m(z) {\n z.target === T.value && a.paneScroll(z);\n }\n function A(z) {\n if (R.value = n.value.getBoundingClientRect(), !$.value || !v || !e.isSelecting || z.button !== 0 || z.target !== T.value || !R.value)\n return;\n const { x: W, y: B } = fi(z, R.value);\n l(), c.value = {\n width: 0,\n height: 0,\n startX: W,\n startY: B,\n x: W,\n y: B\n }, s.value = !0, a.selectionStart(z);\n }\n function E(z) {\n if (!$.value)\n return a.paneMouseMove(z);\n if (!e.isSelecting || !R.value || !c.value)\n return;\n s.value || (s.value = !0), g.value && (g.value = !1);\n const W = fi(z, R.value), B = c.value.startX ?? 0, q = c.value.startY ?? 0, te = {\n ...c.value,\n x: W.x < B ? W.x : B,\n y: W.y < q ? W.y : q,\n width: Math.abs(W.x - B),\n height: Math.abs(W.y - q)\n }, re = Ci(\n o.value,\n c.value,\n r.value,\n S.value === fo.Partial\n ), k = sn(re, i.value);\n _.value = re.length, P.value = k.length, c.value = te, x([...re, ...k]);\n }\n function G(z) {\n $.value && z.button === 0 && (!s.value && c.value && z.target === T.value && Q(z), g.value = _.value > 0, D(), a.selectionEnd(z));\n }\n function Z(z) {\n var W;\n if (!$.value)\n return a.paneMouseLeave(z);\n s.value && (g.value = _.value > 0, (W = a.selectionEnd) == null || W.call(a, z)), D();\n }\n function K(z) {\n $.value || a.paneMouseEnter(z);\n }\n return (z, W) => (oe(), se(\"div\", {\n ref_key: \"container\",\n ref: T,\n key: `pane-${C(t)}`,\n class: Ke([\"vue-flow__pane vue-flow__container\", { selection: e.isSelecting }]),\n onClick: Q,\n onContextmenu: ee,\n onWheelPassive: m,\n onMouseenter: K,\n onMousedown: A,\n onMousemove: E,\n onMouseup: G,\n onMouseleave: Z\n }, [\n xe(z.$slots, \"default\"),\n C(s) && C(c) ? (oe(), ze(au, { key: 0 })) : Ee(\"\", !0),\n C(g) && C(d).length ? (oe(), ze(iu, { key: 1 })) : Ee(\"\", !0)\n ], 34));\n }\n}), sd = { class: \"vue-flow__nodes vue-flow__container\" }, ld = {\n name: \"Nodes\",\n compatConfig: { MODE: 3 }\n}, ud = /* @__PURE__ */ ge({\n ...ld,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"nodesDraggable\"), i = M(n, \"nodesFocusable\"), r = M(n, \"elementsSelectable\"), a = M(n, \"nodesConnectable\"), s = M(n, \"getNodes\"), l = M(n, \"getNodesInitialized\"), u = M(n, \"getNodeTypes\"), c = M(n, \"updateNodeDimensions\"), v = M(n, \"emits\");\n let g = ie();\n ye(() => s.value.length > 0 && l.value.length === s.value.length).toBe(!0).then(() => {\n Ue(() => {\n v.value.nodesInitialized(l.value);\n });\n }), Ve(() => {\n g.value = new ResizeObserver((S) => {\n const V = S.map((p) => ({\n id: p.target.getAttribute(\"data-id\"),\n nodeElement: p.target,\n forceUpdate: !0\n }));\n c.value(V);\n });\n }), gi(() => {\n var S;\n return (S = g.value) == null ? void 0 : S.disconnect();\n });\n function x(S) {\n return typeof S > \"u\" ? o.value : S;\n }\n function h(S) {\n return typeof S > \"u\" ? r.value : S;\n }\n function d(S) {\n return typeof S > \"u\" ? a.value : S;\n }\n function w(S) {\n return typeof S > \"u\" ? i.value : S;\n }\n function y(S, V) {\n const p = S || \"default\";\n let N = V ?? u.value[p];\n const T = on();\n if (typeof N == \"string\" && T) {\n const P = Object.keys(T.appContext.components);\n P && P.includes(p) && (N = pi(p, !1));\n }\n if (typeof N != \"string\")\n return N;\n const _ = t == null ? void 0 : t[`node-${p}`];\n return _ || (v.value.error(new ve(he.NODE_TYPE_MISSING, N)), !1);\n }\n return (S, V) => (oe(), se(\"div\", sd, [\n C(g) ? (oe(!0), se(Ce, { key: 0 }, dt(C(s), (p) => (oe(), ze(C(Tl), {\n id: p.id,\n key: p.id,\n \"resize-observer\": C(g),\n type: y(p.type, p.template),\n name: p.type || \"default\",\n draggable: x(p.draggable),\n selectable: h(p.selectable),\n connectable: d(p.connectable),\n focusable: w(p.focusable),\n node: p\n }, null, 8, [\"id\", \"resize-observer\", \"type\", \"name\", \"draggable\", \"selectable\", \"connectable\", \"focusable\", \"node\"]))), 128)) : Ee(\"\", !0)\n ]));\n }\n}), cd = [\"id\", \"markerWidth\", \"markerHeight\", \"markerUnits\", \"orient\"], dd = [\"stroke\", \"stroke-width\", \"fill\"], fd = [\"stroke\", \"stroke-width\"], hd = {\n name: \"MarkerType\",\n compatConfig: { MODE: 3 }\n}, gd = /* @__PURE__ */ ge({\n ...hd,\n props: {\n id: null,\n type: null,\n color: { default: \"none\" },\n width: { default: 12.5 },\n height: { default: 12.5 },\n markerUnits: { default: \"strokeWidth\" },\n orient: { default: \"auto-start-reverse\" },\n strokeWidth: { default: 1 }\n },\n setup(e) {\n return (t, n) => (oe(), se(\"marker\", {\n id: e.id,\n class: \"vue-flow__arrowhead\",\n viewBox: \"-10 -10 20 20\",\n refX: \"0\",\n refY: \"0\",\n markerWidth: `${e.width}`,\n markerHeight: `${e.height}`,\n markerUnits: e.markerUnits,\n orient: e.orient\n }, [\n e.type === C(Yn).ArrowClosed ? (oe(), se(\"polyline\", {\n key: 0,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: e.color,\n points: \"-5,-4 0,0 -5,4 -5,-4\"\n }, null, 8, dd)) : Ee(\"\", !0),\n e.type === C(Yn).Arrow ? (oe(), se(\"polyline\", {\n key: 1,\n stroke: e.color,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": e.strokeWidth,\n fill: \"none\",\n points: \"-5,-4 0,0 -5,4\"\n }, null, 8, fd)) : Ee(\"\", !0)\n ], 8, cd));\n }\n}), vd = {\n name: \"MarkerDefinitions\",\n compatConfig: { MODE: 3 }\n}, md = /* @__PURE__ */ ge({\n ...vd,\n setup(e) {\n const t = fe(), n = M(t, \"id\"), o = M(t, \"edges\"), i = M(t, \"connectionLineOptions\"), r = M(t, \"defaultMarkerColor\"), a = J(() => {\n const s = [], l = [], u = (c) => {\n if (c) {\n const v = Xe(c, n.value);\n s.includes(v) || (typeof c == \"object\" ? l.push({ ...c, id: v, color: c.color || r.value }) : l.push({ id: v, color: r.value, type: c }), s.push(v));\n }\n };\n return [i.value.markerEnd, i.value.markerStart].forEach(u), o.value.reduce((c, v) => ([v.markerStart, v.markerEnd].forEach(u), c.sort((g, x) => g.id.localeCompare(x.id))), l), l;\n });\n return (s, l) => (oe(), se(\"defs\", null, [\n (oe(!0), se(Ce, null, dt(C(a), (u) => (oe(), ze(gd, {\n id: u.id,\n key: u.id,\n type: u.type,\n color: u.color,\n width: u.width,\n height: u.height,\n markerUnits: u.markerUnits,\n \"stroke-width\": u.strokeWidth,\n orient: u.orient\n }, null, 8, [\"id\", \"type\", \"color\", \"width\", \"height\", \"markerUnits\", \"stroke-width\", \"orient\"]))), 128))\n ]));\n }\n}), pd = {\n key: 0,\n class: \"vue-flow__edges vue-flow__connectionline vue-flow__container\"\n}, yd = {\n name: \"Edges\",\n compatConfig: { MODE: 3 }\n}, xd = /* @__PURE__ */ ge({\n ...yd,\n setup(e) {\n const t = He(ln), n = fe(), o = M(n, \"connectionStartHandle\"), i = M(n, \"nodesConnectable\"), r = M(n, \"edgesUpdatable\"), a = M(n, \"edgesFocusable\"), s = M(n, \"elementsSelectable\"), l = M(n, \"getSelectedNodes\"), u = M(n, \"findNode\"), c = M(n, \"edges\"), v = M(n, \"getEdges\"), g = M(n, \"getNodesInitialized\"), x = M(n, \"getEdgeTypes\"), h = M(n, \"elevateEdgesOnSelect\"), d = M(n, \"dimensions\"), w = M(n, \"emits\"), y = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P;\n return (P = o.value) != null && P.nodeId ? u.value(o.value.nodeId) : !1;\n }\n ), S = Sn(\n () => {\n var P;\n return (P = o.value) == null ? void 0 : P.nodeId;\n },\n () => {\n var P, R;\n return !!(y.value && (typeof y.value.connectable > \"u\" ? i.value : y.value.connectable) && ((P = o.value) != null && P.nodeId) && ((R = o.value) != null && R.type));\n }\n ), V = Sn(\n [\n () => c.value.map((P) => P.zIndex),\n () => h.value ? [l.value.length] : [0],\n () => h.value ? g.value.map((P) => P.computedPosition.z) : []\n ],\n () => Ea(v.value, u.value, h.value)\n );\n function p(P) {\n return typeof P > \"u\" ? s.value : P;\n }\n function N(P) {\n return typeof P > \"u\" ? r.value : P;\n }\n function T(P) {\n return typeof P > \"u\" ? a.value : P;\n }\n function _(P, R) {\n const $ = P || \"default\";\n let D = R ?? x.value[$];\n const Q = on();\n if (typeof D == \"string\" && Q) {\n const m = Object.keys(Q.appContext.components);\n m && m.includes($) && (D = pi($, !1));\n }\n if (D && typeof D != \"string\")\n return D;\n const ee = t == null ? void 0 : t[`edge-${$}`];\n return ee || (w.value.error(new ve(he.EDGE_TYPE_MISSING, D)), !1);\n }\n return (P, R) => C(d).width && C(d).height ? (oe(), se(Ce, { key: 0 }, [\n (oe(!0), se(Ce, null, dt(C(V), ($) => (oe(), se(\"svg\", {\n key: $.level,\n class: \"vue-flow__edges vue-flow__container\",\n style: Le(`z-index: ${$.level}`)\n }, [\n $.isMaxLevel ? (oe(), ze(md, { key: 0 })) : Ee(\"\", !0),\n ct(\"g\", null, [\n (oe(!0), se(Ce, null, dt($.edges, (D) => (oe(), ze(C(Kl), {\n id: D.id,\n key: D.id,\n edge: D,\n type: _(D.type, D.template),\n name: D.type || \"default\",\n selectable: p(D.selectable),\n updatable: N(D.updatable),\n focusable: T(D.focusable)\n }, null, 8, [\"id\", \"edge\", \"type\", \"name\", \"selectable\", \"updatable\", \"focusable\"]))), 128))\n ])\n ], 4))), 128)),\n C(S) && C(y) ? (oe(), se(\"svg\", pd, [\n qe(tu, { \"source-node\": C(y) }, null, 8, [\"source-node\"])\n ])) : Ee(\"\", !0)\n ], 64)) : Ee(\"\", !0);\n }\n}), _d = /* @__PURE__ */ ct(\"div\", { class: \"vue-flow__edge-labels\" }, null, -1), wd = {\n name: \"Transform\",\n compatConfig: { MODE: 3 }\n}, bd = /* @__PURE__ */ ge({\n ...wd,\n setup(e) {\n const { id: t, viewport: n, emits: o, d3Zoom: i, d3Selection: r, dimensions: a, ...s } = fe(), l = ie(!oo);\n return ye(() => i.value && r.value && a.value.width > 0 && a.value.height > 0).toBeTruthy().then(() => {\n o.paneReady({\n id: t,\n viewport: n,\n emits: o,\n d3Zoom: i,\n d3Selection: r,\n dimensions: a,\n ...s\n }), setTimeout(() => {\n l.value = !0;\n }, 0);\n }), (u, c) => (oe(), se(\"div\", {\n key: `transform-${C(t)}`,\n class: \"vue-flow__transformationpane vue-flow__container\",\n style: Le({\n transform: `translate(${C(n).x}px,${C(n).y}px) scale(${C(n).zoom})`,\n opacity: C(l) ? void 0 : 0\n })\n }, [\n qe(xd),\n _d,\n qe(ud),\n xe(u.$slots, \"default\")\n ], 4));\n }\n}), Ed = {\n name: \"Viewport\",\n compatConfig: { MODE: 3 }\n}, Sd = /* @__PURE__ */ ge({\n ...Ed,\n setup(e) {\n const {\n id: t,\n minZoom: n,\n maxZoom: o,\n defaultViewport: i,\n translateExtent: r,\n dimensions: a,\n zoomActivationKeyCode: s,\n selectionKeyCode: l,\n panActivationKeyCode: u,\n panOnScroll: c,\n panOnScrollMode: v,\n panOnScrollSpeed: g,\n panOnDrag: x,\n zoomOnDoubleClick: h,\n zoomOnPinch: d,\n zoomOnScroll: w,\n preventScrolling: y,\n noWheelClassName: S,\n noPanClassName: V,\n emits: p,\n connectionStartHandle: N,\n userSelectionActive: T,\n paneDragging: _,\n d3Zoom: P,\n d3Selection: R,\n d3ZoomHandler: $,\n viewport: D,\n viewportRef: Q\n } = fe(), ee = ie(), m = ie(!1), A = ie(!1);\n let E = !1, G = 0, Z = {\n x: 0,\n y: 0,\n zoom: 0\n };\n const K = _t(u), z = J(() => !m.value && x.value && K.value), W = J(\n () => l.value !== !0 && m.value || l.value === !0 && !z.value\n );\n Ve(() => {\n oa(ee, re);\n const H = ao();\n ro(H, \"resize\", re);\n }), Ve(() => {\n const H = ee.value, f = H.getBoundingClientRect(), b = ed().scaleExtent([n.value, o.value]).translateExtent(r.value), L = we(H).call(b), I = L.on(\"wheel.zoom\"), F = et.translate(i.value.x ?? 0, i.value.y ?? 0).scale(je(i.value.zoom ?? 1, n.value, o.value)), U = [\n [0, 0],\n [f.width, f.height]\n ], Y = b.constrain()(F, U, r.value);\n b.transform(L, Y), P.value = b, R.value = L, $.value = I, D.value = { x: Y.x, y: Y.y, zoom: Y.k }, Q.value = H, _t(l, (O) => {\n m.value = O;\n });\n const ne = _t(s);\n bo(() => {\n m.value && T.value && !A.value ? b.on(\"zoom\", null) : !m.value && !T.value && b.on(\"zoom\", (O) => {\n D.value = { x: O.transform.x, y: O.transform.y, zoom: O.transform.k };\n const ae = te(O.transform);\n E = B(x.value, G ?? 0), p.viewportChange(ae), p.move({ event: O, flowTransform: ae });\n });\n }), b.on(\"start\", (O) => {\n var me;\n if (!O.sourceEvent)\n return null;\n G = O.sourceEvent.button, A.value = !0;\n const ae = te(O.transform);\n ((me = O.sourceEvent) == null ? void 0 : me.type) === \"mousedown\" && (_.value = !0), Z = ae, p.viewportChangeStart(ae), p.moveStart({ event: O, flowTransform: ae });\n }), b.on(\"end\", (O) => {\n if (!O.sourceEvent)\n return null;\n if (A.value = !1, _.value = !1, B(x.value, G ?? 0) && !E && p.paneContextMenu(O.sourceEvent), E = !1, q(Z, O.transform)) {\n const ae = te(O.transform);\n Z = ae, p.viewportChangeEnd(ae), p.moveEnd({ event: O, flowTransform: ae });\n }\n }), bo(() => {\n c.value && !ne.value && !T.value ? L.on(\n \"wheel.zoom\",\n (O) => {\n if (k(O, S.value))\n return !1;\n O.preventDefault(), O.stopImmediatePropagation();\n const ae = L.property(\"__zoom\").k || 1;\n if (O.ctrlKey && d.value) {\n const Tt = Ne(O), _r = -O.deltaY * (O.deltaMode === 1 ? 0.05 : O.deltaMode ? 1 : 2e-3) * 10, wr = ae * 2 ** _r;\n b.scaleTo(L, wr, Tt);\n return;\n }\n const me = O.deltaMode === 1 ? 20 : 1, En = v.value === Ut.Vertical ? 0 : O.deltaX * me, Ot = v.value === Ut.Horizontal ? 0 : O.deltaY * me;\n b.translateBy(\n L,\n -(En / ae) * g.value,\n -(Ot / ae) * g.value\n );\n },\n { passive: !1 }\n ) : typeof I < \"u\" && L.on(\n \"wheel.zoom\",\n function(O, ae) {\n if (!y.value || k(O, S.value))\n return null;\n O.preventDefault(), I.call(this, O, ae);\n },\n { passive: !1 }\n );\n }), b.filter((O) => {\n var Ot, Tt;\n const ae = ne.value || w.value, me = d.value && O.ctrlKey;\n if (O.button === 1 && O.type === \"mousedown\" && ((Ot = O.target) != null && Ot.closest(\".vue-flow__node\") || (Tt = O.target) != null && Tt.closest(\".vue-flow__edge\")))\n return !0;\n if (!x.value && !ae && !c.value && !h.value && !d.value || T.value || !h.value && O.type === \"dblclick\" || k(O, S.value) && O.type === \"wheel\" || k(O, V.value) && O.type !== \"wheel\" || !d.value && O.ctrlKey && O.type === \"wheel\" || !ae && !c.value && !me && O.type === \"wheel\" || !x.value && (O.type === \"mousedown\" || O.type === \"touchstart\") || Array.isArray(x.value) && !x.value.includes(O.button) && (O.type === \"mousedown\" || O.type === \"touchstart\"))\n return !1;\n const En = Array.isArray(x.value) && x.value.includes(O.button) || !O.button || O.button <= 1;\n return (!O.ctrlKey || O.type === \"wheel\") && En;\n });\n });\n function B(H, f) {\n return f === 2 && Array.isArray(H) && H.includes(2);\n }\n function q(H, f) {\n return H.x !== f.x && !isNaN(f.x) || H.y !== f.y && !isNaN(f.y) || H.zoom !== f.k && !isNaN(f.k);\n }\n function te(H) {\n return {\n x: H.x,\n y: H.y,\n zoom: H.k\n };\n }\n function re() {\n if (!ee.value)\n return;\n const { width: H, height: f } = rn(ee.value);\n (H === 0 || f === 0) && p.error(new ve(he.MISSING_VIEWPORT_DIMENSIONS)), a.value.width = H || 500, a.value.height = f || 500;\n }\n function k(H, f) {\n return H.target.closest(`.${f}`);\n }\n return (H, f) => (oe(), se(Ce, null, [\n (oe(), se(\"div\", {\n ref_key: \"viewportEl\",\n ref: ee,\n key: `viewport-${C(t)}`,\n class: \"vue-flow__viewport vue-flow__container\"\n }, [\n qe(ad, {\n \"is-selecting\": C(W),\n class: Ke({ connecting: !!C(N), dragging: C(_), draggable: !!C(x) })\n }, {\n default: Fe(() => [\n qe(bd, null, {\n default: Fe(() => [\n xe(H.$slots, \"zoom-pane\")\n ]),\n _: 3\n })\n ]),\n _: 3\n }, 8, [\"is-selecting\", \"class\"])\n ])),\n xe(H.$slots, \"default\")\n ], 64));\n }\n}), Nd = [\"id\"], Cd = [\"id\"], Md = [\"id\"], $d = {\n name: \"A11yDescriptions\",\n compatConfig: { MODE: 3 }\n}, kd = /* @__PURE__ */ ge({\n ...$d,\n setup(e) {\n const { id: t, disableKeyboardA11y: n, ariaLiveMessage: o } = fe(), i = {\n position: \"absolute\",\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: \"hidden\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n clipPath: \"inset(100%)\"\n };\n return (r, a) => (oe(), se(Ce, null, [\n ct(\"div\", {\n id: `${C(Qi)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select a node. \" + Vn(C(n) ? \"\" : \"You can then use the arrow keys to move the node around.\") + \" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. \", 9, Nd),\n ct(\"div\", {\n id: `${C(Ji)}-${C(t)}`,\n style: { display: \"none\" }\n }, \" Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. \", 8, Cd),\n C(n) ? Ee(\"\", !0) : (oe(), se(\"div\", {\n key: 0,\n id: `${C(Ml)}-${C(t)}`,\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\",\n style: i\n }, Vn(C(o)), 9, Md))\n ], 64));\n }\n}), Od = {\n name: \"VueFlow\",\n compatConfig: { MODE: 3 }\n}, Ld = /* @__PURE__ */ ge({\n ...Od,\n props: {\n id: null,\n modelValue: null,\n nodes: null,\n edges: null,\n edgeTypes: null,\n nodeTypes: null,\n connectionMode: null,\n connectionLineType: null,\n connectionLineStyle: { default: void 0 },\n connectionLineOptions: { default: void 0 },\n connectionRadius: null,\n isValidConnection: { type: [Function, null], default: void 0 },\n deleteKeyCode: null,\n selectionKeyCode: null,\n multiSelectionKeyCode: null,\n zoomActivationKeyCode: null,\n panActivationKeyCode: null,\n snapToGrid: { type: Boolean, default: void 0 },\n snapGrid: null,\n onlyRenderVisibleElements: { type: Boolean, default: void 0 },\n edgesUpdatable: { type: [Boolean, String], default: void 0 },\n nodesDraggable: { type: Boolean, default: void 0 },\n nodesConnectable: { type: Boolean, default: void 0 },\n elementsSelectable: { type: Boolean, default: void 0 },\n selectNodesOnDrag: { type: Boolean, default: void 0 },\n panOnDrag: { type: [Boolean, Array], default: void 0 },\n minZoom: null,\n maxZoom: null,\n defaultViewport: null,\n translateExtent: null,\n nodeExtent: null,\n defaultMarkerColor: null,\n zoomOnScroll: { type: Boolean, default: void 0 },\n zoomOnPinch: { type: Boolean, default: void 0 },\n panOnScroll: { type: Boolean, default: void 0 },\n panOnScrollSpeed: null,\n panOnScrollMode: null,\n zoomOnDoubleClick: { type: Boolean, default: void 0 },\n preventScrolling: { type: Boolean, default: void 0 },\n selectionMode: null,\n edgeUpdaterRadius: null,\n fitViewOnInit: { type: Boolean, default: void 0 },\n connectOnClick: { type: Boolean, default: void 0 },\n applyDefault: { type: Boolean, default: void 0 },\n autoConnect: { type: [Boolean, Function], default: void 0 },\n noDragClassName: null,\n noWheelClassName: null,\n noPanClassName: null,\n defaultEdgeOptions: null,\n elevateEdgesOnSelect: { type: Boolean, default: void 0 },\n elevateNodesOnSelect: { type: Boolean, default: void 0 },\n disableKeyboardA11y: { type: Boolean, default: void 0 },\n edgesFocusable: { type: Boolean, default: void 0 },\n nodesFocusable: { type: Boolean, default: void 0 },\n autoPanOnConnect: { type: Boolean, default: void 0 },\n autoPanOnNodeDrag: { type: Boolean, default: void 0 },\n __experimentalFeatures: null\n },\n emits: [\"nodesChange\", \"edgesChange\", \"nodeDoubleClick\", \"nodeClick\", \"nodeMouseEnter\", \"nodeMouseMove\", \"nodeMouseLeave\", \"nodeContextMenu\", \"nodeDragStart\", \"nodeDrag\", \"nodeDragStop\", \"nodesInitialized\", \"miniMapNodeClick\", \"miniMapNodeDoubleClick\", \"miniMapNodeMouseEnter\", \"miniMapNodeMouseMove\", \"miniMapNodeMouseLeave\", \"connect\", \"connectStart\", \"connectEnd\", \"clickConnectStart\", \"clickConnectEnd\", \"moveStart\", \"move\", \"moveEnd\", \"selectionDragStart\", \"selectionDrag\", \"selectionDragStop\", \"selectionContextMenu\", \"selectionStart\", \"selectionEnd\", \"viewportChangeStart\", \"viewportChange\", \"viewportChangeEnd\", \"paneReady\", \"paneScroll\", \"paneClick\", \"paneContextMenu\", \"paneMouseEnter\", \"paneMouseMove\", \"paneMouseLeave\", \"edgeContextMenu\", \"edgeMouseEnter\", \"edgeMouseMove\", \"edgeMouseLeave\", \"edgeDoubleClick\", \"edgeClick\", \"edgeUpdateStart\", \"edgeUpdate\", \"edgeUpdateEnd\", \"updateNodeInternals\", \"error\", \"update:modelValue\", \"update:nodes\", \"update:edges\"],\n setup(e, { expose: t, emit: n }) {\n const o = e, i = yt(o, \"modelValue\", n), r = yt(o, \"nodes\", n), a = yt(o, \"edges\", n), { vueFlowRef: s, hooks: l, getNodeTypes: u, getEdgeTypes: c, ...v } = fe(o), g = id({ modelValue: i, nodes: r, edges: a }, o, {\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n });\n da(n, l);\n const x = ie();\n return ut(ln, Ir()), Pr(() => {\n g();\n }), Ve(() => {\n s.value = x.value;\n }), t({\n vueFlowRef: s,\n hooks: l,\n getNodeTypes: u,\n getEdgeTypes: c,\n ...v\n }), (h, d) => (oe(), se(\"div\", {\n ref_key: \"el\",\n ref: x,\n class: \"vue-flow\"\n }, [\n qe(Sd, null, {\n nodes: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(u)), (w) => xe(h.$slots, `node-${w}`)), 256))\n ]),\n edges: Fe(() => [\n (oe(!0), se(Ce, null, dt(Object.keys(C(c)), (w) => xe(h.$slots, `edge-${w}`)), 256))\n ]),\n \"connection-name\": Fe(() => [\n xe(h.$slots, \"connection-line\")\n ]),\n \"zoom-pane\": Fe(() => [\n xe(h.$slots, \"zoom-pane\")\n ]),\n default: Fe(() => [\n xe(h.$slots, \"default\")\n ]),\n _: 3\n }),\n qe(kd)\n ], 512));\n }\n}), Td = {\n name: \"Panel\",\n compatConfig: { MODE: 3 }\n}, Gd = /* @__PURE__ */ ge({\n ...Td,\n props: {\n position: null\n },\n setup(e) {\n const t = e, { userSelectionActive: n } = fe(), o = J(() => `${t.position}`.split(\"-\"));\n return (i, r) => (oe(), se(\"div\", {\n class: Ke([\"vue-flow__panel\", C(o)]),\n style: Le({ pointerEvents: C(n) ? \"none\" : \"all\" })\n }, [\n xe(i.$slots, \"default\")\n ], 6));\n }\n}), Bn = 0.1, Fd = (e) => {\n const t = fe({ id: e }), n = M(t, \"nodes\"), o = M(t, \"d3Zoom\"), i = M(t, \"d3Selection\"), r = M(t, \"dimensions\"), a = M(t, \"translateExtent\"), s = M(t, \"minZoom\"), l = M(t, \"maxZoom\"), u = M(t, \"viewport\"), c = M(t, \"snapToGrid\"), v = M(t, \"snapGrid\"), g = M(t, \"getNodes\");\n return {\n zoomIn: (d) => {\n x(1.2, d == null ? void 0 : d.duration);\n },\n zoomOut: (d) => {\n x(1 / 1.2, d == null ? void 0 : d.duration);\n },\n zoomTo: (d, w) => {\n i.value && o.value && o.value.scaleTo(Rn(i.value, w == null ? void 0 : w.duration), d);\n },\n setTransform: (d, w) => {\n h(d.x, d.y, d.zoom, w == null ? void 0 : w.duration);\n },\n getTransform: () => ({\n x: u.value.x,\n y: u.value.y,\n zoom: u.value.zoom\n }),\n fitView: (d = {\n padding: Bn,\n includeHiddenNodes: !1,\n duration: 0\n }) => {\n if (!n.value.length)\n return;\n const w = (d.includeHiddenNodes ? n.value : g.value).filter((N) => {\n var P;\n const T = N.initialized && N.dimensions.width && N.dimensions.height;\n let _ = !0;\n return (P = d.nodes) != null && P.length && (_ = d.nodes.includes(N.id)), T && _;\n }), y = co(w), { x: S, y: V, zoom: p } = Zt(\n y,\n r.value.width,\n r.value.height,\n d.minZoom ?? s.value,\n d.maxZoom ?? l.value,\n d.padding ?? Bn,\n d.offset\n );\n h(S, V, p, d == null ? void 0 : d.duration);\n },\n setCenter: (d, w, y) => {\n const S = typeof (y == null ? void 0 : y.zoom) < \"u\" ? y.zoom : l.value, V = r.value.width / 2 - d * S, p = r.value.height / 2 - w * S;\n h(V, p, S, y == null ? void 0 : y.duration);\n },\n fitBounds: (d, w = { padding: Bn }) => {\n const { x: y, y: S, zoom: V } = Zt(d, r.value.width, r.value.height, s.value, l.value, w.padding);\n h(y, S, V, w == null ? void 0 : w.duration);\n },\n project: (d) => uo(d, u.value, c.value, v.value)\n };\n function x(d, w) {\n i.value && o.value && o.value.scaleBy(Rn(i.value, w), d);\n }\n function h(d, w, y, S) {\n const { x: V, y: p } = so({ x: -d, y: -w }, a.value), N = et.translate(-V, -p).scale(y);\n i.value && o.value && o.value.transform(Rn(i.value, S), N);\n }\n};\nfunction Rn(e, t = 0) {\n return e.transition().duration(t);\n}\nfunction Yd(e) {\n const t = e ?? He(Oi, \"\"), n = He(Ti, null), { findEdge: o, emits: i } = fe(), r = o(t);\n return r || i.error(new ve(he.EDGE_NOT_FOUND, t)), {\n id: t,\n edge: r,\n edgeEl: n\n };\n}\nexport {\n vn as BaseEdge,\n Bl as BezierEdge,\n Ye as ConnectionLineType,\n Qe as ConnectionMode,\n Rd as EdgeLabelRenderer,\n Al as EdgeText,\n he as ErrorCode,\n ot as GlobalVueFlowStorage,\n Kt as Handle,\n Yn as MarkerType,\n $i as NodeIdInjection,\n Ut as PanOnScrollMode,\n Gd as Panel,\n xa as PanelPosition,\n j as Position,\n fo as SelectionMode,\n Rl as SimpleBezierEdge,\n ir as SmoothStepEdge,\n Gl as StepEdge,\n Fl as StraightEdge,\n Ld as VueFlow,\n ve as VueFlowError,\n zo as VueFlowInjection,\n zd as addEdge,\n nn as applyChanges,\n Vd as applyEdgeChanges,\n Hd as applyNodeChanges,\n je as clamp,\n Ei as connectionExists,\n lu as defaultEdgeTypes,\n su as defaultNodeTypes,\n nr as getBezierEdgeCenter,\n Kn as getBezierPath,\n Bd as getBoundsofRects,\n sn as getConnectedEdges,\n Dd as getIncomers,\n Xe as getMarkerId,\n Ci as getNodesInside,\n Pd as getOutgoers,\n co as getRectOfNodes,\n or as getSimpleBezierPath,\n tr as getSimpleEdgeCenter,\n qn as getSmoothStepPath,\n rr as getStraightPath,\n Zt as getTransformForBounds,\n va as graphPosToZoomedPos,\n $e as isEdge,\n fa as isGraphEdge,\n nt as isGraphNode,\n xt as isNode,\n uo as pointToRendererPoint,\n va as rendererPointToPoint,\n Ad as updateEdge,\n Yd as useEdge,\n Ra as useGetPointerPosition,\n Di as useHandle,\n _a as useNode,\n fe as useVueFlow,\n Fd as useZoomPanHelper\n};\n","\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","import { App } from 'vue'\n\nimport NodeEditor from '@/components/NodeEditor.vue'\nimport StateEditor from '@/components/StateEditor.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('NodeEditor', NodeEditor)\n\tapp.component('StateEditor', StateEditor)\n}\n\nexport { install, NodeEditor, StateEditor }\n"],"names":["Eo","oo","Dr","zr","Ae","Ie","Pe","Ar","le","C","Br","i","r","yi","Rr","ie","Er","So","Vr","Sn","a","de","l","u","br","c","v","g","Mt","hi","Vt","Hr","on","Ve","Ue","Hn","x","h","d","w","S","V","p","Sr","y","N","T","ye","No","Lr","Gr","Fr","Yr","Xr","Zr","Ur","Yt","xi","_i","Co","Wr","Kr","qr","tt","wi","io","ro","jr","Mo","Qr","Jr","Ln","Gn","$o","ea","ta","na","oa","ko","ia","Oo","ra","aa","To","sa","yt","J","ua","wt","ca","da","Nr","he","Nn","ve","ao","Io","Fn","rn","je","so","Po","$e","fa","xt","nt","ha","ga","it","ce","lo","an","Ei","uo","Si","Xt","Ni","co","Ci","sn","Zt","ma","Mi","Xe","o","pa","ya","Do","fo","Ye","Qe","Yn","Ut","zo","$i","ki","Oi","Ti","ln","_a","He","fe","ho","rt","n","Wt","Ao","wa","ba","Ea","Cn","Bo","Sa","Ro","Ii","Na","Ca","Vo","Pi","It","Di","_","P","R","$","D","Q","m","G","A","E","Z","Y","L","f","B","F","I","U","ne","W","b","K","q","z","te","re","k","H","Ma","$a","ka","Kt","ge","M","ee","oe","se","Ke","xe","un","ue","Oa","cn","Ta","dn","Ia","Ho","Pa","Mn","zi","Da","za","go","Ai","Aa","Ba","Ra","Lo","Xn","Va","fn","Ht","Ha","La","Go","Zn","Fo","hn","Ga","Fa","Bi","Ya","vo","Xa","_e","Za","Ua","Ri","Wa","Ka","Vi","Hi","qa","ja","Qa","Ja","es","ts","ns","os","is","Li","rs","qt","as","ss","ls","us","cs","ds","fs","hs","gs","vs","ms","ps","ys","xs","_s","ws","bs","Es","Ss","Ns","Cs","Ms","$s","ks","Os","Gi","Ts","Is","Ps","Ds","ft","zs","As","Bs","Rs","Fi","mo","Yi","Xi","Zi","Vs","Hs","Ls","Gs","Fs","Ys","Xs","Zs","Us","Ws","Ks","qs","js","Qs","Js","el","tl","nl","ol","il","rl","al","sl","ll","ul","cl","dl","fl","hl","gl","Ui","vl","ml","pl","yl","Wi","$t","xl","we","_l","Ne","wl","bt","$n","at","Ki","qi","Pt","Un","bl","El","Sl","Nl","Cl","ji","Qi","Ji","Ml","er","st","Wn","t","$l","kl","_t","Ol","ut","gi","Tl","Il","Pl","Dl","zl","Al","Le","Ee","ct","vi","Ce","Cr","Vn","ze","mi","gn","vn","tr","nr","Dt","Yo","Kn","mn","Bl","Xo","or","pn","Rl","Zo","Vl","Uo","Hl","Ll","qn","yn","ir","xn","Gl","rr","_n","Fl","Yl","Xl","po","Wo","Zl","Ul","Wl","Kl","ql","jl","Rd","Mr","Ql","Jl","eu","tu","s","$r","nu","ou","iu","ru","au","su","lu","uu","ar","cu","yo","sr","kt","Et","jt","lt","St","Me","du","fu","hu","gu","vu","mu","pu","Ko","Nt","qo","yu","xu","jo","lr","Qo","pe","zt","ti","_u","jn","We","Qt","Jo","wu","ei","Ze","be","bu","kn","ni","At","ur","Eu","Su","Nu","cr","oi","Re","Qn","On","Cu","Mu","$u","ii","Jn","dr","Bt","ku","Ou","fr","Tu","Iu","Pu","ri","Du","zu","Au","ht","mt","gt","hr","Jt","pt","en","Je","wn","Ct","gr","xo","Bu","tn","vr","eo","Ru","ai","Hu","Vu","si","Lu","Gu","mr","li","to","Lt","ui","no","Gt","bn","Fu","_o","Se","ke","Yu","Xu","Zu","Uu","wo","pr","Wu","Ku","qu","ju","Qu","Ju","ec","tc","nc","oc","ic","rc","ac","sc","lc","uc","cc","dc","fc","hc","gc","vc","mc","Be","pc","yc","xc","_c","wc","bc","Ec","Sc","Nc","Cc","Mc","yr","$c","kc","Oc","Tc","Ic","Pc","Dc","zc","Ac","Bc","Rc","Vc","Hc","Lc","xr","Gc","Fc","Oe","Yc","Xc","Zc","Uc","Rt","Wc","De","et","Tn","vt","Kc","qc","ci","jc","Qc","Jc","ed","In","Ge","td","nd","Pn","Dn","nn","Te","di","zn","An","od","O","ae","me","ot","kr","Or","id","Tr","fi","rd","ad","sd","ld","ud","pi","dt","cd","dd","fd","hd","gd","vd","md","pd","yd","xd","qe","_d","wd","bd","Ed","Sd","bo","Tt","_r","wr","En","Ot","Fe","Nd","Cd","Md","$d","kd","Od","Ld","Ir","Pr","props","__props","emit","__emit","positionMap","Position","sourcePosition","computed","targetPosition","labelInput","ref","newLabel","showInput","lastClick","nodeOnClick","now","showLabelInput","nextTick","submitNewLabel","__default__","useVueFlow","labelOnClick","path","getBezierPath","containerClass","vueFlowInstance","hover","activeElementKey","vueFlowElements","activeElementIndex","j","elements","_elements","key","newValue","getNodes","onPaneReady","onMounted","handleKeypress","onBeforeUnmount","shiftTerminal","currentTerminal","shiftOutput","shiftInput","onWheel","$event","e","fitView","addNode","newNodePosition","makeEdge","activeNode","nodeId","edgeId","onConnect","onEdgeDoubleClick","labelChanged","states","stateHash","hasInputs","stateElements","edges","edgeKey","target","onElementsChange","idToLabel","label","install","app","NodeEditor","StateEditor"],"mappings":"oRACA,IAAIA,GACJ,MAAMC,GAAK,OAAO,OAAS,IAAKC,GAAM,GAAM,OAAO,EAAI,IAAKC,GAAM,GAAM,OAAO,GAAK,UAAWC,GAAM,GAAM,OAAO,GAAK,WAAYC,GAAM,GAAM,OAAO,GAAK,SAAUC,GAAM,GAAM,OAAO,GAAK,SAAUC,GAAK,IAAM,CAClN,EACAN,KAAQD,GAAK,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,GAAG,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EACrI,SAASQ,GAAG,EAAG,CACb,OAAO,OAAO,GAAK,WAAa,EAAC,EAAKC,EAAAA,MAAE,CAAC,CAC3C,CACA,SAASC,GAAG,EAAG,EAAG,CAChB,SAAS,KAAK,EAAG,CACf,OAAO,IAAI,QAAQ,CAACC,EAAGC,IAAM,CAC3B,QAAQ,QAAQ,EAAE,IAAM,EAAE,MAAM,KAAM,CAAC,EAAG,CAAE,GAAI,EAAG,QAAS,KAAM,KAAM,EAAG,CAAC,EAAE,KAAKD,CAAC,EAAE,MAAMC,CAAC,CACnG,CAAK,CACF,CACD,OAAO,CACT,CACA,MAAMC,GAAM,GAAM,IAClB,SAASC,GAAG,EAAID,GAAI,CAClB,MAAM,EAAIE,EAAAA,IAAG,EAAE,EACf,SAAS,GAAI,CAC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,EAAG,KAAK,EAAI,CAClB,GAAI,CAAC,CAAA,EAGGwa,EAAAxa,EAAG,EAAE,EAAIA,EAAG,KACvB,CAEA,QAASwY,KAAO4B,EAAO,CAElB,IAAAK,EAAQD,EAAUhC,CAAG,EAChB,QAAA6B,KAAWD,EAAM5B,CAAG,EACrBwB,EAAAS,CAAK,EAAE,GAAGJ,CAAO,EAAID,EAAM5B,CAAG,EAAE6B,CAAO,CAEhD,CACA5D,EAAK,oBAAqBuD,CAAM,CAAA,qPCjHjC,SAASU,GAAQC,EAAwB,CACpCA,EAAA,UAAU,aAAcC,EAAU,EAClCD,EAAA,UAAU,cAAeE,EAAW,CACzC","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/node_editor/dist/style.css b/node_editor/dist/style.css deleted file mode 100644 index 20dbee6c..00000000 --- a/node_editor/dist/style.css +++ /dev/null @@ -1 +0,0 @@ -.editable-edge-label{background-color:#fff;position:relative;font-size:12px}.label-input-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.label-input{text-align:center}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__pane.selection{cursor:pointer}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.vue-flow__node.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.vue-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.vue-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.vue-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}:root{--vf-node-bg: #fff;--vf-node-text: #222;--vf-connection-path: #b1b1b7;--vf-handle: #555}.vue-flow__edge.updating .vue-flow__edge-path{stroke:#777}.vue-flow__edge-text{font-size:10px}.vue-flow__edge-textbg{fill:#fff}.vue-flow__connection-path{stroke:var(--vf-connection-path)}.vue-flow__node{cursor:grab}.vue-flow__node.selectable:focus,.vue-flow__node.selectable:focus-visible{outline:none}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{padding:10px;border-radius:3px;width:150px;font-size:12px;text-align:center;border-width:1px;border-style:solid;color:var(--vf-node-text);background-color:var(--vf-node-bg);border-color:var(--vf-node-color)}.vue-flow__node-default.selected,.vue-flow__node-default.selected:hover,.vue-flow__node-input.selected,.vue-flow__node-input.selected:hover,.vue-flow__node-output.selected,.vue-flow__node-output.selected:hover{box-shadow:0 0 0 .5px var(--vf-box-shadow)}.vue-flow__node-default .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.chart-controls-left,.chart-controls-right{height:1.8em;display:flex;flex-direction:row;align-items:center;padding-top:.2em}.chart-controls-right div{margin-left:5px}.chart-controls{padding-left:20px;padding-right:20px;height:1.8em;border-bottom:1px solid #ccc;display:flex;flex-direction:row;justify-content:space-between}.chart-controls div{margin-bottom:5px}.defaultContainerClass{height:90vh;width:100%;border:1px solid #ccc}.default-input-node.vue-flow__node-input,.default-output-node.vue-flow__node-output{border-color:#000}.default-input-node.vue-flow__node-input .vue-flow__handle,.default-output-node.vue-flow__node-output .vue-flow__handle{background-color:#000}.default-input-node.vue-flow__node-input.selected,.default-output-node.vue-flow__node-output.selected{box-shadow:0 0 0 .5px #000}button.button-default{background-color:#fff;padding:1px 12px;border-radius:3px;border:1px solid #ccc;cursor:pointer;white-space:nowrap}button.button-default:hover{background-color:#f2f2f2}.vue-flow{background-size:40px 40px;background-image:linear-gradient(to right,#ccc 1px,transparent 1px),linear-gradient(to bottom,#ccc 1px,transparent 1px)}input.label-editor{position:absolute}.node-editor-wrapper{position:relative} diff --git a/node_editor/package.json b/node_editor/package.json index 85bc886f..1a64d5d3 100644 --- a/node_editor/package.json +++ b/node_editor/package.json @@ -1,9 +1,21 @@ { "name": "@stonecrop/node-editor", - "version": "0.2.2", + "version": "0.2.5", "description": "Node editor UI for Stonecrop", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "node_editor" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/node-editor.js", @@ -11,10 +23,12 @@ }, "./styles": "./dist/style.css" }, - "main": "index.js", + "main": "dist/node-editor.js", + "module": "dist/node-editor.js", + "umd": "dist/node-editor.umd.cjs", "files": [ "dist/*", - "src/**/*.vue" + "src/*" ], "scripts": { "build": "vite build", @@ -36,6 +50,9 @@ "histoire": "^0.17.17", "vite": "^5.2.9" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" } diff --git a/rush.json b/rush.json index b8a4a341..55995d3b 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", "rushVersion": "5.120.3", - "pnpmVersion": "8.15.2", + "pnpmVersion": "8.15.7", "approvedPackagesPolicy": { "reviewCategories": ["production", "tool", "prototype", "documentation", "utilities"], "ignoredNpmScopes": ["@types"] @@ -39,14 +39,14 @@ "versionPolicyName": "stonecrop" }, { - "packageName": "@stonecrop/desktop", - "projectFolder": "desktop", + "packageName": "@stonecrop/code-editor", + "projectFolder": "code_editor", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, { - "packageName": "@stonecrop/code-editor", - "projectFolder": "code_editor", + "packageName": "@stonecrop/desktop", + "projectFolder": "desktop", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, @@ -56,6 +56,12 @@ "reviewCategory": "prototype", "shouldPublish": false }, + { + "packageName": "@stonecrop/graphql-client", + "projectFolder": "graphql_client", + "reviewCategory": "utilities", + "versionPolicyName": "stonecrop" + }, { "packageName": "@stonecrop/node-editor", "projectFolder": "node_editor", @@ -79,12 +85,6 @@ "projectFolder": "utilities", "reviewCategory": "utilities", "versionPolicyName": "stonecrop" - }, - { - "packageName": "@stonecrop/graphql-client", - "projectFolder": "graphql_client", - "reviewCategory": "utilities", - "versionPolicyName": "stonecrop" } ] } diff --git a/stonecrop/dist/stonecrop.js b/stonecrop/dist/stonecrop.js deleted file mode 100644 index e31584b0..00000000 --- a/stonecrop/dist/stonecrop.js +++ /dev/null @@ -1,5319 +0,0 @@ -import { effectScope, ref, markRaw, toRaw, hasInjectionContext, inject, getCurrentInstance, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, shallowReactive, defineComponent, h as h$1, provide, watchEffect } from "vue"; -function NotImplementedError(message) { - this.message = message || ""; -} -NotImplementedError.prototype = Object.create(Error.prototype, { - constructor: { value: NotImplementedError }, - name: { value: "NotImplemented" }, - stack: { - get: function() { - return new Error().stack; - } - } -}); -class Stonecrop { - /** - * @constructor - * @param {Registry} registry - The immutable registry - * @param {ReturnType} store - The mutable Pinia store - * @param {Schema} [schema] - (optional) The Stonecrop schema - * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow - * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions - * @returns {Stonecrop} The Stonecrop instance - * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one. - * @example - * const registry = new Registry() - * const store = useDataStore() - * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions) - */ - constructor(registry, store, schema, workflow, actions) { - this.name = "Stonecrop"; - if (Stonecrop._root) { - return Stonecrop._root; - } - Stonecrop._root = this; - this.registry = registry; - this.store = store; - this.schema = schema; - this.workflow = workflow; - this.actions = actions; - } - /** - * @method setup - * @param {DoctypeMeta} doctype - The doctype to setup - * @returns {void} - * @description Sets up the Stonecrop instance with the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.setup(doctype) - */ - setup(doctype) { - this.getMeta(doctype); - this.getWorkflow(doctype); - this.getActions(doctype); - } - /** - * @method getMeta - * @param {DoctypeMeta} doctype - The doctype to get meta for - * @returns {DoctypeMeta} - * @see {@link DoctypeMeta} - * @throws NotImplementedError - * @description Gets the meta for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * const meta = stonecrop.getMeta(doctype) - */ - getMeta(doctype) { - return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype); - } - /** - * @method getWorkflow - * @param {DoctypeMeta} doctype - The doctype to get workflow for - * @returns {void} - * @description Gets the workflow for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.getWorkflow(doctype) - */ - getWorkflow(doctype) { - const doctypeRegistry = this.registry.registry[doctype.slug]; - this.workflow = doctypeRegistry.workflow; - } - /** - * @method getActions - * @param {DoctypeMeta} doctype - The doctype to get actions for - * @returns {void} - * @description Gets the actions for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.getActions(doctype) - */ - getActions(doctype) { - const doctypeRegistry = this.registry.registry[doctype.slug]; - this.actions = doctypeRegistry.actions; - } - /** - * @method getRecords - * @param {DoctypeMeta} doctype - The doctype to get records for - * @param {RequestInit} [filters] - The filters to apply to the records - * @returns {Promise} - * @description Gets the records for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * await stonecrop.getRecords(doctype) - * @example - * const doctype = await registry.getMeta('Task') - * const filters = JSON.stringify({ status: 'Open' }) - * await stonecrop.getRecords(doctype, { body: filters }) - */ - async getRecords(doctype, filters) { - this.store.$patch({ records: [] }); - const records = await fetch(`/${doctype.slug}`, filters); - const data = await records.json(); - this.store.$patch({ records: data }); - } - /** - * @method getRecord - * @param {DoctypeMeta} doctype - The doctype to get record for - * @param {string} id - The id of the record to get - * @returns {Promise} - * @description Gets the record for the given doctype and id - * @example - * const doctype = await registry.getMeta('Task') - * await stonecrop.getRecord(doctype, 'TASK-00001') - */ - async getRecord(doctype, id) { - this.store.$patch({ record: {} }); - const record = await fetch(`/${doctype.slug}/${id}`); - const data = await record.json(); - this.store.$patch({ record: data }); - } - /** - * @method runAction - * @param {DoctypeMeta} doctype - The doctype to run action for - * @param {string} action - The action to run - * @param {string[]} [id] - The id(s) of the record(s) to run action on - * @returns {void} - * @description Runs the action for the given doctype and id - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'CREATE') - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001']) - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001']) - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002']) - */ - runAction(doctype, action, id) { - const doctypeRegistry = this.registry.registry[doctype.slug]; - const actions = doctypeRegistry.actions.get(action); - const { initialState } = this.workflow; - this.workflow.transition(initialState, { type: action }); - if (actions.length > 0) { - actions.forEach((action2) => { - const actionFn = new Function(action2); - actionFn(id); - }); - } - } -} -var isVue2 = false; -function set(target, key, val) { - if (Array.isArray(target)) { - target.length = Math.max(target.length, key); - target.splice(key, 1, val); - return val; - } - target[key] = val; - return val; -} -function del(target, key) { - if (Array.isArray(target)) { - target.splice(key, 1); - return; - } - delete target[key]; -} -function getDevtoolsGlobalHook() { - return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; -} -function getTarget() { - return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; -} -const isProxyAvailable = typeof Proxy === "function"; -const HOOK_SETUP = "devtools-plugin:setup"; -const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; -let supported; -let perf; -function isPerformanceSupported() { - var _a; - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { - supported = true; - perf = global.perf_hooks.performance; - } else { - supported = false; - } - return supported; -} -function now$1() { - return isPerformanceSupported() ? perf.now() : Date.now(); -} -class ApiProxy { - constructor(plugin, hook) { - this.target = null; - this.targetQueue = []; - this.onQueue = []; - this.plugin = plugin; - this.hook = hook; - const defaultSettings = {}; - if (plugin.settings) { - for (const id in plugin.settings) { - const item = plugin.settings[id]; - defaultSettings[id] = item.defaultValue; - } - } - const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; - let currentSettings = Object.assign({}, defaultSettings); - try { - const raw = localStorage.getItem(localSettingsSaveId); - const data = JSON.parse(raw); - Object.assign(currentSettings, data); - } catch (e) { - } - this.fallbacks = { - getSettings() { - return currentSettings; - }, - setSettings(value) { - try { - localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); - } catch (e) { - } - currentSettings = value; - }, - now() { - return now$1(); - } - }; - if (hook) { - hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { - if (pluginId === this.plugin.id) { - this.fallbacks.setSettings(value); - } - }); - } - this.proxiedOn = new Proxy({}, { - get: (_target, prop) => { - if (this.target) { - return this.target.on[prop]; - } else { - return (...args) => { - this.onQueue.push({ - method: prop, - args - }); - }; - } - } - }); - this.proxiedTarget = new Proxy({}, { - get: (_target, prop) => { - if (this.target) { - return this.target[prop]; - } else if (prop === "on") { - return this.proxiedOn; - } else if (Object.keys(this.fallbacks).includes(prop)) { - return (...args) => { - this.targetQueue.push({ - method: prop, - args, - resolve: () => { - } - }); - return this.fallbacks[prop](...args); - }; - } else { - return (...args) => { - return new Promise((resolve) => { - this.targetQueue.push({ - method: prop, - args, - resolve - }); - }); - }; - } - } - }); - } - async setRealTarget(target) { - this.target = target; - for (const item of this.onQueue) { - this.target.on[item.method](...item.args); - } - for (const item of this.targetQueue) { - item.resolve(await this.target[item.method](...item.args)); - } - } -} -function setupDevtoolsPlugin(pluginDescriptor, setupFn) { - const descriptor = pluginDescriptor; - const target = getTarget(); - const hook = getDevtoolsGlobalHook(); - const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy; - if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { - hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); - } else { - const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null; - const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; - list.push({ - pluginDescriptor: descriptor, - setupFn, - proxy - }); - if (proxy) - setupFn(proxy.proxiedTarget); - } -} -/*! - * pinia v2.1.7 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */ -let activePinia; -const setActivePinia = (pinia2) => activePinia = pinia2; -const piniaSymbol = process.env.NODE_ENV !== "production" ? Symbol("pinia") : ( - /* istanbul ignore next */ - Symbol() -); -function isPlainObject(o) { - return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function"; -} -var MutationType; -(function(MutationType2) { - MutationType2["direct"] = "direct"; - MutationType2["patchObject"] = "patch object"; - MutationType2["patchFunction"] = "patch function"; -})(MutationType || (MutationType = {})); -const IS_CLIENT = typeof window !== "undefined"; -const USE_DEVTOOLS = (process.env.NODE_ENV !== "production" || false) && !(process.env.NODE_ENV === "test") && IS_CLIENT; -const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })(); -function bom(blob, { autoBom = false } = {}) { - if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { - return new Blob([String.fromCharCode(65279), blob], { type: blob.type }); - } - return blob; -} -function download(url, name, opts) { - const xhr = new XMLHttpRequest(); - xhr.open("GET", url); - xhr.responseType = "blob"; - xhr.onload = function() { - saveAs(xhr.response, name, opts); - }; - xhr.onerror = function() { - console.error("could not download file"); - }; - xhr.send(); -} -function corsEnabled(url) { - const xhr = new XMLHttpRequest(); - xhr.open("HEAD", url, false); - try { - xhr.send(); - } catch (e) { - } - return xhr.status >= 200 && xhr.status <= 299; -} -function click(node) { - try { - node.dispatchEvent(new MouseEvent("click")); - } catch (e) { - const evt = document.createEvent("MouseEvents"); - evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); - node.dispatchEvent(evt); - } -} -const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" }; -const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))(); -const saveAs = !IS_CLIENT ? () => { -} : ( - // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program - typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : ( - // Use msSaveOrOpenBlob as a second approach - "msSaveOrOpenBlob" in _navigator ? msSaveAs : ( - // Fallback to using FileReader and a popup - fileSaverSaveAs - ) - ) -); -function downloadSaveAs(blob, name = "download", opts) { - const a = document.createElement("a"); - a.download = name; - a.rel = "noopener"; - if (typeof blob === "string") { - a.href = blob; - if (a.origin !== location.origin) { - if (corsEnabled(a.href)) { - download(blob, name, opts); - } else { - a.target = "_blank"; - click(a); - } - } else { - click(a); - } - } else { - a.href = URL.createObjectURL(blob); - setTimeout(function() { - URL.revokeObjectURL(a.href); - }, 4e4); - setTimeout(function() { - click(a); - }, 0); - } -} -function msSaveAs(blob, name = "download", opts) { - if (typeof blob === "string") { - if (corsEnabled(blob)) { - download(blob, name, opts); - } else { - const a = document.createElement("a"); - a.href = blob; - a.target = "_blank"; - setTimeout(function() { - click(a); - }); - } - } else { - navigator.msSaveOrOpenBlob(bom(blob, opts), name); - } -} -function fileSaverSaveAs(blob, name, opts, popup) { - popup = popup || open("", "_blank"); - if (popup) { - popup.document.title = popup.document.body.innerText = "downloading..."; - } - if (typeof blob === "string") - return download(blob, name, opts); - const force = blob.type === "application/octet-stream"; - const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global; - const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); - if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") { - const reader = new FileReader(); - reader.onloadend = function() { - let url = reader.result; - if (typeof url !== "string") { - popup = null; - throw new Error("Wrong reader.result type"); - } - url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;"); - if (popup) { - popup.location.href = url; - } else { - location.assign(url); - } - popup = null; - }; - reader.readAsDataURL(blob); - } else { - const url = URL.createObjectURL(blob); - if (popup) - popup.location.assign(url); - else - location.href = url; - popup = null; - setTimeout(function() { - URL.revokeObjectURL(url); - }, 4e4); - } -} -function toastMessage(message, type2) { - const piniaMessage = "🍍 " + message; - if (typeof __VUE_DEVTOOLS_TOAST__ === "function") { - __VUE_DEVTOOLS_TOAST__(piniaMessage, type2); - } else if (type2 === "error") { - console.error(piniaMessage); - } else if (type2 === "warn") { - console.warn(piniaMessage); - } else { - console.log(piniaMessage); - } -} -function isPinia(o) { - return "_a" in o && "install" in o; -} -function checkClipboardAccess() { - if (!("clipboard" in navigator)) { - toastMessage(`Your browser doesn't support the Clipboard API`, "error"); - return true; - } -} -function checkNotFocusedError(error) { - if (error instanceof Error && error.message.toLowerCase().includes("document is not focused")) { - toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"); - return true; - } - return false; -} -async function actionGlobalCopyState(pinia2) { - if (checkClipboardAccess()) - return; - try { - await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value)); - toastMessage("Global state copied to clipboard."); - } catch (error) { - if (checkNotFocusedError(error)) - return; - toastMessage(`Failed to serialize the state. Check the console for more details.`, "error"); - console.error(error); - } -} -async function actionGlobalPasteState(pinia2) { - if (checkClipboardAccess()) - return; - try { - loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText())); - toastMessage("Global state pasted from clipboard."); - } catch (error) { - if (checkNotFocusedError(error)) - return; - toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error"); - console.error(error); - } -} -async function actionGlobalSaveState(pinia2) { - try { - saveAs(new Blob([JSON.stringify(pinia2.state.value)], { - type: "text/plain;charset=utf-8" - }), "pinia-state.json"); - } catch (error) { - toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); - console.error(error); - } -} -let fileInput; -function getFileOpener() { - if (!fileInput) { - fileInput = document.createElement("input"); - fileInput.type = "file"; - fileInput.accept = ".json"; - } - function openFile() { - return new Promise((resolve, reject) => { - fileInput.onchange = async () => { - const files = fileInput.files; - if (!files) - return resolve(null); - const file = files.item(0); - if (!file) - return resolve(null); - return resolve({ text: await file.text(), file }); - }; - fileInput.oncancel = () => resolve(null); - fileInput.onerror = reject; - fileInput.click(); - }); - } - return openFile; -} -async function actionGlobalOpenStateFile(pinia2) { - try { - const open2 = getFileOpener(); - const result = await open2(); - if (!result) - return; - const { text, file } = result; - loadStoresState(pinia2, JSON.parse(text)); - toastMessage(`Global state imported from "${file.name}".`); - } catch (error) { - toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error"); - console.error(error); - } -} -function loadStoresState(pinia2, state) { - for (const key in state) { - const storeState = pinia2.state.value[key]; - if (storeState) { - Object.assign(storeState, state[key]); - } else { - pinia2.state.value[key] = state[key]; - } - } -} -function formatDisplay$1(display) { - return { - _custom: { - display - } - }; -} -const PINIA_ROOT_LABEL = "🍍 Pinia (root)"; -const PINIA_ROOT_ID = "_root"; -function formatStoreForInspectorTree(store) { - return isPinia(store) ? { - id: PINIA_ROOT_ID, - label: PINIA_ROOT_LABEL - } : { - id: store.$id, - label: store.$id - }; -} -function formatStoreForInspectorState(store) { - if (isPinia(store)) { - const storeNames = Array.from(store._s.keys()); - const storeMap = store._s; - const state2 = { - state: storeNames.map((storeId) => ({ - editable: true, - key: storeId, - value: store.state.value[storeId] - })), - getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => { - const store2 = storeMap.get(id); - return { - editable: false, - key: id, - value: store2._getters.reduce((getters, key) => { - getters[key] = store2[key]; - return getters; - }, {}) - }; - }) - }; - return state2; - } - const state = { - state: Object.keys(store.$state).map((key) => ({ - editable: true, - key, - value: store.$state[key] - })) - }; - if (store._getters && store._getters.length) { - state.getters = store._getters.map((getterName) => ({ - editable: false, - key: getterName, - value: store[getterName] - })); - } - if (store._customProperties.size) { - state.customProperties = Array.from(store._customProperties).map((key) => ({ - editable: true, - key, - value: store[key] - })); - } - return state; -} -function formatEventData(events) { - if (!events) - return {}; - if (Array.isArray(events)) { - return events.reduce((data, event) => { - data.keys.push(event.key); - data.operations.push(event.type); - data.oldValue[event.key] = event.oldValue; - data.newValue[event.key] = event.newValue; - return data; - }, { - oldValue: {}, - keys: [], - operations: [], - newValue: {} - }); - } else { - return { - operation: formatDisplay$1(events.type), - key: formatDisplay$1(events.key), - oldValue: events.oldValue, - newValue: events.newValue - }; - } -} -function formatMutationType(type2) { - switch (type2) { - case MutationType.direct: - return "mutation"; - case MutationType.patchFunction: - return "$patch"; - case MutationType.patchObject: - return "$patch"; - default: - return "unknown"; - } -} -let isTimelineActive = true; -const componentStateTypes = []; -const MUTATIONS_LAYER_ID = "pinia:mutations"; -const INSPECTOR_ID = "pinia"; -const { assign: assign$1 } = Object; -const getStoreType = (id) => "🍍 " + id; -function registerPiniaDevtools(app, pinia2) { - setupDevtoolsPlugin({ - id: "dev.esm.pinia", - label: "Pinia 🍍", - logo: "https://pinia.vuejs.org/logo.svg", - packageName: "pinia", - homepage: "https://pinia.vuejs.org", - componentStateTypes, - app - }, (api) => { - if (typeof api.now !== "function") { - toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); - } - api.addTimelineLayer({ - id: MUTATIONS_LAYER_ID, - label: `Pinia 🍍`, - color: 15064968 - }); - api.addInspector({ - id: INSPECTOR_ID, - label: "Pinia 🍍", - icon: "storage", - treeFilterPlaceholder: "Search stores", - actions: [ - { - icon: "content_copy", - action: () => { - actionGlobalCopyState(pinia2); - }, - tooltip: "Serialize and copy the state" - }, - { - icon: "content_paste", - action: async () => { - await actionGlobalPasteState(pinia2); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - }, - tooltip: "Replace the state with the content of your clipboard" - }, - { - icon: "save", - action: () => { - actionGlobalSaveState(pinia2); - }, - tooltip: "Save the state as a JSON file" - }, - { - icon: "folder_open", - action: async () => { - await actionGlobalOpenStateFile(pinia2); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - }, - tooltip: "Import the state from a JSON file" - } - ], - nodeActions: [ - { - icon: "restore", - tooltip: 'Reset the state (with "$reset")', - action: (nodeId) => { - const store = pinia2._s.get(nodeId); - if (!store) { - toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn"); - } else if (typeof store.$reset !== "function") { - toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn"); - } else { - store.$reset(); - toastMessage(`Store "${nodeId}" reset.`); - } - } - } - ] - }); - api.on.inspectComponent((payload, ctx) => { - const proxy = payload.componentInstance && payload.componentInstance.proxy; - if (proxy && proxy._pStores) { - const piniaStores = payload.componentInstance.proxy._pStores; - Object.values(piniaStores).forEach((store) => { - payload.instanceData.state.push({ - type: getStoreType(store.$id), - key: "state", - editable: true, - value: store._isOptionsAPI ? { - _custom: { - value: toRaw(store.$state), - actions: [ - { - icon: "restore", - tooltip: "Reset the state of this store", - action: () => store.$reset() - } - ] - } - } : ( - // NOTE: workaround to unwrap transferred refs - Object.keys(store.$state).reduce((state, key) => { - state[key] = store.$state[key]; - return state; - }, {}) - ) - }); - if (store._getters && store._getters.length) { - payload.instanceData.state.push({ - type: getStoreType(store.$id), - key: "getters", - editable: false, - value: store._getters.reduce((getters, key) => { - try { - getters[key] = store[key]; - } catch (error) { - getters[key] = error; - } - return getters; - }, {}) - }); - } - }); - } - }); - api.on.getInspectorTree((payload) => { - if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { - let stores = [pinia2]; - stores = stores.concat(Array.from(pinia2._s.values())); - payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree); - } - }); - api.on.getInspectorState((payload) => { - if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { - const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId); - if (!inspectedStore) { - return; - } - if (inspectedStore) { - payload.state = formatStoreForInspectorState(inspectedStore); - } - } - }); - api.on.editInspectorState((payload, ctx) => { - if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { - const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId); - if (!inspectedStore) { - return toastMessage(`store "${payload.nodeId}" not found`, "error"); - } - const { path } = payload; - if (!isPinia(inspectedStore)) { - if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) { - path.unshift("$state"); - } - } else { - path.unshift("state"); - } - isTimelineActive = false; - payload.set(inspectedStore, path, payload.state.value); - isTimelineActive = true; - } - }); - api.on.editComponentState((payload) => { - if (payload.type.startsWith("🍍")) { - const storeId = payload.type.replace(/^🍍\s*/, ""); - const store = pinia2._s.get(storeId); - if (!store) { - return toastMessage(`store "${storeId}" not found`, "error"); - } - const { path } = payload; - if (path[0] !== "state") { - return toastMessage(`Invalid path for store "${storeId}": -${path} -Only state can be modified.`); - } - path[0] = "$state"; - isTimelineActive = false; - payload.set(store, path, payload.state.value); - isTimelineActive = true; - } - }); - }); -} -function addStoreToDevtools(app, store) { - if (!componentStateTypes.includes(getStoreType(store.$id))) { - componentStateTypes.push(getStoreType(store.$id)); - } - setupDevtoolsPlugin({ - id: "dev.esm.pinia", - label: "Pinia 🍍", - logo: "https://pinia.vuejs.org/logo.svg", - packageName: "pinia", - homepage: "https://pinia.vuejs.org", - componentStateTypes, - app, - settings: { - logStoreChanges: { - label: "Notify about new/deleted stores", - type: "boolean", - defaultValue: true - } - // useEmojis: { - // label: 'Use emojis in messages ⚡️', - // type: 'boolean', - // defaultValue: true, - // }, - } - }, (api) => { - const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now; - store.$onAction(({ after, onError, name, args }) => { - const groupId = runningActionId++; - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "🛫 " + name, - subtitle: "start", - data: { - store: formatDisplay$1(store.$id), - action: formatDisplay$1(name), - args - }, - groupId - } - }); - after((result) => { - activeAction = void 0; - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "🛬 " + name, - subtitle: "end", - data: { - store: formatDisplay$1(store.$id), - action: formatDisplay$1(name), - args, - result - }, - groupId - } - }); - }); - onError((error) => { - activeAction = void 0; - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - logType: "error", - title: "💥 " + name, - subtitle: "end", - data: { - store: formatDisplay$1(store.$id), - action: formatDisplay$1(name), - args, - error - }, - groupId - } - }); - }); - }, true); - store._customProperties.forEach((name) => { - watch(() => unref(store[name]), (newValue, oldValue) => { - api.notifyComponentUpdate(); - api.sendInspectorState(INSPECTOR_ID); - if (isTimelineActive) { - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "Change", - subtitle: name, - data: { - newValue, - oldValue - }, - groupId: activeAction - } - }); - } - }, { deep: true }); - }); - store.$subscribe(({ events, type: type2 }, state) => { - api.notifyComponentUpdate(); - api.sendInspectorState(INSPECTOR_ID); - if (!isTimelineActive) - return; - const eventData = { - time: now2(), - title: formatMutationType(type2), - data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)), - groupId: activeAction - }; - if (type2 === MutationType.patchFunction) { - eventData.subtitle = "⤵️"; - } else if (type2 === MutationType.patchObject) { - eventData.subtitle = "🧩"; - } else if (events && !Array.isArray(events)) { - eventData.subtitle = events.type; - } - if (events) { - eventData.data["rawEvent(s)"] = { - _custom: { - display: "DebuggerEvent", - type: "object", - tooltip: "raw DebuggerEvent[]", - value: events - } - }; - } - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: eventData - }); - }, { detached: true, flush: "sync" }); - const hotUpdate = store._hotUpdate; - store._hotUpdate = markRaw((newStore) => { - hotUpdate(newStore); - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "🔥 " + store.$id, - subtitle: "HMR update", - data: { - store: formatDisplay$1(store.$id), - info: formatDisplay$1(`HMR update`) - } - } - }); - api.notifyComponentUpdate(); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - }); - const { $dispose } = store; - store.$dispose = () => { - $dispose(); - api.notifyComponentUpdate(); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`); - }; - api.notifyComponentUpdate(); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`); - }); -} -let runningActionId = 0; -let activeAction; -function patchActionForGrouping(store, actionNames, wrapWithProxy) { - const actions = actionNames.reduce((storeActions, actionName) => { - storeActions[actionName] = toRaw(store)[actionName]; - return storeActions; - }, {}); - for (const actionName in actions) { - store[actionName] = function() { - const _actionId = runningActionId; - const trackedStore = wrapWithProxy ? new Proxy(store, { - get(...args) { - activeAction = _actionId; - return Reflect.get(...args); - }, - set(...args) { - activeAction = _actionId; - return Reflect.set(...args); - } - }) : store; - activeAction = _actionId; - const retValue = actions[actionName].apply(trackedStore, arguments); - activeAction = void 0; - return retValue; - }; - } -} -function devtoolsPlugin({ app, store, options }) { - if (store.$id.startsWith("__hot:")) { - return; - } - store._isOptionsAPI = !!options.state; - patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI); - const originalHotUpdate = store._hotUpdate; - toRaw(store)._hotUpdate = function(newStore) { - originalHotUpdate.apply(this, arguments); - patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI); - }; - addStoreToDevtools( - app, - // FIXME: is there a way to allow the assignment from Store to StoreGeneric? - store - ); -} -function createPinia() { - const scope = effectScope(true); - const state = scope.run(() => ref({})); - let _p = []; - let toBeInstalled = []; - const pinia2 = markRaw({ - install(app) { - setActivePinia(pinia2); - { - pinia2._a = app; - app.provide(piniaSymbol, pinia2); - app.config.globalProperties.$pinia = pinia2; - if (USE_DEVTOOLS) { - registerPiniaDevtools(app, pinia2); - } - toBeInstalled.forEach((plugin) => _p.push(plugin)); - toBeInstalled = []; - } - }, - use(plugin) { - if (!this._a && !isVue2) { - toBeInstalled.push(plugin); - } else { - _p.push(plugin); - } - return this; - }, - _p, - // it's actually undefined here - // @ts-expect-error - _a: null, - _e: scope, - _s: /* @__PURE__ */ new Map(), - state - }); - if (USE_DEVTOOLS && typeof Proxy !== "undefined") { - pinia2.use(devtoolsPlugin); - } - return pinia2; -} -function patchObject(newState, oldState) { - for (const key in oldState) { - const subPatch = oldState[key]; - if (!(key in newState)) { - continue; - } - const targetValue = newState[key]; - if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) { - newState[key] = patchObject(targetValue, subPatch); - } else { - { - newState[key] = subPatch; - } - } - } - return newState; -} -const noop$1 = () => { -}; -function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) { - subscriptions.push(callback); - const removeSubscription = () => { - const idx = subscriptions.indexOf(callback); - if (idx > -1) { - subscriptions.splice(idx, 1); - onCleanup(); - } - }; - if (!detached && getCurrentScope()) { - onScopeDispose(removeSubscription); - } - return removeSubscription; -} -function triggerSubscriptions(subscriptions, ...args) { - subscriptions.slice().forEach((callback) => { - callback(...args); - }); -} -const fallbackRunWithContext = (fn) => fn(); -function mergeReactiveObjects(target, patchToApply) { - if (target instanceof Map && patchToApply instanceof Map) { - patchToApply.forEach((value, key) => target.set(key, value)); - } - if (target instanceof Set && patchToApply instanceof Set) { - patchToApply.forEach(target.add, target); - } - for (const key in patchToApply) { - if (!patchToApply.hasOwnProperty(key)) - continue; - const subPatch = patchToApply[key]; - const targetValue = target[key]; - if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) { - target[key] = mergeReactiveObjects(targetValue, subPatch); - } else { - target[key] = subPatch; - } - } - return target; -} -const skipHydrateSymbol = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : ( - /* istanbul ignore next */ - Symbol() -); -function shouldHydrate(obj) { - return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol); -} -const { assign: assign$2 } = Object; -function isComputed(o) { - return !!(isRef(o) && o.effect); -} -function createOptionsStore(id, options, pinia2, hot) { - const { state, actions, getters } = options; - const initialState = pinia2.state.value[id]; - let store; - function setup() { - if (!initialState && (!(process.env.NODE_ENV !== "production") || !hot)) { - { - pinia2.state.value[id] = state ? state() : {}; - } - } - const localState = process.env.NODE_ENV !== "production" && hot ? ( - // use ref() to unwrap refs inside state TODO: check if this is still necessary - toRefs(ref(state ? state() : {}).value) - ) : toRefs(pinia2.state.value[id]); - return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { - if (process.env.NODE_ENV !== "production" && name in localState) { - console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`); - } - computedGetters[name] = markRaw(computed(() => { - setActivePinia(pinia2); - const store2 = pinia2._s.get(id); - return getters[name].call(store2, store2); - })); - return computedGetters; - }, {})); - } - store = createSetupStore(id, setup, options, pinia2, hot, true); - return store; -} -function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) { - let scope; - const optionsForPlugin = assign$2({ actions: {} }, options); - if (process.env.NODE_ENV !== "production" && !pinia2._e.active) { - throw new Error("Pinia destroyed"); - } - const $subscribeOptions = { - deep: true - // flush: 'post', - }; - if (process.env.NODE_ENV !== "production" && !isVue2) { - $subscribeOptions.onTrigger = (event) => { - if (isListening) { - debuggerEvents = event; - } else if (isListening == false && !store._hotUpdating) { - if (Array.isArray(debuggerEvents)) { - debuggerEvents.push(event); - } else { - console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."); - } - } - }; - } - let isListening; - let isSyncListening; - let subscriptions = []; - let actionSubscriptions = []; - let debuggerEvents; - const initialState = pinia2.state.value[$id]; - if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== "production") || !hot)) { - { - pinia2.state.value[$id] = {}; - } - } - const hotState = ref({}); - let activeListener; - function $patch(partialStateOrMutator) { - let subscriptionMutation; - isListening = isSyncListening = false; - if (process.env.NODE_ENV !== "production") { - debuggerEvents = []; - } - if (typeof partialStateOrMutator === "function") { - partialStateOrMutator(pinia2.state.value[$id]); - subscriptionMutation = { - type: MutationType.patchFunction, - storeId: $id, - events: debuggerEvents - }; - } else { - mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator); - subscriptionMutation = { - type: MutationType.patchObject, - payload: partialStateOrMutator, - storeId: $id, - events: debuggerEvents - }; - } - const myListenerId = activeListener = Symbol(); - nextTick().then(() => { - if (activeListener === myListenerId) { - isListening = true; - } - }); - isSyncListening = true; - triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]); - } - const $reset = isOptionsStore ? function $reset2() { - const { state } = options; - const newState = state ? state() : {}; - this.$patch(($state) => { - assign$2($state, newState); - }); - } : ( - /* istanbul ignore next */ - process.env.NODE_ENV !== "production" ? () => { - throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`); - } : noop$1 - ); - function $dispose() { - scope.stop(); - subscriptions = []; - actionSubscriptions = []; - pinia2._s.delete($id); - } - function wrapAction(name, action) { - return function() { - setActivePinia(pinia2); - const args = Array.from(arguments); - const afterCallbackList = []; - const onErrorCallbackList = []; - function after(callback) { - afterCallbackList.push(callback); - } - function onError(callback) { - onErrorCallbackList.push(callback); - } - triggerSubscriptions(actionSubscriptions, { - args, - name, - store, - after, - onError - }); - let ret; - try { - ret = action.apply(this && this.$id === $id ? this : store, args); - } catch (error) { - triggerSubscriptions(onErrorCallbackList, error); - throw error; - } - if (ret instanceof Promise) { - return ret.then((value) => { - triggerSubscriptions(afterCallbackList, value); - return value; - }).catch((error) => { - triggerSubscriptions(onErrorCallbackList, error); - return Promise.reject(error); - }); - } - triggerSubscriptions(afterCallbackList, ret); - return ret; - }; - } - const _hmrPayload = /* @__PURE__ */ markRaw({ - actions: {}, - getters: {}, - state: [], - hotState - }); - const partialStore = { - _p: pinia2, - // _s: scope, - $id, - $onAction: addSubscription.bind(null, actionSubscriptions), - $patch, - $reset, - $subscribe(callback, options2 = {}) { - const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); - const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => { - if (options2.flush === "sync" ? isSyncListening : isListening) { - callback({ - storeId: $id, - type: MutationType.direct, - events: debuggerEvents - }, state); - } - }, assign$2({}, $subscribeOptions, options2))); - return removeSubscription; - }, - $dispose - }; - const store = reactive(process.env.NODE_ENV !== "production" || USE_DEVTOOLS ? assign$2( - { - _hmrPayload, - _customProperties: markRaw(/* @__PURE__ */ new Set()) - // devtools custom properties - }, - partialStore - // must be added later - // setupStore - ) : partialStore); - pinia2._s.set($id, store); - const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext; - const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(setup))); - for (const key in setupStore) { - const prop = setupStore[key]; - if (isRef(prop) && !isComputed(prop) || isReactive(prop)) { - if (process.env.NODE_ENV !== "production" && hot) { - set(hotState.value, key, toRef(setupStore, key)); - } else if (!isOptionsStore) { - if (initialState && shouldHydrate(prop)) { - if (isRef(prop)) { - prop.value = initialState[key]; - } else { - mergeReactiveObjects(prop, initialState[key]); - } - } - { - pinia2.state.value[$id][key] = prop; - } - } - if (process.env.NODE_ENV !== "production") { - _hmrPayload.state.push(key); - } - } else if (typeof prop === "function") { - const actionValue = process.env.NODE_ENV !== "production" && hot ? prop : wrapAction(key, prop); - { - setupStore[key] = actionValue; - } - if (process.env.NODE_ENV !== "production") { - _hmrPayload.actions[key] = prop; - } - optionsForPlugin.actions[key] = prop; - } else if (process.env.NODE_ENV !== "production") { - if (isComputed(prop)) { - _hmrPayload.getters[key] = isOptionsStore ? ( - // @ts-expect-error - options.getters[key] - ) : prop; - if (IS_CLIENT) { - const getters = setupStore._getters || // @ts-expect-error: same - (setupStore._getters = markRaw([])); - getters.push(key); - } - } - } - } - { - assign$2(store, setupStore); - assign$2(toRaw(store), setupStore); - } - Object.defineProperty(store, "$state", { - get: () => process.env.NODE_ENV !== "production" && hot ? hotState.value : pinia2.state.value[$id], - set: (state) => { - if (process.env.NODE_ENV !== "production" && hot) { - throw new Error("cannot set hotState"); - } - $patch(($state) => { - assign$2($state, state); - }); - } - }); - if (process.env.NODE_ENV !== "production") { - store._hotUpdate = markRaw((newStore) => { - store._hotUpdating = true; - newStore._hmrPayload.state.forEach((stateKey) => { - if (stateKey in store.$state) { - const newStateTarget = newStore.$state[stateKey]; - const oldStateSource = store.$state[stateKey]; - if (typeof newStateTarget === "object" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) { - patchObject(newStateTarget, oldStateSource); - } else { - newStore.$state[stateKey] = oldStateSource; - } - } - set(store, stateKey, toRef(newStore.$state, stateKey)); - }); - Object.keys(store.$state).forEach((stateKey) => { - if (!(stateKey in newStore.$state)) { - del(store, stateKey); - } - }); - isListening = false; - isSyncListening = false; - pinia2.state.value[$id] = toRef(newStore._hmrPayload, "hotState"); - isSyncListening = true; - nextTick().then(() => { - isListening = true; - }); - for (const actionName in newStore._hmrPayload.actions) { - const action = newStore[actionName]; - set(store, actionName, wrapAction(actionName, action)); - } - for (const getterName in newStore._hmrPayload.getters) { - const getter = newStore._hmrPayload.getters[getterName]; - const getterValue = isOptionsStore ? ( - // special handling of options api - computed(() => { - setActivePinia(pinia2); - return getter.call(store, store); - }) - ) : getter; - set(store, getterName, getterValue); - } - Object.keys(store._hmrPayload.getters).forEach((key) => { - if (!(key in newStore._hmrPayload.getters)) { - del(store, key); - } - }); - Object.keys(store._hmrPayload.actions).forEach((key) => { - if (!(key in newStore._hmrPayload.actions)) { - del(store, key); - } - }); - store._hmrPayload = newStore._hmrPayload; - store._getters = newStore._getters; - store._hotUpdating = false; - }); - } - if (USE_DEVTOOLS) { - const nonEnumerable = { - writable: true, - configurable: true, - // avoid warning on devtools trying to display this property - enumerable: false - }; - ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => { - Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable)); - }); - } - pinia2._p.forEach((extender) => { - if (USE_DEVTOOLS) { - const extensions = scope.run(() => extender({ - store, - app: pinia2._a, - pinia: pinia2, - options: optionsForPlugin - })); - Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key)); - assign$2(store, extensions); - } else { - assign$2(store, scope.run(() => extender({ - store, - app: pinia2._a, - pinia: pinia2, - options: optionsForPlugin - }))); - } - }); - if (process.env.NODE_ENV !== "production" && store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) { - console.warn(`[🍍]: The "state" must be a plain object. It cannot be - state: () => new MyClass() -Found in store "${store.$id}".`); - } - if (initialState && isOptionsStore && options.hydrate) { - options.hydrate(store.$state, initialState); - } - isListening = true; - isSyncListening = true; - return store; -} -function defineStore(idOrOptions, setup, setupOptions) { - let id; - let options; - const isSetupStore = typeof setup === "function"; - if (typeof idOrOptions === "string") { - id = idOrOptions; - options = isSetupStore ? setupOptions : setup; - } else { - options = idOrOptions; - id = idOrOptions.id; - if (process.env.NODE_ENV !== "production" && typeof id !== "string") { - throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`); - } - } - function useStore(pinia2, hot) { - const hasContext = hasInjectionContext(); - pinia2 = // in test mode, ignore the argument provided as we can always retrieve a - // pinia instance with getActivePinia() - (process.env.NODE_ENV === "test" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? inject(piniaSymbol, null) : null); - if (pinia2) - setActivePinia(pinia2); - if (process.env.NODE_ENV !== "production" && !activePinia) { - throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? -See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. -This will fail in production.`); - } - pinia2 = activePinia; - if (!pinia2._s.has(id)) { - if (isSetupStore) { - createSetupStore(id, setup, options, pinia2); - } else { - createOptionsStore(id, options, pinia2); - } - if (process.env.NODE_ENV !== "production") { - useStore._pinia = pinia2; - } - } - const store = pinia2._s.get(id); - if (process.env.NODE_ENV !== "production" && hot) { - const hotId = "__hot:" + id; - const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true); - hot._hotUpdate(newStore); - delete pinia2.state.value[hotId]; - pinia2._s.delete(hotId); - } - if (process.env.NODE_ENV !== "production" && IS_CLIENT) { - const currentInstance = getCurrentInstance(); - if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement - !hot) { - const vm = currentInstance.proxy; - const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {}; - cache[id] = store; - } - } - return store; - } - useStore.$id = id; - return useStore; -} -const useDataStore = defineStore("data", () => { - const records = ref([]); - const record = ref({}); - return { records, record }; -}); -function useStonecrop(registry) { - if (!registry) { - registry = inject("$registry"); - } - const store = useDataStore(); - const stonecrop = ref(new Stonecrop(registry, store)); - const isReady = ref(false); - onBeforeMount(async () => { - var _a, _b; - const route = registry.router.currentRoute.value; - const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase(); - const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase(); - if (!doctypeSlug && !recordId) { - return; - } - const doctype = await registry.getMeta(doctypeSlug); - registry.addDoctype(doctype); - stonecrop.value.setup(doctype); - if (doctypeSlug) { - if (recordId) { - await stonecrop.value.getRecord(doctype, recordId); - } else { - await stonecrop.value.getRecords(doctype); - } - } - stonecrop.value.runAction(doctype, "LOAD", recordId ? [recordId] : void 0); - isReady.value = true; - }); - return { stonecrop, isReady }; -} -class DoctypeMeta { - constructor(doctype, schema, workflow, actions, component) { - this.doctype = doctype; - this.schema = schema; - this.workflow = workflow; - this.actions = actions; - this.component = component; - } - get slug() { - return this.doctype.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(); - } - get __typename() { - return this.doctype; - } -} -class Registry { - constructor(router2, getMeta) { - if (Registry._root) { - return Registry._root; - } - Registry._root = this; - this.name = "Registry"; - this.router = router2; - this.registry = {}; - this.getMeta = getMeta; - } - addDoctype(doctype) { - if (!(doctype.doctype in Object.keys(this.registry))) { - this.registry[doctype.slug] = doctype; - } - if (!this.router.hasRoute(doctype.doctype)) { - this.router.addRoute({ - path: `/${doctype.slug}`, - name: doctype.slug, - component: doctype.component - }); - } - } -} -/*! - * vue-router v4.2.5 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */ -const isBrowser = typeof window !== "undefined"; -function isESModule(obj) { - return obj.__esModule || obj[Symbol.toStringTag] === "Module"; -} -const assign = Object.assign; -function applyToParams(fn, params) { - const newParams = {}; - for (const key in params) { - const value = params[key]; - newParams[key] = isArray(value) ? value.map(fn) : fn(value); - } - return newParams; -} -const noop = () => { -}; -const isArray = Array.isArray; -function warn(msg) { - const args = Array.from(arguments).slice(1); - console.warn.apply(console, ["[Vue Router warn]: " + msg].concat(args)); -} -const TRAILING_SLASH_RE = /\/$/; -const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, ""); -function parseURL(parseQuery2, location2, currentLocation = "/") { - let path, query = {}, searchString = "", hash = ""; - const hashPos = location2.indexOf("#"); - let searchPos = location2.indexOf("?"); - if (hashPos < searchPos && hashPos >= 0) { - searchPos = -1; - } - if (searchPos > -1) { - path = location2.slice(0, searchPos); - searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length); - query = parseQuery2(searchString); - } - if (hashPos > -1) { - path = path || location2.slice(0, hashPos); - hash = location2.slice(hashPos, location2.length); - } - path = resolveRelativePath(path != null ? path : location2, currentLocation); - return { - fullPath: path + (searchString && "?") + searchString + hash, - path, - query, - hash - }; -} -function stringifyURL(stringifyQuery2, location2) { - const query = location2.query ? stringifyQuery2(location2.query) : ""; - return location2.path + (query && "?") + query + (location2.hash || ""); -} -function stripBase(pathname, base) { - if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) - return pathname; - return pathname.slice(base.length) || "/"; -} -function isSameRouteLocation(stringifyQuery2, a, b) { - const aLastIndex = a.matched.length - 1; - const bLastIndex = b.matched.length - 1; - return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash; -} -function isSameRouteRecord(a, b) { - return (a.aliasOf || a) === (b.aliasOf || b); -} -function isSameRouteLocationParams(a, b) { - if (Object.keys(a).length !== Object.keys(b).length) - return false; - for (const key in a) { - if (!isSameRouteLocationParamsValue(a[key], b[key])) - return false; - } - return true; -} -function isSameRouteLocationParamsValue(a, b) { - return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b; -} -function isEquivalentArray(a, b) { - return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b; -} -function resolveRelativePath(to, from) { - if (to.startsWith("/")) - return to; - if (process.env.NODE_ENV !== "production" && !from.startsWith("/")) { - warn(`Cannot resolve a relative location without an absolute path. Trying to resolve "${to}" from "${from}". It should look like "/${from}".`); - return to; - } - if (!to) - return from; - const fromSegments = from.split("/"); - const toSegments = to.split("/"); - const lastToSegment = toSegments[toSegments.length - 1]; - if (lastToSegment === ".." || lastToSegment === ".") { - toSegments.push(""); - } - let position = fromSegments.length - 1; - let toPosition; - let segment; - for (toPosition = 0; toPosition < toSegments.length; toPosition++) { - segment = toSegments[toPosition]; - if (segment === ".") - continue; - if (segment === "..") { - if (position > 1) - position--; - } else - break; - } - return fromSegments.slice(0, position).join("/") + "/" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join("/"); -} -var NavigationType; -(function(NavigationType2) { - NavigationType2["pop"] = "pop"; - NavigationType2["push"] = "push"; -})(NavigationType || (NavigationType = {})); -var NavigationDirection; -(function(NavigationDirection2) { - NavigationDirection2["back"] = "back"; - NavigationDirection2["forward"] = "forward"; - NavigationDirection2["unknown"] = ""; -})(NavigationDirection || (NavigationDirection = {})); -function normalizeBase(base) { - if (!base) { - if (isBrowser) { - const baseEl = document.querySelector("base"); - base = baseEl && baseEl.getAttribute("href") || "/"; - base = base.replace(/^\w+:\/\/[^\/]+/, ""); - } else { - base = "/"; - } - } - if (base[0] !== "/" && base[0] !== "#") - base = "/" + base; - return removeTrailingSlash(base); -} -const BEFORE_HASH_RE = /^[^#]+#/; -function createHref(base, location2) { - return base.replace(BEFORE_HASH_RE, "#") + location2; -} -function getElementPosition(el, offset) { - const docRect = document.documentElement.getBoundingClientRect(); - const elRect = el.getBoundingClientRect(); - return { - behavior: offset.behavior, - left: elRect.left - docRect.left - (offset.left || 0), - top: elRect.top - docRect.top - (offset.top || 0) - }; -} -const computeScrollPosition = () => ({ - left: window.pageXOffset, - top: window.pageYOffset -}); -function scrollToPosition(position) { - let scrollToOptions; - if ("el" in position) { - const positionEl = position.el; - const isIdSelector = typeof positionEl === "string" && positionEl.startsWith("#"); - if (process.env.NODE_ENV !== "production" && typeof position.el === "string") { - if (!isIdSelector || !document.getElementById(position.el.slice(1))) { - try { - const foundEl = document.querySelector(position.el); - if (isIdSelector && foundEl) { - warn(`The selector "${position.el}" should be passed as "el: document.querySelector('${position.el}')" because it starts with "#".`); - return; - } - } catch (err) { - warn(`The selector "${position.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`); - return; - } - } - } - const el = typeof positionEl === "string" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl; - if (!el) { - process.env.NODE_ENV !== "production" && warn(`Couldn't find element using selector "${position.el}" returned by scrollBehavior.`); - return; - } - scrollToOptions = getElementPosition(el, position); - } else { - scrollToOptions = position; - } - if ("scrollBehavior" in document.documentElement.style) - window.scrollTo(scrollToOptions); - else { - window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset); - } -} -function getScrollKey(path, delta) { - const position = history.state ? history.state.position - delta : -1; - return position + path; -} -const scrollPositions = /* @__PURE__ */ new Map(); -function saveScrollPosition(key, scrollPosition) { - scrollPositions.set(key, scrollPosition); -} -function getSavedScrollPosition(key) { - const scroll = scrollPositions.get(key); - scrollPositions.delete(key); - return scroll; -} -let createBaseLocation = () => location.protocol + "//" + location.host; -function createCurrentLocation(base, location2) { - const { pathname, search, hash } = location2; - const hashPos = base.indexOf("#"); - if (hashPos > -1) { - let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1; - let pathFromHash = hash.slice(slicePos); - if (pathFromHash[0] !== "/") - pathFromHash = "/" + pathFromHash; - return stripBase(pathFromHash, ""); - } - const path = stripBase(pathname, base); - return path + search + hash; -} -function useHistoryListeners(base, historyState, currentLocation, replace) { - let listeners = []; - let teardowns = []; - let pauseState = null; - const popStateHandler = ({ state }) => { - const to = createCurrentLocation(base, location); - const from = currentLocation.value; - const fromState = historyState.value; - let delta = 0; - if (state) { - currentLocation.value = to; - historyState.value = state; - if (pauseState && pauseState === from) { - pauseState = null; - return; - } - delta = fromState ? state.position - fromState.position : 0; - } else { - replace(to); - } - listeners.forEach((listener) => { - listener(currentLocation.value, from, { - delta, - type: NavigationType.pop, - direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown - }); - }); - }; - function pauseListeners() { - pauseState = currentLocation.value; - } - function listen(callback) { - listeners.push(callback); - const teardown = () => { - const index2 = listeners.indexOf(callback); - if (index2 > -1) - listeners.splice(index2, 1); - }; - teardowns.push(teardown); - return teardown; - } - function beforeUnloadListener() { - const { history: history2 } = window; - if (!history2.state) - return; - history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), ""); - } - function destroy() { - for (const teardown of teardowns) - teardown(); - teardowns = []; - window.removeEventListener("popstate", popStateHandler); - window.removeEventListener("beforeunload", beforeUnloadListener); - } - window.addEventListener("popstate", popStateHandler); - window.addEventListener("beforeunload", beforeUnloadListener, { - passive: true - }); - return { - pauseListeners, - listen, - destroy - }; -} -function buildState(back, current, forward, replaced = false, computeScroll = false) { - return { - back, - current, - forward, - replaced, - position: window.history.length, - scroll: computeScroll ? computeScrollPosition() : null - }; -} -function useHistoryStateNavigation(base) { - const { history: history2, location: location2 } = window; - const currentLocation = { - value: createCurrentLocation(base, location2) - }; - const historyState = { value: history2.state }; - if (!historyState.value) { - changeLocation(currentLocation.value, { - back: null, - current: currentLocation.value, - forward: null, - // the length is off by one, we need to decrease it - position: history2.length - 1, - replaced: true, - // don't add a scroll as the user may have an anchor, and we want - // scrollBehavior to be triggered without a saved position - scroll: null - }, true); - } - function changeLocation(to, state, replace2) { - const hashIndex = base.indexOf("#"); - const url = hashIndex > -1 ? (location2.host && document.querySelector("base") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to; - try { - history2[replace2 ? "replaceState" : "pushState"](state, "", url); - historyState.value = state; - } catch (err) { - if (process.env.NODE_ENV !== "production") { - warn("Error with push/replace State", err); - } else { - console.error(err); - } - location2[replace2 ? "replace" : "assign"](url); - } - } - function replace(to, data) { - const state = assign({}, history2.state, buildState( - historyState.value.back, - // keep back and forward entries but override current position - to, - historyState.value.forward, - true - ), data, { position: historyState.value.position }); - changeLocation(to, state, true); - currentLocation.value = to; - } - function push(to, data) { - const currentState = assign( - {}, - // use current history state to gracefully handle a wrong call to - // history.replaceState - // https://github.com/vuejs/router/issues/366 - historyState.value, - history2.state, - { - forward: to, - scroll: computeScrollPosition() - } - ); - if (process.env.NODE_ENV !== "production" && !history2.state) { - warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: - -history.replaceState(history.state, '', url) - -You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`); - } - changeLocation(currentState.current, currentState, true); - const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data); - changeLocation(to, state, false); - currentLocation.value = to; - } - return { - location: currentLocation, - state: historyState, - push, - replace - }; -} -function createWebHistory(base) { - base = normalizeBase(base); - const historyNavigation = useHistoryStateNavigation(base); - const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace); - function go(delta, triggerListeners = true) { - if (!triggerListeners) - historyListeners.pauseListeners(); - history.go(delta); - } - const routerHistory = assign({ - // it's overridden right after - location: "", - base, - go, - createHref: createHref.bind(null, base) - }, historyNavigation, historyListeners); - Object.defineProperty(routerHistory, "location", { - enumerable: true, - get: () => historyNavigation.location.value - }); - Object.defineProperty(routerHistory, "state", { - enumerable: true, - get: () => historyNavigation.state.value - }); - return routerHistory; -} -function isRouteLocation(route) { - return typeof route === "string" || route && typeof route === "object"; -} -function isRouteName(name) { - return typeof name === "string" || typeof name === "symbol"; -} -const START_LOCATION_NORMALIZED = { - path: "/", - name: void 0, - params: {}, - query: {}, - hash: "", - fullPath: "/", - matched: [], - meta: {}, - redirectedFrom: void 0 -}; -const NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : ""); -var NavigationFailureType; -(function(NavigationFailureType2) { - NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted"; - NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled"; - NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated"; -})(NavigationFailureType || (NavigationFailureType = {})); -const ErrorTypeMessages = { - [ - 1 - /* ErrorTypes.MATCHER_NOT_FOUND */ - ]({ location: location2, currentLocation }) { - return `No match for - ${JSON.stringify(location2)}${currentLocation ? "\nwhile being at\n" + JSON.stringify(currentLocation) : ""}`; - }, - [ - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - ]({ from, to }) { - return `Redirected from "${from.fullPath}" to "${stringifyRoute(to)}" via a navigation guard.`; - }, - [ - 4 - /* ErrorTypes.NAVIGATION_ABORTED */ - ]({ from, to }) { - return `Navigation aborted from "${from.fullPath}" to "${to.fullPath}" via a navigation guard.`; - }, - [ - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ]({ from, to }) { - return `Navigation cancelled from "${from.fullPath}" to "${to.fullPath}" with a new navigation.`; - }, - [ - 16 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - ]({ from, to }) { - return `Avoided redundant navigation to current location: "${from.fullPath}".`; - } -}; -function createRouterError(type2, params) { - if (process.env.NODE_ENV !== "production" || false) { - return assign(new Error(ErrorTypeMessages[type2](params)), { - type: type2, - [NavigationFailureSymbol]: true - }, params); - } else { - return assign(new Error(), { - type: type2, - [NavigationFailureSymbol]: true - }, params); - } -} -function isNavigationFailure(error, type2) { - return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2)); -} -const propertiesToLog = ["params", "query", "hash"]; -function stringifyRoute(to) { - if (typeof to === "string") - return to; - if ("path" in to) - return to.path; - const location2 = {}; - for (const key of propertiesToLog) { - if (key in to) - location2[key] = to[key]; - } - return JSON.stringify(location2, null, 2); -} -const BASE_PARAM_PATTERN = "[^/]+?"; -const BASE_PATH_PARSER_OPTIONS = { - sensitive: false, - strict: false, - start: true, - end: true -}; -const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g; -function tokensToParser(segments, extraOptions) { - const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions); - const score = []; - let pattern = options.start ? "^" : ""; - const keys = []; - for (const segment of segments) { - const segmentScores = segment.length ? [] : [ - 90 - /* PathScore.Root */ - ]; - if (options.strict && !segment.length) - pattern += "/"; - for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) { - const token = segment[tokenIndex]; - let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0); - if (token.type === 0) { - if (!tokenIndex) - pattern += "/"; - pattern += token.value.replace(REGEX_CHARS_RE, "\\$&"); - subSegmentScore += 40; - } else if (token.type === 1) { - const { value, repeatable, optional, regexp } = token; - keys.push({ - name: value, - repeatable, - optional - }); - const re2 = regexp ? regexp : BASE_PARAM_PATTERN; - if (re2 !== BASE_PARAM_PATTERN) { - subSegmentScore += 10; - try { - new RegExp(`(${re2})`); - } catch (err) { - throw new Error(`Invalid custom RegExp for param "${value}" (${re2}): ` + err.message); - } - } - let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`; - if (!tokenIndex) - subPattern = // avoid an optional / if there are more segments e.g. /:p?-static - // or /:p?-:p2 - optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern; - if (optional) - subPattern += "?"; - pattern += subPattern; - subSegmentScore += 20; - if (optional) - subSegmentScore += -8; - if (repeatable) - subSegmentScore += -20; - if (re2 === ".*") - subSegmentScore += -50; - } - segmentScores.push(subSegmentScore); - } - score.push(segmentScores); - } - if (options.strict && options.end) { - const i = score.length - 1; - score[i][score[i].length - 1] += 0.7000000000000001; - } - if (!options.strict) - pattern += "/?"; - if (options.end) - pattern += "$"; - else if (options.strict) - pattern += "(?:/|$)"; - const re = new RegExp(pattern, options.sensitive ? "" : "i"); - function parse2(path) { - const match = path.match(re); - const params = {}; - if (!match) - return null; - for (let i = 1; i < match.length; i++) { - const value = match[i] || ""; - const key = keys[i - 1]; - params[key.name] = value && key.repeatable ? value.split("/") : value; - } - return params; - } - function stringify2(params) { - let path = ""; - let avoidDuplicatedSlash = false; - for (const segment of segments) { - if (!avoidDuplicatedSlash || !path.endsWith("/")) - path += "/"; - avoidDuplicatedSlash = false; - for (const token of segment) { - if (token.type === 0) { - path += token.value; - } else if (token.type === 1) { - const { value, repeatable, optional } = token; - const param = value in params ? params[value] : ""; - if (isArray(param) && !repeatable) { - throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`); - } - const text = isArray(param) ? param.join("/") : param; - if (!text) { - if (optional) { - if (segment.length < 2) { - if (path.endsWith("/")) - path = path.slice(0, -1); - else - avoidDuplicatedSlash = true; - } - } else - throw new Error(`Missing required param "${value}"`); - } - path += text; - } - } - } - return path || "/"; - } - return { - re, - score, - keys, - parse: parse2, - stringify: stringify2 - }; -} -function compareScoreArray(a, b) { - let i = 0; - while (i < a.length && i < b.length) { - const diff = b[i] - a[i]; - if (diff) - return diff; - i++; - } - if (a.length < b.length) { - return a.length === 1 && a[0] === 40 + 40 ? -1 : 1; - } else if (a.length > b.length) { - return b.length === 1 && b[0] === 40 + 40 ? 1 : -1; - } - return 0; -} -function comparePathParserScore(a, b) { - let i = 0; - const aScore = a.score; - const bScore = b.score; - while (i < aScore.length && i < bScore.length) { - const comp = compareScoreArray(aScore[i], bScore[i]); - if (comp) - return comp; - i++; - } - if (Math.abs(bScore.length - aScore.length) === 1) { - if (isLastScoreNegative(aScore)) - return 1; - if (isLastScoreNegative(bScore)) - return -1; - } - return bScore.length - aScore.length; -} -function isLastScoreNegative(score) { - const last = score[score.length - 1]; - return score.length > 0 && last[last.length - 1] < 0; -} -const ROOT_TOKEN = { - type: 0, - value: "" -}; -const VALID_PARAM_RE = /[a-zA-Z0-9_]/; -function tokenizePath(path) { - if (!path) - return [[]]; - if (path === "/") - return [[ROOT_TOKEN]]; - if (!path.startsWith("/")) { - throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${path}" should be "/${path}".` : `Invalid path "${path}"`); - } - function crash(message) { - throw new Error(`ERR (${state})/"${buffer}": ${message}`); - } - let state = 0; - let previousState = state; - const tokens = []; - let segment; - function finalizeSegment() { - if (segment) - tokens.push(segment); - segment = []; - } - let i = 0; - let char; - let buffer = ""; - let customRe = ""; - function consumeBuffer() { - if (!buffer) - return; - if (state === 0) { - segment.push({ - type: 0, - value: buffer - }); - } else if (state === 1 || state === 2 || state === 3) { - if (segment.length > 1 && (char === "*" || char === "+")) - crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`); - segment.push({ - type: 1, - value: buffer, - regexp: customRe, - repeatable: char === "*" || char === "+", - optional: char === "*" || char === "?" - }); - } else { - crash("Invalid state to consume buffer"); - } - buffer = ""; - } - function addCharToBuffer() { - buffer += char; - } - while (i < path.length) { - char = path[i++]; - if (char === "\\" && state !== 2) { - previousState = state; - state = 4; - continue; - } - switch (state) { - case 0: - if (char === "/") { - if (buffer) { - consumeBuffer(); - } - finalizeSegment(); - } else if (char === ":") { - consumeBuffer(); - state = 1; - } else { - addCharToBuffer(); - } - break; - case 4: - addCharToBuffer(); - state = previousState; - break; - case 1: - if (char === "(") { - state = 2; - } else if (VALID_PARAM_RE.test(char)) { - addCharToBuffer(); - } else { - consumeBuffer(); - state = 0; - if (char !== "*" && char !== "?" && char !== "+") - i--; - } - break; - case 2: - if (char === ")") { - if (customRe[customRe.length - 1] == "\\") - customRe = customRe.slice(0, -1) + char; - else - state = 3; - } else { - customRe += char; - } - break; - case 3: - consumeBuffer(); - state = 0; - if (char !== "*" && char !== "?" && char !== "+") - i--; - customRe = ""; - break; - default: - crash("Unknown state"); - break; - } - } - if (state === 2) - crash(`Unfinished custom RegExp for param "${buffer}"`); - consumeBuffer(); - finalizeSegment(); - return tokens; -} -function createRouteRecordMatcher(record, parent, options) { - const parser = tokensToParser(tokenizePath(record.path), options); - if (process.env.NODE_ENV !== "production") { - const existingKeys = /* @__PURE__ */ new Set(); - for (const key of parser.keys) { - if (existingKeys.has(key.name)) - warn(`Found duplicated params with name "${key.name}" for path "${record.path}". Only the last one will be available on "$route.params".`); - existingKeys.add(key.name); - } - } - const matcher = assign(parser, { - record, - parent, - // these needs to be populated by the parent - children: [], - alias: [] - }); - if (parent) { - if (!matcher.record.aliasOf === !parent.record.aliasOf) - parent.children.push(matcher); - } - return matcher; -} -function createRouterMatcher(routes, globalOptions) { - const matchers = []; - const matcherMap = /* @__PURE__ */ new Map(); - globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions); - function getRecordMatcher(name) { - return matcherMap.get(name); - } - function addRoute(record, parent, originalRecord) { - const isRootAdd = !originalRecord; - const mainNormalizedRecord = normalizeRouteRecord(record); - if (process.env.NODE_ENV !== "production") { - checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent); - } - mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record; - const options = mergeOptions(globalOptions, record); - const normalizedRecords = [ - mainNormalizedRecord - ]; - if ("alias" in record) { - const aliases = typeof record.alias === "string" ? [record.alias] : record.alias; - for (const alias of aliases) { - normalizedRecords.push(assign({}, mainNormalizedRecord, { - // this allows us to hold a copy of the `components` option - // so that async components cache is hold on the original record - components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components, - path: alias, - // we might be the child of an alias - aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord - // the aliases are always of the same kind as the original since they - // are defined on the same record - })); - } - } - let matcher; - let originalMatcher; - for (const normalizedRecord of normalizedRecords) { - const { path } = normalizedRecord; - if (parent && path[0] !== "/") { - const parentPath = parent.record.path; - const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/"; - normalizedRecord.path = parent.record.path + (path && connectingSlash + path); - } - if (process.env.NODE_ENV !== "production" && normalizedRecord.path === "*") { - throw new Error('Catch all routes ("*") must now be defined using a param with a custom regexp.\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.'); - } - matcher = createRouteRecordMatcher(normalizedRecord, parent, options); - if (process.env.NODE_ENV !== "production" && parent && path[0] === "/") - checkMissingParamsInAbsolutePath(matcher, parent); - if (originalRecord) { - originalRecord.alias.push(matcher); - if (process.env.NODE_ENV !== "production") { - checkSameParams(originalRecord, matcher); - } - } else { - originalMatcher = originalMatcher || matcher; - if (originalMatcher !== matcher) - originalMatcher.alias.push(matcher); - if (isRootAdd && record.name && !isAliasRecord(matcher)) - removeRoute(record.name); - } - if (mainNormalizedRecord.children) { - const children = mainNormalizedRecord.children; - for (let i = 0; i < children.length; i++) { - addRoute(children[i], matcher, originalRecord && originalRecord.children[i]); - } - } - originalRecord = originalRecord || matcher; - if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) { - insertMatcher(matcher); - } - } - return originalMatcher ? () => { - removeRoute(originalMatcher); - } : noop; - } - function removeRoute(matcherRef) { - if (isRouteName(matcherRef)) { - const matcher = matcherMap.get(matcherRef); - if (matcher) { - matcherMap.delete(matcherRef); - matchers.splice(matchers.indexOf(matcher), 1); - matcher.children.forEach(removeRoute); - matcher.alias.forEach(removeRoute); - } - } else { - const index2 = matchers.indexOf(matcherRef); - if (index2 > -1) { - matchers.splice(index2, 1); - if (matcherRef.record.name) - matcherMap.delete(matcherRef.record.name); - matcherRef.children.forEach(removeRoute); - matcherRef.alias.forEach(removeRoute); - } - } - } - function getRoutes() { - return matchers; - } - function insertMatcher(matcher) { - let i = 0; - while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent - // https://github.com/vuejs/router/issues/1124 - (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i]))) - i++; - matchers.splice(i, 0, matcher); - if (matcher.record.name && !isAliasRecord(matcher)) - matcherMap.set(matcher.record.name, matcher); - } - function resolve(location2, currentLocation) { - let matcher; - let params = {}; - let path; - let name; - if ("name" in location2 && location2.name) { - matcher = matcherMap.get(location2.name); - if (!matcher) - throw createRouterError(1, { - location: location2 - }); - if (process.env.NODE_ENV !== "production") { - const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName)); - if (invalidParams.length) { - warn(`Discarded invalid param(s) "${invalidParams.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`); - } - } - name = matcher.record.name; - params = assign( - // paramsFromLocation is a new object - paramsFromLocation( - currentLocation.params, - // only keep params that exist in the resolved location - // TODO: only keep optional params coming from a parent record - matcher.keys.filter((k) => !k.optional).map((k) => k.name) - ), - // discard any existing params in the current location that do not exist here - // #1497 this ensures better active/exact matching - location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name)) - ); - path = matcher.stringify(params); - } else if ("path" in location2) { - path = location2.path; - if (process.env.NODE_ENV !== "production" && !path.startsWith("/")) { - warn(`The Matcher cannot resolve relative paths but received "${path}". Unless you directly called \`matcher.resolve("${path}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`); - } - matcher = matchers.find((m2) => m2.re.test(path)); - if (matcher) { - params = matcher.parse(path); - name = matcher.record.name; - } - } else { - matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path)); - if (!matcher) - throw createRouterError(1, { - location: location2, - currentLocation - }); - name = matcher.record.name; - params = assign({}, currentLocation.params, location2.params); - path = matcher.stringify(params); - } - const matched = []; - let parentMatcher = matcher; - while (parentMatcher) { - matched.unshift(parentMatcher.record); - parentMatcher = parentMatcher.parent; - } - return { - name, - path, - params, - matched, - meta: mergeMetaFields(matched) - }; - } - routes.forEach((route) => addRoute(route)); - return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher }; -} -function paramsFromLocation(params, keys) { - const newParams = {}; - for (const key of keys) { - if (key in params) - newParams[key] = params[key]; - } - return newParams; -} -function normalizeRouteRecord(record) { - return { - path: record.path, - redirect: record.redirect, - name: record.name, - meta: record.meta || {}, - aliasOf: void 0, - beforeEnter: record.beforeEnter, - props: normalizeRecordProps(record), - children: record.children || [], - instances: {}, - leaveGuards: /* @__PURE__ */ new Set(), - updateGuards: /* @__PURE__ */ new Set(), - enterCallbacks: {}, - components: "components" in record ? record.components || null : record.component && { default: record.component } - }; -} -function normalizeRecordProps(record) { - const propsObject = {}; - const props = record.props || false; - if ("component" in record) { - propsObject.default = props; - } else { - for (const name in record.components) - propsObject[name] = typeof props === "object" ? props[name] : props; - } - return propsObject; -} -function isAliasRecord(record) { - while (record) { - if (record.record.aliasOf) - return true; - record = record.parent; - } - return false; -} -function mergeMetaFields(matched) { - return matched.reduce((meta, record) => assign(meta, record.meta), {}); -} -function mergeOptions(defaults, partialOptions) { - const options = {}; - for (const key in defaults) { - options[key] = key in partialOptions ? partialOptions[key] : defaults[key]; - } - return options; -} -function isSameParam(a, b) { - return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable; -} -function checkSameParams(a, b) { - for (const key of a.keys) { - if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) - return warn(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`); - } - for (const key of b.keys) { - if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) - return warn(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`); - } -} -function checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) { - if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) { - warn(`The route named "${String(parent.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`); - } -} -function checkMissingParamsInAbsolutePath(record, parent) { - for (const key of parent.keys) { - if (!record.keys.find(isSameParam.bind(null, key))) - return warn(`Absolute path "${record.record.path}" must have the exact same param named "${key.name}" as its parent "${parent.record.path}".`); - } -} -function isRecordChildOf(record, parent) { - return parent.children.some((child) => child === record || isRecordChildOf(record, child)); -} -const HASH_RE = /#/g; -const AMPERSAND_RE = /&/g; -const SLASH_RE = /\//g; -const EQUAL_RE = /=/g; -const IM_RE = /\?/g; -const PLUS_RE = /\+/g; -const ENC_BRACKET_OPEN_RE = /%5B/g; -const ENC_BRACKET_CLOSE_RE = /%5D/g; -const ENC_CARET_RE = /%5E/g; -const ENC_BACKTICK_RE = /%60/g; -const ENC_CURLY_OPEN_RE = /%7B/g; -const ENC_PIPE_RE = /%7C/g; -const ENC_CURLY_CLOSE_RE = /%7D/g; -const ENC_SPACE_RE = /%20/g; -function commonEncode(text) { - return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]"); -} -function encodeHash(text) { - return commonEncode(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); -} -function encodeQueryValue(text) { - return commonEncode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); -} -function encodeQueryKey(text) { - return encodeQueryValue(text).replace(EQUAL_RE, "%3D"); -} -function encodePath(text) { - return commonEncode(text).replace(HASH_RE, "%23").replace(IM_RE, "%3F"); -} -function encodeParam(text) { - return text == null ? "" : encodePath(text).replace(SLASH_RE, "%2F"); -} -function decode(text) { - try { - return decodeURIComponent("" + text); - } catch (err) { - process.env.NODE_ENV !== "production" && warn(`Error decoding "${text}". Using original value`); - } - return "" + text; -} -function parseQuery(search) { - const query = {}; - if (search === "" || search === "?") - return query; - const hasLeadingIM = search[0] === "?"; - const searchParams = (hasLeadingIM ? search.slice(1) : search).split("&"); - for (let i = 0; i < searchParams.length; ++i) { - const searchParam = searchParams[i].replace(PLUS_RE, " "); - const eqPos = searchParam.indexOf("="); - const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos)); - const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1)); - if (key in query) { - let currentValue = query[key]; - if (!isArray(currentValue)) { - currentValue = query[key] = [currentValue]; - } - currentValue.push(value); - } else { - query[key] = value; - } - } - return query; -} -function stringifyQuery(query) { - let search = ""; - for (let key in query) { - const value = query[key]; - key = encodeQueryKey(key); - if (value == null) { - if (value !== void 0) { - search += (search.length ? "&" : "") + key; - } - continue; - } - const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]; - values.forEach((value2) => { - if (value2 !== void 0) { - search += (search.length ? "&" : "") + key; - if (value2 != null) - search += "=" + value2; - } - }); - } - return search; -} -function normalizeQuery(query) { - const normalizedQuery = {}; - for (const key in query) { - const value = query[key]; - if (value !== void 0) { - normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : "" + v) : value == null ? value : "" + value; - } - } - return normalizedQuery; -} -const matchedRouteKey = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""); -const viewDepthKey = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""); -const routerKey = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""); -const routeLocationKey = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""); -const routerViewLocationKey = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : ""); -function useCallbacks() { - let handlers = []; - function add(handler) { - handlers.push(handler); - return () => { - const i = handlers.indexOf(handler); - if (i > -1) - handlers.splice(i, 1); - }; - } - function reset() { - handlers = []; - } - return { - add, - list: () => handlers.slice(), - reset - }; -} -function guardToPromiseFn(guard, to, from, record, name) { - const enterCallbackArray = record && // name is defined if record is because of the function overload - (record.enterCallbacks[name] = record.enterCallbacks[name] || []); - return () => new Promise((resolve, reject) => { - const next = (valid) => { - if (valid === false) { - reject(createRouterError(4, { - from, - to - })); - } else if (valid instanceof Error) { - reject(valid); - } else if (isRouteLocation(valid)) { - reject(createRouterError(2, { - from: to, - to: valid - })); - } else { - if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are - record.enterCallbacks[name] === enterCallbackArray && typeof valid === "function") { - enterCallbackArray.push(valid); - } - resolve(); - } - }; - const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== "production" ? canOnlyBeCalledOnce(next, to, from) : next); - let guardCall = Promise.resolve(guardReturn); - if (guard.length < 3) - guardCall = guardCall.then(next); - if (process.env.NODE_ENV !== "production" && guard.length > 2) { - const message = `The "next" callback was never called inside of ${guard.name ? '"' + guard.name + '"' : ""}: -${guard.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`; - if (typeof guardReturn === "object" && "then" in guardReturn) { - guardCall = guardCall.then((resolvedValue) => { - if (!next._called) { - warn(message); - return Promise.reject(new Error("Invalid navigation guard")); - } - return resolvedValue; - }); - } else if (guardReturn !== void 0) { - if (!next._called) { - warn(message); - reject(new Error("Invalid navigation guard")); - return; - } - } - } - guardCall.catch((err) => reject(err)); - }); -} -function canOnlyBeCalledOnce(next, to, from) { - let called = 0; - return function() { - if (called++ === 1) - warn(`The "next" callback was called more than once in one navigation guard when going from "${from.fullPath}" to "${to.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`); - next._called = true; - if (called === 1) - next.apply(null, arguments); - }; -} -function extractComponentsGuards(matched, guardType, to, from) { - const guards = []; - for (const record of matched) { - if (process.env.NODE_ENV !== "production" && !record.components && !record.children.length) { - warn(`Record with path "${record.path}" is either missing a "component(s)" or "children" property.`); - } - for (const name in record.components) { - let rawComponent = record.components[name]; - if (process.env.NODE_ENV !== "production") { - if (!rawComponent || typeof rawComponent !== "object" && typeof rawComponent !== "function") { - warn(`Component "${name}" in record with path "${record.path}" is not a valid component. Received "${String(rawComponent)}".`); - throw new Error("Invalid route component"); - } else if ("then" in rawComponent) { - warn(`Component "${name}" in record with path "${record.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`); - const promise = rawComponent; - rawComponent = () => promise; - } else if (rawComponent.__asyncLoader && // warn only once per component - !rawComponent.__warnedDefineAsync) { - rawComponent.__warnedDefineAsync = true; - warn(`Component "${name}" in record with path "${record.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`); - } - } - if (guardType !== "beforeRouteEnter" && !record.instances[name]) - continue; - if (isRouteComponent(rawComponent)) { - const options = rawComponent.__vccOpts || rawComponent; - const guard = options[guardType]; - guard && guards.push(guardToPromiseFn(guard, to, from, record, name)); - } else { - let componentPromise = rawComponent(); - if (process.env.NODE_ENV !== "production" && !("catch" in componentPromise)) { - warn(`Component "${name}" in record with path "${record.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`); - componentPromise = Promise.resolve(componentPromise); - } - guards.push(() => componentPromise.then((resolved) => { - if (!resolved) - return Promise.reject(new Error(`Couldn't resolve component "${name}" at "${record.path}"`)); - const resolvedComponent = isESModule(resolved) ? resolved.default : resolved; - record.components[name] = resolvedComponent; - const options = resolvedComponent.__vccOpts || resolvedComponent; - const guard = options[guardType]; - return guard && guardToPromiseFn(guard, to, from, record, name)(); - })); - } - } - } - return guards; -} -function isRouteComponent(component) { - return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component; -} -function useLink(props) { - const router2 = inject(routerKey); - const currentRoute = inject(routeLocationKey); - const route = computed(() => router2.resolve(unref(props.to))); - const activeRecordIndex = computed(() => { - const { matched } = route.value; - const { length } = matched; - const routeMatched = matched[length - 1]; - const currentMatched = currentRoute.matched; - if (!routeMatched || !currentMatched.length) - return -1; - const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched)); - if (index2 > -1) - return index2; - const parentRecordPath = getOriginalPath(matched[length - 2]); - return ( - // we are dealing with nested routes - length > 1 && // if the parent and matched route have the same path, this link is - // referring to the empty child. Or we currently are on a different - // child of the same parent - getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent - currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2 - ); - }); - const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params)); - const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params)); - function navigate(e = {}) { - if (guardEvent(e)) { - return router2[unref(props.replace) ? "replace" : "push"]( - unref(props.to) - // avoid uncaught errors are they are logged anyway - ).catch(noop); - } - return Promise.resolve(); - } - if ((process.env.NODE_ENV !== "production" || false) && isBrowser) { - const instance = getCurrentInstance(); - if (instance) { - const linkContextDevtools = { - route: route.value, - isActive: isActive.value, - isExactActive: isExactActive.value - }; - instance.__vrl_devtools = instance.__vrl_devtools || []; - instance.__vrl_devtools.push(linkContextDevtools); - watchEffect(() => { - linkContextDevtools.route = route.value; - linkContextDevtools.isActive = isActive.value; - linkContextDevtools.isExactActive = isExactActive.value; - }, { flush: "post" }); - } - } - return { - route, - href: computed(() => route.value.href), - isActive, - isExactActive, - navigate - }; -} -const RouterLinkImpl = /* @__PURE__ */ defineComponent({ - name: "RouterLink", - compatConfig: { MODE: 3 }, - props: { - to: { - type: [String, Object], - required: true - }, - replace: Boolean, - activeClass: String, - // inactiveClass: String, - exactActiveClass: String, - custom: Boolean, - ariaCurrentValue: { - type: String, - default: "page" - } - }, - useLink, - setup(props, { slots }) { - const link = reactive(useLink(props)); - const { options } = inject(routerKey); - const elClass = computed(() => ({ - [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive, - // [getLinkClass( - // props.inactiveClass, - // options.linkInactiveClass, - // 'router-link-inactive' - // )]: !link.isExactActive, - [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive - })); - return () => { - const children = slots.default && slots.default(link); - return props.custom ? children : h$1("a", { - "aria-current": link.isExactActive ? props.ariaCurrentValue : null, - href: link.href, - // this would override user added attrs but Vue will still add - // the listener, so we end up triggering both - onClick: link.navigate, - class: elClass.value - }, children); - }; - } -}); -const RouterLink = RouterLinkImpl; -function guardEvent(e) { - if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) - return; - if (e.defaultPrevented) - return; - if (e.button !== void 0 && e.button !== 0) - return; - if (e.currentTarget && e.currentTarget.getAttribute) { - const target = e.currentTarget.getAttribute("target"); - if (/\b_blank\b/i.test(target)) - return; - } - if (e.preventDefault) - e.preventDefault(); - return true; -} -function includesParams(outer, inner) { - for (const key in inner) { - const innerValue = inner[key]; - const outerValue = outer[key]; - if (typeof innerValue === "string") { - if (innerValue !== outerValue) - return false; - } else { - if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i])) - return false; - } - } - return true; -} -function getOriginalPath(record) { - return record ? record.aliasOf ? record.aliasOf.path : record.path : ""; -} -const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass; -const RouterViewImpl = /* @__PURE__ */ defineComponent({ - name: "RouterView", - // #674 we manually inherit them - inheritAttrs: false, - props: { - name: { - type: String, - default: "default" - }, - route: Object - }, - // Better compat for @vue/compat users - // https://github.com/vuejs/router/issues/1315 - compatConfig: { MODE: 3 }, - setup(props, { attrs, slots }) { - process.env.NODE_ENV !== "production" && warnDeprecatedUsage(); - const injectedRoute = inject(routerViewLocationKey); - const routeToDisplay = computed(() => props.route || injectedRoute.value); - const injectedDepth = inject(viewDepthKey, 0); - const depth = computed(() => { - let initialDepth = unref(injectedDepth); - const { matched } = routeToDisplay.value; - let matchedRoute; - while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) { - initialDepth++; - } - return initialDepth; - }); - const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]); - provide(viewDepthKey, computed(() => depth.value + 1)); - provide(matchedRouteKey, matchedRouteRef); - provide(routerViewLocationKey, routeToDisplay); - const viewRef = ref(); - watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => { - if (to) { - to.instances[name] = instance; - if (from && from !== to && instance && instance === oldInstance) { - if (!to.leaveGuards.size) { - to.leaveGuards = from.leaveGuards; - } - if (!to.updateGuards.size) { - to.updateGuards = from.updateGuards; - } - } - } - if (instance && to && // if there is no instance but to and from are the same this might be - // the first visit - (!from || !isSameRouteRecord(to, from) || !oldInstance)) { - (to.enterCallbacks[name] || []).forEach((callback) => callback(instance)); - } - }, { flush: "post" }); - return () => { - const route = routeToDisplay.value; - const currentName = props.name; - const matchedRoute = matchedRouteRef.value; - const ViewComponent = matchedRoute && matchedRoute.components[currentName]; - if (!ViewComponent) { - return normalizeSlot(slots.default, { Component: ViewComponent, route }); - } - const routePropsOption = matchedRoute.props[currentName]; - const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null; - const onVnodeUnmounted = (vnode) => { - if (vnode.component.isUnmounted) { - matchedRoute.instances[currentName] = null; - } - }; - const component = h$1(ViewComponent, assign({}, routeProps, attrs, { - onVnodeUnmounted, - ref: viewRef - })); - if ((process.env.NODE_ENV !== "production" || false) && isBrowser && component.ref) { - const info = { - depth: depth.value, - name: matchedRoute.name, - path: matchedRoute.path, - meta: matchedRoute.meta - }; - const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]; - internalInstances.forEach((instance) => { - instance.__vrv_devtools = info; - }); - } - return ( - // pass the vnode to the slot as a prop. - // h and both accept vnodes - normalizeSlot(slots.default, { Component: component, route }) || component - ); - }; - } -}); -function normalizeSlot(slot, data) { - if (!slot) - return null; - const slotContent = slot(data); - return slotContent.length === 1 ? slotContent[0] : slotContent; -} -const RouterView = RouterViewImpl; -function warnDeprecatedUsage() { - const instance = getCurrentInstance(); - const parentName = instance.parent && instance.parent.type.name; - const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type; - if (parentName && (parentName === "KeepAlive" || parentName.includes("Transition")) && typeof parentSubTreeType === "object" && parentSubTreeType.name === "RouterView") { - const comp = parentName === "KeepAlive" ? "keep-alive" : "transition"; - warn(` can no longer be used directly inside or . -Use slot props instead: - - - <${comp}> - - -`); - } -} -function formatRouteLocation(routeLocation, tooltip) { - const copy = assign({}, routeLocation, { - // remove variables that can contain vue instances - matched: routeLocation.matched.map((matched) => omit(matched, ["instances", "children", "aliasOf"])) - }); - return { - _custom: { - type: null, - readOnly: true, - display: routeLocation.fullPath, - tooltip, - value: copy - } - }; -} -function formatDisplay(display) { - return { - _custom: { - display - } - }; -} -let routerId = 0; -function addDevtools(app, router2, matcher) { - if (router2.__hasDevtools) - return; - router2.__hasDevtools = true; - const id = routerId++; - setupDevtoolsPlugin({ - id: "org.vuejs.router" + (id ? "." + id : ""), - label: "Vue Router", - packageName: "vue-router", - homepage: "https://router.vuejs.org", - logo: "https://router.vuejs.org/logo.png", - componentStateTypes: ["Routing"], - app - }, (api) => { - if (typeof api.now !== "function") { - console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); - } - api.on.inspectComponent((payload, ctx) => { - if (payload.instanceData) { - payload.instanceData.state.push({ - type: "Routing", - key: "$route", - editable: false, - value: formatRouteLocation(router2.currentRoute.value, "Current Route") - }); - } - }); - api.on.visitComponentTree(({ treeNode: node, componentInstance }) => { - if (componentInstance.__vrv_devtools) { - const info = componentInstance.__vrv_devtools; - node.tags.push({ - label: (info.name ? `${info.name.toString()}: ` : "") + info.path, - textColor: 0, - tooltip: "This component is rendered by <router-view>", - backgroundColor: PINK_500 - }); - } - if (isArray(componentInstance.__vrl_devtools)) { - componentInstance.__devtoolsApi = api; - componentInstance.__vrl_devtools.forEach((devtoolsData) => { - let backgroundColor = ORANGE_400; - let tooltip = ""; - if (devtoolsData.isExactActive) { - backgroundColor = LIME_500; - tooltip = "This is exactly active"; - } else if (devtoolsData.isActive) { - backgroundColor = BLUE_600; - tooltip = "This link is active"; - } - node.tags.push({ - label: devtoolsData.route.path, - textColor: 0, - tooltip, - backgroundColor - }); - }); - } - }); - watch(router2.currentRoute, () => { - refreshRoutesView(); - api.notifyComponentUpdate(); - api.sendInspectorTree(routerInspectorId); - api.sendInspectorState(routerInspectorId); - }); - const navigationsLayerId = "router:navigations:" + id; - api.addTimelineLayer({ - id: navigationsLayerId, - label: `Router${id ? " " + id : ""} Navigations`, - color: 4237508 - }); - router2.onError((error, to) => { - api.addTimelineEvent({ - layerId: navigationsLayerId, - event: { - title: "Error during Navigation", - subtitle: to.fullPath, - logType: "error", - time: api.now(), - data: { error }, - groupId: to.meta.__navigationId - } - }); - }); - let navigationId = 0; - router2.beforeEach((to, from) => { - const data = { - guard: formatDisplay("beforeEach"), - from: formatRouteLocation(from, "Current Location during this navigation"), - to: formatRouteLocation(to, "Target location") - }; - Object.defineProperty(to.meta, "__navigationId", { - value: navigationId++ - }); - api.addTimelineEvent({ - layerId: navigationsLayerId, - event: { - time: api.now(), - title: "Start of navigation", - subtitle: to.fullPath, - data, - groupId: to.meta.__navigationId - } - }); - }); - router2.afterEach((to, from, failure) => { - const data = { - guard: formatDisplay("afterEach") - }; - if (failure) { - data.failure = { - _custom: { - type: Error, - readOnly: true, - display: failure ? failure.message : "", - tooltip: "Navigation Failure", - value: failure - } - }; - data.status = formatDisplay("❌"); - } else { - data.status = formatDisplay("✅"); - } - data.from = formatRouteLocation(from, "Current Location during this navigation"); - data.to = formatRouteLocation(to, "Target location"); - api.addTimelineEvent({ - layerId: navigationsLayerId, - event: { - title: "End of navigation", - subtitle: to.fullPath, - time: api.now(), - data, - logType: failure ? "warning" : "default", - groupId: to.meta.__navigationId - } - }); - }); - const routerInspectorId = "router-inspector:" + id; - api.addInspector({ - id: routerInspectorId, - label: "Routes" + (id ? " " + id : ""), - icon: "book", - treeFilterPlaceholder: "Search routes" - }); - function refreshRoutesView() { - if (!activeRoutesPayload) - return; - const payload = activeRoutesPayload; - let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view - // therefore we still need to include them - !route.parent.record.components); - routes.forEach(resetMatchStateOnRouteRecord); - if (payload.filter) { - routes = routes.filter((route) => ( - // save matches state based on the payload - isRouteMatching(route, payload.filter.toLowerCase()) - )); - } - routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value)); - payload.rootNodes = routes.map(formatRouteRecordForInspector); - } - let activeRoutesPayload; - api.on.getInspectorTree((payload) => { - activeRoutesPayload = payload; - if (payload.app === app && payload.inspectorId === routerInspectorId) { - refreshRoutesView(); - } - }); - api.on.getInspectorState((payload) => { - if (payload.app === app && payload.inspectorId === routerInspectorId) { - const routes = matcher.getRoutes(); - const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId); - if (route) { - payload.state = { - options: formatRouteRecordMatcherForStateInspector(route) - }; - } - } - }); - api.sendInspectorTree(routerInspectorId); - api.sendInspectorState(routerInspectorId); - }); -} -function modifierForKey(key) { - if (key.optional) { - return key.repeatable ? "*" : "?"; - } else { - return key.repeatable ? "+" : ""; - } -} -function formatRouteRecordMatcherForStateInspector(route) { - const { record } = route; - const fields = [ - { editable: false, key: "path", value: record.path } - ]; - if (record.name != null) { - fields.push({ - editable: false, - key: "name", - value: record.name - }); - } - fields.push({ editable: false, key: "regexp", value: route.re }); - if (route.keys.length) { - fields.push({ - editable: false, - key: "keys", - value: { - _custom: { - type: null, - readOnly: true, - display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(" "), - tooltip: "Param keys", - value: route.keys - } - } - }); - } - if (record.redirect != null) { - fields.push({ - editable: false, - key: "redirect", - value: record.redirect - }); - } - if (route.alias.length) { - fields.push({ - editable: false, - key: "aliases", - value: route.alias.map((alias) => alias.record.path) - }); - } - if (Object.keys(route.record.meta).length) { - fields.push({ - editable: false, - key: "meta", - value: route.record.meta - }); - } - fields.push({ - key: "score", - editable: false, - value: { - _custom: { - type: null, - readOnly: true, - display: route.score.map((score) => score.join(", ")).join(" | "), - tooltip: "Score used to sort routes", - value: route.score - } - } - }); - return fields; -} -const PINK_500 = 15485081; -const BLUE_600 = 2450411; -const LIME_500 = 8702998; -const CYAN_400 = 2282478; -const ORANGE_400 = 16486972; -const DARK = 6710886; -function formatRouteRecordForInspector(route) { - const tags = []; - const { record } = route; - if (record.name != null) { - tags.push({ - label: String(record.name), - textColor: 0, - backgroundColor: CYAN_400 - }); - } - if (record.aliasOf) { - tags.push({ - label: "alias", - textColor: 0, - backgroundColor: ORANGE_400 - }); - } - if (route.__vd_match) { - tags.push({ - label: "matches", - textColor: 0, - backgroundColor: PINK_500 - }); - } - if (route.__vd_exactActive) { - tags.push({ - label: "exact", - textColor: 0, - backgroundColor: LIME_500 - }); - } - if (route.__vd_active) { - tags.push({ - label: "active", - textColor: 0, - backgroundColor: BLUE_600 - }); - } - if (record.redirect) { - tags.push({ - label: typeof record.redirect === "string" ? `redirect: ${record.redirect}` : "redirects", - textColor: 16777215, - backgroundColor: DARK - }); - } - let id = record.__vd_id; - if (id == null) { - id = String(routeRecordId++); - record.__vd_id = id; - } - return { - id, - label: record.path, - tags, - children: route.children.map(formatRouteRecordForInspector) - }; -} -let routeRecordId = 0; -const EXTRACT_REGEXP_RE = /^\/(.*)\/([a-z]*)$/; -function markRouteRecordActive(route, currentRoute) { - const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record); - route.__vd_exactActive = route.__vd_active = isExactActive; - if (!isExactActive) { - route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record)); - } - route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute)); -} -function resetMatchStateOnRouteRecord(route) { - route.__vd_match = false; - route.children.forEach(resetMatchStateOnRouteRecord); -} -function isRouteMatching(route, filter) { - const found = String(route.re).match(EXTRACT_REGEXP_RE); - route.__vd_match = false; - if (!found || found.length < 3) { - return false; - } - const nonEndingRE = new RegExp(found[1].replace(/\$$/, ""), found[2]); - if (nonEndingRE.test(filter)) { - route.children.forEach((child) => isRouteMatching(child, filter)); - if (route.record.path !== "/" || filter === "/") { - route.__vd_match = route.re.test(filter); - return true; - } - return false; - } - const path = route.record.path.toLowerCase(); - const decodedPath = decode(path); - if (!filter.startsWith("/") && (decodedPath.includes(filter) || path.includes(filter))) - return true; - if (decodedPath.startsWith(filter) || path.startsWith(filter)) - return true; - if (route.record.name && String(route.record.name).includes(filter)) - return true; - return route.children.some((child) => isRouteMatching(child, filter)); -} -function omit(obj, keys) { - const ret = {}; - for (const key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -function createRouter(options) { - const matcher = createRouterMatcher(options.routes, options); - const parseQuery$1 = options.parseQuery || parseQuery; - const stringifyQuery$1 = options.stringifyQuery || stringifyQuery; - const routerHistory = options.history; - if (process.env.NODE_ENV !== "production" && !routerHistory) - throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.'); - const beforeGuards = useCallbacks(); - const beforeResolveGuards = useCallbacks(); - const afterGuards = useCallbacks(); - const currentRoute = shallowRef(START_LOCATION_NORMALIZED); - let pendingLocation = START_LOCATION_NORMALIZED; - if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) { - history.scrollRestoration = "manual"; - } - const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue); - const encodeParams = applyToParams.bind(null, encodeParam); - const decodeParams = ( - // @ts-expect-error: intentionally avoid the type check - applyToParams.bind(null, decode) - ); - function addRoute(parentOrRoute, route) { - let parent; - let record; - if (isRouteName(parentOrRoute)) { - parent = matcher.getRecordMatcher(parentOrRoute); - record = route; - } else { - record = parentOrRoute; - } - return matcher.addRoute(record, parent); - } - function removeRoute(name) { - const recordMatcher = matcher.getRecordMatcher(name); - if (recordMatcher) { - matcher.removeRoute(recordMatcher); - } else if (process.env.NODE_ENV !== "production") { - warn(`Cannot remove non-existent route "${String(name)}"`); - } - } - function getRoutes() { - return matcher.getRoutes().map((routeMatcher) => routeMatcher.record); - } - function hasRoute(name) { - return !!matcher.getRecordMatcher(name); - } - function resolve(rawLocation, currentLocation) { - currentLocation = assign({}, currentLocation || currentRoute.value); - if (typeof rawLocation === "string") { - const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path); - const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation); - const href2 = routerHistory.createHref(locationNormalized.fullPath); - if (process.env.NODE_ENV !== "production") { - if (href2.startsWith("//")) - warn(`Location "${rawLocation}" resolved to "${href2}". A resolved location cannot start with multiple slashes.`); - else if (!matchedRoute2.matched.length) { - warn(`No match found for location with path "${rawLocation}"`); - } - } - return assign(locationNormalized, matchedRoute2, { - params: decodeParams(matchedRoute2.params), - hash: decode(locationNormalized.hash), - redirectedFrom: void 0, - href: href2 - }); - } - let matcherLocation; - if ("path" in rawLocation) { - if (process.env.NODE_ENV !== "production" && "params" in rawLocation && !("name" in rawLocation) && // @ts-expect-error: the type is never - Object.keys(rawLocation.params).length) { - warn(`Path "${rawLocation.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`); - } - matcherLocation = assign({}, rawLocation, { - path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path - }); - } else { - const targetParams = assign({}, rawLocation.params); - for (const key in targetParams) { - if (targetParams[key] == null) { - delete targetParams[key]; - } - } - matcherLocation = assign({}, rawLocation, { - params: encodeParams(targetParams) - }); - currentLocation.params = encodeParams(currentLocation.params); - } - const matchedRoute = matcher.resolve(matcherLocation, currentLocation); - const hash = rawLocation.hash || ""; - if (process.env.NODE_ENV !== "production" && hash && !hash.startsWith("#")) { - warn(`A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`); - } - matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params)); - const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, { - hash: encodeHash(hash), - path: matchedRoute.path - })); - const href = routerHistory.createHref(fullPath); - if (process.env.NODE_ENV !== "production") { - if (href.startsWith("//")) { - warn(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`); - } else if (!matchedRoute.matched.length) { - warn(`No match found for location with path "${"path" in rawLocation ? rawLocation.path : rawLocation}"`); - } - } - return assign({ - fullPath, - // keep the hash encoded so fullPath is effectively path + encodedQuery + - // hash - hash, - query: ( - // if the user is using a custom query lib like qs, we might have - // nested objects, so we keep the query as is, meaning it can contain - // numbers at `$route.query`, but at the point, the user will have to - // use their own type anyway. - // https://github.com/vuejs/router/issues/328#issuecomment-649481567 - stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {} - ) - }, matchedRoute, { - redirectedFrom: void 0, - href - }); - } - function locationAsObject(to) { - return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to); - } - function checkCanceledNavigation(to, from) { - if (pendingLocation !== to) { - return createRouterError(8, { - from, - to - }); - } - } - function push(to) { - return pushWithRedirect(to); - } - function replace(to) { - return push(assign(locationAsObject(to), { replace: true })); - } - function handleRedirectRecord(to) { - const lastMatched = to.matched[to.matched.length - 1]; - if (lastMatched && lastMatched.redirect) { - const { redirect } = lastMatched; - let newTargetLocation = typeof redirect === "function" ? redirect(to) : redirect; - if (typeof newTargetLocation === "string") { - newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : ( - // force empty params - { path: newTargetLocation } - ); - newTargetLocation.params = {}; - } - if (process.env.NODE_ENV !== "production" && !("path" in newTargetLocation) && !("name" in newTargetLocation)) { - warn(`Invalid redirect found: -${JSON.stringify(newTargetLocation, null, 2)} - when navigating to "${to.fullPath}". A redirect must contain a name or path. This will break in production.`); - throw new Error("Invalid redirect"); - } - return assign({ - query: to.query, - hash: to.hash, - // avoid transferring params if the redirect has a path - params: "path" in newTargetLocation ? {} : to.params - }, newTargetLocation); - } - } - function pushWithRedirect(to, redirectedFrom) { - const targetLocation = pendingLocation = resolve(to); - const from = currentRoute.value; - const data = to.state; - const force = to.force; - const replace2 = to.replace === true; - const shouldRedirect = handleRedirectRecord(targetLocation); - if (shouldRedirect) - return pushWithRedirect( - assign(locationAsObject(shouldRedirect), { - state: typeof shouldRedirect === "object" ? assign({}, data, shouldRedirect.state) : data, - force, - replace: replace2 - }), - // keep original redirectedFrom if it exists - redirectedFrom || targetLocation - ); - const toLocation = targetLocation; - toLocation.redirectedFrom = redirectedFrom; - let failure; - if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) { - failure = createRouterError(16, { to: toLocation, from }); - handleScroll( - from, - from, - // this is a push, the only way for it to be triggered from a - // history.listen is with a redirect, which makes it become a push - true, - // This cannot be the first navigation because the initial location - // cannot be manually navigated to - false - ); - } - return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? ( - // navigation redirects still mark the router as ready - isNavigationFailure( - error, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - ) ? error : markAsReady(error) - ) : ( - // reject any unknown error - triggerError(error, toLocation, from) - )).then((failure2) => { - if (failure2) { - if (isNavigationFailure( - failure2, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - )) { - if (process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at - isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times - redirectedFrom && // @ts-expect-error: added only in dev - (redirectedFrom._count = redirectedFrom._count ? ( - // @ts-expect-error - redirectedFrom._count + 1 - ) : 1) > 30) { - warn(`Detected a possibly infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow. - Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`); - return Promise.reject(new Error("Infinite redirect in navigation guard")); - } - return pushWithRedirect( - // keep options - assign({ - // preserve an existing replacement but allow the redirect to override it - replace: replace2 - }, locationAsObject(failure2.to), { - state: typeof failure2.to === "object" ? assign({}, data, failure2.to.state) : data, - force - }), - // preserve the original redirectedFrom if any - redirectedFrom || toLocation - ); - } - } else { - failure2 = finalizeNavigation(toLocation, from, true, replace2, data); - } - triggerAfterEach(toLocation, from, failure2); - return failure2; - }); - } - function checkCanceledNavigationAndReject(to, from) { - const error = checkCanceledNavigation(to, from); - return error ? Promise.reject(error) : Promise.resolve(); - } - function runWithContext(fn) { - const app = installedApps.values().next().value; - return app && typeof app.runWithContext === "function" ? app.runWithContext(fn) : fn(); - } - function navigate(to, from) { - let guards; - const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from); - guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from); - for (const record of leavingRecords) { - record.leaveGuards.forEach((guard) => { - guards.push(guardToPromiseFn(guard, to, from)); - }); - } - const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from); - guards.push(canceledNavigationCheck); - return runGuardQueue(guards).then(() => { - guards = []; - for (const guard of beforeGuards.list()) { - guards.push(guardToPromiseFn(guard, to, from)); - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from); - for (const record of updatingRecords) { - record.updateGuards.forEach((guard) => { - guards.push(guardToPromiseFn(guard, to, from)); - }); - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - guards = []; - for (const record of enteringRecords) { - if (record.beforeEnter) { - if (isArray(record.beforeEnter)) { - for (const beforeEnter of record.beforeEnter) - guards.push(guardToPromiseFn(beforeEnter, to, from)); - } else { - guards.push(guardToPromiseFn(record.beforeEnter, to, from)); - } - } - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - to.matched.forEach((record) => record.enterCallbacks = {}); - guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from); - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - guards = []; - for (const guard of beforeResolveGuards.list()) { - guards.push(guardToPromiseFn(guard, to, from)); - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).catch((err) => isNavigationFailure( - err, - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ) ? err : Promise.reject(err)); - } - function triggerAfterEach(to, from, failure) { - afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure))); - } - function finalizeNavigation(toLocation, from, isPush, replace2, data) { - const error = checkCanceledNavigation(toLocation, from); - if (error) - return error; - const isFirstNavigation = from === START_LOCATION_NORMALIZED; - const state = !isBrowser ? {} : history.state; - if (isPush) { - if (replace2 || isFirstNavigation) - routerHistory.replace(toLocation.fullPath, assign({ - scroll: isFirstNavigation && state && state.scroll - }, data)); - else - routerHistory.push(toLocation.fullPath, data); - } - currentRoute.value = toLocation; - handleScroll(toLocation, from, isPush, isFirstNavigation); - markAsReady(); - } - let removeHistoryListener; - function setupListeners() { - if (removeHistoryListener) - return; - removeHistoryListener = routerHistory.listen((to, _from, info) => { - if (!router2.listening) - return; - const toLocation = resolve(to); - const shouldRedirect = handleRedirectRecord(toLocation); - if (shouldRedirect) { - pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop); - return; - } - pendingLocation = toLocation; - const from = currentRoute.value; - if (isBrowser) { - saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition()); - } - navigate(toLocation, from).catch((error) => { - if (isNavigationFailure( - error, - 4 | 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - )) { - return error; - } - if (isNavigationFailure( - error, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - )) { - pushWithRedirect( - error.to, - toLocation - // avoid an uncaught rejection, let push call triggerError - ).then((failure) => { - if (isNavigationFailure( - failure, - 4 | 16 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - ) && !info.delta && info.type === NavigationType.pop) { - routerHistory.go(-1, false); - } - }).catch(noop); - return Promise.reject(); - } - if (info.delta) { - routerHistory.go(-info.delta, false); - } - return triggerError(error, toLocation, from); - }).then((failure) => { - failure = failure || finalizeNavigation( - // after navigation, all matched components are resolved - toLocation, - from, - false - ); - if (failure) { - if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history - // entry while a different route is displayed - !isNavigationFailure( - failure, - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - )) { - routerHistory.go(-info.delta, false); - } else if (info.type === NavigationType.pop && isNavigationFailure( - failure, - 4 | 16 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - )) { - routerHistory.go(-1, false); - } - } - triggerAfterEach(toLocation, from, failure); - }).catch(noop); - }); - } - let readyHandlers = useCallbacks(); - let errorListeners = useCallbacks(); - let ready; - function triggerError(error, to, from) { - markAsReady(error); - const list = errorListeners.list(); - if (list.length) { - list.forEach((handler) => handler(error, to, from)); - } else { - if (process.env.NODE_ENV !== "production") { - warn("uncaught error during route navigation:"); - } - console.error(error); - } - return Promise.reject(error); - } - function isReady() { - if (ready && currentRoute.value !== START_LOCATION_NORMALIZED) - return Promise.resolve(); - return new Promise((resolve2, reject) => { - readyHandlers.add([resolve2, reject]); - }); - } - function markAsReady(err) { - if (!ready) { - ready = !err; - setupListeners(); - readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2()); - readyHandlers.reset(); - } - return err; - } - function handleScroll(to, from, isPush, isFirstNavigation) { - const { scrollBehavior } = options; - if (!isBrowser || !scrollBehavior) - return Promise.resolve(); - const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null; - return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from)); - } - const go = (delta) => routerHistory.go(delta); - let started; - const installedApps = /* @__PURE__ */ new Set(); - const router2 = { - currentRoute, - listening: true, - addRoute, - removeRoute, - hasRoute, - getRoutes, - resolve, - options, - push, - replace, - go, - back: () => go(-1), - forward: () => go(1), - beforeEach: beforeGuards.add, - beforeResolve: beforeResolveGuards.add, - afterEach: afterGuards.add, - onError: errorListeners.add, - isReady, - install(app) { - const router22 = this; - app.component("RouterLink", RouterLink); - app.component("RouterView", RouterView); - app.config.globalProperties.$router = router22; - Object.defineProperty(app.config.globalProperties, "$route", { - enumerable: true, - get: () => unref(currentRoute) - }); - if (isBrowser && // used for the initial navigation client side to avoid pushing - // multiple times when the router is used in multiple apps - !started && currentRoute.value === START_LOCATION_NORMALIZED) { - started = true; - push(routerHistory.location).catch((err) => { - if (process.env.NODE_ENV !== "production") - warn("Unexpected error when starting the router:", err); - }); - } - const reactiveRoute = {}; - for (const key in START_LOCATION_NORMALIZED) { - Object.defineProperty(reactiveRoute, key, { - get: () => currentRoute.value[key], - enumerable: true - }); - } - app.provide(routerKey, router22); - app.provide(routeLocationKey, shallowReactive(reactiveRoute)); - app.provide(routerViewLocationKey, currentRoute); - const unmountApp = app.unmount; - installedApps.add(app); - app.unmount = function() { - installedApps.delete(app); - if (installedApps.size < 1) { - pendingLocation = START_LOCATION_NORMALIZED; - removeHistoryListener && removeHistoryListener(); - removeHistoryListener = null; - currentRoute.value = START_LOCATION_NORMALIZED; - started = false; - ready = false; - } - unmountApp(); - }; - if ((process.env.NODE_ENV !== "production" || false) && isBrowser) { - addDevtools(app, router22, matcher); - } - } - }; - function runGuardQueue(guards) { - return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve()); - } - return router2; -} -function extractChangingRecords(to, from) { - const leavingRecords = []; - const updatingRecords = []; - const enteringRecords = []; - const len = Math.max(from.matched.length, to.matched.length); - for (let i = 0; i < len; i++) { - const recordFrom = from.matched[i]; - if (recordFrom) { - if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) - updatingRecords.push(recordFrom); - else - leavingRecords.push(recordFrom); - } - const recordTo = to.matched[i]; - if (recordTo) { - if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) { - enteringRecords.push(recordTo); - } - } - } - return [leavingRecords, updatingRecords, enteringRecords]; -} -const router = createRouter({ - history: createWebHistory(), - routes: [] -}); -function isPromise(obj) { - return obj && typeof obj.then === "function"; -} -Promise.resolve(false); -Promise.resolve(true); -var PROMISE_RESOLVED_VOID = Promise.resolve(); -function sleep(time, resolveWith) { - if (!time) - time = 0; - return new Promise(function(res) { - return setTimeout(function() { - return res(resolveWith); - }, time); - }); -} -function randomInt(min, max) { - return Math.floor(Math.random() * (max - min + 1) + min); -} -function randomToken() { - return Math.random().toString(36).substring(2); -} -var lastMs = 0; -var additional = 0; -function microSeconds$4() { - var ms = (/* @__PURE__ */ new Date()).getTime(); - if (ms === lastMs) { - additional++; - return ms * 1e3 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1e3; - } -} -var microSeconds$3 = microSeconds$4; -var type$3 = "native"; -function create$3(channelName) { - var state = { - messagesCallback: null, - bc: new BroadcastChannel(channelName), - subFns: [] - // subscriberFunctions - }; - state.bc.onmessage = function(msg) { - if (state.messagesCallback) { - state.messagesCallback(msg.data); - } - }; - return state; -} -function close$3(channelState) { - channelState.bc.close(); - channelState.subFns = []; -} -function postMessage$3(channelState, messageJson) { - try { - channelState.bc.postMessage(messageJson, false); - return PROMISE_RESOLVED_VOID; - } catch (err) { - return Promise.reject(err); - } -} -function onMessage$3(channelState, fn) { - channelState.messagesCallback = fn; -} -function canBeUsed$3() { - if (typeof window === "undefined") { - return false; - } - if (typeof BroadcastChannel === "function") { - if (BroadcastChannel._pubkey) { - throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill"); - } - return true; - } else { - return false; - } -} -function averageResponseTime$3() { - return 150; -} -var NativeMethod = { - create: create$3, - close: close$3, - onMessage: onMessage$3, - postMessage: postMessage$3, - canBeUsed: canBeUsed$3, - type: type$3, - averageResponseTime: averageResponseTime$3, - microSeconds: microSeconds$3 -}; -var ObliviousSet = ( - /** @class */ - function() { - function ObliviousSet2(ttl) { - this.ttl = ttl; - this.map = /* @__PURE__ */ new Map(); - this._to = false; - } - ObliviousSet2.prototype.has = function(value) { - return this.map.has(value); - }; - ObliviousSet2.prototype.add = function(value) { - var _this = this; - this.map.set(value, now()); - if (!this._to) { - this._to = true; - setTimeout(function() { - _this._to = false; - removeTooOldValues(_this); - }, 0); - } - }; - ObliviousSet2.prototype.clear = function() { - this.map.clear(); - }; - return ObliviousSet2; - }() -); -function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); - while (true) { - var next = iterator.next().value; - if (!next) { - return; - } - var value = next[0]; - var time = next[1]; - if (time < olderThen) { - obliviousSet.map.delete(value); - } else { - return; - } - } -} -function now() { - return (/* @__PURE__ */ new Date()).getTime(); -} -function fillOptionsWithDefaults() { - var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - var options = JSON.parse(JSON.stringify(originalOptions)); - if (typeof options.webWorkerSupport === "undefined") - options.webWorkerSupport = true; - if (!options.idb) - options.idb = {}; - if (!options.idb.ttl) - options.idb.ttl = 1e3 * 45; - if (!options.idb.fallbackInterval) - options.idb.fallbackInterval = 150; - if (originalOptions.idb && typeof originalOptions.idb.onclose === "function") - options.idb.onclose = originalOptions.idb.onclose; - if (!options.localstorage) - options.localstorage = {}; - if (!options.localstorage.removeTimeout) - options.localstorage.removeTimeout = 1e3 * 60; - if (originalOptions.methods) - options.methods = originalOptions.methods; - if (!options.node) - options.node = {}; - if (!options.node.ttl) - options.node.ttl = 1e3 * 60 * 2; - if (!options.node.maxParallelWrites) - options.node.maxParallelWrites = 2048; - if (typeof options.node.useFastPath === "undefined") - options.node.useFastPath = true; - return options; -} -var microSeconds$2 = microSeconds$4; -var DB_PREFIX = "pubkey.broadcast-channel-0-"; -var OBJECT_STORE_ID = "messages"; -var TRANSACTION_SETTINGS = { - durability: "relaxed" -}; -var type$2 = "idb"; -function getIdb() { - if (typeof indexedDB !== "undefined") - return indexedDB; - if (typeof window !== "undefined") { - if (typeof window.mozIndexedDB !== "undefined") - return window.mozIndexedDB; - if (typeof window.webkitIndexedDB !== "undefined") - return window.webkitIndexedDB; - if (typeof window.msIndexedDB !== "undefined") - return window.msIndexedDB; - } - return false; -} -function commitIndexedDBTransaction(tx) { - if (tx.commit) { - tx.commit(); - } -} -function createDatabase(channelName) { - var IndexedDB = getIdb(); - var dbName = DB_PREFIX + channelName; - var openRequest = IndexedDB.open(dbName); - openRequest.onupgradeneeded = function(ev) { - var db = ev.target.result; - db.createObjectStore(OBJECT_STORE_ID, { - keyPath: "id", - autoIncrement: true - }); - }; - return new Promise(function(res, rej) { - openRequest.onerror = function(ev) { - return rej(ev); - }; - openRequest.onsuccess = function() { - res(openRequest.result); - }; - }); -} -function writeMessage(db, readerUuid, messageJson) { - var time = (/* @__PURE__ */ new Date()).getTime(); - var writeObject = { - uuid: readerUuid, - time, - data: messageJson - }; - var tx = db.transaction([OBJECT_STORE_ID], "readwrite", TRANSACTION_SETTINGS); - return new Promise(function(res, rej) { - tx.oncomplete = function() { - return res(); - }; - tx.onerror = function(ev) { - return rej(ev); - }; - var objectStore = tx.objectStore(OBJECT_STORE_ID); - objectStore.add(writeObject); - commitIndexedDBTransaction(tx); - }); -} -function getMessagesHigherThan(db, lastCursorId) { - var tx = db.transaction(OBJECT_STORE_ID, "readonly", TRANSACTION_SETTINGS); - var objectStore = tx.objectStore(OBJECT_STORE_ID); - var ret = []; - var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); - if (objectStore.getAll) { - var getAllRequest = objectStore.getAll(keyRangeValue); - return new Promise(function(res, rej) { - getAllRequest.onerror = function(err) { - return rej(err); - }; - getAllRequest.onsuccess = function(e) { - res(e.target.result); - }; - }); - } - function openCursor() { - try { - keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); - return objectStore.openCursor(keyRangeValue); - } catch (e) { - return objectStore.openCursor(); - } - } - return new Promise(function(res, rej) { - var openCursorRequest = openCursor(); - openCursorRequest.onerror = function(err) { - return rej(err); - }; - openCursorRequest.onsuccess = function(ev) { - var cursor = ev.target.result; - if (cursor) { - if (cursor.value.id < lastCursorId + 1) { - cursor["continue"](lastCursorId + 1); - } else { - ret.push(cursor.value); - cursor["continue"](); - } - } else { - commitIndexedDBTransaction(tx); - res(ret); - } - }; - }); -} -function removeMessagesById(channelState, ids) { - if (channelState.closed) { - return Promise.resolve([]); - } - var tx = channelState.db.transaction(OBJECT_STORE_ID, "readwrite", TRANSACTION_SETTINGS); - var objectStore = tx.objectStore(OBJECT_STORE_ID); - return Promise.all(ids.map(function(id) { - var deleteRequest = objectStore["delete"](id); - return new Promise(function(res) { - deleteRequest.onsuccess = function() { - return res(); - }; - }); - })); -} -function getOldMessages(db, ttl) { - var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl; - var tx = db.transaction(OBJECT_STORE_ID, "readonly", TRANSACTION_SETTINGS); - var objectStore = tx.objectStore(OBJECT_STORE_ID); - var ret = []; - return new Promise(function(res) { - objectStore.openCursor().onsuccess = function(ev) { - var cursor = ev.target.result; - if (cursor) { - var msgObk = cursor.value; - if (msgObk.time < olderThen) { - ret.push(msgObk); - cursor["continue"](); - } else { - commitIndexedDBTransaction(tx); - res(ret); - } - } else { - res(ret); - } - }; - }); -} -function cleanOldMessages(channelState) { - return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) { - return removeMessagesById(channelState, tooOld.map(function(msg) { - return msg.id; - })); - }); -} -function create$2(channelName, options) { - options = fillOptionsWithDefaults(options); - return createDatabase(channelName).then(function(db) { - var state = { - closed: false, - lastCursorId: 0, - channelName, - options, - uuid: randomToken(), - /** - * emittedMessagesIds - * contains all messages that have been emitted before - * @type {ObliviousSet} - */ - eMIs: new ObliviousSet(options.idb.ttl * 2), - // ensures we do not read messages in parallel - writeBlockPromise: PROMISE_RESOLVED_VOID, - messagesCallback: null, - readQueuePromises: [], - db - }; - db.onclose = function() { - state.closed = true; - if (options.idb.onclose) - options.idb.onclose(); - }; - _readLoop(state); - return state; - }); -} -function _readLoop(state) { - if (state.closed) - return; - readNewMessages(state).then(function() { - return sleep(state.options.idb.fallbackInterval); - }).then(function() { - return _readLoop(state); - }); -} -function _filterMessage(msgObj, state) { - if (msgObj.uuid === state.uuid) - return false; - if (state.eMIs.has(msgObj.id)) - return false; - if (msgObj.data.time < state.messagesCallbackTime) - return false; - return true; -} -function readNewMessages(state) { - if (state.closed) - return PROMISE_RESOLVED_VOID; - if (!state.messagesCallback) - return PROMISE_RESOLVED_VOID; - return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) { - var useMessages = newerMessages.filter(function(msgObj) { - return !!msgObj; - }).map(function(msgObj) { - if (msgObj.id > state.lastCursorId) { - state.lastCursorId = msgObj.id; - } - return msgObj; - }).filter(function(msgObj) { - return _filterMessage(msgObj, state); - }).sort(function(msgObjA, msgObjB) { - return msgObjA.time - msgObjB.time; - }); - useMessages.forEach(function(msgObj) { - if (state.messagesCallback) { - state.eMIs.add(msgObj.id); - state.messagesCallback(msgObj.data); - } - }); - return PROMISE_RESOLVED_VOID; - }); -} -function close$2(channelState) { - channelState.closed = true; - channelState.db.close(); -} -function postMessage$2(channelState, messageJson) { - channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() { - return writeMessage(channelState.db, channelState.uuid, messageJson); - }).then(function() { - if (randomInt(0, 10) === 0) { - cleanOldMessages(channelState); - } - }); - return channelState.writeBlockPromise; -} -function onMessage$2(channelState, fn, time) { - channelState.messagesCallbackTime = time; - channelState.messagesCallback = fn; - readNewMessages(channelState); -} -function canBeUsed$2() { - return !!getIdb(); -} -function averageResponseTime$2(options) { - return options.idb.fallbackInterval * 2; -} -var IndexedDBMethod = { - create: create$2, - close: close$2, - onMessage: onMessage$2, - postMessage: postMessage$2, - canBeUsed: canBeUsed$2, - type: type$2, - averageResponseTime: averageResponseTime$2, - microSeconds: microSeconds$2 -}; -var microSeconds$1 = microSeconds$4; -var KEY_PREFIX = "pubkey.broadcastChannel-"; -var type$1 = "localstorage"; -function getLocalStorage() { - var localStorage2; - if (typeof window === "undefined") - return null; - try { - localStorage2 = window.localStorage; - localStorage2 = window["ie8-eventlistener/storage"] || window.localStorage; - } catch (e) { - } - return localStorage2; -} -function storageKey(channelName) { - return KEY_PREFIX + channelName; -} -function postMessage$1(channelState, messageJson) { - return new Promise(function(res) { - sleep().then(function() { - var key = storageKey(channelState.channelName); - var writeObj = { - token: randomToken(), - time: (/* @__PURE__ */ new Date()).getTime(), - data: messageJson, - uuid: channelState.uuid - }; - var value = JSON.stringify(writeObj); - getLocalStorage().setItem(key, value); - var ev = document.createEvent("Event"); - ev.initEvent("storage", true, true); - ev.key = key; - ev.newValue = value; - window.dispatchEvent(ev); - res(); - }); - }); -} -function addStorageEventListener(channelName, fn) { - var key = storageKey(channelName); - var listener = function listener2(ev) { - if (ev.key === key) { - fn(JSON.parse(ev.newValue)); - } - }; - window.addEventListener("storage", listener); - return listener; -} -function removeStorageEventListener(listener) { - window.removeEventListener("storage", listener); -} -function create$1(channelName, options) { - options = fillOptionsWithDefaults(options); - if (!canBeUsed$1()) { - throw new Error("BroadcastChannel: localstorage cannot be used"); - } - var uuid = randomToken(); - var eMIs = new ObliviousSet(options.localstorage.removeTimeout); - var state = { - channelName, - uuid, - eMIs - // emittedMessagesIds - }; - state.listener = addStorageEventListener(channelName, function(msgObj) { - if (!state.messagesCallback) - return; - if (msgObj.uuid === uuid) - return; - if (!msgObj.token || eMIs.has(msgObj.token)) - return; - if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime) - return; - eMIs.add(msgObj.token); - state.messagesCallback(msgObj.data); - }); - return state; -} -function close$1(channelState) { - removeStorageEventListener(channelState.listener); -} -function onMessage$1(channelState, fn, time) { - channelState.messagesCallbackTime = time; - channelState.messagesCallback = fn; -} -function canBeUsed$1() { - var ls = getLocalStorage(); - if (!ls) - return false; - try { - var key = "__broadcastchannel_check"; - ls.setItem(key, "works"); - ls.removeItem(key); - } catch (e) { - return false; - } - return true; -} -function averageResponseTime$1() { - var defaultTime = 120; - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.includes("safari") && !userAgent.includes("chrome")) { - return defaultTime * 2; - } - return defaultTime; -} -var LocalstorageMethod = { - create: create$1, - close: close$1, - onMessage: onMessage$1, - postMessage: postMessage$1, - canBeUsed: canBeUsed$1, - type: type$1, - averageResponseTime: averageResponseTime$1, - microSeconds: microSeconds$1 -}; -var microSeconds = microSeconds$4; -var type = "simulate"; -var SIMULATE_CHANNELS = /* @__PURE__ */ new Set(); -function create(channelName) { - var state = { - name: channelName, - messagesCallback: null - }; - SIMULATE_CHANNELS.add(state); - return state; -} -function close(channelState) { - SIMULATE_CHANNELS["delete"](channelState); -} -function postMessage(channelState, messageJson) { - return new Promise(function(res) { - return setTimeout(function() { - var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function(channel) { - return channel.name === channelState.name; - }).filter(function(channel) { - return channel !== channelState; - }).filter(function(channel) { - return !!channel.messagesCallback; - }).forEach(function(channel) { - return channel.messagesCallback(messageJson); - }); - res(); - }, 5); - }); -} -function onMessage(channelState, fn) { - channelState.messagesCallback = fn; -} -function canBeUsed() { - return true; -} -function averageResponseTime() { - return 5; -} -var SimulateMethod = { - create, - close, - onMessage, - postMessage, - canBeUsed, - type, - averageResponseTime, - microSeconds -}; -var METHODS = [ - NativeMethod, - // fastest - IndexedDBMethod, - LocalstorageMethod -]; -function chooseMethod(options) { - var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean); - if (options.type) { - if (options.type === "simulate") { - return SimulateMethod; - } - var ret = chooseMethods.find(function(m2) { - return m2.type === options.type; - }); - if (!ret) - throw new Error("method-type " + options.type + " not found"); - else - return ret; - } - if (!options.webWorkerSupport) { - chooseMethods = chooseMethods.filter(function(m2) { - return m2.type !== "idb"; - }); - } - var useMethod = chooseMethods.find(function(method) { - return method.canBeUsed(); - }); - if (!useMethod) - throw new Error("No usable method found in " + JSON.stringify(METHODS.map(function(m2) { - return m2.type; - }))); - else - return useMethod; -} -var OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set(); -var lastId = 0; -var BroadcastChannel$1 = function BroadcastChannel2(name, options) { - this.id = lastId++; - OPEN_BROADCAST_CHANNELS.add(this); - this.name = name; - if (ENFORCED_OPTIONS) { - options = ENFORCED_OPTIONS; - } - this.options = fillOptionsWithDefaults(options); - this.method = chooseMethod(this.options); - this._iL = false; - this._onML = null; - this._addEL = { - message: [], - internal: [] - }; - this._uMP = /* @__PURE__ */ new Set(); - this._befC = []; - this._prepP = null; - _prepareChannel(this); -}; -BroadcastChannel$1._pubkey = true; -var ENFORCED_OPTIONS; -BroadcastChannel$1.prototype = { - postMessage: function postMessage2(msg) { - if (this.closed) { - throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /** - * In the past when this error appeared, it was really hard to debug. - * So now we log the msg together with the error so it at least - * gives some clue about where in your application this happens. - */ - JSON.stringify(msg)); - } - return _post(this, "message", msg); - }, - postInternal: function postInternal(msg) { - return _post(this, "internal", msg); - }, - set onmessage(fn) { - var time = this.method.microSeconds(); - var listenObj = { - time, - fn - }; - _removeListenerObject(this, "message", this._onML); - if (fn && typeof fn === "function") { - this._onML = listenObj; - _addListenerObject(this, "message", listenObj); - } else { - this._onML = null; - } - }, - addEventListener: function addEventListener(type2, fn) { - var time = this.method.microSeconds(); - var listenObj = { - time, - fn - }; - _addListenerObject(this, type2, listenObj); - }, - removeEventListener: function removeEventListener(type2, fn) { - var obj = this._addEL[type2].find(function(obj2) { - return obj2.fn === fn; - }); - _removeListenerObject(this, type2, obj); - }, - close: function close2() { - var _this = this; - if (this.closed) { - return; - } - OPEN_BROADCAST_CHANNELS["delete"](this); - this.closed = true; - var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID; - this._onML = null; - this._addEL.message = []; - return awaitPrepare.then(function() { - return Promise.all(Array.from(_this._uMP)); - }).then(function() { - return Promise.all(_this._befC.map(function(fn) { - return fn(); - })); - }).then(function() { - return _this.method.close(_this._state); - }); - }, - get type() { - return this.method.type; - }, - get isClosed() { - return this.closed; - } -}; -function _post(broadcastChannel, type2, msg) { - var time = broadcastChannel.method.microSeconds(); - var msgObj = { - time, - type: type2, - data: msg - }; - var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID; - return awaitPrepare.then(function() { - var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj); - broadcastChannel._uMP.add(sendPromise); - sendPromise["catch"]().then(function() { - return broadcastChannel._uMP["delete"](sendPromise); - }); - return sendPromise; - }); -} -function _prepareChannel(channel) { - var maybePromise = channel.method.create(channel.name, channel.options); - if (isPromise(maybePromise)) { - channel._prepP = maybePromise; - maybePromise.then(function(s) { - channel._state = s; - }); - } else { - channel._state = maybePromise; - } -} -function _hasMessageListeners(channel) { - if (channel._addEL.message.length > 0) - return true; - if (channel._addEL.internal.length > 0) - return true; - return false; -} -function _addListenerObject(channel, type2, obj) { - channel._addEL[type2].push(obj); - _startListening(channel); -} -function _removeListenerObject(channel, type2, obj) { - channel._addEL[type2] = channel._addEL[type2].filter(function(o) { - return o !== obj; - }); - _stopListening(channel); -} -function _startListening(channel) { - if (!channel._iL && _hasMessageListeners(channel)) { - var listenerFn = function listenerFn2(msgObj) { - channel._addEL[msgObj.type].forEach(function(listenerObject) { - var hundredMsInMicro = 100 * 1e3; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { - listenerObject.fn(msgObj.data); - } - }); - }; - var time = channel.method.microSeconds(); - if (channel._prepP) { - channel._prepP.then(function() { - channel._iL = true; - channel.method.onMessage(channel._state, listenerFn, time); - }); - } else { - channel._iL = true; - channel.method.onMessage(channel._state, listenerFn, time); - } - } -} -function _stopListening(channel) { - if (channel._iL && !_hasMessageListeners(channel)) { - channel._iL = false; - var time = channel.method.microSeconds(); - channel.method.onMessage(channel._state, null, time); - } -} -class DevalueError extends Error { - /** - * @param {string} message - * @param {string[]} keys - */ - constructor(message, keys) { - super(message); - this.name = "DevalueError"; - this.path = keys.join(""); - } -} -function is_primitive(thing) { - return Object(thing) !== thing; -} -const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames( - Object.prototype -).sort().join("\0"); -function is_plain_object(thing) { - const proto = Object.getPrototypeOf(thing); - return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names; -} -function get_type(thing) { - return Object.prototype.toString.call(thing).slice(8, -1); -} -function get_escaped_char(char) { - switch (char) { - case '"': - return '\\"'; - case "<": - return "\\u003C"; - case "\\": - return "\\\\"; - case "\n": - return "\\n"; - case "\r": - return "\\r"; - case " ": - return "\\t"; - case "\b": - return "\\b"; - case "\f": - return "\\f"; - case "\u2028": - return "\\u2028"; - case "\u2029": - return "\\u2029"; - default: - return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; - } -} -function stringify_string(str) { - let result = ""; - let last_pos = 0; - const len = str.length; - for (let i = 0; i < len; i += 1) { - const char = str[i]; - const replacement = get_escaped_char(char); - if (replacement) { - result += str.slice(last_pos, i) + replacement; - last_pos = i + 1; - } - } - return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`; -} -const UNDEFINED = -1; -const HOLE = -2; -const NAN = -3; -const POSITIVE_INFINITY = -4; -const NEGATIVE_INFINITY = -5; -const NEGATIVE_ZERO = -6; -function parse(serialized, revivers) { - return unflatten(JSON.parse(serialized), revivers); -} -function unflatten(parsed, revivers) { - if (typeof parsed === "number") - return hydrate(parsed, true); - if (!Array.isArray(parsed) || parsed.length === 0) { - throw new Error("Invalid input"); - } - const values = ( - /** @type {any[]} */ - parsed - ); - const hydrated = Array(values.length); - function hydrate(index2, standalone = false) { - if (index2 === UNDEFINED) - return void 0; - if (index2 === NAN) - return NaN; - if (index2 === POSITIVE_INFINITY) - return Infinity; - if (index2 === NEGATIVE_INFINITY) - return -Infinity; - if (index2 === NEGATIVE_ZERO) - return -0; - if (standalone) - throw new Error(`Invalid input`); - if (index2 in hydrated) - return hydrated[index2]; - const value = values[index2]; - if (!value || typeof value !== "object") { - hydrated[index2] = value; - } else if (Array.isArray(value)) { - if (typeof value[0] === "string") { - const type2 = value[0]; - const reviver = revivers == null ? void 0 : revivers[type2]; - if (reviver) { - return hydrated[index2] = reviver(hydrate(value[1])); - } - switch (type2) { - case "Date": - hydrated[index2] = new Date(value[1]); - break; - case "Set": - const set2 = /* @__PURE__ */ new Set(); - hydrated[index2] = set2; - for (let i = 1; i < value.length; i += 1) { - set2.add(hydrate(value[i])); - } - break; - case "Map": - const map = /* @__PURE__ */ new Map(); - hydrated[index2] = map; - for (let i = 1; i < value.length; i += 2) { - map.set(hydrate(value[i]), hydrate(value[i + 1])); - } - break; - case "RegExp": - hydrated[index2] = new RegExp(value[1], value[2]); - break; - case "Object": - hydrated[index2] = Object(value[1]); - break; - case "BigInt": - hydrated[index2] = BigInt(value[1]); - break; - case "null": - const obj = /* @__PURE__ */ Object.create(null); - hydrated[index2] = obj; - for (let i = 1; i < value.length; i += 2) { - obj[value[i]] = hydrate(value[i + 1]); - } - break; - default: - throw new Error(`Unknown type ${type2}`); - } - } else { - const array = new Array(value.length); - hydrated[index2] = array; - for (let i = 0; i < value.length; i += 1) { - const n = value[i]; - if (n === HOLE) - continue; - array[i] = hydrate(n); - } - } - } else { - const object = {}; - hydrated[index2] = object; - for (const key in value) { - const n = value[key]; - object[key] = hydrate(n); - } - } - return hydrated[index2]; - } - return hydrate(0); -} -function stringify(value, reducers) { - const stringified = []; - const indexes = /* @__PURE__ */ new Map(); - const custom = []; - for (const key in reducers) { - custom.push({ key, fn: reducers[key] }); - } - const keys = []; - let p = 0; - function flatten(thing) { - if (typeof thing === "function") { - throw new DevalueError(`Cannot stringify a function`, keys); - } - if (indexes.has(thing)) - return indexes.get(thing); - if (thing === void 0) - return UNDEFINED; - if (Number.isNaN(thing)) - return NAN; - if (thing === Infinity) - return POSITIVE_INFINITY; - if (thing === -Infinity) - return NEGATIVE_INFINITY; - if (thing === 0 && 1 / thing < 0) - return NEGATIVE_ZERO; - const index3 = p++; - indexes.set(thing, index3); - for (const { key, fn } of custom) { - const value2 = fn(thing); - if (value2) { - stringified[index3] = `["${key}",${flatten(value2)}]`; - return index3; - } - } - let str = ""; - if (is_primitive(thing)) { - str = stringify_primitive(thing); - } else { - const type2 = get_type(thing); - switch (type2) { - case "Number": - case "String": - case "Boolean": - str = `["Object",${stringify_primitive(thing)}]`; - break; - case "BigInt": - str = `["BigInt",${thing}]`; - break; - case "Date": - str = `["Date","${thing.toISOString()}"]`; - break; - case "RegExp": - const { source, flags } = thing; - str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`; - break; - case "Array": - str = "["; - for (let i = 0; i < thing.length; i += 1) { - if (i > 0) - str += ","; - if (i in thing) { - keys.push(`[${i}]`); - str += flatten(thing[i]); - keys.pop(); - } else { - str += HOLE; - } - } - str += "]"; - break; - case "Set": - str = '["Set"'; - for (const value2 of thing) { - str += `,${flatten(value2)}`; - } - str += "]"; - break; - case "Map": - str = '["Map"'; - for (const [key, value2] of thing) { - keys.push( - `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})` - ); - str += `,${flatten(key)},${flatten(value2)}`; - } - str += "]"; - break; - default: - if (!is_plain_object(thing)) { - throw new DevalueError( - `Cannot stringify arbitrary non-POJOs`, - keys - ); - } - if (Object.getOwnPropertySymbols(thing).length > 0) { - throw new DevalueError( - `Cannot stringify POJOs with symbolic keys`, - keys - ); - } - if (Object.getPrototypeOf(thing) === null) { - str = '["null"'; - for (const key in thing) { - keys.push(`.${key}`); - str += `,${stringify_string(key)},${flatten(thing[key])}`; - keys.pop(); - } - str += "]"; - } else { - str = "{"; - let started = false; - for (const key in thing) { - if (started) - str += ","; - started = true; - keys.push(`.${key}`); - str += `${stringify_string(key)}:${flatten(thing[key])}`; - keys.pop(); - } - str += "}"; - } - } - } - stringified[index3] = str; - return index3; - } - const index2 = flatten(value); - if (index2 < 0) - return `${index2}`; - return `[${stringified.join(",")}]`; -} -function stringify_primitive(thing) { - const type2 = typeof thing; - if (type2 === "string") - return stringify_string(thing); - if (thing instanceof String) - return stringify_string(thing.toString()); - if (thing === void 0) - return UNDEFINED.toString(); - if (thing === 0 && 1 / thing < 0) - return NEGATIVE_ZERO.toString(); - if (type2 === "bigint") - return `["BigInt","${thing}"]`; - return String(thing); -} -function m(t, a, { initialize: d, type: r }) { - let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0; - watch(() => a[t], (i) => { - l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false; - }, { deep: true }), n.onmessage = (i) => { - if (i === void 0) { - n.postMessage({ timestamp: e, state: parse(stringify(a[t])) }); - return; - } - i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state); - }; - let u = () => n.postMessage(void 0), p = () => n.close(); - return d && u(), { sync: u, unshare: p }; -} -var h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => { - var _a, _b; - let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? []; - !n || Object.keys(r.$state).forEach((e) => { - var _a2; - l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d }); - }); -}; -const pinia = createPinia(); -pinia.use( - g({ - enable: true, - initialize: true - }) -); -const index = { - install: (app, options) => { - const appRouter = (options == null ? void 0 : options.router) || router; - const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta); - app.use(appRouter); - app.use(pinia); - app.provide("$registry", registry); - if (options == null ? void 0 : options.components) { - for (const [tag, component] of Object.entries(options.components)) { - app.component(tag, component); - } - } - } -}; -export { - DoctypeMeta, - Registry, - index as Stonecrop, - useStonecrop -}; diff --git a/stonecrop/dist/stonecrop.umd.cjs b/stonecrop/dist/stonecrop.umd.cjs deleted file mode 100644 index 442496f7..00000000 --- a/stonecrop/dist/stonecrop.umd.cjs +++ /dev/null @@ -1,5322 +0,0 @@ -(function(global2, factory) { - typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["@stonecrop/stonecrop"] = {}, global2.Vue)); -})(this, function(exports2, vue) { - "use strict"; - function NotImplementedError(message) { - this.message = message || ""; - } - NotImplementedError.prototype = Object.create(Error.prototype, { - constructor: { value: NotImplementedError }, - name: { value: "NotImplemented" }, - stack: { - get: function() { - return new Error().stack; - } - } - }); - class Stonecrop { - /** - * @constructor - * @param {Registry} registry - The immutable registry - * @param {ReturnType} store - The mutable Pinia store - * @param {Schema} [schema] - (optional) The Stonecrop schema - * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow - * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions - * @returns {Stonecrop} The Stonecrop instance - * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one. - * @example - * const registry = new Registry() - * const store = useDataStore() - * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions) - */ - constructor(registry, store, schema, workflow, actions) { - this.name = "Stonecrop"; - if (Stonecrop._root) { - return Stonecrop._root; - } - Stonecrop._root = this; - this.registry = registry; - this.store = store; - this.schema = schema; - this.workflow = workflow; - this.actions = actions; - } - /** - * @method setup - * @param {DoctypeMeta} doctype - The doctype to setup - * @returns {void} - * @description Sets up the Stonecrop instance with the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.setup(doctype) - */ - setup(doctype) { - this.getMeta(doctype); - this.getWorkflow(doctype); - this.getActions(doctype); - } - /** - * @method getMeta - * @param {DoctypeMeta} doctype - The doctype to get meta for - * @returns {DoctypeMeta} - * @see {@link DoctypeMeta} - * @throws NotImplementedError - * @description Gets the meta for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * const meta = stonecrop.getMeta(doctype) - */ - getMeta(doctype) { - return this.registry.getMeta ? this.registry.getMeta(doctype.doctype) : new NotImplementedError(doctype.doctype); - } - /** - * @method getWorkflow - * @param {DoctypeMeta} doctype - The doctype to get workflow for - * @returns {void} - * @description Gets the workflow for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.getWorkflow(doctype) - */ - getWorkflow(doctype) { - const doctypeRegistry = this.registry.registry[doctype.slug]; - this.workflow = doctypeRegistry.workflow; - } - /** - * @method getActions - * @param {DoctypeMeta} doctype - The doctype to get actions for - * @returns {void} - * @description Gets the actions for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.getActions(doctype) - */ - getActions(doctype) { - const doctypeRegistry = this.registry.registry[doctype.slug]; - this.actions = doctypeRegistry.actions; - } - /** - * @method getRecords - * @param {DoctypeMeta} doctype - The doctype to get records for - * @param {RequestInit} [filters] - The filters to apply to the records - * @returns {Promise} - * @description Gets the records for the given doctype - * @example - * const doctype = await registry.getMeta('Task') - * await stonecrop.getRecords(doctype) - * @example - * const doctype = await registry.getMeta('Task') - * const filters = JSON.stringify({ status: 'Open' }) - * await stonecrop.getRecords(doctype, { body: filters }) - */ - async getRecords(doctype, filters) { - this.store.$patch({ records: [] }); - const records = await fetch(`/${doctype.slug}`, filters); - const data = await records.json(); - this.store.$patch({ records: data }); - } - /** - * @method getRecord - * @param {DoctypeMeta} doctype - The doctype to get record for - * @param {string} id - The id of the record to get - * @returns {Promise} - * @description Gets the record for the given doctype and id - * @example - * const doctype = await registry.getMeta('Task') - * await stonecrop.getRecord(doctype, 'TASK-00001') - */ - async getRecord(doctype, id) { - this.store.$patch({ record: {} }); - const record = await fetch(`/${doctype.slug}/${id}`); - const data = await record.json(); - this.store.$patch({ record: data }); - } - /** - * @method runAction - * @param {DoctypeMeta} doctype - The doctype to run action for - * @param {string} action - The action to run - * @param {string[]} [id] - The id(s) of the record(s) to run action on - * @returns {void} - * @description Runs the action for the given doctype and id - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'CREATE') - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001']) - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001']) - * @example - * const doctype = await registry.getMeta('Task') - * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002']) - */ - runAction(doctype, action, id) { - const doctypeRegistry = this.registry.registry[doctype.slug]; - const actions = doctypeRegistry.actions.get(action); - const { initialState } = this.workflow; - this.workflow.transition(initialState, { type: action }); - if (actions.length > 0) { - actions.forEach((action2) => { - const actionFn = new Function(action2); - actionFn(id); - }); - } - } - } - var isVue2 = false; - function set(target, key, val) { - if (Array.isArray(target)) { - target.length = Math.max(target.length, key); - target.splice(key, 1, val); - return val; - } - target[key] = val; - return val; - } - function del(target, key) { - if (Array.isArray(target)) { - target.splice(key, 1); - return; - } - delete target[key]; - } - function getDevtoolsGlobalHook() { - return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; - } - function getTarget() { - return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; - } - const isProxyAvailable = typeof Proxy === "function"; - const HOOK_SETUP = "devtools-plugin:setup"; - const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; - let supported; - let perf; - function isPerformanceSupported() { - var _a; - if (supported !== void 0) { - return supported; - } - if (typeof window !== "undefined" && window.performance) { - supported = true; - perf = window.performance; - } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { - supported = true; - perf = global.perf_hooks.performance; - } else { - supported = false; - } - return supported; - } - function now$1() { - return isPerformanceSupported() ? perf.now() : Date.now(); - } - class ApiProxy { - constructor(plugin, hook) { - this.target = null; - this.targetQueue = []; - this.onQueue = []; - this.plugin = plugin; - this.hook = hook; - const defaultSettings = {}; - if (plugin.settings) { - for (const id in plugin.settings) { - const item = plugin.settings[id]; - defaultSettings[id] = item.defaultValue; - } - } - const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; - let currentSettings = Object.assign({}, defaultSettings); - try { - const raw = localStorage.getItem(localSettingsSaveId); - const data = JSON.parse(raw); - Object.assign(currentSettings, data); - } catch (e) { - } - this.fallbacks = { - getSettings() { - return currentSettings; - }, - setSettings(value) { - try { - localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); - } catch (e) { - } - currentSettings = value; - }, - now() { - return now$1(); - } - }; - if (hook) { - hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { - if (pluginId === this.plugin.id) { - this.fallbacks.setSettings(value); - } - }); - } - this.proxiedOn = new Proxy({}, { - get: (_target, prop) => { - if (this.target) { - return this.target.on[prop]; - } else { - return (...args) => { - this.onQueue.push({ - method: prop, - args - }); - }; - } - } - }); - this.proxiedTarget = new Proxy({}, { - get: (_target, prop) => { - if (this.target) { - return this.target[prop]; - } else if (prop === "on") { - return this.proxiedOn; - } else if (Object.keys(this.fallbacks).includes(prop)) { - return (...args) => { - this.targetQueue.push({ - method: prop, - args, - resolve: () => { - } - }); - return this.fallbacks[prop](...args); - }; - } else { - return (...args) => { - return new Promise((resolve) => { - this.targetQueue.push({ - method: prop, - args, - resolve - }); - }); - }; - } - } - }); - } - async setRealTarget(target) { - this.target = target; - for (const item of this.onQueue) { - this.target.on[item.method](...item.args); - } - for (const item of this.targetQueue) { - item.resolve(await this.target[item.method](...item.args)); - } - } - } - function setupDevtoolsPlugin(pluginDescriptor, setupFn) { - const descriptor = pluginDescriptor; - const target = getTarget(); - const hook = getDevtoolsGlobalHook(); - const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy; - if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { - hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); - } else { - const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null; - const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; - list.push({ - pluginDescriptor: descriptor, - setupFn, - proxy - }); - if (proxy) - setupFn(proxy.proxiedTarget); - } - } - /*! - * pinia v2.1.7 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */ - let activePinia; - const setActivePinia = (pinia2) => activePinia = pinia2; - const piniaSymbol = process.env.NODE_ENV !== "production" ? Symbol("pinia") : ( - /* istanbul ignore next */ - Symbol() - ); - function isPlainObject(o) { - return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function"; - } - var MutationType; - (function(MutationType2) { - MutationType2["direct"] = "direct"; - MutationType2["patchObject"] = "patch object"; - MutationType2["patchFunction"] = "patch function"; - })(MutationType || (MutationType = {})); - const IS_CLIENT = typeof window !== "undefined"; - const USE_DEVTOOLS = (process.env.NODE_ENV !== "production" || false) && !(process.env.NODE_ENV === "test") && IS_CLIENT; - const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })(); - function bom(blob, { autoBom = false } = {}) { - if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { - return new Blob([String.fromCharCode(65279), blob], { type: blob.type }); - } - return blob; - } - function download(url, name, opts) { - const xhr = new XMLHttpRequest(); - xhr.open("GET", url); - xhr.responseType = "blob"; - xhr.onload = function() { - saveAs(xhr.response, name, opts); - }; - xhr.onerror = function() { - console.error("could not download file"); - }; - xhr.send(); - } - function corsEnabled(url) { - const xhr = new XMLHttpRequest(); - xhr.open("HEAD", url, false); - try { - xhr.send(); - } catch (e) { - } - return xhr.status >= 200 && xhr.status <= 299; - } - function click(node) { - try { - node.dispatchEvent(new MouseEvent("click")); - } catch (e) { - const evt = document.createEvent("MouseEvents"); - evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); - node.dispatchEvent(evt); - } - } - const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" }; - const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))(); - const saveAs = !IS_CLIENT ? () => { - } : ( - // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program - typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : ( - // Use msSaveOrOpenBlob as a second approach - "msSaveOrOpenBlob" in _navigator ? msSaveAs : ( - // Fallback to using FileReader and a popup - fileSaverSaveAs - ) - ) - ); - function downloadSaveAs(blob, name = "download", opts) { - const a = document.createElement("a"); - a.download = name; - a.rel = "noopener"; - if (typeof blob === "string") { - a.href = blob; - if (a.origin !== location.origin) { - if (corsEnabled(a.href)) { - download(blob, name, opts); - } else { - a.target = "_blank"; - click(a); - } - } else { - click(a); - } - } else { - a.href = URL.createObjectURL(blob); - setTimeout(function() { - URL.revokeObjectURL(a.href); - }, 4e4); - setTimeout(function() { - click(a); - }, 0); - } - } - function msSaveAs(blob, name = "download", opts) { - if (typeof blob === "string") { - if (corsEnabled(blob)) { - download(blob, name, opts); - } else { - const a = document.createElement("a"); - a.href = blob; - a.target = "_blank"; - setTimeout(function() { - click(a); - }); - } - } else { - navigator.msSaveOrOpenBlob(bom(blob, opts), name); - } - } - function fileSaverSaveAs(blob, name, opts, popup) { - popup = popup || open("", "_blank"); - if (popup) { - popup.document.title = popup.document.body.innerText = "downloading..."; - } - if (typeof blob === "string") - return download(blob, name, opts); - const force = blob.type === "application/octet-stream"; - const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global; - const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); - if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") { - const reader = new FileReader(); - reader.onloadend = function() { - let url = reader.result; - if (typeof url !== "string") { - popup = null; - throw new Error("Wrong reader.result type"); - } - url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;"); - if (popup) { - popup.location.href = url; - } else { - location.assign(url); - } - popup = null; - }; - reader.readAsDataURL(blob); - } else { - const url = URL.createObjectURL(blob); - if (popup) - popup.location.assign(url); - else - location.href = url; - popup = null; - setTimeout(function() { - URL.revokeObjectURL(url); - }, 4e4); - } - } - function toastMessage(message, type2) { - const piniaMessage = "🍍 " + message; - if (typeof __VUE_DEVTOOLS_TOAST__ === "function") { - __VUE_DEVTOOLS_TOAST__(piniaMessage, type2); - } else if (type2 === "error") { - console.error(piniaMessage); - } else if (type2 === "warn") { - console.warn(piniaMessage); - } else { - console.log(piniaMessage); - } - } - function isPinia(o) { - return "_a" in o && "install" in o; - } - function checkClipboardAccess() { - if (!("clipboard" in navigator)) { - toastMessage(`Your browser doesn't support the Clipboard API`, "error"); - return true; - } - } - function checkNotFocusedError(error) { - if (error instanceof Error && error.message.toLowerCase().includes("document is not focused")) { - toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"); - return true; - } - return false; - } - async function actionGlobalCopyState(pinia2) { - if (checkClipboardAccess()) - return; - try { - await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value)); - toastMessage("Global state copied to clipboard."); - } catch (error) { - if (checkNotFocusedError(error)) - return; - toastMessage(`Failed to serialize the state. Check the console for more details.`, "error"); - console.error(error); - } - } - async function actionGlobalPasteState(pinia2) { - if (checkClipboardAccess()) - return; - try { - loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText())); - toastMessage("Global state pasted from clipboard."); - } catch (error) { - if (checkNotFocusedError(error)) - return; - toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error"); - console.error(error); - } - } - async function actionGlobalSaveState(pinia2) { - try { - saveAs(new Blob([JSON.stringify(pinia2.state.value)], { - type: "text/plain;charset=utf-8" - }), "pinia-state.json"); - } catch (error) { - toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); - console.error(error); - } - } - let fileInput; - function getFileOpener() { - if (!fileInput) { - fileInput = document.createElement("input"); - fileInput.type = "file"; - fileInput.accept = ".json"; - } - function openFile() { - return new Promise((resolve, reject) => { - fileInput.onchange = async () => { - const files = fileInput.files; - if (!files) - return resolve(null); - const file = files.item(0); - if (!file) - return resolve(null); - return resolve({ text: await file.text(), file }); - }; - fileInput.oncancel = () => resolve(null); - fileInput.onerror = reject; - fileInput.click(); - }); - } - return openFile; - } - async function actionGlobalOpenStateFile(pinia2) { - try { - const open2 = getFileOpener(); - const result = await open2(); - if (!result) - return; - const { text, file } = result; - loadStoresState(pinia2, JSON.parse(text)); - toastMessage(`Global state imported from "${file.name}".`); - } catch (error) { - toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error"); - console.error(error); - } - } - function loadStoresState(pinia2, state) { - for (const key in state) { - const storeState = pinia2.state.value[key]; - if (storeState) { - Object.assign(storeState, state[key]); - } else { - pinia2.state.value[key] = state[key]; - } - } - } - function formatDisplay$1(display) { - return { - _custom: { - display - } - }; - } - const PINIA_ROOT_LABEL = "🍍 Pinia (root)"; - const PINIA_ROOT_ID = "_root"; - function formatStoreForInspectorTree(store) { - return isPinia(store) ? { - id: PINIA_ROOT_ID, - label: PINIA_ROOT_LABEL - } : { - id: store.$id, - label: store.$id - }; - } - function formatStoreForInspectorState(store) { - if (isPinia(store)) { - const storeNames = Array.from(store._s.keys()); - const storeMap = store._s; - const state2 = { - state: storeNames.map((storeId) => ({ - editable: true, - key: storeId, - value: store.state.value[storeId] - })), - getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => { - const store2 = storeMap.get(id); - return { - editable: false, - key: id, - value: store2._getters.reduce((getters, key) => { - getters[key] = store2[key]; - return getters; - }, {}) - }; - }) - }; - return state2; - } - const state = { - state: Object.keys(store.$state).map((key) => ({ - editable: true, - key, - value: store.$state[key] - })) - }; - if (store._getters && store._getters.length) { - state.getters = store._getters.map((getterName) => ({ - editable: false, - key: getterName, - value: store[getterName] - })); - } - if (store._customProperties.size) { - state.customProperties = Array.from(store._customProperties).map((key) => ({ - editable: true, - key, - value: store[key] - })); - } - return state; - } - function formatEventData(events) { - if (!events) - return {}; - if (Array.isArray(events)) { - return events.reduce((data, event) => { - data.keys.push(event.key); - data.operations.push(event.type); - data.oldValue[event.key] = event.oldValue; - data.newValue[event.key] = event.newValue; - return data; - }, { - oldValue: {}, - keys: [], - operations: [], - newValue: {} - }); - } else { - return { - operation: formatDisplay$1(events.type), - key: formatDisplay$1(events.key), - oldValue: events.oldValue, - newValue: events.newValue - }; - } - } - function formatMutationType(type2) { - switch (type2) { - case MutationType.direct: - return "mutation"; - case MutationType.patchFunction: - return "$patch"; - case MutationType.patchObject: - return "$patch"; - default: - return "unknown"; - } - } - let isTimelineActive = true; - const componentStateTypes = []; - const MUTATIONS_LAYER_ID = "pinia:mutations"; - const INSPECTOR_ID = "pinia"; - const { assign: assign$1 } = Object; - const getStoreType = (id) => "🍍 " + id; - function registerPiniaDevtools(app, pinia2) { - setupDevtoolsPlugin({ - id: "dev.esm.pinia", - label: "Pinia 🍍", - logo: "https://pinia.vuejs.org/logo.svg", - packageName: "pinia", - homepage: "https://pinia.vuejs.org", - componentStateTypes, - app - }, (api) => { - if (typeof api.now !== "function") { - toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); - } - api.addTimelineLayer({ - id: MUTATIONS_LAYER_ID, - label: `Pinia 🍍`, - color: 15064968 - }); - api.addInspector({ - id: INSPECTOR_ID, - label: "Pinia 🍍", - icon: "storage", - treeFilterPlaceholder: "Search stores", - actions: [ - { - icon: "content_copy", - action: () => { - actionGlobalCopyState(pinia2); - }, - tooltip: "Serialize and copy the state" - }, - { - icon: "content_paste", - action: async () => { - await actionGlobalPasteState(pinia2); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - }, - tooltip: "Replace the state with the content of your clipboard" - }, - { - icon: "save", - action: () => { - actionGlobalSaveState(pinia2); - }, - tooltip: "Save the state as a JSON file" - }, - { - icon: "folder_open", - action: async () => { - await actionGlobalOpenStateFile(pinia2); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - }, - tooltip: "Import the state from a JSON file" - } - ], - nodeActions: [ - { - icon: "restore", - tooltip: 'Reset the state (with "$reset")', - action: (nodeId) => { - const store = pinia2._s.get(nodeId); - if (!store) { - toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn"); - } else if (typeof store.$reset !== "function") { - toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn"); - } else { - store.$reset(); - toastMessage(`Store "${nodeId}" reset.`); - } - } - } - ] - }); - api.on.inspectComponent((payload, ctx) => { - const proxy = payload.componentInstance && payload.componentInstance.proxy; - if (proxy && proxy._pStores) { - const piniaStores = payload.componentInstance.proxy._pStores; - Object.values(piniaStores).forEach((store) => { - payload.instanceData.state.push({ - type: getStoreType(store.$id), - key: "state", - editable: true, - value: store._isOptionsAPI ? { - _custom: { - value: vue.toRaw(store.$state), - actions: [ - { - icon: "restore", - tooltip: "Reset the state of this store", - action: () => store.$reset() - } - ] - } - } : ( - // NOTE: workaround to unwrap transferred refs - Object.keys(store.$state).reduce((state, key) => { - state[key] = store.$state[key]; - return state; - }, {}) - ) - }); - if (store._getters && store._getters.length) { - payload.instanceData.state.push({ - type: getStoreType(store.$id), - key: "getters", - editable: false, - value: store._getters.reduce((getters, key) => { - try { - getters[key] = store[key]; - } catch (error) { - getters[key] = error; - } - return getters; - }, {}) - }); - } - }); - } - }); - api.on.getInspectorTree((payload) => { - if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { - let stores = [pinia2]; - stores = stores.concat(Array.from(pinia2._s.values())); - payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree); - } - }); - api.on.getInspectorState((payload) => { - if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { - const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId); - if (!inspectedStore) { - return; - } - if (inspectedStore) { - payload.state = formatStoreForInspectorState(inspectedStore); - } - } - }); - api.on.editInspectorState((payload, ctx) => { - if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { - const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId); - if (!inspectedStore) { - return toastMessage(`store "${payload.nodeId}" not found`, "error"); - } - const { path } = payload; - if (!isPinia(inspectedStore)) { - if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) { - path.unshift("$state"); - } - } else { - path.unshift("state"); - } - isTimelineActive = false; - payload.set(inspectedStore, path, payload.state.value); - isTimelineActive = true; - } - }); - api.on.editComponentState((payload) => { - if (payload.type.startsWith("🍍")) { - const storeId = payload.type.replace(/^🍍\s*/, ""); - const store = pinia2._s.get(storeId); - if (!store) { - return toastMessage(`store "${storeId}" not found`, "error"); - } - const { path } = payload; - if (path[0] !== "state") { - return toastMessage(`Invalid path for store "${storeId}": -${path} -Only state can be modified.`); - } - path[0] = "$state"; - isTimelineActive = false; - payload.set(store, path, payload.state.value); - isTimelineActive = true; - } - }); - }); - } - function addStoreToDevtools(app, store) { - if (!componentStateTypes.includes(getStoreType(store.$id))) { - componentStateTypes.push(getStoreType(store.$id)); - } - setupDevtoolsPlugin({ - id: "dev.esm.pinia", - label: "Pinia 🍍", - logo: "https://pinia.vuejs.org/logo.svg", - packageName: "pinia", - homepage: "https://pinia.vuejs.org", - componentStateTypes, - app, - settings: { - logStoreChanges: { - label: "Notify about new/deleted stores", - type: "boolean", - defaultValue: true - } - // useEmojis: { - // label: 'Use emojis in messages ⚡️', - // type: 'boolean', - // defaultValue: true, - // }, - } - }, (api) => { - const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now; - store.$onAction(({ after, onError, name, args }) => { - const groupId = runningActionId++; - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "🛫 " + name, - subtitle: "start", - data: { - store: formatDisplay$1(store.$id), - action: formatDisplay$1(name), - args - }, - groupId - } - }); - after((result) => { - activeAction = void 0; - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "🛬 " + name, - subtitle: "end", - data: { - store: formatDisplay$1(store.$id), - action: formatDisplay$1(name), - args, - result - }, - groupId - } - }); - }); - onError((error) => { - activeAction = void 0; - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - logType: "error", - title: "💥 " + name, - subtitle: "end", - data: { - store: formatDisplay$1(store.$id), - action: formatDisplay$1(name), - args, - error - }, - groupId - } - }); - }); - }, true); - store._customProperties.forEach((name) => { - vue.watch(() => vue.unref(store[name]), (newValue, oldValue) => { - api.notifyComponentUpdate(); - api.sendInspectorState(INSPECTOR_ID); - if (isTimelineActive) { - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "Change", - subtitle: name, - data: { - newValue, - oldValue - }, - groupId: activeAction - } - }); - } - }, { deep: true }); - }); - store.$subscribe(({ events, type: type2 }, state) => { - api.notifyComponentUpdate(); - api.sendInspectorState(INSPECTOR_ID); - if (!isTimelineActive) - return; - const eventData = { - time: now2(), - title: formatMutationType(type2), - data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)), - groupId: activeAction - }; - if (type2 === MutationType.patchFunction) { - eventData.subtitle = "⤵️"; - } else if (type2 === MutationType.patchObject) { - eventData.subtitle = "🧩"; - } else if (events && !Array.isArray(events)) { - eventData.subtitle = events.type; - } - if (events) { - eventData.data["rawEvent(s)"] = { - _custom: { - display: "DebuggerEvent", - type: "object", - tooltip: "raw DebuggerEvent[]", - value: events - } - }; - } - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: eventData - }); - }, { detached: true, flush: "sync" }); - const hotUpdate = store._hotUpdate; - store._hotUpdate = vue.markRaw((newStore) => { - hotUpdate(newStore); - api.addTimelineEvent({ - layerId: MUTATIONS_LAYER_ID, - event: { - time: now2(), - title: "🔥 " + store.$id, - subtitle: "HMR update", - data: { - store: formatDisplay$1(store.$id), - info: formatDisplay$1(`HMR update`) - } - } - }); - api.notifyComponentUpdate(); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - }); - const { $dispose } = store; - store.$dispose = () => { - $dispose(); - api.notifyComponentUpdate(); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`); - }; - api.notifyComponentUpdate(); - api.sendInspectorTree(INSPECTOR_ID); - api.sendInspectorState(INSPECTOR_ID); - api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`); - }); - } - let runningActionId = 0; - let activeAction; - function patchActionForGrouping(store, actionNames, wrapWithProxy) { - const actions = actionNames.reduce((storeActions, actionName) => { - storeActions[actionName] = vue.toRaw(store)[actionName]; - return storeActions; - }, {}); - for (const actionName in actions) { - store[actionName] = function() { - const _actionId = runningActionId; - const trackedStore = wrapWithProxy ? new Proxy(store, { - get(...args) { - activeAction = _actionId; - return Reflect.get(...args); - }, - set(...args) { - activeAction = _actionId; - return Reflect.set(...args); - } - }) : store; - activeAction = _actionId; - const retValue = actions[actionName].apply(trackedStore, arguments); - activeAction = void 0; - return retValue; - }; - } - } - function devtoolsPlugin({ app, store, options }) { - if (store.$id.startsWith("__hot:")) { - return; - } - store._isOptionsAPI = !!options.state; - patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI); - const originalHotUpdate = store._hotUpdate; - vue.toRaw(store)._hotUpdate = function(newStore) { - originalHotUpdate.apply(this, arguments); - patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI); - }; - addStoreToDevtools( - app, - // FIXME: is there a way to allow the assignment from Store to StoreGeneric? - store - ); - } - function createPinia() { - const scope = vue.effectScope(true); - const state = scope.run(() => vue.ref({})); - let _p = []; - let toBeInstalled = []; - const pinia2 = vue.markRaw({ - install(app) { - setActivePinia(pinia2); - { - pinia2._a = app; - app.provide(piniaSymbol, pinia2); - app.config.globalProperties.$pinia = pinia2; - if (USE_DEVTOOLS) { - registerPiniaDevtools(app, pinia2); - } - toBeInstalled.forEach((plugin) => _p.push(plugin)); - toBeInstalled = []; - } - }, - use(plugin) { - if (!this._a && !isVue2) { - toBeInstalled.push(plugin); - } else { - _p.push(plugin); - } - return this; - }, - _p, - // it's actually undefined here - // @ts-expect-error - _a: null, - _e: scope, - _s: /* @__PURE__ */ new Map(), - state - }); - if (USE_DEVTOOLS && typeof Proxy !== "undefined") { - pinia2.use(devtoolsPlugin); - } - return pinia2; - } - function patchObject(newState, oldState) { - for (const key in oldState) { - const subPatch = oldState[key]; - if (!(key in newState)) { - continue; - } - const targetValue = newState[key]; - if (isPlainObject(targetValue) && isPlainObject(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { - newState[key] = patchObject(targetValue, subPatch); - } else { - { - newState[key] = subPatch; - } - } - } - return newState; - } - const noop$1 = () => { - }; - function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) { - subscriptions.push(callback); - const removeSubscription = () => { - const idx = subscriptions.indexOf(callback); - if (idx > -1) { - subscriptions.splice(idx, 1); - onCleanup(); - } - }; - if (!detached && vue.getCurrentScope()) { - vue.onScopeDispose(removeSubscription); - } - return removeSubscription; - } - function triggerSubscriptions(subscriptions, ...args) { - subscriptions.slice().forEach((callback) => { - callback(...args); - }); - } - const fallbackRunWithContext = (fn) => fn(); - function mergeReactiveObjects(target, patchToApply) { - if (target instanceof Map && patchToApply instanceof Map) { - patchToApply.forEach((value, key) => target.set(key, value)); - } - if (target instanceof Set && patchToApply instanceof Set) { - patchToApply.forEach(target.add, target); - } - for (const key in patchToApply) { - if (!patchToApply.hasOwnProperty(key)) - continue; - const subPatch = patchToApply[key]; - const targetValue = target[key]; - if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { - target[key] = mergeReactiveObjects(targetValue, subPatch); - } else { - target[key] = subPatch; - } - } - return target; - } - const skipHydrateSymbol = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : ( - /* istanbul ignore next */ - Symbol() - ); - function shouldHydrate(obj) { - return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol); - } - const { assign: assign$2 } = Object; - function isComputed(o) { - return !!(vue.isRef(o) && o.effect); - } - function createOptionsStore(id, options, pinia2, hot) { - const { state, actions, getters } = options; - const initialState = pinia2.state.value[id]; - let store; - function setup() { - if (!initialState && (!(process.env.NODE_ENV !== "production") || !hot)) { - { - pinia2.state.value[id] = state ? state() : {}; - } - } - const localState = process.env.NODE_ENV !== "production" && hot ? ( - // use ref() to unwrap refs inside state TODO: check if this is still necessary - vue.toRefs(vue.ref(state ? state() : {}).value) - ) : vue.toRefs(pinia2.state.value[id]); - return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { - if (process.env.NODE_ENV !== "production" && name in localState) { - console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`); - } - computedGetters[name] = vue.markRaw(vue.computed(() => { - setActivePinia(pinia2); - const store2 = pinia2._s.get(id); - return getters[name].call(store2, store2); - })); - return computedGetters; - }, {})); - } - store = createSetupStore(id, setup, options, pinia2, hot, true); - return store; - } - function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) { - let scope; - const optionsForPlugin = assign$2({ actions: {} }, options); - if (process.env.NODE_ENV !== "production" && !pinia2._e.active) { - throw new Error("Pinia destroyed"); - } - const $subscribeOptions = { - deep: true - // flush: 'post', - }; - if (process.env.NODE_ENV !== "production" && !isVue2) { - $subscribeOptions.onTrigger = (event) => { - if (isListening) { - debuggerEvents = event; - } else if (isListening == false && !store._hotUpdating) { - if (Array.isArray(debuggerEvents)) { - debuggerEvents.push(event); - } else { - console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."); - } - } - }; - } - let isListening; - let isSyncListening; - let subscriptions = []; - let actionSubscriptions = []; - let debuggerEvents; - const initialState = pinia2.state.value[$id]; - if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== "production") || !hot)) { - { - pinia2.state.value[$id] = {}; - } - } - const hotState = vue.ref({}); - let activeListener; - function $patch(partialStateOrMutator) { - let subscriptionMutation; - isListening = isSyncListening = false; - if (process.env.NODE_ENV !== "production") { - debuggerEvents = []; - } - if (typeof partialStateOrMutator === "function") { - partialStateOrMutator(pinia2.state.value[$id]); - subscriptionMutation = { - type: MutationType.patchFunction, - storeId: $id, - events: debuggerEvents - }; - } else { - mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator); - subscriptionMutation = { - type: MutationType.patchObject, - payload: partialStateOrMutator, - storeId: $id, - events: debuggerEvents - }; - } - const myListenerId = activeListener = Symbol(); - vue.nextTick().then(() => { - if (activeListener === myListenerId) { - isListening = true; - } - }); - isSyncListening = true; - triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]); - } - const $reset = isOptionsStore ? function $reset2() { - const { state } = options; - const newState = state ? state() : {}; - this.$patch(($state) => { - assign$2($state, newState); - }); - } : ( - /* istanbul ignore next */ - process.env.NODE_ENV !== "production" ? () => { - throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`); - } : noop$1 - ); - function $dispose() { - scope.stop(); - subscriptions = []; - actionSubscriptions = []; - pinia2._s.delete($id); - } - function wrapAction(name, action) { - return function() { - setActivePinia(pinia2); - const args = Array.from(arguments); - const afterCallbackList = []; - const onErrorCallbackList = []; - function after(callback) { - afterCallbackList.push(callback); - } - function onError(callback) { - onErrorCallbackList.push(callback); - } - triggerSubscriptions(actionSubscriptions, { - args, - name, - store, - after, - onError - }); - let ret; - try { - ret = action.apply(this && this.$id === $id ? this : store, args); - } catch (error) { - triggerSubscriptions(onErrorCallbackList, error); - throw error; - } - if (ret instanceof Promise) { - return ret.then((value) => { - triggerSubscriptions(afterCallbackList, value); - return value; - }).catch((error) => { - triggerSubscriptions(onErrorCallbackList, error); - return Promise.reject(error); - }); - } - triggerSubscriptions(afterCallbackList, ret); - return ret; - }; - } - const _hmrPayload = /* @__PURE__ */ vue.markRaw({ - actions: {}, - getters: {}, - state: [], - hotState - }); - const partialStore = { - _p: pinia2, - // _s: scope, - $id, - $onAction: addSubscription.bind(null, actionSubscriptions), - $patch, - $reset, - $subscribe(callback, options2 = {}) { - const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); - const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => { - if (options2.flush === "sync" ? isSyncListening : isListening) { - callback({ - storeId: $id, - type: MutationType.direct, - events: debuggerEvents - }, state); - } - }, assign$2({}, $subscribeOptions, options2))); - return removeSubscription; - }, - $dispose - }; - const store = vue.reactive(process.env.NODE_ENV !== "production" || USE_DEVTOOLS ? assign$2( - { - _hmrPayload, - _customProperties: vue.markRaw(/* @__PURE__ */ new Set()) - // devtools custom properties - }, - partialStore - // must be added later - // setupStore - ) : partialStore); - pinia2._s.set($id, store); - const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext; - const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup))); - for (const key in setupStore) { - const prop = setupStore[key]; - if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) { - if (process.env.NODE_ENV !== "production" && hot) { - set(hotState.value, key, vue.toRef(setupStore, key)); - } else if (!isOptionsStore) { - if (initialState && shouldHydrate(prop)) { - if (vue.isRef(prop)) { - prop.value = initialState[key]; - } else { - mergeReactiveObjects(prop, initialState[key]); - } - } - { - pinia2.state.value[$id][key] = prop; - } - } - if (process.env.NODE_ENV !== "production") { - _hmrPayload.state.push(key); - } - } else if (typeof prop === "function") { - const actionValue = process.env.NODE_ENV !== "production" && hot ? prop : wrapAction(key, prop); - { - setupStore[key] = actionValue; - } - if (process.env.NODE_ENV !== "production") { - _hmrPayload.actions[key] = prop; - } - optionsForPlugin.actions[key] = prop; - } else if (process.env.NODE_ENV !== "production") { - if (isComputed(prop)) { - _hmrPayload.getters[key] = isOptionsStore ? ( - // @ts-expect-error - options.getters[key] - ) : prop; - if (IS_CLIENT) { - const getters = setupStore._getters || // @ts-expect-error: same - (setupStore._getters = vue.markRaw([])); - getters.push(key); - } - } - } - } - { - assign$2(store, setupStore); - assign$2(vue.toRaw(store), setupStore); - } - Object.defineProperty(store, "$state", { - get: () => process.env.NODE_ENV !== "production" && hot ? hotState.value : pinia2.state.value[$id], - set: (state) => { - if (process.env.NODE_ENV !== "production" && hot) { - throw new Error("cannot set hotState"); - } - $patch(($state) => { - assign$2($state, state); - }); - } - }); - if (process.env.NODE_ENV !== "production") { - store._hotUpdate = vue.markRaw((newStore) => { - store._hotUpdating = true; - newStore._hmrPayload.state.forEach((stateKey) => { - if (stateKey in store.$state) { - const newStateTarget = newStore.$state[stateKey]; - const oldStateSource = store.$state[stateKey]; - if (typeof newStateTarget === "object" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) { - patchObject(newStateTarget, oldStateSource); - } else { - newStore.$state[stateKey] = oldStateSource; - } - } - set(store, stateKey, vue.toRef(newStore.$state, stateKey)); - }); - Object.keys(store.$state).forEach((stateKey) => { - if (!(stateKey in newStore.$state)) { - del(store, stateKey); - } - }); - isListening = false; - isSyncListening = false; - pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState"); - isSyncListening = true; - vue.nextTick().then(() => { - isListening = true; - }); - for (const actionName in newStore._hmrPayload.actions) { - const action = newStore[actionName]; - set(store, actionName, wrapAction(actionName, action)); - } - for (const getterName in newStore._hmrPayload.getters) { - const getter = newStore._hmrPayload.getters[getterName]; - const getterValue = isOptionsStore ? ( - // special handling of options api - vue.computed(() => { - setActivePinia(pinia2); - return getter.call(store, store); - }) - ) : getter; - set(store, getterName, getterValue); - } - Object.keys(store._hmrPayload.getters).forEach((key) => { - if (!(key in newStore._hmrPayload.getters)) { - del(store, key); - } - }); - Object.keys(store._hmrPayload.actions).forEach((key) => { - if (!(key in newStore._hmrPayload.actions)) { - del(store, key); - } - }); - store._hmrPayload = newStore._hmrPayload; - store._getters = newStore._getters; - store._hotUpdating = false; - }); - } - if (USE_DEVTOOLS) { - const nonEnumerable = { - writable: true, - configurable: true, - // avoid warning on devtools trying to display this property - enumerable: false - }; - ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => { - Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable)); - }); - } - pinia2._p.forEach((extender) => { - if (USE_DEVTOOLS) { - const extensions = scope.run(() => extender({ - store, - app: pinia2._a, - pinia: pinia2, - options: optionsForPlugin - })); - Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key)); - assign$2(store, extensions); - } else { - assign$2(store, scope.run(() => extender({ - store, - app: pinia2._a, - pinia: pinia2, - options: optionsForPlugin - }))); - } - }); - if (process.env.NODE_ENV !== "production" && store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) { - console.warn(`[🍍]: The "state" must be a plain object. It cannot be - state: () => new MyClass() -Found in store "${store.$id}".`); - } - if (initialState && isOptionsStore && options.hydrate) { - options.hydrate(store.$state, initialState); - } - isListening = true; - isSyncListening = true; - return store; - } - function defineStore(idOrOptions, setup, setupOptions) { - let id; - let options; - const isSetupStore = typeof setup === "function"; - if (typeof idOrOptions === "string") { - id = idOrOptions; - options = isSetupStore ? setupOptions : setup; - } else { - options = idOrOptions; - id = idOrOptions.id; - if (process.env.NODE_ENV !== "production" && typeof id !== "string") { - throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`); - } - } - function useStore(pinia2, hot) { - const hasContext = vue.hasInjectionContext(); - pinia2 = // in test mode, ignore the argument provided as we can always retrieve a - // pinia instance with getActivePinia() - (process.env.NODE_ENV === "test" && activePinia && activePinia._testing ? null : pinia2) || (hasContext ? vue.inject(piniaSymbol, null) : null); - if (pinia2) - setActivePinia(pinia2); - if (process.env.NODE_ENV !== "production" && !activePinia) { - throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? -See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. -This will fail in production.`); - } - pinia2 = activePinia; - if (!pinia2._s.has(id)) { - if (isSetupStore) { - createSetupStore(id, setup, options, pinia2); - } else { - createOptionsStore(id, options, pinia2); - } - if (process.env.NODE_ENV !== "production") { - useStore._pinia = pinia2; - } - } - const store = pinia2._s.get(id); - if (process.env.NODE_ENV !== "production" && hot) { - const hotId = "__hot:" + id; - const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true); - hot._hotUpdate(newStore); - delete pinia2.state.value[hotId]; - pinia2._s.delete(hotId); - } - if (process.env.NODE_ENV !== "production" && IS_CLIENT) { - const currentInstance = vue.getCurrentInstance(); - if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement - !hot) { - const vm = currentInstance.proxy; - const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {}; - cache[id] = store; - } - } - return store; - } - useStore.$id = id; - return useStore; - } - const useDataStore = defineStore("data", () => { - const records = vue.ref([]); - const record = vue.ref({}); - return { records, record }; - }); - function useStonecrop(registry) { - if (!registry) { - registry = vue.inject("$registry"); - } - const store = useDataStore(); - const stonecrop = vue.ref(new Stonecrop(registry, store)); - const isReady = vue.ref(false); - vue.onBeforeMount(async () => { - var _a, _b; - const route = registry.router.currentRoute.value; - const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase(); - const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase(); - if (!doctypeSlug && !recordId) { - return; - } - const doctype = await registry.getMeta(doctypeSlug); - registry.addDoctype(doctype); - stonecrop.value.setup(doctype); - if (doctypeSlug) { - if (recordId) { - await stonecrop.value.getRecord(doctype, recordId); - } else { - await stonecrop.value.getRecords(doctype); - } - } - stonecrop.value.runAction(doctype, "LOAD", recordId ? [recordId] : void 0); - isReady.value = true; - }); - return { stonecrop, isReady }; - } - class DoctypeMeta { - constructor(doctype, schema, workflow, actions, component) { - this.doctype = doctype; - this.schema = schema; - this.workflow = workflow; - this.actions = actions; - this.component = component; - } - get slug() { - return this.doctype.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(); - } - get __typename() { - return this.doctype; - } - } - class Registry { - constructor(router2, getMeta) { - if (Registry._root) { - return Registry._root; - } - Registry._root = this; - this.name = "Registry"; - this.router = router2; - this.registry = {}; - this.getMeta = getMeta; - } - addDoctype(doctype) { - if (!(doctype.doctype in Object.keys(this.registry))) { - this.registry[doctype.slug] = doctype; - } - if (!this.router.hasRoute(doctype.doctype)) { - this.router.addRoute({ - path: `/${doctype.slug}`, - name: doctype.slug, - component: doctype.component - }); - } - } - } - /*! - * vue-router v4.2.5 - * (c) 2023 Eduardo San Martin Morote - * @license MIT - */ - const isBrowser = typeof window !== "undefined"; - function isESModule(obj) { - return obj.__esModule || obj[Symbol.toStringTag] === "Module"; - } - const assign = Object.assign; - function applyToParams(fn, params) { - const newParams = {}; - for (const key in params) { - const value = params[key]; - newParams[key] = isArray(value) ? value.map(fn) : fn(value); - } - return newParams; - } - const noop = () => { - }; - const isArray = Array.isArray; - function warn(msg) { - const args = Array.from(arguments).slice(1); - console.warn.apply(console, ["[Vue Router warn]: " + msg].concat(args)); - } - const TRAILING_SLASH_RE = /\/$/; - const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, ""); - function parseURL(parseQuery2, location2, currentLocation = "/") { - let path, query = {}, searchString = "", hash = ""; - const hashPos = location2.indexOf("#"); - let searchPos = location2.indexOf("?"); - if (hashPos < searchPos && hashPos >= 0) { - searchPos = -1; - } - if (searchPos > -1) { - path = location2.slice(0, searchPos); - searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length); - query = parseQuery2(searchString); - } - if (hashPos > -1) { - path = path || location2.slice(0, hashPos); - hash = location2.slice(hashPos, location2.length); - } - path = resolveRelativePath(path != null ? path : location2, currentLocation); - return { - fullPath: path + (searchString && "?") + searchString + hash, - path, - query, - hash - }; - } - function stringifyURL(stringifyQuery2, location2) { - const query = location2.query ? stringifyQuery2(location2.query) : ""; - return location2.path + (query && "?") + query + (location2.hash || ""); - } - function stripBase(pathname, base) { - if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) - return pathname; - return pathname.slice(base.length) || "/"; - } - function isSameRouteLocation(stringifyQuery2, a, b) { - const aLastIndex = a.matched.length - 1; - const bLastIndex = b.matched.length - 1; - return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash; - } - function isSameRouteRecord(a, b) { - return (a.aliasOf || a) === (b.aliasOf || b); - } - function isSameRouteLocationParams(a, b) { - if (Object.keys(a).length !== Object.keys(b).length) - return false; - for (const key in a) { - if (!isSameRouteLocationParamsValue(a[key], b[key])) - return false; - } - return true; - } - function isSameRouteLocationParamsValue(a, b) { - return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b; - } - function isEquivalentArray(a, b) { - return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b; - } - function resolveRelativePath(to, from) { - if (to.startsWith("/")) - return to; - if (process.env.NODE_ENV !== "production" && !from.startsWith("/")) { - warn(`Cannot resolve a relative location without an absolute path. Trying to resolve "${to}" from "${from}". It should look like "/${from}".`); - return to; - } - if (!to) - return from; - const fromSegments = from.split("/"); - const toSegments = to.split("/"); - const lastToSegment = toSegments[toSegments.length - 1]; - if (lastToSegment === ".." || lastToSegment === ".") { - toSegments.push(""); - } - let position = fromSegments.length - 1; - let toPosition; - let segment; - for (toPosition = 0; toPosition < toSegments.length; toPosition++) { - segment = toSegments[toPosition]; - if (segment === ".") - continue; - if (segment === "..") { - if (position > 1) - position--; - } else - break; - } - return fromSegments.slice(0, position).join("/") + "/" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join("/"); - } - var NavigationType; - (function(NavigationType2) { - NavigationType2["pop"] = "pop"; - NavigationType2["push"] = "push"; - })(NavigationType || (NavigationType = {})); - var NavigationDirection; - (function(NavigationDirection2) { - NavigationDirection2["back"] = "back"; - NavigationDirection2["forward"] = "forward"; - NavigationDirection2["unknown"] = ""; - })(NavigationDirection || (NavigationDirection = {})); - function normalizeBase(base) { - if (!base) { - if (isBrowser) { - const baseEl = document.querySelector("base"); - base = baseEl && baseEl.getAttribute("href") || "/"; - base = base.replace(/^\w+:\/\/[^\/]+/, ""); - } else { - base = "/"; - } - } - if (base[0] !== "/" && base[0] !== "#") - base = "/" + base; - return removeTrailingSlash(base); - } - const BEFORE_HASH_RE = /^[^#]+#/; - function createHref(base, location2) { - return base.replace(BEFORE_HASH_RE, "#") + location2; - } - function getElementPosition(el, offset) { - const docRect = document.documentElement.getBoundingClientRect(); - const elRect = el.getBoundingClientRect(); - return { - behavior: offset.behavior, - left: elRect.left - docRect.left - (offset.left || 0), - top: elRect.top - docRect.top - (offset.top || 0) - }; - } - const computeScrollPosition = () => ({ - left: window.pageXOffset, - top: window.pageYOffset - }); - function scrollToPosition(position) { - let scrollToOptions; - if ("el" in position) { - const positionEl = position.el; - const isIdSelector = typeof positionEl === "string" && positionEl.startsWith("#"); - if (process.env.NODE_ENV !== "production" && typeof position.el === "string") { - if (!isIdSelector || !document.getElementById(position.el.slice(1))) { - try { - const foundEl = document.querySelector(position.el); - if (isIdSelector && foundEl) { - warn(`The selector "${position.el}" should be passed as "el: document.querySelector('${position.el}')" because it starts with "#".`); - return; - } - } catch (err) { - warn(`The selector "${position.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`); - return; - } - } - } - const el = typeof positionEl === "string" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl; - if (!el) { - process.env.NODE_ENV !== "production" && warn(`Couldn't find element using selector "${position.el}" returned by scrollBehavior.`); - return; - } - scrollToOptions = getElementPosition(el, position); - } else { - scrollToOptions = position; - } - if ("scrollBehavior" in document.documentElement.style) - window.scrollTo(scrollToOptions); - else { - window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset); - } - } - function getScrollKey(path, delta) { - const position = history.state ? history.state.position - delta : -1; - return position + path; - } - const scrollPositions = /* @__PURE__ */ new Map(); - function saveScrollPosition(key, scrollPosition) { - scrollPositions.set(key, scrollPosition); - } - function getSavedScrollPosition(key) { - const scroll = scrollPositions.get(key); - scrollPositions.delete(key); - return scroll; - } - let createBaseLocation = () => location.protocol + "//" + location.host; - function createCurrentLocation(base, location2) { - const { pathname, search, hash } = location2; - const hashPos = base.indexOf("#"); - if (hashPos > -1) { - let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1; - let pathFromHash = hash.slice(slicePos); - if (pathFromHash[0] !== "/") - pathFromHash = "/" + pathFromHash; - return stripBase(pathFromHash, ""); - } - const path = stripBase(pathname, base); - return path + search + hash; - } - function useHistoryListeners(base, historyState, currentLocation, replace) { - let listeners = []; - let teardowns = []; - let pauseState = null; - const popStateHandler = ({ state }) => { - const to = createCurrentLocation(base, location); - const from = currentLocation.value; - const fromState = historyState.value; - let delta = 0; - if (state) { - currentLocation.value = to; - historyState.value = state; - if (pauseState && pauseState === from) { - pauseState = null; - return; - } - delta = fromState ? state.position - fromState.position : 0; - } else { - replace(to); - } - listeners.forEach((listener) => { - listener(currentLocation.value, from, { - delta, - type: NavigationType.pop, - direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown - }); - }); - }; - function pauseListeners() { - pauseState = currentLocation.value; - } - function listen(callback) { - listeners.push(callback); - const teardown = () => { - const index2 = listeners.indexOf(callback); - if (index2 > -1) - listeners.splice(index2, 1); - }; - teardowns.push(teardown); - return teardown; - } - function beforeUnloadListener() { - const { history: history2 } = window; - if (!history2.state) - return; - history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), ""); - } - function destroy() { - for (const teardown of teardowns) - teardown(); - teardowns = []; - window.removeEventListener("popstate", popStateHandler); - window.removeEventListener("beforeunload", beforeUnloadListener); - } - window.addEventListener("popstate", popStateHandler); - window.addEventListener("beforeunload", beforeUnloadListener, { - passive: true - }); - return { - pauseListeners, - listen, - destroy - }; - } - function buildState(back, current, forward, replaced = false, computeScroll = false) { - return { - back, - current, - forward, - replaced, - position: window.history.length, - scroll: computeScroll ? computeScrollPosition() : null - }; - } - function useHistoryStateNavigation(base) { - const { history: history2, location: location2 } = window; - const currentLocation = { - value: createCurrentLocation(base, location2) - }; - const historyState = { value: history2.state }; - if (!historyState.value) { - changeLocation(currentLocation.value, { - back: null, - current: currentLocation.value, - forward: null, - // the length is off by one, we need to decrease it - position: history2.length - 1, - replaced: true, - // don't add a scroll as the user may have an anchor, and we want - // scrollBehavior to be triggered without a saved position - scroll: null - }, true); - } - function changeLocation(to, state, replace2) { - const hashIndex = base.indexOf("#"); - const url = hashIndex > -1 ? (location2.host && document.querySelector("base") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to; - try { - history2[replace2 ? "replaceState" : "pushState"](state, "", url); - historyState.value = state; - } catch (err) { - if (process.env.NODE_ENV !== "production") { - warn("Error with push/replace State", err); - } else { - console.error(err); - } - location2[replace2 ? "replace" : "assign"](url); - } - } - function replace(to, data) { - const state = assign({}, history2.state, buildState( - historyState.value.back, - // keep back and forward entries but override current position - to, - historyState.value.forward, - true - ), data, { position: historyState.value.position }); - changeLocation(to, state, true); - currentLocation.value = to; - } - function push(to, data) { - const currentState = assign( - {}, - // use current history state to gracefully handle a wrong call to - // history.replaceState - // https://github.com/vuejs/router/issues/366 - historyState.value, - history2.state, - { - forward: to, - scroll: computeScrollPosition() - } - ); - if (process.env.NODE_ENV !== "production" && !history2.state) { - warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: - -history.replaceState(history.state, '', url) - -You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`); - } - changeLocation(currentState.current, currentState, true); - const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data); - changeLocation(to, state, false); - currentLocation.value = to; - } - return { - location: currentLocation, - state: historyState, - push, - replace - }; - } - function createWebHistory(base) { - base = normalizeBase(base); - const historyNavigation = useHistoryStateNavigation(base); - const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace); - function go(delta, triggerListeners = true) { - if (!triggerListeners) - historyListeners.pauseListeners(); - history.go(delta); - } - const routerHistory = assign({ - // it's overridden right after - location: "", - base, - go, - createHref: createHref.bind(null, base) - }, historyNavigation, historyListeners); - Object.defineProperty(routerHistory, "location", { - enumerable: true, - get: () => historyNavigation.location.value - }); - Object.defineProperty(routerHistory, "state", { - enumerable: true, - get: () => historyNavigation.state.value - }); - return routerHistory; - } - function isRouteLocation(route) { - return typeof route === "string" || route && typeof route === "object"; - } - function isRouteName(name) { - return typeof name === "string" || typeof name === "symbol"; - } - const START_LOCATION_NORMALIZED = { - path: "/", - name: void 0, - params: {}, - query: {}, - hash: "", - fullPath: "/", - matched: [], - meta: {}, - redirectedFrom: void 0 - }; - const NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : ""); - var NavigationFailureType; - (function(NavigationFailureType2) { - NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted"; - NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled"; - NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated"; - })(NavigationFailureType || (NavigationFailureType = {})); - const ErrorTypeMessages = { - [ - 1 - /* ErrorTypes.MATCHER_NOT_FOUND */ - ]({ location: location2, currentLocation }) { - return `No match for - ${JSON.stringify(location2)}${currentLocation ? "\nwhile being at\n" + JSON.stringify(currentLocation) : ""}`; - }, - [ - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - ]({ from, to }) { - return `Redirected from "${from.fullPath}" to "${stringifyRoute(to)}" via a navigation guard.`; - }, - [ - 4 - /* ErrorTypes.NAVIGATION_ABORTED */ - ]({ from, to }) { - return `Navigation aborted from "${from.fullPath}" to "${to.fullPath}" via a navigation guard.`; - }, - [ - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ]({ from, to }) { - return `Navigation cancelled from "${from.fullPath}" to "${to.fullPath}" with a new navigation.`; - }, - [ - 16 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - ]({ from, to }) { - return `Avoided redundant navigation to current location: "${from.fullPath}".`; - } - }; - function createRouterError(type2, params) { - if (process.env.NODE_ENV !== "production" || false) { - return assign(new Error(ErrorTypeMessages[type2](params)), { - type: type2, - [NavigationFailureSymbol]: true - }, params); - } else { - return assign(new Error(), { - type: type2, - [NavigationFailureSymbol]: true - }, params); - } - } - function isNavigationFailure(error, type2) { - return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2)); - } - const propertiesToLog = ["params", "query", "hash"]; - function stringifyRoute(to) { - if (typeof to === "string") - return to; - if ("path" in to) - return to.path; - const location2 = {}; - for (const key of propertiesToLog) { - if (key in to) - location2[key] = to[key]; - } - return JSON.stringify(location2, null, 2); - } - const BASE_PARAM_PATTERN = "[^/]+?"; - const BASE_PATH_PARSER_OPTIONS = { - sensitive: false, - strict: false, - start: true, - end: true - }; - const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g; - function tokensToParser(segments, extraOptions) { - const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions); - const score = []; - let pattern = options.start ? "^" : ""; - const keys = []; - for (const segment of segments) { - const segmentScores = segment.length ? [] : [ - 90 - /* PathScore.Root */ - ]; - if (options.strict && !segment.length) - pattern += "/"; - for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) { - const token = segment[tokenIndex]; - let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0); - if (token.type === 0) { - if (!tokenIndex) - pattern += "/"; - pattern += token.value.replace(REGEX_CHARS_RE, "\\$&"); - subSegmentScore += 40; - } else if (token.type === 1) { - const { value, repeatable, optional, regexp } = token; - keys.push({ - name: value, - repeatable, - optional - }); - const re2 = regexp ? regexp : BASE_PARAM_PATTERN; - if (re2 !== BASE_PARAM_PATTERN) { - subSegmentScore += 10; - try { - new RegExp(`(${re2})`); - } catch (err) { - throw new Error(`Invalid custom RegExp for param "${value}" (${re2}): ` + err.message); - } - } - let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`; - if (!tokenIndex) - subPattern = // avoid an optional / if there are more segments e.g. /:p?-static - // or /:p?-:p2 - optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern; - if (optional) - subPattern += "?"; - pattern += subPattern; - subSegmentScore += 20; - if (optional) - subSegmentScore += -8; - if (repeatable) - subSegmentScore += -20; - if (re2 === ".*") - subSegmentScore += -50; - } - segmentScores.push(subSegmentScore); - } - score.push(segmentScores); - } - if (options.strict && options.end) { - const i = score.length - 1; - score[i][score[i].length - 1] += 0.7000000000000001; - } - if (!options.strict) - pattern += "/?"; - if (options.end) - pattern += "$"; - else if (options.strict) - pattern += "(?:/|$)"; - const re = new RegExp(pattern, options.sensitive ? "" : "i"); - function parse2(path) { - const match = path.match(re); - const params = {}; - if (!match) - return null; - for (let i = 1; i < match.length; i++) { - const value = match[i] || ""; - const key = keys[i - 1]; - params[key.name] = value && key.repeatable ? value.split("/") : value; - } - return params; - } - function stringify2(params) { - let path = ""; - let avoidDuplicatedSlash = false; - for (const segment of segments) { - if (!avoidDuplicatedSlash || !path.endsWith("/")) - path += "/"; - avoidDuplicatedSlash = false; - for (const token of segment) { - if (token.type === 0) { - path += token.value; - } else if (token.type === 1) { - const { value, repeatable, optional } = token; - const param = value in params ? params[value] : ""; - if (isArray(param) && !repeatable) { - throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`); - } - const text = isArray(param) ? param.join("/") : param; - if (!text) { - if (optional) { - if (segment.length < 2) { - if (path.endsWith("/")) - path = path.slice(0, -1); - else - avoidDuplicatedSlash = true; - } - } else - throw new Error(`Missing required param "${value}"`); - } - path += text; - } - } - } - return path || "/"; - } - return { - re, - score, - keys, - parse: parse2, - stringify: stringify2 - }; - } - function compareScoreArray(a, b) { - let i = 0; - while (i < a.length && i < b.length) { - const diff = b[i] - a[i]; - if (diff) - return diff; - i++; - } - if (a.length < b.length) { - return a.length === 1 && a[0] === 40 + 40 ? -1 : 1; - } else if (a.length > b.length) { - return b.length === 1 && b[0] === 40 + 40 ? 1 : -1; - } - return 0; - } - function comparePathParserScore(a, b) { - let i = 0; - const aScore = a.score; - const bScore = b.score; - while (i < aScore.length && i < bScore.length) { - const comp = compareScoreArray(aScore[i], bScore[i]); - if (comp) - return comp; - i++; - } - if (Math.abs(bScore.length - aScore.length) === 1) { - if (isLastScoreNegative(aScore)) - return 1; - if (isLastScoreNegative(bScore)) - return -1; - } - return bScore.length - aScore.length; - } - function isLastScoreNegative(score) { - const last = score[score.length - 1]; - return score.length > 0 && last[last.length - 1] < 0; - } - const ROOT_TOKEN = { - type: 0, - value: "" - }; - const VALID_PARAM_RE = /[a-zA-Z0-9_]/; - function tokenizePath(path) { - if (!path) - return [[]]; - if (path === "/") - return [[ROOT_TOKEN]]; - if (!path.startsWith("/")) { - throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${path}" should be "/${path}".` : `Invalid path "${path}"`); - } - function crash(message) { - throw new Error(`ERR (${state})/"${buffer}": ${message}`); - } - let state = 0; - let previousState = state; - const tokens = []; - let segment; - function finalizeSegment() { - if (segment) - tokens.push(segment); - segment = []; - } - let i = 0; - let char; - let buffer = ""; - let customRe = ""; - function consumeBuffer() { - if (!buffer) - return; - if (state === 0) { - segment.push({ - type: 0, - value: buffer - }); - } else if (state === 1 || state === 2 || state === 3) { - if (segment.length > 1 && (char === "*" || char === "+")) - crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`); - segment.push({ - type: 1, - value: buffer, - regexp: customRe, - repeatable: char === "*" || char === "+", - optional: char === "*" || char === "?" - }); - } else { - crash("Invalid state to consume buffer"); - } - buffer = ""; - } - function addCharToBuffer() { - buffer += char; - } - while (i < path.length) { - char = path[i++]; - if (char === "\\" && state !== 2) { - previousState = state; - state = 4; - continue; - } - switch (state) { - case 0: - if (char === "/") { - if (buffer) { - consumeBuffer(); - } - finalizeSegment(); - } else if (char === ":") { - consumeBuffer(); - state = 1; - } else { - addCharToBuffer(); - } - break; - case 4: - addCharToBuffer(); - state = previousState; - break; - case 1: - if (char === "(") { - state = 2; - } else if (VALID_PARAM_RE.test(char)) { - addCharToBuffer(); - } else { - consumeBuffer(); - state = 0; - if (char !== "*" && char !== "?" && char !== "+") - i--; - } - break; - case 2: - if (char === ")") { - if (customRe[customRe.length - 1] == "\\") - customRe = customRe.slice(0, -1) + char; - else - state = 3; - } else { - customRe += char; - } - break; - case 3: - consumeBuffer(); - state = 0; - if (char !== "*" && char !== "?" && char !== "+") - i--; - customRe = ""; - break; - default: - crash("Unknown state"); - break; - } - } - if (state === 2) - crash(`Unfinished custom RegExp for param "${buffer}"`); - consumeBuffer(); - finalizeSegment(); - return tokens; - } - function createRouteRecordMatcher(record, parent, options) { - const parser = tokensToParser(tokenizePath(record.path), options); - if (process.env.NODE_ENV !== "production") { - const existingKeys = /* @__PURE__ */ new Set(); - for (const key of parser.keys) { - if (existingKeys.has(key.name)) - warn(`Found duplicated params with name "${key.name}" for path "${record.path}". Only the last one will be available on "$route.params".`); - existingKeys.add(key.name); - } - } - const matcher = assign(parser, { - record, - parent, - // these needs to be populated by the parent - children: [], - alias: [] - }); - if (parent) { - if (!matcher.record.aliasOf === !parent.record.aliasOf) - parent.children.push(matcher); - } - return matcher; - } - function createRouterMatcher(routes, globalOptions) { - const matchers = []; - const matcherMap = /* @__PURE__ */ new Map(); - globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions); - function getRecordMatcher(name) { - return matcherMap.get(name); - } - function addRoute(record, parent, originalRecord) { - const isRootAdd = !originalRecord; - const mainNormalizedRecord = normalizeRouteRecord(record); - if (process.env.NODE_ENV !== "production") { - checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent); - } - mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record; - const options = mergeOptions(globalOptions, record); - const normalizedRecords = [ - mainNormalizedRecord - ]; - if ("alias" in record) { - const aliases = typeof record.alias === "string" ? [record.alias] : record.alias; - for (const alias of aliases) { - normalizedRecords.push(assign({}, mainNormalizedRecord, { - // this allows us to hold a copy of the `components` option - // so that async components cache is hold on the original record - components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components, - path: alias, - // we might be the child of an alias - aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord - // the aliases are always of the same kind as the original since they - // are defined on the same record - })); - } - } - let matcher; - let originalMatcher; - for (const normalizedRecord of normalizedRecords) { - const { path } = normalizedRecord; - if (parent && path[0] !== "/") { - const parentPath = parent.record.path; - const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/"; - normalizedRecord.path = parent.record.path + (path && connectingSlash + path); - } - if (process.env.NODE_ENV !== "production" && normalizedRecord.path === "*") { - throw new Error('Catch all routes ("*") must now be defined using a param with a custom regexp.\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.'); - } - matcher = createRouteRecordMatcher(normalizedRecord, parent, options); - if (process.env.NODE_ENV !== "production" && parent && path[0] === "/") - checkMissingParamsInAbsolutePath(matcher, parent); - if (originalRecord) { - originalRecord.alias.push(matcher); - if (process.env.NODE_ENV !== "production") { - checkSameParams(originalRecord, matcher); - } - } else { - originalMatcher = originalMatcher || matcher; - if (originalMatcher !== matcher) - originalMatcher.alias.push(matcher); - if (isRootAdd && record.name && !isAliasRecord(matcher)) - removeRoute(record.name); - } - if (mainNormalizedRecord.children) { - const children = mainNormalizedRecord.children; - for (let i = 0; i < children.length; i++) { - addRoute(children[i], matcher, originalRecord && originalRecord.children[i]); - } - } - originalRecord = originalRecord || matcher; - if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) { - insertMatcher(matcher); - } - } - return originalMatcher ? () => { - removeRoute(originalMatcher); - } : noop; - } - function removeRoute(matcherRef) { - if (isRouteName(matcherRef)) { - const matcher = matcherMap.get(matcherRef); - if (matcher) { - matcherMap.delete(matcherRef); - matchers.splice(matchers.indexOf(matcher), 1); - matcher.children.forEach(removeRoute); - matcher.alias.forEach(removeRoute); - } - } else { - const index2 = matchers.indexOf(matcherRef); - if (index2 > -1) { - matchers.splice(index2, 1); - if (matcherRef.record.name) - matcherMap.delete(matcherRef.record.name); - matcherRef.children.forEach(removeRoute); - matcherRef.alias.forEach(removeRoute); - } - } - } - function getRoutes() { - return matchers; - } - function insertMatcher(matcher) { - let i = 0; - while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent - // https://github.com/vuejs/router/issues/1124 - (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i]))) - i++; - matchers.splice(i, 0, matcher); - if (matcher.record.name && !isAliasRecord(matcher)) - matcherMap.set(matcher.record.name, matcher); - } - function resolve(location2, currentLocation) { - let matcher; - let params = {}; - let path; - let name; - if ("name" in location2 && location2.name) { - matcher = matcherMap.get(location2.name); - if (!matcher) - throw createRouterError(1, { - location: location2 - }); - if (process.env.NODE_ENV !== "production") { - const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName)); - if (invalidParams.length) { - warn(`Discarded invalid param(s) "${invalidParams.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`); - } - } - name = matcher.record.name; - params = assign( - // paramsFromLocation is a new object - paramsFromLocation( - currentLocation.params, - // only keep params that exist in the resolved location - // TODO: only keep optional params coming from a parent record - matcher.keys.filter((k) => !k.optional).map((k) => k.name) - ), - // discard any existing params in the current location that do not exist here - // #1497 this ensures better active/exact matching - location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name)) - ); - path = matcher.stringify(params); - } else if ("path" in location2) { - path = location2.path; - if (process.env.NODE_ENV !== "production" && !path.startsWith("/")) { - warn(`The Matcher cannot resolve relative paths but received "${path}". Unless you directly called \`matcher.resolve("${path}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`); - } - matcher = matchers.find((m2) => m2.re.test(path)); - if (matcher) { - params = matcher.parse(path); - name = matcher.record.name; - } - } else { - matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path)); - if (!matcher) - throw createRouterError(1, { - location: location2, - currentLocation - }); - name = matcher.record.name; - params = assign({}, currentLocation.params, location2.params); - path = matcher.stringify(params); - } - const matched = []; - let parentMatcher = matcher; - while (parentMatcher) { - matched.unshift(parentMatcher.record); - parentMatcher = parentMatcher.parent; - } - return { - name, - path, - params, - matched, - meta: mergeMetaFields(matched) - }; - } - routes.forEach((route) => addRoute(route)); - return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher }; - } - function paramsFromLocation(params, keys) { - const newParams = {}; - for (const key of keys) { - if (key in params) - newParams[key] = params[key]; - } - return newParams; - } - function normalizeRouteRecord(record) { - return { - path: record.path, - redirect: record.redirect, - name: record.name, - meta: record.meta || {}, - aliasOf: void 0, - beforeEnter: record.beforeEnter, - props: normalizeRecordProps(record), - children: record.children || [], - instances: {}, - leaveGuards: /* @__PURE__ */ new Set(), - updateGuards: /* @__PURE__ */ new Set(), - enterCallbacks: {}, - components: "components" in record ? record.components || null : record.component && { default: record.component } - }; - } - function normalizeRecordProps(record) { - const propsObject = {}; - const props = record.props || false; - if ("component" in record) { - propsObject.default = props; - } else { - for (const name in record.components) - propsObject[name] = typeof props === "object" ? props[name] : props; - } - return propsObject; - } - function isAliasRecord(record) { - while (record) { - if (record.record.aliasOf) - return true; - record = record.parent; - } - return false; - } - function mergeMetaFields(matched) { - return matched.reduce((meta, record) => assign(meta, record.meta), {}); - } - function mergeOptions(defaults, partialOptions) { - const options = {}; - for (const key in defaults) { - options[key] = key in partialOptions ? partialOptions[key] : defaults[key]; - } - return options; - } - function isSameParam(a, b) { - return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable; - } - function checkSameParams(a, b) { - for (const key of a.keys) { - if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) - return warn(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`); - } - for (const key of b.keys) { - if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) - return warn(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`); - } - } - function checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) { - if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) { - warn(`The route named "${String(parent.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`); - } - } - function checkMissingParamsInAbsolutePath(record, parent) { - for (const key of parent.keys) { - if (!record.keys.find(isSameParam.bind(null, key))) - return warn(`Absolute path "${record.record.path}" must have the exact same param named "${key.name}" as its parent "${parent.record.path}".`); - } - } - function isRecordChildOf(record, parent) { - return parent.children.some((child) => child === record || isRecordChildOf(record, child)); - } - const HASH_RE = /#/g; - const AMPERSAND_RE = /&/g; - const SLASH_RE = /\//g; - const EQUAL_RE = /=/g; - const IM_RE = /\?/g; - const PLUS_RE = /\+/g; - const ENC_BRACKET_OPEN_RE = /%5B/g; - const ENC_BRACKET_CLOSE_RE = /%5D/g; - const ENC_CARET_RE = /%5E/g; - const ENC_BACKTICK_RE = /%60/g; - const ENC_CURLY_OPEN_RE = /%7B/g; - const ENC_PIPE_RE = /%7C/g; - const ENC_CURLY_CLOSE_RE = /%7D/g; - const ENC_SPACE_RE = /%20/g; - function commonEncode(text) { - return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]"); - } - function encodeHash(text) { - return commonEncode(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); - } - function encodeQueryValue(text) { - return commonEncode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); - } - function encodeQueryKey(text) { - return encodeQueryValue(text).replace(EQUAL_RE, "%3D"); - } - function encodePath(text) { - return commonEncode(text).replace(HASH_RE, "%23").replace(IM_RE, "%3F"); - } - function encodeParam(text) { - return text == null ? "" : encodePath(text).replace(SLASH_RE, "%2F"); - } - function decode(text) { - try { - return decodeURIComponent("" + text); - } catch (err) { - process.env.NODE_ENV !== "production" && warn(`Error decoding "${text}". Using original value`); - } - return "" + text; - } - function parseQuery(search) { - const query = {}; - if (search === "" || search === "?") - return query; - const hasLeadingIM = search[0] === "?"; - const searchParams = (hasLeadingIM ? search.slice(1) : search).split("&"); - for (let i = 0; i < searchParams.length; ++i) { - const searchParam = searchParams[i].replace(PLUS_RE, " "); - const eqPos = searchParam.indexOf("="); - const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos)); - const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1)); - if (key in query) { - let currentValue = query[key]; - if (!isArray(currentValue)) { - currentValue = query[key] = [currentValue]; - } - currentValue.push(value); - } else { - query[key] = value; - } - } - return query; - } - function stringifyQuery(query) { - let search = ""; - for (let key in query) { - const value = query[key]; - key = encodeQueryKey(key); - if (value == null) { - if (value !== void 0) { - search += (search.length ? "&" : "") + key; - } - continue; - } - const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]; - values.forEach((value2) => { - if (value2 !== void 0) { - search += (search.length ? "&" : "") + key; - if (value2 != null) - search += "=" + value2; - } - }); - } - return search; - } - function normalizeQuery(query) { - const normalizedQuery = {}; - for (const key in query) { - const value = query[key]; - if (value !== void 0) { - normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : "" + v) : value == null ? value : "" + value; - } - } - return normalizedQuery; - } - const matchedRouteKey = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""); - const viewDepthKey = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""); - const routerKey = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""); - const routeLocationKey = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""); - const routerViewLocationKey = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : ""); - function useCallbacks() { - let handlers = []; - function add(handler) { - handlers.push(handler); - return () => { - const i = handlers.indexOf(handler); - if (i > -1) - handlers.splice(i, 1); - }; - } - function reset() { - handlers = []; - } - return { - add, - list: () => handlers.slice(), - reset - }; - } - function guardToPromiseFn(guard, to, from, record, name) { - const enterCallbackArray = record && // name is defined if record is because of the function overload - (record.enterCallbacks[name] = record.enterCallbacks[name] || []); - return () => new Promise((resolve, reject) => { - const next = (valid) => { - if (valid === false) { - reject(createRouterError(4, { - from, - to - })); - } else if (valid instanceof Error) { - reject(valid); - } else if (isRouteLocation(valid)) { - reject(createRouterError(2, { - from: to, - to: valid - })); - } else { - if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are - record.enterCallbacks[name] === enterCallbackArray && typeof valid === "function") { - enterCallbackArray.push(valid); - } - resolve(); - } - }; - const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== "production" ? canOnlyBeCalledOnce(next, to, from) : next); - let guardCall = Promise.resolve(guardReturn); - if (guard.length < 3) - guardCall = guardCall.then(next); - if (process.env.NODE_ENV !== "production" && guard.length > 2) { - const message = `The "next" callback was never called inside of ${guard.name ? '"' + guard.name + '"' : ""}: -${guard.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`; - if (typeof guardReturn === "object" && "then" in guardReturn) { - guardCall = guardCall.then((resolvedValue) => { - if (!next._called) { - warn(message); - return Promise.reject(new Error("Invalid navigation guard")); - } - return resolvedValue; - }); - } else if (guardReturn !== void 0) { - if (!next._called) { - warn(message); - reject(new Error("Invalid navigation guard")); - return; - } - } - } - guardCall.catch((err) => reject(err)); - }); - } - function canOnlyBeCalledOnce(next, to, from) { - let called = 0; - return function() { - if (called++ === 1) - warn(`The "next" callback was called more than once in one navigation guard when going from "${from.fullPath}" to "${to.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`); - next._called = true; - if (called === 1) - next.apply(null, arguments); - }; - } - function extractComponentsGuards(matched, guardType, to, from) { - const guards = []; - for (const record of matched) { - if (process.env.NODE_ENV !== "production" && !record.components && !record.children.length) { - warn(`Record with path "${record.path}" is either missing a "component(s)" or "children" property.`); - } - for (const name in record.components) { - let rawComponent = record.components[name]; - if (process.env.NODE_ENV !== "production") { - if (!rawComponent || typeof rawComponent !== "object" && typeof rawComponent !== "function") { - warn(`Component "${name}" in record with path "${record.path}" is not a valid component. Received "${String(rawComponent)}".`); - throw new Error("Invalid route component"); - } else if ("then" in rawComponent) { - warn(`Component "${name}" in record with path "${record.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`); - const promise = rawComponent; - rawComponent = () => promise; - } else if (rawComponent.__asyncLoader && // warn only once per component - !rawComponent.__warnedDefineAsync) { - rawComponent.__warnedDefineAsync = true; - warn(`Component "${name}" in record with path "${record.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`); - } - } - if (guardType !== "beforeRouteEnter" && !record.instances[name]) - continue; - if (isRouteComponent(rawComponent)) { - const options = rawComponent.__vccOpts || rawComponent; - const guard = options[guardType]; - guard && guards.push(guardToPromiseFn(guard, to, from, record, name)); - } else { - let componentPromise = rawComponent(); - if (process.env.NODE_ENV !== "production" && !("catch" in componentPromise)) { - warn(`Component "${name}" in record with path "${record.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`); - componentPromise = Promise.resolve(componentPromise); - } - guards.push(() => componentPromise.then((resolved) => { - if (!resolved) - return Promise.reject(new Error(`Couldn't resolve component "${name}" at "${record.path}"`)); - const resolvedComponent = isESModule(resolved) ? resolved.default : resolved; - record.components[name] = resolvedComponent; - const options = resolvedComponent.__vccOpts || resolvedComponent; - const guard = options[guardType]; - return guard && guardToPromiseFn(guard, to, from, record, name)(); - })); - } - } - } - return guards; - } - function isRouteComponent(component) { - return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component; - } - function useLink(props) { - const router2 = vue.inject(routerKey); - const currentRoute = vue.inject(routeLocationKey); - const route = vue.computed(() => router2.resolve(vue.unref(props.to))); - const activeRecordIndex = vue.computed(() => { - const { matched } = route.value; - const { length } = matched; - const routeMatched = matched[length - 1]; - const currentMatched = currentRoute.matched; - if (!routeMatched || !currentMatched.length) - return -1; - const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched)); - if (index2 > -1) - return index2; - const parentRecordPath = getOriginalPath(matched[length - 2]); - return ( - // we are dealing with nested routes - length > 1 && // if the parent and matched route have the same path, this link is - // referring to the empty child. Or we currently are on a different - // child of the same parent - getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent - currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2 - ); - }); - const isActive = vue.computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params)); - const isExactActive = vue.computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params)); - function navigate(e = {}) { - if (guardEvent(e)) { - return router2[vue.unref(props.replace) ? "replace" : "push"]( - vue.unref(props.to) - // avoid uncaught errors are they are logged anyway - ).catch(noop); - } - return Promise.resolve(); - } - if ((process.env.NODE_ENV !== "production" || false) && isBrowser) { - const instance = vue.getCurrentInstance(); - if (instance) { - const linkContextDevtools = { - route: route.value, - isActive: isActive.value, - isExactActive: isExactActive.value - }; - instance.__vrl_devtools = instance.__vrl_devtools || []; - instance.__vrl_devtools.push(linkContextDevtools); - vue.watchEffect(() => { - linkContextDevtools.route = route.value; - linkContextDevtools.isActive = isActive.value; - linkContextDevtools.isExactActive = isExactActive.value; - }, { flush: "post" }); - } - } - return { - route, - href: vue.computed(() => route.value.href), - isActive, - isExactActive, - navigate - }; - } - const RouterLinkImpl = /* @__PURE__ */ vue.defineComponent({ - name: "RouterLink", - compatConfig: { MODE: 3 }, - props: { - to: { - type: [String, Object], - required: true - }, - replace: Boolean, - activeClass: String, - // inactiveClass: String, - exactActiveClass: String, - custom: Boolean, - ariaCurrentValue: { - type: String, - default: "page" - } - }, - useLink, - setup(props, { slots }) { - const link = vue.reactive(useLink(props)); - const { options } = vue.inject(routerKey); - const elClass = vue.computed(() => ({ - [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive, - // [getLinkClass( - // props.inactiveClass, - // options.linkInactiveClass, - // 'router-link-inactive' - // )]: !link.isExactActive, - [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive - })); - return () => { - const children = slots.default && slots.default(link); - return props.custom ? children : vue.h("a", { - "aria-current": link.isExactActive ? props.ariaCurrentValue : null, - href: link.href, - // this would override user added attrs but Vue will still add - // the listener, so we end up triggering both - onClick: link.navigate, - class: elClass.value - }, children); - }; - } - }); - const RouterLink = RouterLinkImpl; - function guardEvent(e) { - if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) - return; - if (e.defaultPrevented) - return; - if (e.button !== void 0 && e.button !== 0) - return; - if (e.currentTarget && e.currentTarget.getAttribute) { - const target = e.currentTarget.getAttribute("target"); - if (/\b_blank\b/i.test(target)) - return; - } - if (e.preventDefault) - e.preventDefault(); - return true; - } - function includesParams(outer, inner) { - for (const key in inner) { - const innerValue = inner[key]; - const outerValue = outer[key]; - if (typeof innerValue === "string") { - if (innerValue !== outerValue) - return false; - } else { - if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i])) - return false; - } - } - return true; - } - function getOriginalPath(record) { - return record ? record.aliasOf ? record.aliasOf.path : record.path : ""; - } - const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass; - const RouterViewImpl = /* @__PURE__ */ vue.defineComponent({ - name: "RouterView", - // #674 we manually inherit them - inheritAttrs: false, - props: { - name: { - type: String, - default: "default" - }, - route: Object - }, - // Better compat for @vue/compat users - // https://github.com/vuejs/router/issues/1315 - compatConfig: { MODE: 3 }, - setup(props, { attrs, slots }) { - process.env.NODE_ENV !== "production" && warnDeprecatedUsage(); - const injectedRoute = vue.inject(routerViewLocationKey); - const routeToDisplay = vue.computed(() => props.route || injectedRoute.value); - const injectedDepth = vue.inject(viewDepthKey, 0); - const depth = vue.computed(() => { - let initialDepth = vue.unref(injectedDepth); - const { matched } = routeToDisplay.value; - let matchedRoute; - while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) { - initialDepth++; - } - return initialDepth; - }); - const matchedRouteRef = vue.computed(() => routeToDisplay.value.matched[depth.value]); - vue.provide(viewDepthKey, vue.computed(() => depth.value + 1)); - vue.provide(matchedRouteKey, matchedRouteRef); - vue.provide(routerViewLocationKey, routeToDisplay); - const viewRef = vue.ref(); - vue.watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => { - if (to) { - to.instances[name] = instance; - if (from && from !== to && instance && instance === oldInstance) { - if (!to.leaveGuards.size) { - to.leaveGuards = from.leaveGuards; - } - if (!to.updateGuards.size) { - to.updateGuards = from.updateGuards; - } - } - } - if (instance && to && // if there is no instance but to and from are the same this might be - // the first visit - (!from || !isSameRouteRecord(to, from) || !oldInstance)) { - (to.enterCallbacks[name] || []).forEach((callback) => callback(instance)); - } - }, { flush: "post" }); - return () => { - const route = routeToDisplay.value; - const currentName = props.name; - const matchedRoute = matchedRouteRef.value; - const ViewComponent = matchedRoute && matchedRoute.components[currentName]; - if (!ViewComponent) { - return normalizeSlot(slots.default, { Component: ViewComponent, route }); - } - const routePropsOption = matchedRoute.props[currentName]; - const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null; - const onVnodeUnmounted = (vnode) => { - if (vnode.component.isUnmounted) { - matchedRoute.instances[currentName] = null; - } - }; - const component = vue.h(ViewComponent, assign({}, routeProps, attrs, { - onVnodeUnmounted, - ref: viewRef - })); - if ((process.env.NODE_ENV !== "production" || false) && isBrowser && component.ref) { - const info = { - depth: depth.value, - name: matchedRoute.name, - path: matchedRoute.path, - meta: matchedRoute.meta - }; - const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]; - internalInstances.forEach((instance) => { - instance.__vrv_devtools = info; - }); - } - return ( - // pass the vnode to the slot as a prop. - // h and both accept vnodes - normalizeSlot(slots.default, { Component: component, route }) || component - ); - }; - } - }); - function normalizeSlot(slot, data) { - if (!slot) - return null; - const slotContent = slot(data); - return slotContent.length === 1 ? slotContent[0] : slotContent; - } - const RouterView = RouterViewImpl; - function warnDeprecatedUsage() { - const instance = vue.getCurrentInstance(); - const parentName = instance.parent && instance.parent.type.name; - const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type; - if (parentName && (parentName === "KeepAlive" || parentName.includes("Transition")) && typeof parentSubTreeType === "object" && parentSubTreeType.name === "RouterView") { - const comp = parentName === "KeepAlive" ? "keep-alive" : "transition"; - warn(` can no longer be used directly inside or . -Use slot props instead: - - - <${comp}> - - -`); - } - } - function formatRouteLocation(routeLocation, tooltip) { - const copy = assign({}, routeLocation, { - // remove variables that can contain vue instances - matched: routeLocation.matched.map((matched) => omit(matched, ["instances", "children", "aliasOf"])) - }); - return { - _custom: { - type: null, - readOnly: true, - display: routeLocation.fullPath, - tooltip, - value: copy - } - }; - } - function formatDisplay(display) { - return { - _custom: { - display - } - }; - } - let routerId = 0; - function addDevtools(app, router2, matcher) { - if (router2.__hasDevtools) - return; - router2.__hasDevtools = true; - const id = routerId++; - setupDevtoolsPlugin({ - id: "org.vuejs.router" + (id ? "." + id : ""), - label: "Vue Router", - packageName: "vue-router", - homepage: "https://router.vuejs.org", - logo: "https://router.vuejs.org/logo.png", - componentStateTypes: ["Routing"], - app - }, (api) => { - if (typeof api.now !== "function") { - console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); - } - api.on.inspectComponent((payload, ctx) => { - if (payload.instanceData) { - payload.instanceData.state.push({ - type: "Routing", - key: "$route", - editable: false, - value: formatRouteLocation(router2.currentRoute.value, "Current Route") - }); - } - }); - api.on.visitComponentTree(({ treeNode: node, componentInstance }) => { - if (componentInstance.__vrv_devtools) { - const info = componentInstance.__vrv_devtools; - node.tags.push({ - label: (info.name ? `${info.name.toString()}: ` : "") + info.path, - textColor: 0, - tooltip: "This component is rendered by <router-view>", - backgroundColor: PINK_500 - }); - } - if (isArray(componentInstance.__vrl_devtools)) { - componentInstance.__devtoolsApi = api; - componentInstance.__vrl_devtools.forEach((devtoolsData) => { - let backgroundColor = ORANGE_400; - let tooltip = ""; - if (devtoolsData.isExactActive) { - backgroundColor = LIME_500; - tooltip = "This is exactly active"; - } else if (devtoolsData.isActive) { - backgroundColor = BLUE_600; - tooltip = "This link is active"; - } - node.tags.push({ - label: devtoolsData.route.path, - textColor: 0, - tooltip, - backgroundColor - }); - }); - } - }); - vue.watch(router2.currentRoute, () => { - refreshRoutesView(); - api.notifyComponentUpdate(); - api.sendInspectorTree(routerInspectorId); - api.sendInspectorState(routerInspectorId); - }); - const navigationsLayerId = "router:navigations:" + id; - api.addTimelineLayer({ - id: navigationsLayerId, - label: `Router${id ? " " + id : ""} Navigations`, - color: 4237508 - }); - router2.onError((error, to) => { - api.addTimelineEvent({ - layerId: navigationsLayerId, - event: { - title: "Error during Navigation", - subtitle: to.fullPath, - logType: "error", - time: api.now(), - data: { error }, - groupId: to.meta.__navigationId - } - }); - }); - let navigationId = 0; - router2.beforeEach((to, from) => { - const data = { - guard: formatDisplay("beforeEach"), - from: formatRouteLocation(from, "Current Location during this navigation"), - to: formatRouteLocation(to, "Target location") - }; - Object.defineProperty(to.meta, "__navigationId", { - value: navigationId++ - }); - api.addTimelineEvent({ - layerId: navigationsLayerId, - event: { - time: api.now(), - title: "Start of navigation", - subtitle: to.fullPath, - data, - groupId: to.meta.__navigationId - } - }); - }); - router2.afterEach((to, from, failure) => { - const data = { - guard: formatDisplay("afterEach") - }; - if (failure) { - data.failure = { - _custom: { - type: Error, - readOnly: true, - display: failure ? failure.message : "", - tooltip: "Navigation Failure", - value: failure - } - }; - data.status = formatDisplay("❌"); - } else { - data.status = formatDisplay("✅"); - } - data.from = formatRouteLocation(from, "Current Location during this navigation"); - data.to = formatRouteLocation(to, "Target location"); - api.addTimelineEvent({ - layerId: navigationsLayerId, - event: { - title: "End of navigation", - subtitle: to.fullPath, - time: api.now(), - data, - logType: failure ? "warning" : "default", - groupId: to.meta.__navigationId - } - }); - }); - const routerInspectorId = "router-inspector:" + id; - api.addInspector({ - id: routerInspectorId, - label: "Routes" + (id ? " " + id : ""), - icon: "book", - treeFilterPlaceholder: "Search routes" - }); - function refreshRoutesView() { - if (!activeRoutesPayload) - return; - const payload = activeRoutesPayload; - let routes = matcher.getRoutes().filter((route) => !route.parent || // these routes have a parent with no component which will not appear in the view - // therefore we still need to include them - !route.parent.record.components); - routes.forEach(resetMatchStateOnRouteRecord); - if (payload.filter) { - routes = routes.filter((route) => ( - // save matches state based on the payload - isRouteMatching(route, payload.filter.toLowerCase()) - )); - } - routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value)); - payload.rootNodes = routes.map(formatRouteRecordForInspector); - } - let activeRoutesPayload; - api.on.getInspectorTree((payload) => { - activeRoutesPayload = payload; - if (payload.app === app && payload.inspectorId === routerInspectorId) { - refreshRoutesView(); - } - }); - api.on.getInspectorState((payload) => { - if (payload.app === app && payload.inspectorId === routerInspectorId) { - const routes = matcher.getRoutes(); - const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId); - if (route) { - payload.state = { - options: formatRouteRecordMatcherForStateInspector(route) - }; - } - } - }); - api.sendInspectorTree(routerInspectorId); - api.sendInspectorState(routerInspectorId); - }); - } - function modifierForKey(key) { - if (key.optional) { - return key.repeatable ? "*" : "?"; - } else { - return key.repeatable ? "+" : ""; - } - } - function formatRouteRecordMatcherForStateInspector(route) { - const { record } = route; - const fields = [ - { editable: false, key: "path", value: record.path } - ]; - if (record.name != null) { - fields.push({ - editable: false, - key: "name", - value: record.name - }); - } - fields.push({ editable: false, key: "regexp", value: route.re }); - if (route.keys.length) { - fields.push({ - editable: false, - key: "keys", - value: { - _custom: { - type: null, - readOnly: true, - display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(" "), - tooltip: "Param keys", - value: route.keys - } - } - }); - } - if (record.redirect != null) { - fields.push({ - editable: false, - key: "redirect", - value: record.redirect - }); - } - if (route.alias.length) { - fields.push({ - editable: false, - key: "aliases", - value: route.alias.map((alias) => alias.record.path) - }); - } - if (Object.keys(route.record.meta).length) { - fields.push({ - editable: false, - key: "meta", - value: route.record.meta - }); - } - fields.push({ - key: "score", - editable: false, - value: { - _custom: { - type: null, - readOnly: true, - display: route.score.map((score) => score.join(", ")).join(" | "), - tooltip: "Score used to sort routes", - value: route.score - } - } - }); - return fields; - } - const PINK_500 = 15485081; - const BLUE_600 = 2450411; - const LIME_500 = 8702998; - const CYAN_400 = 2282478; - const ORANGE_400 = 16486972; - const DARK = 6710886; - function formatRouteRecordForInspector(route) { - const tags = []; - const { record } = route; - if (record.name != null) { - tags.push({ - label: String(record.name), - textColor: 0, - backgroundColor: CYAN_400 - }); - } - if (record.aliasOf) { - tags.push({ - label: "alias", - textColor: 0, - backgroundColor: ORANGE_400 - }); - } - if (route.__vd_match) { - tags.push({ - label: "matches", - textColor: 0, - backgroundColor: PINK_500 - }); - } - if (route.__vd_exactActive) { - tags.push({ - label: "exact", - textColor: 0, - backgroundColor: LIME_500 - }); - } - if (route.__vd_active) { - tags.push({ - label: "active", - textColor: 0, - backgroundColor: BLUE_600 - }); - } - if (record.redirect) { - tags.push({ - label: typeof record.redirect === "string" ? `redirect: ${record.redirect}` : "redirects", - textColor: 16777215, - backgroundColor: DARK - }); - } - let id = record.__vd_id; - if (id == null) { - id = String(routeRecordId++); - record.__vd_id = id; - } - return { - id, - label: record.path, - tags, - children: route.children.map(formatRouteRecordForInspector) - }; - } - let routeRecordId = 0; - const EXTRACT_REGEXP_RE = /^\/(.*)\/([a-z]*)$/; - function markRouteRecordActive(route, currentRoute) { - const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record); - route.__vd_exactActive = route.__vd_active = isExactActive; - if (!isExactActive) { - route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record)); - } - route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute)); - } - function resetMatchStateOnRouteRecord(route) { - route.__vd_match = false; - route.children.forEach(resetMatchStateOnRouteRecord); - } - function isRouteMatching(route, filter) { - const found = String(route.re).match(EXTRACT_REGEXP_RE); - route.__vd_match = false; - if (!found || found.length < 3) { - return false; - } - const nonEndingRE = new RegExp(found[1].replace(/\$$/, ""), found[2]); - if (nonEndingRE.test(filter)) { - route.children.forEach((child) => isRouteMatching(child, filter)); - if (route.record.path !== "/" || filter === "/") { - route.__vd_match = route.re.test(filter); - return true; - } - return false; - } - const path = route.record.path.toLowerCase(); - const decodedPath = decode(path); - if (!filter.startsWith("/") && (decodedPath.includes(filter) || path.includes(filter))) - return true; - if (decodedPath.startsWith(filter) || path.startsWith(filter)) - return true; - if (route.record.name && String(route.record.name).includes(filter)) - return true; - return route.children.some((child) => isRouteMatching(child, filter)); - } - function omit(obj, keys) { - const ret = {}; - for (const key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; - } - function createRouter(options) { - const matcher = createRouterMatcher(options.routes, options); - const parseQuery$1 = options.parseQuery || parseQuery; - const stringifyQuery$1 = options.stringifyQuery || stringifyQuery; - const routerHistory = options.history; - if (process.env.NODE_ENV !== "production" && !routerHistory) - throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.'); - const beforeGuards = useCallbacks(); - const beforeResolveGuards = useCallbacks(); - const afterGuards = useCallbacks(); - const currentRoute = vue.shallowRef(START_LOCATION_NORMALIZED); - let pendingLocation = START_LOCATION_NORMALIZED; - if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) { - history.scrollRestoration = "manual"; - } - const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue); - const encodeParams = applyToParams.bind(null, encodeParam); - const decodeParams = ( - // @ts-expect-error: intentionally avoid the type check - applyToParams.bind(null, decode) - ); - function addRoute(parentOrRoute, route) { - let parent; - let record; - if (isRouteName(parentOrRoute)) { - parent = matcher.getRecordMatcher(parentOrRoute); - record = route; - } else { - record = parentOrRoute; - } - return matcher.addRoute(record, parent); - } - function removeRoute(name) { - const recordMatcher = matcher.getRecordMatcher(name); - if (recordMatcher) { - matcher.removeRoute(recordMatcher); - } else if (process.env.NODE_ENV !== "production") { - warn(`Cannot remove non-existent route "${String(name)}"`); - } - } - function getRoutes() { - return matcher.getRoutes().map((routeMatcher) => routeMatcher.record); - } - function hasRoute(name) { - return !!matcher.getRecordMatcher(name); - } - function resolve(rawLocation, currentLocation) { - currentLocation = assign({}, currentLocation || currentRoute.value); - if (typeof rawLocation === "string") { - const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path); - const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation); - const href2 = routerHistory.createHref(locationNormalized.fullPath); - if (process.env.NODE_ENV !== "production") { - if (href2.startsWith("//")) - warn(`Location "${rawLocation}" resolved to "${href2}". A resolved location cannot start with multiple slashes.`); - else if (!matchedRoute2.matched.length) { - warn(`No match found for location with path "${rawLocation}"`); - } - } - return assign(locationNormalized, matchedRoute2, { - params: decodeParams(matchedRoute2.params), - hash: decode(locationNormalized.hash), - redirectedFrom: void 0, - href: href2 - }); - } - let matcherLocation; - if ("path" in rawLocation) { - if (process.env.NODE_ENV !== "production" && "params" in rawLocation && !("name" in rawLocation) && // @ts-expect-error: the type is never - Object.keys(rawLocation.params).length) { - warn(`Path "${rawLocation.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`); - } - matcherLocation = assign({}, rawLocation, { - path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path - }); - } else { - const targetParams = assign({}, rawLocation.params); - for (const key in targetParams) { - if (targetParams[key] == null) { - delete targetParams[key]; - } - } - matcherLocation = assign({}, rawLocation, { - params: encodeParams(targetParams) - }); - currentLocation.params = encodeParams(currentLocation.params); - } - const matchedRoute = matcher.resolve(matcherLocation, currentLocation); - const hash = rawLocation.hash || ""; - if (process.env.NODE_ENV !== "production" && hash && !hash.startsWith("#")) { - warn(`A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`); - } - matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params)); - const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, { - hash: encodeHash(hash), - path: matchedRoute.path - })); - const href = routerHistory.createHref(fullPath); - if (process.env.NODE_ENV !== "production") { - if (href.startsWith("//")) { - warn(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`); - } else if (!matchedRoute.matched.length) { - warn(`No match found for location with path "${"path" in rawLocation ? rawLocation.path : rawLocation}"`); - } - } - return assign({ - fullPath, - // keep the hash encoded so fullPath is effectively path + encodedQuery + - // hash - hash, - query: ( - // if the user is using a custom query lib like qs, we might have - // nested objects, so we keep the query as is, meaning it can contain - // numbers at `$route.query`, but at the point, the user will have to - // use their own type anyway. - // https://github.com/vuejs/router/issues/328#issuecomment-649481567 - stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {} - ) - }, matchedRoute, { - redirectedFrom: void 0, - href - }); - } - function locationAsObject(to) { - return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to); - } - function checkCanceledNavigation(to, from) { - if (pendingLocation !== to) { - return createRouterError(8, { - from, - to - }); - } - } - function push(to) { - return pushWithRedirect(to); - } - function replace(to) { - return push(assign(locationAsObject(to), { replace: true })); - } - function handleRedirectRecord(to) { - const lastMatched = to.matched[to.matched.length - 1]; - if (lastMatched && lastMatched.redirect) { - const { redirect } = lastMatched; - let newTargetLocation = typeof redirect === "function" ? redirect(to) : redirect; - if (typeof newTargetLocation === "string") { - newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : ( - // force empty params - { path: newTargetLocation } - ); - newTargetLocation.params = {}; - } - if (process.env.NODE_ENV !== "production" && !("path" in newTargetLocation) && !("name" in newTargetLocation)) { - warn(`Invalid redirect found: -${JSON.stringify(newTargetLocation, null, 2)} - when navigating to "${to.fullPath}". A redirect must contain a name or path. This will break in production.`); - throw new Error("Invalid redirect"); - } - return assign({ - query: to.query, - hash: to.hash, - // avoid transferring params if the redirect has a path - params: "path" in newTargetLocation ? {} : to.params - }, newTargetLocation); - } - } - function pushWithRedirect(to, redirectedFrom) { - const targetLocation = pendingLocation = resolve(to); - const from = currentRoute.value; - const data = to.state; - const force = to.force; - const replace2 = to.replace === true; - const shouldRedirect = handleRedirectRecord(targetLocation); - if (shouldRedirect) - return pushWithRedirect( - assign(locationAsObject(shouldRedirect), { - state: typeof shouldRedirect === "object" ? assign({}, data, shouldRedirect.state) : data, - force, - replace: replace2 - }), - // keep original redirectedFrom if it exists - redirectedFrom || targetLocation - ); - const toLocation = targetLocation; - toLocation.redirectedFrom = redirectedFrom; - let failure; - if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) { - failure = createRouterError(16, { to: toLocation, from }); - handleScroll( - from, - from, - // this is a push, the only way for it to be triggered from a - // history.listen is with a redirect, which makes it become a push - true, - // This cannot be the first navigation because the initial location - // cannot be manually navigated to - false - ); - } - return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? ( - // navigation redirects still mark the router as ready - isNavigationFailure( - error, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - ) ? error : markAsReady(error) - ) : ( - // reject any unknown error - triggerError(error, toLocation, from) - )).then((failure2) => { - if (failure2) { - if (isNavigationFailure( - failure2, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - )) { - if (process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at - isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times - redirectedFrom && // @ts-expect-error: added only in dev - (redirectedFrom._count = redirectedFrom._count ? ( - // @ts-expect-error - redirectedFrom._count + 1 - ) : 1) > 30) { - warn(`Detected a possibly infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow. - Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`); - return Promise.reject(new Error("Infinite redirect in navigation guard")); - } - return pushWithRedirect( - // keep options - assign({ - // preserve an existing replacement but allow the redirect to override it - replace: replace2 - }, locationAsObject(failure2.to), { - state: typeof failure2.to === "object" ? assign({}, data, failure2.to.state) : data, - force - }), - // preserve the original redirectedFrom if any - redirectedFrom || toLocation - ); - } - } else { - failure2 = finalizeNavigation(toLocation, from, true, replace2, data); - } - triggerAfterEach(toLocation, from, failure2); - return failure2; - }); - } - function checkCanceledNavigationAndReject(to, from) { - const error = checkCanceledNavigation(to, from); - return error ? Promise.reject(error) : Promise.resolve(); - } - function runWithContext(fn) { - const app = installedApps.values().next().value; - return app && typeof app.runWithContext === "function" ? app.runWithContext(fn) : fn(); - } - function navigate(to, from) { - let guards; - const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from); - guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from); - for (const record of leavingRecords) { - record.leaveGuards.forEach((guard) => { - guards.push(guardToPromiseFn(guard, to, from)); - }); - } - const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from); - guards.push(canceledNavigationCheck); - return runGuardQueue(guards).then(() => { - guards = []; - for (const guard of beforeGuards.list()) { - guards.push(guardToPromiseFn(guard, to, from)); - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from); - for (const record of updatingRecords) { - record.updateGuards.forEach((guard) => { - guards.push(guardToPromiseFn(guard, to, from)); - }); - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - guards = []; - for (const record of enteringRecords) { - if (record.beforeEnter) { - if (isArray(record.beforeEnter)) { - for (const beforeEnter of record.beforeEnter) - guards.push(guardToPromiseFn(beforeEnter, to, from)); - } else { - guards.push(guardToPromiseFn(record.beforeEnter, to, from)); - } - } - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - to.matched.forEach((record) => record.enterCallbacks = {}); - guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from); - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).then(() => { - guards = []; - for (const guard of beforeResolveGuards.list()) { - guards.push(guardToPromiseFn(guard, to, from)); - } - guards.push(canceledNavigationCheck); - return runGuardQueue(guards); - }).catch((err) => isNavigationFailure( - err, - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - ) ? err : Promise.reject(err)); - } - function triggerAfterEach(to, from, failure) { - afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure))); - } - function finalizeNavigation(toLocation, from, isPush, replace2, data) { - const error = checkCanceledNavigation(toLocation, from); - if (error) - return error; - const isFirstNavigation = from === START_LOCATION_NORMALIZED; - const state = !isBrowser ? {} : history.state; - if (isPush) { - if (replace2 || isFirstNavigation) - routerHistory.replace(toLocation.fullPath, assign({ - scroll: isFirstNavigation && state && state.scroll - }, data)); - else - routerHistory.push(toLocation.fullPath, data); - } - currentRoute.value = toLocation; - handleScroll(toLocation, from, isPush, isFirstNavigation); - markAsReady(); - } - let removeHistoryListener; - function setupListeners() { - if (removeHistoryListener) - return; - removeHistoryListener = routerHistory.listen((to, _from, info) => { - if (!router2.listening) - return; - const toLocation = resolve(to); - const shouldRedirect = handleRedirectRecord(toLocation); - if (shouldRedirect) { - pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop); - return; - } - pendingLocation = toLocation; - const from = currentRoute.value; - if (isBrowser) { - saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition()); - } - navigate(toLocation, from).catch((error) => { - if (isNavigationFailure( - error, - 4 | 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - )) { - return error; - } - if (isNavigationFailure( - error, - 2 - /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */ - )) { - pushWithRedirect( - error.to, - toLocation - // avoid an uncaught rejection, let push call triggerError - ).then((failure) => { - if (isNavigationFailure( - failure, - 4 | 16 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - ) && !info.delta && info.type === NavigationType.pop) { - routerHistory.go(-1, false); - } - }).catch(noop); - return Promise.reject(); - } - if (info.delta) { - routerHistory.go(-info.delta, false); - } - return triggerError(error, toLocation, from); - }).then((failure) => { - failure = failure || finalizeNavigation( - // after navigation, all matched components are resolved - toLocation, - from, - false - ); - if (failure) { - if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history - // entry while a different route is displayed - !isNavigationFailure( - failure, - 8 - /* ErrorTypes.NAVIGATION_CANCELLED */ - )) { - routerHistory.go(-info.delta, false); - } else if (info.type === NavigationType.pop && isNavigationFailure( - failure, - 4 | 16 - /* ErrorTypes.NAVIGATION_DUPLICATED */ - )) { - routerHistory.go(-1, false); - } - } - triggerAfterEach(toLocation, from, failure); - }).catch(noop); - }); - } - let readyHandlers = useCallbacks(); - let errorListeners = useCallbacks(); - let ready; - function triggerError(error, to, from) { - markAsReady(error); - const list = errorListeners.list(); - if (list.length) { - list.forEach((handler) => handler(error, to, from)); - } else { - if (process.env.NODE_ENV !== "production") { - warn("uncaught error during route navigation:"); - } - console.error(error); - } - return Promise.reject(error); - } - function isReady() { - if (ready && currentRoute.value !== START_LOCATION_NORMALIZED) - return Promise.resolve(); - return new Promise((resolve2, reject) => { - readyHandlers.add([resolve2, reject]); - }); - } - function markAsReady(err) { - if (!ready) { - ready = !err; - setupListeners(); - readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2()); - readyHandlers.reset(); - } - return err; - } - function handleScroll(to, from, isPush, isFirstNavigation) { - const { scrollBehavior } = options; - if (!isBrowser || !scrollBehavior) - return Promise.resolve(); - const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null; - return vue.nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from)); - } - const go = (delta) => routerHistory.go(delta); - let started; - const installedApps = /* @__PURE__ */ new Set(); - const router2 = { - currentRoute, - listening: true, - addRoute, - removeRoute, - hasRoute, - getRoutes, - resolve, - options, - push, - replace, - go, - back: () => go(-1), - forward: () => go(1), - beforeEach: beforeGuards.add, - beforeResolve: beforeResolveGuards.add, - afterEach: afterGuards.add, - onError: errorListeners.add, - isReady, - install(app) { - const router22 = this; - app.component("RouterLink", RouterLink); - app.component("RouterView", RouterView); - app.config.globalProperties.$router = router22; - Object.defineProperty(app.config.globalProperties, "$route", { - enumerable: true, - get: () => vue.unref(currentRoute) - }); - if (isBrowser && // used for the initial navigation client side to avoid pushing - // multiple times when the router is used in multiple apps - !started && currentRoute.value === START_LOCATION_NORMALIZED) { - started = true; - push(routerHistory.location).catch((err) => { - if (process.env.NODE_ENV !== "production") - warn("Unexpected error when starting the router:", err); - }); - } - const reactiveRoute = {}; - for (const key in START_LOCATION_NORMALIZED) { - Object.defineProperty(reactiveRoute, key, { - get: () => currentRoute.value[key], - enumerable: true - }); - } - app.provide(routerKey, router22); - app.provide(routeLocationKey, vue.shallowReactive(reactiveRoute)); - app.provide(routerViewLocationKey, currentRoute); - const unmountApp = app.unmount; - installedApps.add(app); - app.unmount = function() { - installedApps.delete(app); - if (installedApps.size < 1) { - pendingLocation = START_LOCATION_NORMALIZED; - removeHistoryListener && removeHistoryListener(); - removeHistoryListener = null; - currentRoute.value = START_LOCATION_NORMALIZED; - started = false; - ready = false; - } - unmountApp(); - }; - if ((process.env.NODE_ENV !== "production" || false) && isBrowser) { - addDevtools(app, router22, matcher); - } - } - }; - function runGuardQueue(guards) { - return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve()); - } - return router2; - } - function extractChangingRecords(to, from) { - const leavingRecords = []; - const updatingRecords = []; - const enteringRecords = []; - const len = Math.max(from.matched.length, to.matched.length); - for (let i = 0; i < len; i++) { - const recordFrom = from.matched[i]; - if (recordFrom) { - if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) - updatingRecords.push(recordFrom); - else - leavingRecords.push(recordFrom); - } - const recordTo = to.matched[i]; - if (recordTo) { - if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) { - enteringRecords.push(recordTo); - } - } - } - return [leavingRecords, updatingRecords, enteringRecords]; - } - const router = createRouter({ - history: createWebHistory(), - routes: [] - }); - function isPromise(obj) { - return obj && typeof obj.then === "function"; - } - Promise.resolve(false); - Promise.resolve(true); - var PROMISE_RESOLVED_VOID = Promise.resolve(); - function sleep(time, resolveWith) { - if (!time) - time = 0; - return new Promise(function(res) { - return setTimeout(function() { - return res(resolveWith); - }, time); - }); - } - function randomInt(min, max) { - return Math.floor(Math.random() * (max - min + 1) + min); - } - function randomToken() { - return Math.random().toString(36).substring(2); - } - var lastMs = 0; - var additional = 0; - function microSeconds$4() { - var ms = (/* @__PURE__ */ new Date()).getTime(); - if (ms === lastMs) { - additional++; - return ms * 1e3 + additional; - } else { - lastMs = ms; - additional = 0; - return ms * 1e3; - } - } - var microSeconds$3 = microSeconds$4; - var type$3 = "native"; - function create$3(channelName) { - var state = { - messagesCallback: null, - bc: new BroadcastChannel(channelName), - subFns: [] - // subscriberFunctions - }; - state.bc.onmessage = function(msg) { - if (state.messagesCallback) { - state.messagesCallback(msg.data); - } - }; - return state; - } - function close$3(channelState) { - channelState.bc.close(); - channelState.subFns = []; - } - function postMessage$3(channelState, messageJson) { - try { - channelState.bc.postMessage(messageJson, false); - return PROMISE_RESOLVED_VOID; - } catch (err) { - return Promise.reject(err); - } - } - function onMessage$3(channelState, fn) { - channelState.messagesCallback = fn; - } - function canBeUsed$3() { - if (typeof window === "undefined") { - return false; - } - if (typeof BroadcastChannel === "function") { - if (BroadcastChannel._pubkey) { - throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill"); - } - return true; - } else { - return false; - } - } - function averageResponseTime$3() { - return 150; - } - var NativeMethod = { - create: create$3, - close: close$3, - onMessage: onMessage$3, - postMessage: postMessage$3, - canBeUsed: canBeUsed$3, - type: type$3, - averageResponseTime: averageResponseTime$3, - microSeconds: microSeconds$3 - }; - var ObliviousSet = ( - /** @class */ - function() { - function ObliviousSet2(ttl) { - this.ttl = ttl; - this.map = /* @__PURE__ */ new Map(); - this._to = false; - } - ObliviousSet2.prototype.has = function(value) { - return this.map.has(value); - }; - ObliviousSet2.prototype.add = function(value) { - var _this = this; - this.map.set(value, now()); - if (!this._to) { - this._to = true; - setTimeout(function() { - _this._to = false; - removeTooOldValues(_this); - }, 0); - } - }; - ObliviousSet2.prototype.clear = function() { - this.map.clear(); - }; - return ObliviousSet2; - }() - ); - function removeTooOldValues(obliviousSet) { - var olderThen = now() - obliviousSet.ttl; - var iterator = obliviousSet.map[Symbol.iterator](); - while (true) { - var next = iterator.next().value; - if (!next) { - return; - } - var value = next[0]; - var time = next[1]; - if (time < olderThen) { - obliviousSet.map.delete(value); - } else { - return; - } - } - } - function now() { - return (/* @__PURE__ */ new Date()).getTime(); - } - function fillOptionsWithDefaults() { - var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - var options = JSON.parse(JSON.stringify(originalOptions)); - if (typeof options.webWorkerSupport === "undefined") - options.webWorkerSupport = true; - if (!options.idb) - options.idb = {}; - if (!options.idb.ttl) - options.idb.ttl = 1e3 * 45; - if (!options.idb.fallbackInterval) - options.idb.fallbackInterval = 150; - if (originalOptions.idb && typeof originalOptions.idb.onclose === "function") - options.idb.onclose = originalOptions.idb.onclose; - if (!options.localstorage) - options.localstorage = {}; - if (!options.localstorage.removeTimeout) - options.localstorage.removeTimeout = 1e3 * 60; - if (originalOptions.methods) - options.methods = originalOptions.methods; - if (!options.node) - options.node = {}; - if (!options.node.ttl) - options.node.ttl = 1e3 * 60 * 2; - if (!options.node.maxParallelWrites) - options.node.maxParallelWrites = 2048; - if (typeof options.node.useFastPath === "undefined") - options.node.useFastPath = true; - return options; - } - var microSeconds$2 = microSeconds$4; - var DB_PREFIX = "pubkey.broadcast-channel-0-"; - var OBJECT_STORE_ID = "messages"; - var TRANSACTION_SETTINGS = { - durability: "relaxed" - }; - var type$2 = "idb"; - function getIdb() { - if (typeof indexedDB !== "undefined") - return indexedDB; - if (typeof window !== "undefined") { - if (typeof window.mozIndexedDB !== "undefined") - return window.mozIndexedDB; - if (typeof window.webkitIndexedDB !== "undefined") - return window.webkitIndexedDB; - if (typeof window.msIndexedDB !== "undefined") - return window.msIndexedDB; - } - return false; - } - function commitIndexedDBTransaction(tx) { - if (tx.commit) { - tx.commit(); - } - } - function createDatabase(channelName) { - var IndexedDB = getIdb(); - var dbName = DB_PREFIX + channelName; - var openRequest = IndexedDB.open(dbName); - openRequest.onupgradeneeded = function(ev) { - var db = ev.target.result; - db.createObjectStore(OBJECT_STORE_ID, { - keyPath: "id", - autoIncrement: true - }); - }; - return new Promise(function(res, rej) { - openRequest.onerror = function(ev) { - return rej(ev); - }; - openRequest.onsuccess = function() { - res(openRequest.result); - }; - }); - } - function writeMessage(db, readerUuid, messageJson) { - var time = (/* @__PURE__ */ new Date()).getTime(); - var writeObject = { - uuid: readerUuid, - time, - data: messageJson - }; - var tx = db.transaction([OBJECT_STORE_ID], "readwrite", TRANSACTION_SETTINGS); - return new Promise(function(res, rej) { - tx.oncomplete = function() { - return res(); - }; - tx.onerror = function(ev) { - return rej(ev); - }; - var objectStore = tx.objectStore(OBJECT_STORE_ID); - objectStore.add(writeObject); - commitIndexedDBTransaction(tx); - }); - } - function getMessagesHigherThan(db, lastCursorId) { - var tx = db.transaction(OBJECT_STORE_ID, "readonly", TRANSACTION_SETTINGS); - var objectStore = tx.objectStore(OBJECT_STORE_ID); - var ret = []; - var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); - if (objectStore.getAll) { - var getAllRequest = objectStore.getAll(keyRangeValue); - return new Promise(function(res, rej) { - getAllRequest.onerror = function(err) { - return rej(err); - }; - getAllRequest.onsuccess = function(e) { - res(e.target.result); - }; - }); - } - function openCursor() { - try { - keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); - return objectStore.openCursor(keyRangeValue); - } catch (e) { - return objectStore.openCursor(); - } - } - return new Promise(function(res, rej) { - var openCursorRequest = openCursor(); - openCursorRequest.onerror = function(err) { - return rej(err); - }; - openCursorRequest.onsuccess = function(ev) { - var cursor = ev.target.result; - if (cursor) { - if (cursor.value.id < lastCursorId + 1) { - cursor["continue"](lastCursorId + 1); - } else { - ret.push(cursor.value); - cursor["continue"](); - } - } else { - commitIndexedDBTransaction(tx); - res(ret); - } - }; - }); - } - function removeMessagesById(channelState, ids) { - if (channelState.closed) { - return Promise.resolve([]); - } - var tx = channelState.db.transaction(OBJECT_STORE_ID, "readwrite", TRANSACTION_SETTINGS); - var objectStore = tx.objectStore(OBJECT_STORE_ID); - return Promise.all(ids.map(function(id) { - var deleteRequest = objectStore["delete"](id); - return new Promise(function(res) { - deleteRequest.onsuccess = function() { - return res(); - }; - }); - })); - } - function getOldMessages(db, ttl) { - var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl; - var tx = db.transaction(OBJECT_STORE_ID, "readonly", TRANSACTION_SETTINGS); - var objectStore = tx.objectStore(OBJECT_STORE_ID); - var ret = []; - return new Promise(function(res) { - objectStore.openCursor().onsuccess = function(ev) { - var cursor = ev.target.result; - if (cursor) { - var msgObk = cursor.value; - if (msgObk.time < olderThen) { - ret.push(msgObk); - cursor["continue"](); - } else { - commitIndexedDBTransaction(tx); - res(ret); - } - } else { - res(ret); - } - }; - }); - } - function cleanOldMessages(channelState) { - return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) { - return removeMessagesById(channelState, tooOld.map(function(msg) { - return msg.id; - })); - }); - } - function create$2(channelName, options) { - options = fillOptionsWithDefaults(options); - return createDatabase(channelName).then(function(db) { - var state = { - closed: false, - lastCursorId: 0, - channelName, - options, - uuid: randomToken(), - /** - * emittedMessagesIds - * contains all messages that have been emitted before - * @type {ObliviousSet} - */ - eMIs: new ObliviousSet(options.idb.ttl * 2), - // ensures we do not read messages in parallel - writeBlockPromise: PROMISE_RESOLVED_VOID, - messagesCallback: null, - readQueuePromises: [], - db - }; - db.onclose = function() { - state.closed = true; - if (options.idb.onclose) - options.idb.onclose(); - }; - _readLoop(state); - return state; - }); - } - function _readLoop(state) { - if (state.closed) - return; - readNewMessages(state).then(function() { - return sleep(state.options.idb.fallbackInterval); - }).then(function() { - return _readLoop(state); - }); - } - function _filterMessage(msgObj, state) { - if (msgObj.uuid === state.uuid) - return false; - if (state.eMIs.has(msgObj.id)) - return false; - if (msgObj.data.time < state.messagesCallbackTime) - return false; - return true; - } - function readNewMessages(state) { - if (state.closed) - return PROMISE_RESOLVED_VOID; - if (!state.messagesCallback) - return PROMISE_RESOLVED_VOID; - return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) { - var useMessages = newerMessages.filter(function(msgObj) { - return !!msgObj; - }).map(function(msgObj) { - if (msgObj.id > state.lastCursorId) { - state.lastCursorId = msgObj.id; - } - return msgObj; - }).filter(function(msgObj) { - return _filterMessage(msgObj, state); - }).sort(function(msgObjA, msgObjB) { - return msgObjA.time - msgObjB.time; - }); - useMessages.forEach(function(msgObj) { - if (state.messagesCallback) { - state.eMIs.add(msgObj.id); - state.messagesCallback(msgObj.data); - } - }); - return PROMISE_RESOLVED_VOID; - }); - } - function close$2(channelState) { - channelState.closed = true; - channelState.db.close(); - } - function postMessage$2(channelState, messageJson) { - channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() { - return writeMessage(channelState.db, channelState.uuid, messageJson); - }).then(function() { - if (randomInt(0, 10) === 0) { - cleanOldMessages(channelState); - } - }); - return channelState.writeBlockPromise; - } - function onMessage$2(channelState, fn, time) { - channelState.messagesCallbackTime = time; - channelState.messagesCallback = fn; - readNewMessages(channelState); - } - function canBeUsed$2() { - return !!getIdb(); - } - function averageResponseTime$2(options) { - return options.idb.fallbackInterval * 2; - } - var IndexedDBMethod = { - create: create$2, - close: close$2, - onMessage: onMessage$2, - postMessage: postMessage$2, - canBeUsed: canBeUsed$2, - type: type$2, - averageResponseTime: averageResponseTime$2, - microSeconds: microSeconds$2 - }; - var microSeconds$1 = microSeconds$4; - var KEY_PREFIX = "pubkey.broadcastChannel-"; - var type$1 = "localstorage"; - function getLocalStorage() { - var localStorage2; - if (typeof window === "undefined") - return null; - try { - localStorage2 = window.localStorage; - localStorage2 = window["ie8-eventlistener/storage"] || window.localStorage; - } catch (e) { - } - return localStorage2; - } - function storageKey(channelName) { - return KEY_PREFIX + channelName; - } - function postMessage$1(channelState, messageJson) { - return new Promise(function(res) { - sleep().then(function() { - var key = storageKey(channelState.channelName); - var writeObj = { - token: randomToken(), - time: (/* @__PURE__ */ new Date()).getTime(), - data: messageJson, - uuid: channelState.uuid - }; - var value = JSON.stringify(writeObj); - getLocalStorage().setItem(key, value); - var ev = document.createEvent("Event"); - ev.initEvent("storage", true, true); - ev.key = key; - ev.newValue = value; - window.dispatchEvent(ev); - res(); - }); - }); - } - function addStorageEventListener(channelName, fn) { - var key = storageKey(channelName); - var listener = function listener2(ev) { - if (ev.key === key) { - fn(JSON.parse(ev.newValue)); - } - }; - window.addEventListener("storage", listener); - return listener; - } - function removeStorageEventListener(listener) { - window.removeEventListener("storage", listener); - } - function create$1(channelName, options) { - options = fillOptionsWithDefaults(options); - if (!canBeUsed$1()) { - throw new Error("BroadcastChannel: localstorage cannot be used"); - } - var uuid = randomToken(); - var eMIs = new ObliviousSet(options.localstorage.removeTimeout); - var state = { - channelName, - uuid, - eMIs - // emittedMessagesIds - }; - state.listener = addStorageEventListener(channelName, function(msgObj) { - if (!state.messagesCallback) - return; - if (msgObj.uuid === uuid) - return; - if (!msgObj.token || eMIs.has(msgObj.token)) - return; - if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime) - return; - eMIs.add(msgObj.token); - state.messagesCallback(msgObj.data); - }); - return state; - } - function close$1(channelState) { - removeStorageEventListener(channelState.listener); - } - function onMessage$1(channelState, fn, time) { - channelState.messagesCallbackTime = time; - channelState.messagesCallback = fn; - } - function canBeUsed$1() { - var ls = getLocalStorage(); - if (!ls) - return false; - try { - var key = "__broadcastchannel_check"; - ls.setItem(key, "works"); - ls.removeItem(key); - } catch (e) { - return false; - } - return true; - } - function averageResponseTime$1() { - var defaultTime = 120; - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.includes("safari") && !userAgent.includes("chrome")) { - return defaultTime * 2; - } - return defaultTime; - } - var LocalstorageMethod = { - create: create$1, - close: close$1, - onMessage: onMessage$1, - postMessage: postMessage$1, - canBeUsed: canBeUsed$1, - type: type$1, - averageResponseTime: averageResponseTime$1, - microSeconds: microSeconds$1 - }; - var microSeconds = microSeconds$4; - var type = "simulate"; - var SIMULATE_CHANNELS = /* @__PURE__ */ new Set(); - function create(channelName) { - var state = { - name: channelName, - messagesCallback: null - }; - SIMULATE_CHANNELS.add(state); - return state; - } - function close(channelState) { - SIMULATE_CHANNELS["delete"](channelState); - } - function postMessage(channelState, messageJson) { - return new Promise(function(res) { - return setTimeout(function() { - var channelArray = Array.from(SIMULATE_CHANNELS); - channelArray.filter(function(channel) { - return channel.name === channelState.name; - }).filter(function(channel) { - return channel !== channelState; - }).filter(function(channel) { - return !!channel.messagesCallback; - }).forEach(function(channel) { - return channel.messagesCallback(messageJson); - }); - res(); - }, 5); - }); - } - function onMessage(channelState, fn) { - channelState.messagesCallback = fn; - } - function canBeUsed() { - return true; - } - function averageResponseTime() { - return 5; - } - var SimulateMethod = { - create, - close, - onMessage, - postMessage, - canBeUsed, - type, - averageResponseTime, - microSeconds - }; - var METHODS = [ - NativeMethod, - // fastest - IndexedDBMethod, - LocalstorageMethod - ]; - function chooseMethod(options) { - var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean); - if (options.type) { - if (options.type === "simulate") { - return SimulateMethod; - } - var ret = chooseMethods.find(function(m2) { - return m2.type === options.type; - }); - if (!ret) - throw new Error("method-type " + options.type + " not found"); - else - return ret; - } - if (!options.webWorkerSupport) { - chooseMethods = chooseMethods.filter(function(m2) { - return m2.type !== "idb"; - }); - } - var useMethod = chooseMethods.find(function(method) { - return method.canBeUsed(); - }); - if (!useMethod) - throw new Error("No usable method found in " + JSON.stringify(METHODS.map(function(m2) { - return m2.type; - }))); - else - return useMethod; - } - var OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set(); - var lastId = 0; - var BroadcastChannel$1 = function BroadcastChannel2(name, options) { - this.id = lastId++; - OPEN_BROADCAST_CHANNELS.add(this); - this.name = name; - if (ENFORCED_OPTIONS) { - options = ENFORCED_OPTIONS; - } - this.options = fillOptionsWithDefaults(options); - this.method = chooseMethod(this.options); - this._iL = false; - this._onML = null; - this._addEL = { - message: [], - internal: [] - }; - this._uMP = /* @__PURE__ */ new Set(); - this._befC = []; - this._prepP = null; - _prepareChannel(this); - }; - BroadcastChannel$1._pubkey = true; - var ENFORCED_OPTIONS; - BroadcastChannel$1.prototype = { - postMessage: function postMessage2(msg) { - if (this.closed) { - throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /** - * In the past when this error appeared, it was really hard to debug. - * So now we log the msg together with the error so it at least - * gives some clue about where in your application this happens. - */ - JSON.stringify(msg)); - } - return _post(this, "message", msg); - }, - postInternal: function postInternal(msg) { - return _post(this, "internal", msg); - }, - set onmessage(fn) { - var time = this.method.microSeconds(); - var listenObj = { - time, - fn - }; - _removeListenerObject(this, "message", this._onML); - if (fn && typeof fn === "function") { - this._onML = listenObj; - _addListenerObject(this, "message", listenObj); - } else { - this._onML = null; - } - }, - addEventListener: function addEventListener(type2, fn) { - var time = this.method.microSeconds(); - var listenObj = { - time, - fn - }; - _addListenerObject(this, type2, listenObj); - }, - removeEventListener: function removeEventListener(type2, fn) { - var obj = this._addEL[type2].find(function(obj2) { - return obj2.fn === fn; - }); - _removeListenerObject(this, type2, obj); - }, - close: function close2() { - var _this = this; - if (this.closed) { - return; - } - OPEN_BROADCAST_CHANNELS["delete"](this); - this.closed = true; - var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID; - this._onML = null; - this._addEL.message = []; - return awaitPrepare.then(function() { - return Promise.all(Array.from(_this._uMP)); - }).then(function() { - return Promise.all(_this._befC.map(function(fn) { - return fn(); - })); - }).then(function() { - return _this.method.close(_this._state); - }); - }, - get type() { - return this.method.type; - }, - get isClosed() { - return this.closed; - } - }; - function _post(broadcastChannel, type2, msg) { - var time = broadcastChannel.method.microSeconds(); - var msgObj = { - time, - type: type2, - data: msg - }; - var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID; - return awaitPrepare.then(function() { - var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj); - broadcastChannel._uMP.add(sendPromise); - sendPromise["catch"]().then(function() { - return broadcastChannel._uMP["delete"](sendPromise); - }); - return sendPromise; - }); - } - function _prepareChannel(channel) { - var maybePromise = channel.method.create(channel.name, channel.options); - if (isPromise(maybePromise)) { - channel._prepP = maybePromise; - maybePromise.then(function(s) { - channel._state = s; - }); - } else { - channel._state = maybePromise; - } - } - function _hasMessageListeners(channel) { - if (channel._addEL.message.length > 0) - return true; - if (channel._addEL.internal.length > 0) - return true; - return false; - } - function _addListenerObject(channel, type2, obj) { - channel._addEL[type2].push(obj); - _startListening(channel); - } - function _removeListenerObject(channel, type2, obj) { - channel._addEL[type2] = channel._addEL[type2].filter(function(o) { - return o !== obj; - }); - _stopListening(channel); - } - function _startListening(channel) { - if (!channel._iL && _hasMessageListeners(channel)) { - var listenerFn = function listenerFn2(msgObj) { - channel._addEL[msgObj.type].forEach(function(listenerObject) { - var hundredMsInMicro = 100 * 1e3; - var minMessageTime = listenerObject.time - hundredMsInMicro; - if (msgObj.time >= minMessageTime) { - listenerObject.fn(msgObj.data); - } - }); - }; - var time = channel.method.microSeconds(); - if (channel._prepP) { - channel._prepP.then(function() { - channel._iL = true; - channel.method.onMessage(channel._state, listenerFn, time); - }); - } else { - channel._iL = true; - channel.method.onMessage(channel._state, listenerFn, time); - } - } - } - function _stopListening(channel) { - if (channel._iL && !_hasMessageListeners(channel)) { - channel._iL = false; - var time = channel.method.microSeconds(); - channel.method.onMessage(channel._state, null, time); - } - } - class DevalueError extends Error { - /** - * @param {string} message - * @param {string[]} keys - */ - constructor(message, keys) { - super(message); - this.name = "DevalueError"; - this.path = keys.join(""); - } - } - function is_primitive(thing) { - return Object(thing) !== thing; - } - const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames( - Object.prototype - ).sort().join("\0"); - function is_plain_object(thing) { - const proto = Object.getPrototypeOf(thing); - return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names; - } - function get_type(thing) { - return Object.prototype.toString.call(thing).slice(8, -1); - } - function get_escaped_char(char) { - switch (char) { - case '"': - return '\\"'; - case "<": - return "\\u003C"; - case "\\": - return "\\\\"; - case "\n": - return "\\n"; - case "\r": - return "\\r"; - case " ": - return "\\t"; - case "\b": - return "\\b"; - case "\f": - return "\\f"; - case "\u2028": - return "\\u2028"; - case "\u2029": - return "\\u2029"; - default: - return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; - } - } - function stringify_string(str) { - let result = ""; - let last_pos = 0; - const len = str.length; - for (let i = 0; i < len; i += 1) { - const char = str[i]; - const replacement = get_escaped_char(char); - if (replacement) { - result += str.slice(last_pos, i) + replacement; - last_pos = i + 1; - } - } - return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`; - } - const UNDEFINED = -1; - const HOLE = -2; - const NAN = -3; - const POSITIVE_INFINITY = -4; - const NEGATIVE_INFINITY = -5; - const NEGATIVE_ZERO = -6; - function parse(serialized, revivers) { - return unflatten(JSON.parse(serialized), revivers); - } - function unflatten(parsed, revivers) { - if (typeof parsed === "number") - return hydrate(parsed, true); - if (!Array.isArray(parsed) || parsed.length === 0) { - throw new Error("Invalid input"); - } - const values = ( - /** @type {any[]} */ - parsed - ); - const hydrated = Array(values.length); - function hydrate(index2, standalone = false) { - if (index2 === UNDEFINED) - return void 0; - if (index2 === NAN) - return NaN; - if (index2 === POSITIVE_INFINITY) - return Infinity; - if (index2 === NEGATIVE_INFINITY) - return -Infinity; - if (index2 === NEGATIVE_ZERO) - return -0; - if (standalone) - throw new Error(`Invalid input`); - if (index2 in hydrated) - return hydrated[index2]; - const value = values[index2]; - if (!value || typeof value !== "object") { - hydrated[index2] = value; - } else if (Array.isArray(value)) { - if (typeof value[0] === "string") { - const type2 = value[0]; - const reviver = revivers == null ? void 0 : revivers[type2]; - if (reviver) { - return hydrated[index2] = reviver(hydrate(value[1])); - } - switch (type2) { - case "Date": - hydrated[index2] = new Date(value[1]); - break; - case "Set": - const set2 = /* @__PURE__ */ new Set(); - hydrated[index2] = set2; - for (let i = 1; i < value.length; i += 1) { - set2.add(hydrate(value[i])); - } - break; - case "Map": - const map = /* @__PURE__ */ new Map(); - hydrated[index2] = map; - for (let i = 1; i < value.length; i += 2) { - map.set(hydrate(value[i]), hydrate(value[i + 1])); - } - break; - case "RegExp": - hydrated[index2] = new RegExp(value[1], value[2]); - break; - case "Object": - hydrated[index2] = Object(value[1]); - break; - case "BigInt": - hydrated[index2] = BigInt(value[1]); - break; - case "null": - const obj = /* @__PURE__ */ Object.create(null); - hydrated[index2] = obj; - for (let i = 1; i < value.length; i += 2) { - obj[value[i]] = hydrate(value[i + 1]); - } - break; - default: - throw new Error(`Unknown type ${type2}`); - } - } else { - const array = new Array(value.length); - hydrated[index2] = array; - for (let i = 0; i < value.length; i += 1) { - const n = value[i]; - if (n === HOLE) - continue; - array[i] = hydrate(n); - } - } - } else { - const object = {}; - hydrated[index2] = object; - for (const key in value) { - const n = value[key]; - object[key] = hydrate(n); - } - } - return hydrated[index2]; - } - return hydrate(0); - } - function stringify(value, reducers) { - const stringified = []; - const indexes = /* @__PURE__ */ new Map(); - const custom = []; - for (const key in reducers) { - custom.push({ key, fn: reducers[key] }); - } - const keys = []; - let p = 0; - function flatten(thing) { - if (typeof thing === "function") { - throw new DevalueError(`Cannot stringify a function`, keys); - } - if (indexes.has(thing)) - return indexes.get(thing); - if (thing === void 0) - return UNDEFINED; - if (Number.isNaN(thing)) - return NAN; - if (thing === Infinity) - return POSITIVE_INFINITY; - if (thing === -Infinity) - return NEGATIVE_INFINITY; - if (thing === 0 && 1 / thing < 0) - return NEGATIVE_ZERO; - const index3 = p++; - indexes.set(thing, index3); - for (const { key, fn } of custom) { - const value2 = fn(thing); - if (value2) { - stringified[index3] = `["${key}",${flatten(value2)}]`; - return index3; - } - } - let str = ""; - if (is_primitive(thing)) { - str = stringify_primitive(thing); - } else { - const type2 = get_type(thing); - switch (type2) { - case "Number": - case "String": - case "Boolean": - str = `["Object",${stringify_primitive(thing)}]`; - break; - case "BigInt": - str = `["BigInt",${thing}]`; - break; - case "Date": - str = `["Date","${thing.toISOString()}"]`; - break; - case "RegExp": - const { source, flags } = thing; - str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`; - break; - case "Array": - str = "["; - for (let i = 0; i < thing.length; i += 1) { - if (i > 0) - str += ","; - if (i in thing) { - keys.push(`[${i}]`); - str += flatten(thing[i]); - keys.pop(); - } else { - str += HOLE; - } - } - str += "]"; - break; - case "Set": - str = '["Set"'; - for (const value2 of thing) { - str += `,${flatten(value2)}`; - } - str += "]"; - break; - case "Map": - str = '["Map"'; - for (const [key, value2] of thing) { - keys.push( - `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})` - ); - str += `,${flatten(key)},${flatten(value2)}`; - } - str += "]"; - break; - default: - if (!is_plain_object(thing)) { - throw new DevalueError( - `Cannot stringify arbitrary non-POJOs`, - keys - ); - } - if (Object.getOwnPropertySymbols(thing).length > 0) { - throw new DevalueError( - `Cannot stringify POJOs with symbolic keys`, - keys - ); - } - if (Object.getPrototypeOf(thing) === null) { - str = '["null"'; - for (const key in thing) { - keys.push(`.${key}`); - str += `,${stringify_string(key)},${flatten(thing[key])}`; - keys.pop(); - } - str += "]"; - } else { - str = "{"; - let started = false; - for (const key in thing) { - if (started) - str += ","; - started = true; - keys.push(`.${key}`); - str += `${stringify_string(key)}:${flatten(thing[key])}`; - keys.pop(); - } - str += "}"; - } - } - } - stringified[index3] = str; - return index3; - } - const index2 = flatten(value); - if (index2 < 0) - return `${index2}`; - return `[${stringified.join(",")}]`; - } - function stringify_primitive(thing) { - const type2 = typeof thing; - if (type2 === "string") - return stringify_string(thing); - if (thing instanceof String) - return stringify_string(thing.toString()); - if (thing === void 0) - return UNDEFINED.toString(); - if (thing === 0 && 1 / thing < 0) - return NEGATIVE_ZERO.toString(); - if (type2 === "bigint") - return `["BigInt","${thing}"]`; - return String(thing); - } - function m(t, a, { initialize: d, type: r }) { - let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0; - vue.watch(() => a[t], (i) => { - l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false; - }, { deep: true }), n.onmessage = (i) => { - if (i === void 0) { - n.postMessage({ timestamp: e, state: parse(stringify(a[t])) }); - return; - } - i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state); - }; - let u = () => n.postMessage(void 0), p = () => n.close(); - return d && u(), { sync: u, unshare: p }; - } - var h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => { - var _a, _b; - let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? []; - !n || Object.keys(r.$state).forEach((e) => { - var _a2; - l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d }); - }); - }; - const pinia = createPinia(); - pinia.use( - g({ - enable: true, - initialize: true - }) - ); - const index = { - install: (app, options) => { - const appRouter = (options == null ? void 0 : options.router) || router; - const registry = new Registry(appRouter, options == null ? void 0 : options.getMeta); - app.use(appRouter); - app.use(pinia); - app.provide("$registry", registry); - if (options == null ? void 0 : options.components) { - for (const [tag, component] of Object.entries(options.components)) { - app.component(tag, component); - } - } - } - }; - exports2.DoctypeMeta = DoctypeMeta; - exports2.Registry = Registry; - exports2.Stonecrop = index; - exports2.useStonecrop = useStonecrop; - Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" }); -}); diff --git a/stonecrop/package.json b/stonecrop/package.json index 71621a74..b25df053 100644 --- a/stonecrop/package.json +++ b/stonecrop/package.json @@ -1,9 +1,21 @@ { "name": "@stonecrop/stonecrop", - "version": "0.2.2", + "version": "0.2.5", "description": "schema helper", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "stonecrop" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/stonecrop.js", @@ -12,10 +24,11 @@ }, "main": "dist/stonecrop.js", "module": "dist/stonecrop.js", + "umd": "dist/stonecrop.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.vue" + "src/*" ], "scripts": { "build": "vite build", @@ -46,8 +59,10 @@ "typescript": "^5.0.4", "vite": "^5.2.9" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/stonecrop.umd.cjs" + } } diff --git a/themes/dist/style.css b/themes/dist/style.css deleted file mode 100644 index 5c5c70ed..00000000 --- a/themes/dist/style.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em} diff --git a/themes/dist/themes.js b/themes/dist/themes.js deleted file mode 100644 index 82656ee6..00000000 --- a/themes/dist/themes.js +++ /dev/null @@ -1,2 +0,0 @@ - -//# sourceMappingURL=themes.js.map diff --git a/themes/dist/themes.js.map b/themes/dist/themes.js.map deleted file mode 100644 index 4c51b3fd..00000000 --- a/themes/dist/themes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"themes.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/themes/dist/themes.umd.cjs b/themes/dist/themes.umd.cjs deleted file mode 100644 index 4a2ce62b..00000000 --- a/themes/dist/themes.umd.cjs +++ /dev/null @@ -1,2 +0,0 @@ -(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict"}); -//# sourceMappingURL=themes.umd.cjs.map diff --git a/themes/dist/themes.umd.cjs.map b/themes/dist/themes.umd.cjs.map deleted file mode 100644 index a84e48b4..00000000 --- a/themes/dist/themes.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"themes.umd.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/themes/package.json b/themes/package.json index 56db915f..3e00db81 100644 --- a/themes/package.json +++ b/themes/package.json @@ -1,7 +1,19 @@ { "name": "@stonecrop/themes", - "version": "0.0.0", + "version": "0.2.5", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "themes" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "scripts": { "build": "vite build", "dev": "vite", @@ -12,6 +24,9 @@ "vite": "^5.2.9", "vue": "^3.4.23" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" } diff --git a/utilities/dist/utilities.js b/utilities/dist/utilities.js deleted file mode 100644 index a8fdda41..00000000 --- a/utilities/dist/utilities.js +++ /dev/null @@ -1,333 +0,0 @@ -import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from "vue"; -var v; -const M = typeof window < "u", F = (e) => typeof e == "string", j = () => { -}; -M && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function H(e) { - return typeof e == "function" ? e() : Q(e); -} -function q(e) { - return e; -} -function G(e) { - return U() ? (K(e), !0) : !1; -} -function y(e) { - var t; - const r = H(e); - return (t = r == null ? void 0 : r.$el) != null ? t : r; -} -const N = M ? window : void 0; -function z(...e) { - let t, r, n, o; - if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t) - return j; - Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]); - const l = [], s = () => { - l.forEach((c) => c()), l.length = 0; - }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => { - s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g)))); - }, { immediate: !0, flush: "post" }), d = () => { - C(), s(); - }; - return G(d), d; -} -const O = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, T = "__vueuse_ssr_handlers__"; -O[T] = O[T] || {}; -function J(e, { window: t = N, scrollTarget: r } = {}) { - const n = B(!1), o = () => { - if (!t) - return; - const l = t.document, s = y(e); - if (!s) - n.value = !1; - else { - const a = s.getBoundingClientRect(); - n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0; - } - }; - return D(() => y(e), () => o(), { immediate: !0, flush: "post" }), t && z(r || t, "scroll", o, { - capture: !1, - passive: !0 - }), n; -} -var P; -(function(e) { - e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; -})(P || (P = {})); -var X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => { - for (var r in t || (t = {})) - Y.call(t, r) && _(e, r, t[r]); - if (I) - for (var r of I(t)) - Z.call(t, r) && _(e, r, t[r]); - return e; -}; -const te = { - 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] -}; -ee({ - linear: q -}, te); -const f = (e) => { - let t = J(e).value; - return t = t && e.offsetHeight > 0, t; -}, u = (e) => e.tabIndex >= 0, A = (e) => { - const t = e.target; - return E(t); -}, E = (e) => { - var r; - let t; - if (e instanceof HTMLTableCellElement) { - const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling; - if (n) { - const l = Array.from(n.children)[e.cellIndex]; - l && (t = l); - } - } else if (e instanceof HTMLTableRowElement) { - const n = e.previousElementSibling; - n && (t = n); - } - return t && (!u(t) || !f(t)) ? E(t) : t; -}, ne = (e) => { - var n; - const t = e.target; - let r; - if (t instanceof HTMLTableCellElement) { - const o = (n = t.parentElement) == null ? void 0 : n.parentElement; - if (o) { - const s = o.firstElementChild.children[t.cellIndex]; - s && (r = s); - } - } else if (t instanceof HTMLTableRowElement) { - const o = t.parentElement; - if (o) { - const l = o.firstElementChild; - l && (r = l); - } - } - return r && (!u(r) || !f(r)) ? w(r) : r; -}, x = (e) => { - const t = e.target; - return w(t); -}, w = (e) => { - var r; - let t; - if (e instanceof HTMLTableCellElement) { - const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling; - if (n) { - const l = Array.from(n.children)[e.cellIndex]; - l && (t = l); - } - } else if (e instanceof HTMLTableRowElement) { - const n = e.nextElementSibling; - n && (t = n); - } - return t && (!u(t) || !f(t)) ? w(t) : t; -}, re = (e) => { - var n; - const t = e.target; - let r; - if (t instanceof HTMLTableCellElement) { - const o = (n = t.parentElement) == null ? void 0 : n.parentElement; - if (o) { - const s = o.lastElementChild.children[t.cellIndex]; - s && (r = s); - } - } else if (t instanceof HTMLTableRowElement) { - const o = t.parentElement; - if (o) { - const l = o.lastElementChild; - l && (r = l); - } - } - return r && (!u(r) || !f(r)) ? E(r) : r; -}, k = (e) => { - const t = e.target; - return h(t); -}, h = (e) => { - var r; - let t; - if (e.previousElementSibling) - t = e.previousElementSibling; - else { - const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling; - t = n == null ? void 0 : n.lastElementChild; - } - return t && (!u(t) || !f(t)) ? h(t) : t; -}, S = (e) => { - const t = e.target; - return b(t); -}, b = (e) => { - var r; - let t; - if (e.nextElementSibling) - t = e.nextElementSibling; - else { - const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling; - t = n == null ? void 0 : n.firstElementChild; - } - return t && (!u(t) || !f(t)) ? b(t) : t; -}, L = (e) => { - const n = e.target.parentElement.firstElementChild; - return n && (!u(n) || !f(n)) ? b(n) : n; -}, R = (e) => { - const n = e.target.parentElement.lastElementChild; - return n && (!u(n) || !f(n)) ? h(n) : n; -}, m = ["alt", "control", "shift", "meta"], oe = { - ArrowUp: "up", - ArrowDown: "down", - ArrowLeft: "left", - ArrowRight: "right" -}, le = { - "keydown.up": (e) => { - const t = A(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.down": (e) => { - const t = x(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.left": (e) => { - const t = k(e); - e.preventDefault(), e.stopPropagation(), t && t.focus(); - }, - "keydown.right": (e) => { - const t = S(e); - e.preventDefault(), e.stopPropagation(), t && t.focus(); - }, - "keydown.control.up": (e) => { - const t = ne(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.down": (e) => { - const t = re(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.left": (e) => { - const t = L(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.control.right": (e) => { - const t = R(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.end": (e) => { - const t = R(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.enter": (e) => { - if (e.target instanceof HTMLTableCellElement) { - e.preventDefault(), e.stopPropagation(); - const r = x(e); - r && r.focus(); - } - }, - "keydown.shift.enter": (e) => { - if (e.target instanceof HTMLTableCellElement) { - e.preventDefault(), e.stopPropagation(); - const r = A(e); - r && r.focus(); - } - }, - "keydown.home": (e) => { - const t = L(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.tab": (e) => { - const t = S(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - }, - "keydown.shift.tab": (e) => { - const t = k(e); - t && (e.preventDefault(), e.stopPropagation(), t.focus()); - } -}; -function ie(e) { - const t = (n) => { - let o = null; - n.parent && (typeof n.parent == "string" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value); - let l = []; - if (n.selectors) - if (typeof n.selectors == "string") - l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors)); - else if (n.selectors instanceof Element) - l.push(n.selectors); - else if (Array.isArray(n.selectors.value)) - for (const s of n.selectors.value) - s instanceof Element ? l.push(s) : l.push(s.$el); - else - l.push(n.selectors.value); - else - l = Array.from(o.children).filter((a) => u(a) && f(a)); - return l; - }, r = (n) => (o) => { - const l = oe[o.key] || o.key.toLowerCase(); - if (m.includes(l)) - return; - const s = n.handlers || le; - for (const a of Object.keys(s)) { - const [C, ...d] = a.split("."); - if (C === "keydown" && d.includes(l)) { - const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => { - const $ = i.charAt(0).toUpperCase() + i.slice(1); - return o.getModifierState($); - }); - if (g.length > 0) { - if (p) { - for (const i of m) - if (d.includes(i)) { - const $ = i.charAt(0).toUpperCase() + i.slice(1); - o.getModifierState($) && c(o); - } - } - } else - p || c(o); - } - } - }; - W(() => { - for (const n of e) { - const o = t(n); - for (const l of o) - l.addEventListener("keydown", r(n)); - } - }), V(() => { - for (const n of e) { - const o = t(n); - for (const l of o) - l.removeEventListener("keydown", r(n)); - } - }); -} -function ae(e) { -} -export { - le as defaultKeypressHandlers, - ae as install, - ie as useKeyboardNav -}; -//# sourceMappingURL=utilities.js.map diff --git a/utilities/dist/utilities.js.map b/utilities/dist/utilities.js.map deleted file mode 100644 index f1ef8b4f..00000000 --- a/utilities/dist/utilities.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utilities.js","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.23/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.23/node_modules/@vueuse/core/index.mjs","../src/composables/keyboard.ts","../src/index.ts"],"sourcesContent":["import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { onMounted, onBeforeUnmount } from 'vue'\nimport { useElementVisibility } from '@vueuse/core'\n\nimport type { KeyboardNavigationOptions, KeypressHandlers } from 'types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet isVisible = useElementVisibility(element).value\n\tisVisible = isVisible && element.offsetHeight > 0\n\treturn isVisible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getUpCell($target)\n}\n\nconst _getUpCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\tconst $prevRowCells = Array.from($prevRow.children)\n\t\t\tconst $prevCell = $prevRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($prevCell) {\n\t\t\t\t$upCell = $prevCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevRow = element.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\t$upCell = $prevRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn _getUpCell($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navCell = $firstRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$topCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild as HTMLTableRowElement\n\t\t\tif ($firstRow) {\n\t\t\t\t$topCell = $firstRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn _getDownCell($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getDownCell($target)\n}\n\nconst _getDownCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tif ($nextRow) {\n\t\t\tconst $nextRowCells = Array.from($nextRow.children)\n\t\t\tconst $nextCell = $nextRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($nextCell) {\n\t\t\t\t$downCell = $nextCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextRow = element.nextElementSibling as HTMLTableRowElement\n\t\tif ($nextRow) {\n\t\t\t$downCell = $nextRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn _getDownCell($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navCell = $lastRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$bottomCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild as HTMLTableRowElement\n\t\t\tif ($lastRow) {\n\t\t\t\t$bottomCell = $lastRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn _getUpCell($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getPrevCell($target)\n}\n\nconst _getPrevCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tif (element.previousElementSibling) {\n\t\t$prevCell = element.previousElementSibling as HTMLElement\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\t$prevCell = $prevRow?.lastElementChild as HTMLElement\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn _getPrevCell($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getNextCell($target)\n}\n\nconst _getNextCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tif (element.nextElementSibling) {\n\t\t$nextCell = element.nextElementSibling as HTMLElement\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\t$nextCell = $nextRow?.firstElementChild as HTMLElement\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn _getNextCell($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $firstCell = $parent.firstElementChild as HTMLElement | null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn _getNextCell($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $lastCell = $parent.lastElementChild as HTMLElement | null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn _getPrevCell($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\t// get parent element\n\t\tlet $parent: Element | null = null\n\t\tif (option.parent) {\n\t\t\tif (typeof option.parent === 'string') {\n\t\t\t\t$parent = document.querySelector(option.parent)\n\t\t\t} else if (option.parent instanceof Element) {\n\t\t\t\t$parent = option.parent\n\t\t\t} else {\n\t\t\t\t$parent = option.parent.value\n\t\t\t}\n\t\t}\n\n\t\t// generate a list of selector(s)\n\t\tlet selectors: Element[] = []\n\n\t\tif (option.selectors) {\n\t\t\tif (typeof option.selectors === 'string') {\n\t\t\t\tselectors = $parent\n\t\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t\t} else if (option.selectors instanceof Element) {\n\t\t\t\tselectors.push(option.selectors)\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectors.push(element.$el as Element)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst $children = Array.from($parent.children)\n\t\t\tselectors = $children.filter((selector: HTMLElement) => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = (eventKeyMap[event.key] as string) || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(key => modifierKeys.includes(key))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(key => {\n\t\t\t\t\t\tconst modifierKey = key.charAt(0).toUpperCase() + key.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.addEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.removeEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\n\nfunction install(app: App /* options */) {}\n\nexport { defaultKeypressHandlers, install, useKeyboardNav }\n"],"names":["_a","isClient","isString","val","noop","resolveUnref","r","unref","identity","arg","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","unrefElement","elRef","plain","defaultWindow","useEventListener","args","target","events","listeners","options","cleanups","cleanup","register","el","event","listener","options2","stopWatch","watch","stop","_global","globalKey","useElementVisibility","element","window","scrollTarget","elementIsVisible","ref","testBounding","document","rect","SwipeDirection","SwipeDirection2","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","_TransitionPresets","isVisible","isFocusable","getUpCell","$target","_getUpCell","$upCell","$prevRow","$prevCell","getTopCell","$topCell","$table","$navCell","$firstRow","_getDownCell","getDownCell","$downCell","$nextRow","$nextCell","getBottomCell","$bottomCell","$lastRow","getPrevCell","_getPrevCell","getNextCell","_getNextCell","getFirstCell","$firstCell","getLastCell","$lastCell","modifierKeys","eventKeyMap","defaultKeypressHandlers","useKeyboardNav","getSelectors","option","$parent","selectors","selector","getEventListener","activeKey","handlers","eventType","keys","hasModifier","isModifierActive","modifierKey","modifier","onMounted","onBeforeUnmount","install","app"],"mappings":";AAgCA,IAAIA;AACJ,MAAMC,IAAW,OAAO,SAAW,KAU7BC,IAAW,CAACC,MAAQ,OAAOA,KAAQ,UAMnCC,IAAO,MAAM;AACnB;AAMcH,OAAcD,IAAK,UAAU,OAAO,SAAS,OAAO,cAAc,QAAgBA,EAAG,cAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AAGjK,SAASK,EAAaC,GAAG;AACvB,SAAO,OAAOA,KAAM,aAAaA,EAAC,IAAKC,EAAMD,CAAC;AAChD;AA2IA,SAASE,EAASC,GAAK;AACrB,SAAOA;AACT;AA6EA,SAASC,EAAkBC,GAAI;AAC7B,SAAIC,EAAe,KACjBC,EAAeF,CAAE,GACV,MAEF;AACT;ACzMA,SAASG,EAAaC,GAAO;AAC3B,MAAIf;AACJ,QAAMgB,IAAQX,EAAaU,CAAK;AAChC,UAAQf,IAAKgB,KAAS,OAAO,SAASA,EAAM,QAAQ,OAAOhB,IAAKgB;AAClE;AAEA,MAAMC,IAAgBhB,IAAW,SAAS;AAK1C,SAASiB,KAAoBC,GAAM;AACjC,MAAIC,GACAC,GACAC,GACAC;AAOJ,MANIrB,EAASiB,EAAK,CAAC,CAAC,KAAK,MAAM,QAAQA,EAAK,CAAC,CAAC,KAC5C,CAACE,GAAQC,GAAWC,CAAO,IAAIJ,GAC/BC,IAASH,KAET,CAACG,GAAQC,GAAQC,GAAWC,CAAO,IAAIJ,GAErC,CAACC;AACH,WAAOhB;AACT,EAAK,MAAM,QAAQiB,CAAM,MACvBA,IAAS,CAACA,CAAM,IACb,MAAM,QAAQC,CAAS,MAC1BA,IAAY,CAACA,CA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M,iBAAiB6E,CAAW;AAAA,QAAA,CACzC;AAEG,YAAAF,EAAY,SAAS;AACxB,cAAIC;AACH,uBAAWE,KAAYjB;AAClB,kBAAAa,EAAK,SAASI,CAAQ,GAAG;AAEtB,sBAAAD,IAAcC,EAAS,OAAO,CAAC,EAAE,YAAY,IAAIA,EAAS,MAAM,CAAC;AACnE,gBAAA9E,EAAM,iBAAiB6E,CAAW,KACrC5E,EAASD,CAAK;AAAA,cAEhB;AAAA;AAAA;AAIF,UAAK4E,KACJ3E,EAASD,CAAK;AAAA,MAGjB;AAAA,IACD;AAAA,EAAA;AAIF,EAAA+E,EAAU,MAAM;AACf,eAAWb,KAAUvE,GAAS;AACvB,YAAAyE,IAAYH,EAAaC,CAAM;AACrC,iBAAWG,KAAYD;AACtB,QAAAC,EAAS,iBAAiB,WAAWC,EAAiBJ,CAAM,CAAC;AAAA,IAE/D;AAAA,EAAA,CACA,GAEDc,EAAgB,MAAM;AACrB,eAAWd,KAAUvE,GAAS;AACvB,YAAAyE,IAAYH,EAAaC,CAAM;AACrC,iBAAWG,KAAYD;AACtB,QAAAC,EAAS,oBAAoB,WAAWC,EAAiBJ,CAAM,CAAC;AAAA,IAElE;AAAA,EAAA,CACA;AACF;ACnbA,SAASe,GAAQC,GAAwB;AAAC;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/utilities/dist/utilities.umd.cjs b/utilities/dist/utilities.umd.cjs deleted file mode 100644 index 5a99a736..00000000 --- a/utilities/dist/utilities.umd.cjs +++ /dev/null @@ -1,2 +0,0 @@ -(function(u,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(u=typeof globalThis<"u"?globalThis:u||self,a(u["@stonecrop/utilities"]={},u.Vue))})(this,function(u,a){"use strict";var O;const P=typeof window<"u",U=e=>typeof e=="string",B=()=>{};P&&((O=window==null?void 0:window.navigator)!=null&&O.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function _(e){return typeof e=="function"?e():a.unref(e)}function V(e){return e}function W(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function $(e){var t;const r=_(e);return(t=r==null?void 0:r.$el)!=null?t:r}const I=P?window:void 0;function j(...e){let t,r,n,o;if(U(e[0])||Array.isArray(e[0])?([r,n,o]=e,t=I):[t,r,n,o]=e,!t)return B;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const s=[],l=()=>{s.forEach(c=>c()),s.length=0},f=(c,y,g,i)=>(c.addEventListener(y,g,i),()=>c.removeEventListener(y,g,i)),T=a.watch(()=>[$(t),_(o)],([c,y])=>{l(),c&&s.push(...r.flatMap(g=>n.map(i=>f(c,g,i,y))))},{immediate:!0,flush:"post"}),m=()=>{T(),l()};return W(m),m}const A=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S="__vueuse_ssr_handlers__";A[S]=A[S]||{};function q(e,{window:t=I,scrollTarget:r}={}){const n=a.ref(!1),o=()=>{if(!t)return;const s=t.document,l=$(e);if(!l)n.value=!1;else{const f=l.getBoundingClientRect();n.value=f.top<=(t.innerHeight||s.documentElement.clientHeight)&&f.left<=(t.innerWidth||s.documentElement.clientWidth)&&f.bottom>=0&&f.right>=0}};return a.watch(()=>$(e),()=>o(),{immediate:!0,flush:"post"}),t&&j(r||t,"scroll",o,{capture:!1,passive:!0}),n}var k;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(k||(k={}));var F=Object.defineProperty,x=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,L=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))G.call(t,r)&&L(e,r,t[r]);if(x)for(var r of x(t))z.call(t,r)&&L(e,r,t[r]);return e};J({linear:V},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const p=e=>{let t=q(e).value;return t=t&&e.offsetHeight>0,t},d=e=>e.tabIndex>=0,R=e=>{const t=e.target;return E(t)},E=e=>{var r;let t;if(e instanceof HTMLTableCellElement){const n=(r=e.parentElement)==null?void 0:r.previousElementSibling;if(n){const s=Array.from(n.children)[e.cellIndex];s&&(t=s)}}else if(e instanceof HTMLTableRowElement){const n=e.previousElementSibling;n&&(t=n)}return t&&(!d(t)||!p(t))?E(t):t},X=e=>{var n;const t=e.target;let r;if(t instanceof HTMLTableCellElement){const o=(n=t.parentElement)==null?void 0:n.parentElement;if(o){const l=o.firstElementChild.children[t.cellIndex];l&&(r=l)}}else if(t instanceof HTMLTableRowElement){const o=t.parentElement;if(o){const s=o.firstElementChild;s&&(r=s)}}return r&&(!d(r)||!p(r))?h(r):r},D=e=>{const t=e.target;return h(t)},h=e=>{var r;let t;if(e instanceof HTMLTableCellElement){const n=(r=e.parentElement)==null?void 0:r.nextElementSibling;if(n){const s=Array.from(n.children)[e.cellIndex];s&&(t=s)}}else if(e instanceof HTMLTableRowElement){const n=e.nextElementSibling;n&&(t=n)}return t&&(!d(t)||!p(t))?h(t):t},Y=e=>{var n;const t=e.target;let r;if(t instanceof HTMLTableCellElement){const o=(n=t.parentElement)==null?void 0:n.parentElement;if(o){const l=o.lastElementChild.children[t.cellIndex];l&&(r=l)}}else if(t instanceof HTMLTableRowElement){const o=t.parentElement;if(o){const s=o.lastElementChild;s&&(r=s)}}return r&&(!d(r)||!p(r))?E(r):r},M=e=>{const t=e.target;return w(t)},w=e=>{var r;let t;if(e.previousElementSibling)t=e.previousElementSibling;else{const n=(r=e.parentElement)==null?void 0:r.previousElementSibling;t=n==null?void 0:n.lastElementChild}return t&&(!d(t)||!p(t))?w(t):t},H=e=>{const t=e.target;return b(t)},b=e=>{var r;let t;if(e.nextElementSibling)t=e.nextElementSibling;else{const n=(r=e.parentElement)==null?void 0:r.nextElementSibling;t=n==null?void 0:n.firstElementChild}return t&&(!d(t)||!p(t))?b(t):t},N=e=>{const n=e.target.parentElement.firstElementChild;return n&&(!d(n)||!p(n))?b(n):n},K=e=>{const n=e.target.parentElement.lastElementChild;return n&&(!d(n)||!p(n))?w(n):n},C=["alt","control","shift","meta"],Z={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Q={"keydown.up":e=>{const t=R(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=D(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=M(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=H(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=X(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Y(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=N(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=K(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=K(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const r=D(e);r&&r.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const r=R(e);r&&r.focus()}},"keydown.home":e=>{const t=N(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=H(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=M(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function ee(e){const t=n=>{let o=null;n.parent&&(typeof n.parent=="string"?o=document.querySelector(n.parent):n.parent instanceof Element?o=n.parent:o=n.parent.value);let s=[];if(n.selectors)if(typeof n.selectors=="string")s=o?Array.from(o.querySelectorAll(n.selectors)):Array.from(document.querySelectorAll(n.selectors));else if(n.selectors instanceof Element)s.push(n.selectors);else if(Array.isArray(n.selectors.value))for(const l of n.selectors.value)l instanceof Element?s.push(l):s.push(l.$el);else s.push(n.selectors.value);else s=Array.from(o.children).filter(f=>d(f)&&p(f));return s},r=n=>o=>{const s=Z[o.key]||o.key.toLowerCase();if(C.includes(s))return;const l=n.handlers||Q;for(const f of Object.keys(l)){const[T,...m]=f.split(".");if(T==="keydown"&&m.includes(s)){const c=l[f],y=m.filter(i=>C.includes(i)),g=C.some(i=>{const v=i.charAt(0).toUpperCase()+i.slice(1);return o.getModifierState(v)});if(y.length>0){if(g){for(const i of C)if(m.includes(i)){const v=i.charAt(0).toUpperCase()+i.slice(1);o.getModifierState(v)&&c(o)}}}else g||c(o)}}};a.onMounted(()=>{for(const n of e){const o=t(n);for(const s of o)s.addEventListener("keydown",r(n))}}),a.onBeforeUnmount(()=>{for(const n of e){const o=t(n);for(const s of o)s.removeEventListener("keydown",r(n))}})}function te(e){}u.defaultKeypressHandlers=Q,u.install=te,u.useKeyboardNav=ee,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); -//# sourceMappingURL=utilities.umd.cjs.map diff --git a/utilities/dist/utilities.umd.cjs.map b/utilities/dist/utilities.umd.cjs.map deleted file mode 100644 index 4700ec40..00000000 --- a/utilities/dist/utilities.umd.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utilities.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.23/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.23/node_modules/@vueuse/core/index.mjs","../src/composables/keyboard.ts","../src/index.ts"],"sourcesContent":["import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { onMounted, onBeforeUnmount } from 'vue'\nimport { useElementVisibility } from '@vueuse/core'\n\nimport type { KeyboardNavigationOptions, KeypressHandlers } from 'types'\n\n// helper functions\nconst isVisible = (element: HTMLElement) => {\n\tlet isVisible = useElementVisibility(element).value\n\tisVisible = isVisible && element.offsetHeight > 0\n\treturn isVisible\n}\n\nconst isFocusable = (element: HTMLElement) => {\n\treturn element.tabIndex >= 0\n}\n\n// navigation functions\nconst getUpCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getUpCell($target)\n}\n\nconst _getUpCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $upCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\tconst $prevRowCells = Array.from($prevRow.children)\n\t\t\tconst $prevCell = $prevRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($prevCell) {\n\t\t\t\t$upCell = $prevCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $prevRow = element.previousElementSibling as HTMLTableRowElement\n\t\tif ($prevRow) {\n\t\t\t$upCell = $prevRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($upCell && (!isFocusable($upCell) || !isVisible($upCell))) {\n\t\treturn _getUpCell($upCell)\n\t}\n\treturn $upCell\n}\n\nconst getTopCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $topCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild\n\t\t\tconst $navCell = $firstRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$topCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $firstRow = $table.firstElementChild as HTMLTableRowElement\n\t\t\tif ($firstRow) {\n\t\t\t\t$topCell = $firstRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($topCell && (!isFocusable($topCell) || !isVisible($topCell))) {\n\t\treturn _getDownCell($topCell)\n\t}\n\treturn $topCell\n}\n\nconst getDownCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getDownCell($target)\n}\n\nconst _getDownCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $downCell: HTMLElement | undefined\n\tif (element instanceof HTMLTableCellElement) {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\tif ($nextRow) {\n\t\t\tconst $nextRowCells = Array.from($nextRow.children)\n\t\t\tconst $nextCell = $nextRowCells[element.cellIndex] as HTMLElement\n\t\t\tif ($nextCell) {\n\t\t\t\t$downCell = $nextCell\n\t\t\t}\n\t\t}\n\t} else if (element instanceof HTMLTableRowElement) {\n\t\tconst $nextRow = element.nextElementSibling as HTMLTableRowElement\n\t\tif ($nextRow) {\n\t\t\t$downCell = $nextRow\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($downCell && (!isFocusable($downCell) || !isVisible($downCell))) {\n\t\treturn _getDownCell($downCell)\n\t}\n\treturn $downCell\n}\n\nconst getBottomCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tlet $bottomCell: HTMLElement | undefined\n\tif ($target instanceof HTMLTableCellElement) {\n\t\tconst $table = $target.parentElement?.parentElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild\n\t\t\tconst $navCell = $lastRow.children[$target.cellIndex] as HTMLElement\n\t\t\tif ($navCell) {\n\t\t\t\t$bottomCell = $navCell\n\t\t\t}\n\t\t}\n\t} else if ($target instanceof HTMLTableRowElement) {\n\t\tconst $table = $target.parentElement as HTMLTableElement\n\t\tif ($table) {\n\t\t\tconst $lastRow = $table.lastElementChild as HTMLTableRowElement\n\t\t\tif ($lastRow) {\n\t\t\t\t$bottomCell = $lastRow\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// handle other contexts\n\t}\n\tif ($bottomCell && (!isFocusable($bottomCell) || !isVisible($bottomCell))) {\n\t\treturn _getUpCell($bottomCell)\n\t}\n\treturn $bottomCell\n}\n\nconst getPrevCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getPrevCell($target)\n}\n\nconst _getPrevCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $prevCell: HTMLElement | undefined\n\tif (element.previousElementSibling) {\n\t\t$prevCell = element.previousElementSibling as HTMLElement\n\t} else {\n\t\tconst $prevRow = element.parentElement?.previousElementSibling\n\t\t$prevCell = $prevRow?.lastElementChild as HTMLElement\n\t}\n\tif ($prevCell && (!isFocusable($prevCell) || !isVisible($prevCell))) {\n\t\treturn _getPrevCell($prevCell)\n\t}\n\treturn $prevCell\n}\n\nconst getNextCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\treturn _getNextCell($target)\n}\n\nconst _getNextCell = (element: HTMLElement): HTMLElement | undefined => {\n\tlet $nextCell: HTMLElement | undefined\n\tif (element.nextElementSibling) {\n\t\t$nextCell = element.nextElementSibling as HTMLElement\n\t} else {\n\t\tconst $nextRow = element.parentElement?.nextElementSibling\n\t\t$nextCell = $nextRow?.firstElementChild as HTMLElement\n\t}\n\tif ($nextCell && (!isFocusable($nextCell) || !isVisible($nextCell))) {\n\t\treturn _getNextCell($nextCell)\n\t}\n\treturn $nextCell\n}\n\nconst getFirstCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $firstCell = $parent.firstElementChild as HTMLElement | null\n\tif ($firstCell && (!isFocusable($firstCell) || !isVisible($firstCell))) {\n\t\treturn _getNextCell($firstCell)\n\t}\n\treturn $firstCell\n}\n\nconst getLastCell = (event: KeyboardEvent) => {\n\tconst $target = event.target as HTMLElement\n\tconst $parent = $target.parentElement\n\tconst $lastCell = $parent.lastElementChild as HTMLElement | null\n\tif ($lastCell && (!isFocusable($lastCell) || !isVisible($lastCell))) {\n\t\treturn _getPrevCell($lastCell)\n\t}\n\treturn $lastCell\n}\n\nconst modifierKeys = ['alt', 'control', 'shift', 'meta']\n\nconst eventKeyMap = {\n\tArrowUp: 'up',\n\tArrowDown: 'down',\n\tArrowLeft: 'left',\n\tArrowRight: 'right',\n}\n\nexport const defaultKeypressHandlers: KeypressHandlers = {\n\t'keydown.up': (event: KeyboardEvent) => {\n\t\tconst $upCell = getUpCell(event)\n\t\tif ($upCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$upCell.focus()\n\t\t}\n\t},\n\t'keydown.down': (event: KeyboardEvent) => {\n\t\tconst $downCell = getDownCell(event)\n\t\tif ($downCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$downCell.focus()\n\t\t}\n\t},\n\t'keydown.left': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\t// prevent default edit-cell behaviour on first cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($prevCell) {\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n\t'keydown.right': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\t// prevent default edit-cell behaviour on last cell\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tif ($nextCell) {\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.control.up': (event: KeyboardEvent) => {\n\t\tconst $topCell = getTopCell(event)\n\t\tif ($topCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$topCell.focus()\n\t\t}\n\t},\n\t'keydown.control.down': (event: KeyboardEvent) => {\n\t\tconst $bottomCell = getBottomCell(event)\n\t\tif ($bottomCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$bottomCell.focus()\n\t\t}\n\t},\n\t'keydown.control.left': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.control.right': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.end': (event: KeyboardEvent) => {\n\t\tconst $lastCell = getLastCell(event)\n\t\tif ($lastCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$lastCell.focus()\n\t\t}\n\t},\n\t'keydown.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $downCell = getDownCell(event)\n\t\t\tif ($downCell) {\n\t\t\t\t$downCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.shift.enter': (event: KeyboardEvent) => {\n\t\tconst $target = event.target as HTMLElement\n\t\tif ($target instanceof HTMLTableCellElement) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tconst $upCell = getUpCell(event)\n\t\t\tif ($upCell) {\n\t\t\t\t$upCell.focus()\n\t\t\t}\n\t\t} else {\n\t\t\t// handle other contexts\n\t\t}\n\t},\n\t'keydown.home': (event: KeyboardEvent) => {\n\t\tconst $firstCell = getFirstCell(event)\n\t\tif ($firstCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$firstCell.focus()\n\t\t}\n\t},\n\t'keydown.tab': (event: KeyboardEvent) => {\n\t\tconst $nextCell = getNextCell(event)\n\t\tif ($nextCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$nextCell.focus()\n\t\t}\n\t},\n\t'keydown.shift.tab': (event: KeyboardEvent) => {\n\t\tconst $prevCell = getPrevCell(event)\n\t\tif ($prevCell) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\t$prevCell.focus()\n\t\t}\n\t},\n}\n\nexport function useKeyboardNav(options: KeyboardNavigationOptions[]) {\n\tconst getSelectors = (option: KeyboardNavigationOptions) => {\n\t\t// get parent element\n\t\tlet $parent: Element | null = null\n\t\tif (option.parent) {\n\t\t\tif (typeof option.parent === 'string') {\n\t\t\t\t$parent = document.querySelector(option.parent)\n\t\t\t} else if (option.parent instanceof Element) {\n\t\t\t\t$parent = option.parent\n\t\t\t} else {\n\t\t\t\t$parent = option.parent.value\n\t\t\t}\n\t\t}\n\n\t\t// generate a list of selector(s)\n\t\tlet selectors: Element[] = []\n\n\t\tif (option.selectors) {\n\t\t\tif (typeof option.selectors === 'string') {\n\t\t\t\tselectors = $parent\n\t\t\t\t\t? Array.from($parent.querySelectorAll(option.selectors))\n\t\t\t\t\t: Array.from(document.querySelectorAll(option.selectors))\n\t\t\t} else if (option.selectors instanceof Element) {\n\t\t\t\tselectors.push(option.selectors)\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(option.selectors.value)) {\n\t\t\t\t\tfor (const element of option.selectors.value) {\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tselectors.push(element)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectors.push(element.$el as Element)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselectors.push(option.selectors.value)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst $children = Array.from($parent.children)\n\t\t\tselectors = $children.filter((selector: HTMLElement) => {\n\t\t\t\t// ignore elements not in the tab order or are not visible\n\t\t\t\treturn isFocusable(selector) && isVisible(selector)\n\t\t\t})\n\t\t}\n\n\t\treturn selectors\n\t}\n\n\tconst getEventListener = (option: KeyboardNavigationOptions) => {\n\t\treturn (event: KeyboardEvent) => {\n\t\t\tconst activeKey = (eventKeyMap[event.key] as string) || event.key.toLowerCase()\n\t\t\tif (modifierKeys.includes(activeKey)) return // ignore modifier key presses\n\n\t\t\tconst handlers = option.handlers || defaultKeypressHandlers\n\t\t\tfor (const key of Object.keys(handlers)) {\n\t\t\t\tconst [eventType, ...keys] = key.split('.')\n\t\t\t\tif (eventType !== 'keydown') {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif (keys.includes(activeKey)) {\n\t\t\t\t\tconst listener = handlers[key]\n\n\t\t\t\t\t// check if the handler has modifiers, and if the modifier is active;\n\t\t\t\t\t// this is to ensure exact key-press matches\n\t\t\t\t\tconst hasModifier = keys.filter(key => modifierKeys.includes(key))\n\t\t\t\t\tconst isModifierActive = modifierKeys.some(key => {\n\t\t\t\t\t\tconst modifierKey = key.charAt(0).toUpperCase() + key.slice(1)\n\t\t\t\t\t\treturn event.getModifierState(modifierKey)\n\t\t\t\t\t})\n\n\t\t\t\t\tif (hasModifier.length > 0) {\n\t\t\t\t\t\tif (isModifierActive) {\n\t\t\t\t\t\t\tfor (const modifier of modifierKeys) {\n\t\t\t\t\t\t\t\tif (keys.includes(modifier)) {\n\t\t\t\t\t\t\t\t\t// docs: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState\n\t\t\t\t\t\t\t\t\tconst modifierKey = modifier.charAt(0).toUpperCase() + modifier.slice(1)\n\t\t\t\t\t\t\t\t\tif (event.getModifierState(modifierKey)) {\n\t\t\t\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isModifierActive) {\n\t\t\t\t\t\t\tlistener(event)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonMounted(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.addEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tfor (const option of options) {\n\t\t\tconst selectors = getSelectors(option)\n\t\t\tfor (const selector of selectors) {\n\t\t\t\tselector.removeEventListener('keydown', getEventListener(option))\n\t\t\t}\n\t\t}\n\t})\n}\n","import { App } from 'vue'\n\nimport { defaultKeypressHandlers, useKeyboardNav } from './composables/keyboard'\n\nfunction install(app: App /* options */) {}\n\nexport { defaultKeypressHandlers, install, useKeyboardNav }\n"],"names":["_a","isClient","isString","val","noop","resolveUnref","r","unref","identity","arg","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","unrefElement","elRef","plain","defaultWindow","useEventListener","args","target","events","listeners","options","cleanups","cleanup","register","el","event","listener","options2","stopWatch","watch","stop","_global","globalKey","useElementVisibility","element","window","scrollTarget","elementIsVisible","ref","testBounding","document","rect","SwipeDirection","SwipeDirection2","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","isVisible","isFocusable","getUpCell","$target","_getUpCell","$upCell","$prevRow","$prevCell","getTopCell","$topCell","$table","$navCell","$firstRow","_getDownCell","getDownCell","$downCell","$nextRow","$nextCell","getBottomCell","$bottomCell","$lastRow","getPrevCell","_getPrevCell","getNextCell","_getNextCell","getFirstCell","$firstCell","getLastCell","$lastCell","modifierKeys","eventKeyMap","defaultKeypressHandlers","useKeyboardNav","getSelectors","option","$parent","selectors","selector","getEventListener","activeKey","handlers","eventType","keys","hasModifier","isModifierActive","modifierKey","modifier","onMounted","onBeforeUnmount","install","app"],"mappings":"4QAgCA,IAAIA,EACJ,MAAMC,EAAW,OAAO,OAAW,IAU7BC,EAAYC,GAAQ,OAAOA,GAAQ,SAMnCC,EAAO,IAAM,CACnB,EAMcH,KAAcD,EAAK,QAAU,KAAO,OAAS,OAAO,YAAc,MAAgBA,EAAG,YAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAGjK,SAASK,EAAaC,EAAG,CACvB,OAAO,OAAOA,GAAM,WAAaA,EAAC,EAAKC,EAAAA,MAAMD,CAAC,CAChD,CA2IA,SAASE,EAASC,EAAK,CACrB,OAAOA,CACT,CA6EA,SAASC,EAAkBC,EAAI,CAC7B,OAAIC,EAAe,gBAAA,GACjBC,EAAc,eAACF,CAAE,EACV,IAEF,EACT,CCzMA,SAASG,EAAaC,EAAO,CAC3B,IAAIf,EACJ,MAAMgB,EAAQX,EAAaU,CAAK,EAChC,OAAQf,EAAKgB,GAAS,KAAO,OAASA,EAAM,MAAQ,KAAOhB,EAAKgB,CAClE,CAEA,MAAMC,EAAgBhB,EAAW,OAAS,OAK1C,SAASiB,KAAoBC,EAAM,CACjC,IAAIC,EACAC,EACAC,EACAC,EAOJ,GANIrB,EAASiB,EAAK,CAAC,CAAC,GAAK,MAAM,QAAQA,EAAK,CAAC,CAAC,GAC5C,CAACE,EAAQC,EAAWC,CAAO,EAAIJ,EAC/BC,EAASH,GAET,CAACG,EAAQC,EAAQC,EAAWC,CAAO,EAAIJ,EAErC,CAACC,EACH,OAAOhB,EACJ,MAAM,QAAQiB,CAA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AIhD,EAAI,MAAM,GAAG,EAC1C,GAAI+C,IAAc,WAIdC,EAAK,SAASH,CAAS,EAAG,CACvB,MAAArE,EAAWsE,EAAS9C,CAAG,EAIvBiD,EAAcD,EAAK,OAAOhD,GAAOmC,EAAa,SAASnC,CAAG,CAAC,EAC3DkD,EAAmBf,EAAa,KAAKnC,GAAO,CAC3C,MAAAmD,EAAcnD,EAAI,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAI,MAAM,CAAC,EACtD,OAAAzB,EAAM,iBAAiB4E,CAAW,CAAA,CACzC,EAEG,GAAAF,EAAY,OAAS,GACxB,GAAIC,GACH,UAAWE,KAAYjB,EAClB,GAAAa,EAAK,SAASI,CAAQ,EAAG,CAEtB,MAAAD,EAAcC,EAAS,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAS,MAAM,CAAC,EACnE7E,EAAM,iBAAiB4E,CAAW,GACrC3E,EAASD,CAAK,CAEhB,QAIG2E,GACJ1E,EAASD,CAAK,CAGjB,CACD,CAAA,EAIF8E,EAAAA,UAAU,IAAM,CACf,UAAWb,KAAUtE,EAAS,CACvB,MAAAwE,EAAYH,EAAaC,CAAM,EACrC,UAAWG,KAAYD,EACtBC,EAAS,iBAAiB,UAAWC,EAAiBJ,CAAM,CAAC,CAE/D,CAAA,CACA,EAEDc,EAAAA,gBAAgB,IAAM,CACrB,UAAWd,KAAUtE,EAAS,CACvB,MAAAwE,EAAYH,EAAaC,CAAM,EACrC,UAAWG,KAAYD,EACtBC,EAAS,oBAAoB,UAAWC,EAAiBJ,CAAM,CAAC,CAElE,CAAA,CACA,CACF,CCnbA,SAASe,GAAQC,EAAwB,CAAC","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/utilities/package.json b/utilities/package.json index 9da09bd0..25473a0f 100644 --- a/utilities/package.json +++ b/utilities/package.json @@ -1,8 +1,20 @@ { "name": "@stonecrop/utilities", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", "type": "module", + "author": { + "name": "Tyler Matteson", + "email": "tyler@agritheory.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/agritheory/stonecrop", + "directory": "utilities" + }, + "bugs": { + "url": "https://github.com/agritheory/stonecrop/issues" + }, "exports": { ".": { "import": "./dist/utilities.js", @@ -11,10 +23,11 @@ }, "main": "dist/utilities.js", "module": "dist/utilities.js", + "umd": "dist/utilities.umd.cjs", "types": "src/index", "files": [ "dist/*", - "src/**/*.ts" + "src/*" ], "scripts": { "build": "tsc -b && vite build", @@ -43,8 +56,10 @@ "vite": "^5.2.9", "vue-router": "^4" }, + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=20.11.0" - }, - "umd": "dist/utilities.umd.cjs" + } }