From 8dda0587bc97f7e7f9e2cb51af1a1c208f11c4d1 Mon Sep 17 00:00:00 2001 From: Rohan Bansal Date: Tue, 16 Apr 2024 12:07:31 +0530 Subject: [PATCH] ci: publish packages to NPM --- .github/workflows/change.yml | 4 +- .github/workflows/lint.yml | 4 +- .github/workflows/release-package.yml | 8 +- .github/workflows/tests.yml | 8 +- aform/dist/aform.js | 2 +- 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/form/ADate.vue | 4 +- aform/src/histoire.setup.ts | 4 +- aform/src/theme/aform.css | 2 +- aform/types/index.ts | 2 +- aform/vite.config.ts | 2 +- atable/dist/atable.js | 16 +-- atable/dist/atable.js.map | 2 +- atable/dist/atable.umd.cjs | 2 +- atable/dist/atable.umd.cjs.map | 2 +- atable/dist/style.css | 2 +- atable/package.json | 10 +- atable/src/components/ACell.vue | 4 +- atable/src/components/AExpansionRow.vue | 4 +- atable/src/components/ARow.vue | 4 +- atable/src/components/ATable.vue | 2 +- atable/src/components/ATableHeader.vue | 2 +- atable/src/components/ATableModal.vue | 2 +- atable/src/histoire.setup.ts | 2 +- atable/stories/default.story.vue | 2 +- atable/stories/list.story.vue | 2 +- atable/stories/tree.story.vue | 2 +- atable/vite.config.ts | 2 +- beam/dev/vite.config.js | 2 +- beam/package.json | 2 +- code_editor/dist/code-editor.umd.cjs | 2 +- code_editor/dist/code-editor.umd.cjs.map | 2 +- code_editor/package.json | 8 +- code_editor/vite.config.ts | 2 +- .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ .../fix-publish-npm_2024-04-16-06-45.json | 10 ++ common/config/rush/.npmrc | 4 +- common/config/rush/.npmrc-publish | 4 +- .../rush/browser-approved-packages.json | 14 +- common/config/rush/pnpm-lock.yaml | 44 +++--- common/config/rush/version-policies.json | 2 +- common/scripts/install-run-rush-pnpm.js | 3 + common/scripts/install-run-rush.js | 9 +- common/scripts/install-run-rushx.js | 3 + common/scripts/install-run.js | 126 ++++++++++-------- desktop/dist/desktop.js | 14 +- desktop/dist/desktop.js.map | 2 +- desktop/dist/desktop.umd.cjs | 4 +- desktop/dist/desktop.umd.cjs.map | 2 +- desktop/package.json | 10 +- desktop/src/components/Doctype.vue | 6 +- desktop/src/components/Records.vue | 4 +- desktop/stories/components/Home.vue | 2 +- desktop/stories/index.ts | 6 +- desktop/stories/server.ts | 2 +- desktop/stories/vite.config.ts | 2 +- desktop/vite.config.ts | 2 +- docs/package.json | 2 +- examples/docbuilder/components/Builder.vue | 2 +- examples/docbuilder/components/Listview.vue | 6 +- examples/docbuilder/index.ts | 16 +-- examples/docbuilder/vite.config.ts | 4 +- examples/package.json | 14 +- graphql_client/dist/graphql-client.umd.cjs | 2 +- .../dist/graphql-client.umd.cjs.map | 2 +- graphql_client/package.json | 4 +- graphql_client/stories/App.vue | 2 +- graphql_client/stories/index.ts | 2 +- graphql_client/vite.config.ts | 2 +- node_editor/dist/node-editor.umd.cjs | 2 +- node_editor/dist/node-editor.umd.cjs.map | 2 +- node_editor/package.json | 2 +- node_editor/vite.config.ts | 2 +- rush.json | 27 ++-- stonecrop/dist/stonecrop.umd.cjs | 2 +- stonecrop/package.json | 6 +- stonecrop/types/index.ts | 2 +- stonecrop/vite.config.ts | 4 +- themes/package.json | 2 +- themes/vite.config.js | 2 +- utilities/README.md | 2 +- utilities/dist/utilities.umd.cjs | 2 +- utilities/dist/utilities.umd.cjs.map | 2 +- utilities/package.json | 2 +- utilities/vite.config.ts | 2 +- 96 files changed, 367 insertions(+), 247 deletions(-) create mode 100644 common/changes/@stonecrop/aform/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/atable/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/code-editor/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/desktop/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/graphql-client/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/node-editor/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/stonecrop/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/themes/fix-publish-npm_2024-04-16-06-45.json create mode 100644 common/changes/@stonecrop/utilities/fix-publish-npm_2024-04-16-06-45.json diff --git a/.github/workflows/change.yml b/.github/workflows/change.yml index 94a4f9c3..79442f87 100644 --- a/.github/workflows/change.yml +++ b/.github/workflows/change.yml @@ -7,12 +7,12 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Checkout with: fetch-depth: 2 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 name: Install Node.js with: cache-dependency-path: '**/config/rush/pnpm-lock.yaml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a27137bf..547a552d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -34,10 +34,10 @@ jobs: name: Sort package.json runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Checkout - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 name: Install Node.js with: cache-dependency-path: '**/config/rush/pnpm-lock.yaml' diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index 11ca5069..a62a0f5f 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -13,14 +13,14 @@ jobs: contents: write packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Checkout - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 name: Install Node.js with: cache-dependency-path: '**/config/rush/pnpm-lock.yaml' - registry-url: https://npm.pkg.github.com/ + registry-url: https://registry.npmjs.org/ - name: Set Git User run: | @@ -36,4 +36,4 @@ jobs: - name: Publish Packages via Rush run: node common/scripts/install-run-rush.js publish --apply --publish --include-all --version-policy stonecrop --target-branch development --add-commit-details --set-access-level=public env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c0c9dfa3..650820d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,10 +38,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node ${{ matrix.node }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache-dependency-path: '**/config/rush/pnpm-lock.yaml' registry-url: https://npm.pkg.github.com/ @@ -76,10 +76,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node ${{ matrix.node }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache-dependency-path: '**/config/rush/pnpm-lock.yaml' registry-url: https://npm.pkg.github.com/ diff --git a/aform/dist/aform.js b/aform/dist/aform.js index cfe404a6..b5372da5 100644 --- a/aform/dist/aform.js +++ b/aform/dist/aform.js @@ -501,7 +501,7 @@ const nt = ["event", "colIndex", "rowIndex", "tableid"], ot = { colspan: "5" }, ], 8, nt)); } }); -const rt = /* @__PURE__ */ I(at, [["__scopeId", "data-v-fcdc102d"]]), it = k({ +const rt = /* @__PURE__ */ I(at, [["__scopeId", "data-v-169f1184"]]), it = k({ name: "ADropdown", props: { modelValue: { diff --git a/aform/dist/aform.js.map b/aform/dist/aform.js.map index b4278715..718cf8c2 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","g","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtCD,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,GAAG,GAAGG;AACb,MAAIZ,GAAE,EAAE,CAAC,CAAC,KAAK,MAAM,QAAQ,EAAE,CAAC,CAAC,KAAK,CAACS,GAAG,GAAGG,CAAC,IAAI,GAAG,IAAIF,MAAK,CAAC,GAAGD,GAAG,GAAGG,CAAC,IAAI,GAAG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UAAAA,EAAAA;AAAAA,IAAAA,GAKDrB,MAAAA,GAAAA,EAAAA,GAAAA;AAAAA,MAAAA,CAAAA,GAAAA,EAAAA,SAAAA;AAAAA,MACT,CAAuC2B,GAAA9D,EAAA,IAAA;AAAA,IAAA,CAAA;AAAA,IACK+D,EAAAA,SAAW,EAAY,KAAA/D,EAAA,KAAA,GAAAgE,EAAAhE,EAAA,KAAA,GAAA,GAAAH,EAAA;AAAA,IAVrEW,EAAAD,EAAA,KAAA;AAAA,MAAA,WAUawD,EAAW,WAAA;AAAA,IAAA,GAAA,MAAA,GAAAjE,EAAA,GAAA;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":["props","__props","emit","__emit","checkbox","computed","value","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","o","s","a","g","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtCD,IAAIC;AACJ,MAAMC,KAAI,OAAO,SAAS,KAAKC,KAAI,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAI,MAAM;AAC1E;AACAF,OAAOD,IAAI,UAAU,OAAO,SAAS,O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AAA,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 f411abdc..f3214325 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["@agritheory/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]])]))}}),ot="",k=(e,t)=>{const l=e.__vccOpts||e;for(const[o,r]of t)l[o]=r;return l},M=k(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 $;const L=typeof window<"u",ce=e=>typeof e=="string",de=()=>{};L&&($=window==null?void 0:window.navigator)!=null&&$.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 x=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=x):[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 F=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},P="__vueuse_ssr_handlers__";F[P]=F[P]||{};function me(e,{window:t=x,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 q;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(q||(q={}));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 V(t)},V=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))?V(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))?S(o):o},j=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.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))?S(l):l},_e=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))?V(o):o},Q=e=>{const t=e.target;return B(t)},B=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))?B(l):l},Y=e=>{const t=e.target;return v(t)},v=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))?v(l):l},z=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!b(t)||!w(t))?v(t):t},W=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!b(t)||!w(t))?B(t):t},A=["alt","control","shift","meta"],ke={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=_e(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 Ee(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=ke[r.key]||r.key.toLowerCase();if(A.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=>A.includes(f)),g=A.some(f=>{const D=f.charAt(0).toUpperCase()+f.slice(1);return r.getModifierState(D)});if(y.length>0){if(g){for(const f of A)if(c.includes(f)){const D=f.charAt(0).toUpperCase()+f.slice(1);r.getModifierState(D)&&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 Ce=["event","colIndex","rowIndex","tableid"],De={colspan:"5"},Ae=["onClick"],Ie=6,E=7,Ve=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 C=document.getElementsByClassName("selecteddate");if(C.length>0)C[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),C=u.getDay(),h=u.setDate(u.getDate()-C);for(let _ of Array(43).keys())i.value.push(h+_*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()},D=u=>new Date(u).toDateString()===new Date(r.value).toDateString(),Ze=(u,C)=>{r.value=new Date(i.value[C]),et()},et=()=>{l.setCellData(t.rowIndex,t.colIndex,r.value.getTime())},tt=n.computed(()=>new Date(s.value,a.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ee([{parent:"table.adate",selectors:"td",handlers:{...K,"keydown.pageup":y,"keydown.shift.pageup":c,"keydown.pagedown":g,"keydown.shift.pagedown":d}}]),(u,C)=>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",De,n.toDisplayString(tt.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(E,_=>n.createElementVNode("td",{key:(h-1)*E+_,contenteditable:!1,spellcheck:!1,tabindex:0,style:n.normalizeStyle({border:D(i.value[(h-1)*E+_])?"2px solid var(--focus-cell-outline)":"none",borderBottomColor:f(i.value[(h-1)*E+_])?"var(--focus-cell-outline)":"none"}),onClick:n.withModifiers(nt=>Ze(nt,(h-1)*E+_),["prevent","stop"]),class:n.normalizeClass({todaysdate:f(i.value[(h-1)*E+_]),selecteddate:D(i.value[(h-1)*E+_])})},n.toDisplayString(new Date(i.value[(h-1)*E+_]).getDate()),15,Ae)),64))])),64))])],8,Ce))}}),at="",G=k(Ve,[["__scopeId","data-v-fcdc102d"]]),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()}}}),rt="",Be={class:"input-wrapper"},ve={id:"autocomplete-results",class:"autocomplete-results"},Te={key:0,class:"loading autocomplete-result"},Me=["onClick"];function Oe(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",ve,[e.isLoading?(n.openBlock(),n.createElementBlock("li",Te,"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,Me))),128))],512),[[n.vShow,e.isOpen]]),n.createElementVNode("label",null,n.toDisplayString(e.label),1)])],2)}const J=k(Se,[["render",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))}}),st="",Le=k($e,[["__scopeId","data-v-6f1c1b45"]]),Ne=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))]))}}),it="",T=k(Ne,[["__scopeId","data-v-74d66cf2"]]),xe=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(Le,{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)]))}}),ct="",X=k(xe,[["__scopeId","data-v-cad9b578"]]),Fe=["id","disabled","required"],Pe=["for"],qe=["innerHTML"],He=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,Fe),[[n.vModelText,r.value]]),n.createElementVNode("label",{for:a.uuid},n.toDisplayString(a.label),9,Pe),n.withDirectives(n.createElementVNode("p",{innerHTML:a.validation.errorMessage},null,8,qe),[[n.vShow,a.validation.errorMessage]])]))}}),dt="",Z=k(He,[["__scopeId","data-v-be33e6c4"]]),ee={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Re(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Ue(e){var l;let t=e.value;if(t){const o=Re(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 je(e,t){t||(t="#");let l=e;const o=[t,"/","-","(",")"," "];for(const r of o)l=l.replaceAll(r,"");return l}function Qe(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 Ye(e,t){const l=Ue(t);if(!l)return;const o="#",r=e.value,a=je(r,o);if(a){const s=Qe(a,l,o);t.instance.maskFilled&&(t.instance.maskFilled=!s.includes(o)),e.value=s}else e.value=l}const ze=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:Ye}}),ut="",We=["id","disabled","maxlength","required"],Ke=["for"],Ge=["innerHTML"];function Je(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,We),[[n.vModelText,e.inputText],[s,e.mask]]),n.createElementVNode("label",{for:e.uuid},n.toDisplayString(e.label),9,Ke),n.withDirectives(n.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Ge),[[n.vShow,e.validation.errorMessage]])])}const te=k(ze,[["render",Je],["__scopeId","data-v-76dba9b8"]]);function Xe(e){e.component("ACheckbox",M),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,m.AComboBox=O,m.ADate=G,m.ADropdown=J,m.AFieldset=X,m.AForm=T,m.ANumericInput=Z,m.ATextInput=te,m.install=Xe,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:{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]])]))}}),ot="",k=(e,t)=>{const l=e.__vccOpts||e;for(const[o,r]of t)l[o]=r;return l},M=k(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 $;const L=typeof window<"u",ce=e=>typeof e=="string",de=()=>{};L&&($=window==null?void 0:window.navigator)!=null&&$.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 x=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=x):[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 F=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},P="__vueuse_ssr_handlers__";F[P]=F[P]||{};function me(e,{window:t=x,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 q;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(q||(q={}));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 V(t)},V=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))?V(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))?S(o):o},j=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.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))?S(l):l},_e=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))?V(o):o},Q=e=>{const t=e.target;return B(t)},B=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))?B(l):l},Y=e=>{const t=e.target;return v(t)},v=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))?v(l):l},z=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!b(t)||!w(t))?v(t):t},W=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!b(t)||!w(t))?B(t):t},A=["alt","control","shift","meta"],ke={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=_e(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 Ee(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=ke[r.key]||r.key.toLowerCase();if(A.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=>A.includes(f)),g=A.some(f=>{const D=f.charAt(0).toUpperCase()+f.slice(1);return r.getModifierState(D)});if(y.length>0){if(g){for(const f of A)if(c.includes(f)){const D=f.charAt(0).toUpperCase()+f.slice(1);r.getModifierState(D)&&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 Ce=["event","colIndex","rowIndex","tableid"],De={colspan:"5"},Ae=["onClick"],Ie=6,E=7,Ve=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 C=document.getElementsByClassName("selecteddate");if(C.length>0)C[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),C=u.getDay(),h=u.setDate(u.getDate()-C);for(let _ of Array(43).keys())i.value.push(h+_*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()},D=u=>new Date(u).toDateString()===new Date(r.value).toDateString(),Ze=(u,C)=>{r.value=new Date(i.value[C]),et()},et=()=>{l.setCellData(t.rowIndex,t.colIndex,r.value.getTime())},tt=n.computed(()=>new Date(s.value,a.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ee([{parent:"table.adate",selectors:"td",handlers:{...K,"keydown.pageup":y,"keydown.shift.pageup":c,"keydown.pagedown":g,"keydown.shift.pagedown":d}}]),(u,C)=>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",De,n.toDisplayString(tt.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(E,_=>n.createElementVNode("td",{key:(h-1)*E+_,contenteditable:!1,spellcheck:!1,tabindex:0,style:n.normalizeStyle({border:D(i.value[(h-1)*E+_])?"2px solid var(--focus-cell-outline)":"none",borderBottomColor:f(i.value[(h-1)*E+_])?"var(--focus-cell-outline)":"none"}),onClick:n.withModifiers(nt=>Ze(nt,(h-1)*E+_),["prevent","stop"]),class:n.normalizeClass({todaysdate:f(i.value[(h-1)*E+_]),selecteddate:D(i.value[(h-1)*E+_])})},n.toDisplayString(new Date(i.value[(h-1)*E+_]).getDate()),15,Ae)),64))])),64))])],8,Ce))}}),at="",G=k(Ve,[["__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()}}}),rt="",Be={class:"input-wrapper"},ve={id:"autocomplete-results",class:"autocomplete-results"},Te={key:0,class:"loading autocomplete-result"},Me=["onClick"];function Oe(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",ve,[e.isLoading?(n.openBlock(),n.createElementBlock("li",Te,"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,Me))),128))],512),[[n.vShow,e.isOpen]]),n.createElementVNode("label",null,n.toDisplayString(e.label),1)])],2)}const J=k(Se,[["render",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))}}),st="",Le=k($e,[["__scopeId","data-v-6f1c1b45"]]),Ne=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))]))}}),it="",T=k(Ne,[["__scopeId","data-v-74d66cf2"]]),xe=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(Le,{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)]))}}),ct="",X=k(xe,[["__scopeId","data-v-cad9b578"]]),Fe=["id","disabled","required"],Pe=["for"],qe=["innerHTML"],He=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,Fe),[[n.vModelText,r.value]]),n.createElementVNode("label",{for:a.uuid},n.toDisplayString(a.label),9,Pe),n.withDirectives(n.createElementVNode("p",{innerHTML:a.validation.errorMessage},null,8,qe),[[n.vShow,a.validation.errorMessage]])]))}}),dt="",Z=k(He,[["__scopeId","data-v-be33e6c4"]]),ee={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Re(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Ue(e){var l;let t=e.value;if(t){const o=Re(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 je(e,t){t||(t="#");let l=e;const o=[t,"/","-","(",")"," "];for(const r of o)l=l.replaceAll(r,"");return l}function Qe(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 Ye(e,t){const l=Ue(t);if(!l)return;const o="#",r=e.value,a=je(r,o);if(a){const s=Qe(a,l,o);t.instance.maskFilled&&(t.instance.maskFilled=!s.includes(o)),e.value=s}else e.value=l}const ze=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:Ye}}),ut="",We=["id","disabled","maxlength","required"],Ke=["for"],Ge=["innerHTML"];function Je(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,We),[[n.vModelText,e.inputText],[s,e.mask]]),n.createElementVNode("label",{for:e.uuid},n.toDisplayString(e.label),9,Ke),n.withDirectives(n.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Ge),[[n.vShow,e.validation.errorMessage]])])}const te=k(ze,[["render",Je],["__scopeId","data-v-76dba9b8"]]);function Xe(e){e.component("ACheckbox",M),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,m.AComboBox=O,m.ADate=G,m.ADropdown=J,m.AFieldset=X,m.AForm=T,m.ANumericInput=Z,m.ATextInput=te,m.install=Xe,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 fd5e874a..c67f6c71 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","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","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":"ylBAcA,MAAMA,EAAQC,EAcRC,EAAOC,EAIPC,EAAWC,EAAAA,SAAS,CACzB,KAAM,CACL,OAAOL,EAAM,KACd,EACA,IAAIM,EAAO,CACVJ,EAAK,eAAgBI,CAAK,CAC3B,CAAA,CACA,wqCCtCD,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,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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":["props","__props","emit","__emit","checkbox","computed","value","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","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,wqCCtCD,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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U,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 56a6c68d..21e75c2b 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:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}[data-v-fcdc102d]: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-fcdc102d]:root{font-family:var(--font-family)}.aform-primary-action[data-v-fcdc102d]{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-fcdc102d]:hover,.aform-primary-action[data-v-fcdc102d]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adate[data-v-fcdc102d]{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-fcdc102d]{height:1.15rem;text-align:center;vertical-align:middle}.adate td[data-v-fcdc102d]{border:2px solid transparent;min-width:2.25ch}.adate td[data-v-fcdc102d]:hover{border:2px solid var(--focus-cell-outline)}.adate td[data-v-fcdc102d]{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-fcdc102d]:focus,.adate td[data-v-fcdc102d]: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-fcdc102d]{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-fcdc102d]{font-weight:700;display:flex;align-items:center;justify-content:space-between}.adate .todaysdate[data-v-fcdc102d]{border-bottom-color:var(--focus-cell-outline)}.adate .selecteddate[data-v-fcdc102d]{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:white;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-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:white;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:white;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-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:white;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:white;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-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:white;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:white;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 631b23f9..adde713d 100644 --- a/aform/package.json +++ b/aform/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/aform", + "name": "@stonecrop/aform", "version": "0.2.2", "license": "MIT", "type": "module", @@ -30,13 +30,13 @@ "test:ui": "vitest --ui" }, "dependencies": { - "@agritheory/themes": "workspace:*", - "@agritheory/utilities": "workspace:*", + "@stonecrop/themes": "workspace:*", + "@stonecrop/utilities": "workspace:*", "uuid": "^9.0.0", "vue": "^3.2.47" }, "devDependencies": { - "@agritheory/atable": "workspace:*", + "@stonecrop/atable": "workspace:*", "@histoire/plugin-vue": "^0.16.1", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.5", @@ -57,7 +57,7 @@ "vue-router": "^4" }, "peerDependencies": { - "@agritheory/atable": "workspace:*" + "@stonecrop/atable": "workspace:*" }, "engines": { "node": ">=20.11.0" diff --git a/aform/src/components/form/ADate.vue b/aform/src/components/form/ADate.vue index d46bc5d3..c045b50a 100644 --- a/aform/src/components/form/ADate.vue +++ b/aform/src/components/form/ADate.vue @@ -45,8 +45,8 @@ \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","oldValue","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,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AGpB,cAAAsE,IAAUtE,EAAU,MAAM;AAChC,QAAIsE,KAEEC,GAAA,EAAW,KAAK,MAAM;AAGpB,gBAAAvC,IAAWsC,EAAQ,QAAQ,UAC3BhB,IAAWgB,EAAQ,QAAQ,UAC3BE,IAAc,SAAS,iBAAiB,mBAAmBxC,CAAQ,qBAAqBsB,CAAQ,IAAI;AAC1G,UAAIkB,KACDA,EAAY,CAAC,EAA2B;QAC3C,CACA;AAAA,MAEH;AAAA,IACD,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzKD,SAASC,GAAQC,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 +{"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","oldValue","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,GAAGC,GAAGG,GAAGC,CAAC,IAAId,GAAG,CAACS;AAC/E,WAAOR;AACT,QAAM,QAAQS,CAAC,MAAMA,IAAI,CAACA,CAAC,IAAI,MAAM,QA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,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 index 34e7c46b..c14f40ee 100644 --- a/atable/dist/atable.umd.cjs +++ b/atable/dist/atable.umd.cjs @@ -1,2 +1,2 @@ -(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["@agritheory/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 C(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(u=>u()),r.length=0},s=(u,c,b,w)=>(u.addEventListener(c,b,w),()=>u.removeEventListener(c,b,w)),d=n.watch(()=>[C(e),L(a)],([u,c])=>{i(),u&&r.push(...o.flatMap(b=>l.map(w=>s(u,b,w,c))))},{immediate:!0,flush:"post"}),f=()=>{d(),i()};return re(f),f}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=C(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(()=>C(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,pe=(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};pe({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 A(e)},A=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))?A(o):o},fe=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))?S(l):l},z=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.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))?S(o):o},ue=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))?A(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 D(e)},D=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))?D(o):o},J=t=>{const e=t.target.parentElement.firstElementChild;return e&&(!x(e)||!y(e))?D(e):e},X=t=>{const e=t.target.parentElement.lastElementChild;return e&&(!x(e)||!y(e))?T(e):e},E=["alt","control","shift","meta"],me={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=fe(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.down":t=>{const e=ue(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 $(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=me[a.key]||a.key.toLowerCase();if(E.includes(r))return;const i=l.handlers||Y;for(const s of Object.keys(i)){const[d,...f]=s.split(".");if(d==="keydown"&&f.includes(r)){const u=i[s],c=f.filter(w=>E.includes(w)),b=E.some(w=>{const I=w.charAt(0).toUpperCase()+w.slice(1);return a.getModifierState(I)});if(c.length>0){if(b){for(const w of E)if(f.includes(w)){const I=w.charAt(0).toUpperCase()+w.slice(1);a.getModifierState(I)&&u(a)}}}else b||u(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 I;const e=t,o=n.inject(e.tableid),l=n.ref(null);let a=n.ref(!1);const r=n.computed(()=>{const p=o.cellData(e.colIndex,e.rowIndex);if(o.columns[e.colIndex].format){const g=o.columns[e.colIndex].format;return typeof g=="function"?g(p):typeof g=="string"?Function(`"use strict";return (${g})`)()(p):p}else return p}),i=p=>{if(e.clickHandler){e.clickHandler(p);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 p={...Y,"keydown.f2":i,"keydown.alt.up":i,"keydown.alt.down":i,"keydown.alt.left":i,"keydown.alt.right":i};typeof e.addNavigation=="object"&&(p={...p,...e.addNavigation}),$([{selectors:l,handlers:p}])}const s=n.computed(()=>o.columns[e.colIndex].align||"center"),d=n.computed(()=>o.columns[e.colIndex].width||"40ch");let f="";const u=()=>{l.value&&(f=l.value.innerText)},c=()=>{l.value&&l.value.innerHTML!==f&&(f=l.value.innerText,l.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[e.colIndex].format||o.setCellData(e.rowIndex,e.colIndex,f))},b=(p,g)=>g&&p===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,(I=o.display[e.rowIndex])==null?void 0:I.indent)};return(p,g)=>(n.openBlock(),n.createElementBlock("td",{ref_key:"cell",ref:l,"data-colindex":p.colIndex,"data-rowindex":p.rowIndex,"data-editable":n.unref(o).columns[p.colIndex].edit,contenteditable:n.unref(o).columns[p.colIndex].edit,tabindex:p.tabIndex,spellcheck:!1,style:w,onFocus:u,onPaste:c,onBlur:c,onInput:c,onClick:i,onMousedown:i},[n.unref(o).columns[p.colIndex].cellComponent?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(o).columns[p.colIndex].cellComponent),n.mergeProps({key:0,value:r.value},n.unref(o).columns[p.colIndex].cellComponentProps),null,16,["value"])):(n.openBlock(),n.createElementBlock("span",he,n.toDisplayString(r.value),1))],40,we))}}),He="",_=(t,e)=>{const o=t.__vccOpts||t;for(const[l,a]of e)o[l]=a;return o},B=_(ge,[["__scopeId","data-v-1738c6fc"]]),be=["tabindex"],ye=["tabindex"],xe=["colspan"],_e=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)},$([{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))}}),Le="",Z=_(_e,[["__scopeId","data-v-2bb821ae"]]),Ie=["tabindex"],Ee={key:0,tabIndex:-1,class:"list-index"},ke=n.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(t){n.useCssVars(d=>({"6b10edcf":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&&$([{selectors:l,handlers:e.addNavigation}]),(d,f)=>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:f[0]||(f[0]=u=>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()]])}}),Ve="",O=_(ke,[["__scopeId","data-v-c758303d"]]);let k;const Ce=new Uint8Array(16);function Ae(){if(!k&&(k=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!k))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return k(Ce)}const m=[];for(let t=0;t<256;++t)m.push((t+256).toString(16).slice(1));function Se(t,e=0){return m[t[e+0]]+m[t[e+1]]+m[t[e+2]]+m[t[e+3]]+"-"+m[t[e+4]]+m[t[e+5]]+"-"+m[t[e+6]]+m[t[e+7]]+"-"+m[t[e+8]]+m[t[e+9]]+"-"+m[t[e+10]]+m[t[e+11]]+m[t[e+12]]+m[t[e+13]]+m[t[e+14]]+m[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||Ae)();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 Se(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 Te={key:0},De={class:"atable-header-row",tabindex:"-1"},$e={key:0,id:"header-index"},Be=n.defineComponent({__name:"ATableHeader",props:{columns:{},config:{},tableid:{}},setup(t){n.useCssVars(r=>({"1cb0fcc9":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",Te,[n.createElementVNode("tr",De,[n.unref(o).zeroColumn?(n.openBlock(),n.createElementBlock("th",$e)):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)}}),je="",R=_(Be,[["__scopeId","data-v-8a8d9cee"]]),Oe=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))}}),Ue="",P=_(Oe,[["__scopeId","data-v-8ac70767"]]),Re=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,d)=>{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 f=d.dataset.rowindex,u=d.dataset.colindex,c=document.querySelectorAll(`[data-rowindex='${f}'][data-colindex='${u}']`);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,(f,u)=>(n.openBlock(),n.createBlock(O,{key:f.id||n.unref(v)(),row:f,rowIndex:u,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}:${u}`,tableid:n.unref(r).id,col:c,spellcheck:"false",rowIndex:u,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))}}),We="",te=_(Re,[["__scopeId","data-v-9137b4c3"]]);function Pe(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=Pe,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}); +(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 C(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(u=>u()),r.length=0},s=(u,c,b,w)=>(u.addEventListener(c,b,w),()=>u.removeEventListener(c,b,w)),d=n.watch(()=>[C(e),L(a)],([u,c])=>{i(),u&&r.push(...o.flatMap(b=>l.map(w=>s(u,b,w,c))))},{immediate:!0,flush:"post"}),f=()=>{d(),i()};return re(f),f}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=C(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(()=>C(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,pe=(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};pe({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 A(e)},A=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))?A(o):o},fe=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))?S(l):l},z=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.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))?S(o):o},ue=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))?A(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 D(e)},D=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))?D(o):o},J=t=>{const e=t.target.parentElement.firstElementChild;return e&&(!x(e)||!y(e))?D(e):e},X=t=>{const e=t.target.parentElement.lastElementChild;return e&&(!x(e)||!y(e))?T(e):e},E=["alt","control","shift","meta"],me={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=fe(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.down":t=>{const e=ue(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 $(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=me[a.key]||a.key.toLowerCase();if(E.includes(r))return;const i=l.handlers||Y;for(const s of Object.keys(i)){const[d,...f]=s.split(".");if(d==="keydown"&&f.includes(r)){const u=i[s],c=f.filter(w=>E.includes(w)),b=E.some(w=>{const I=w.charAt(0).toUpperCase()+w.slice(1);return a.getModifierState(I)});if(c.length>0){if(b){for(const w of E)if(f.includes(w)){const I=w.charAt(0).toUpperCase()+w.slice(1);a.getModifierState(I)&&u(a)}}}else b||u(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 I;const e=t,o=n.inject(e.tableid),l=n.ref(null);let a=n.ref(!1);const r=n.computed(()=>{const p=o.cellData(e.colIndex,e.rowIndex);if(o.columns[e.colIndex].format){const g=o.columns[e.colIndex].format;return typeof g=="function"?g(p):typeof g=="string"?Function(`"use strict";return (${g})`)()(p):p}else return p}),i=p=>{if(e.clickHandler){e.clickHandler(p);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 p={...Y,"keydown.f2":i,"keydown.alt.up":i,"keydown.alt.down":i,"keydown.alt.left":i,"keydown.alt.right":i};typeof e.addNavigation=="object"&&(p={...p,...e.addNavigation}),$([{selectors:l,handlers:p}])}const s=n.computed(()=>o.columns[e.colIndex].align||"center"),d=n.computed(()=>o.columns[e.colIndex].width||"40ch");let f="";const u=()=>{l.value&&(f=l.value.innerText)},c=()=>{l.value&&l.value.innerHTML!==f&&(f=l.value.innerText,l.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[e.colIndex].format||o.setCellData(e.rowIndex,e.colIndex,f))},b=(p,g)=>g&&p===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,(I=o.display[e.rowIndex])==null?void 0:I.indent)};return(p,g)=>(n.openBlock(),n.createElementBlock("td",{ref_key:"cell",ref:l,"data-colindex":p.colIndex,"data-rowindex":p.rowIndex,"data-editable":n.unref(o).columns[p.colIndex].edit,contenteditable:n.unref(o).columns[p.colIndex].edit,tabindex:p.tabIndex,spellcheck:!1,style:w,onFocus:u,onPaste:c,onBlur:c,onInput:c,onClick:i,onMousedown:i},[n.unref(o).columns[p.colIndex].cellComponent?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(o).columns[p.colIndex].cellComponent),n.mergeProps({key:0,value:r.value},n.unref(o).columns[p.colIndex].cellComponentProps),null,16,["value"])):(n.openBlock(),n.createElementBlock("span",he,n.toDisplayString(r.value),1))],40,we))}}),He="",_=(t,e)=>{const o=t.__vccOpts||t;for(const[l,a]of e)o[l]=a;return o},B=_(ge,[["__scopeId","data-v-07dfe445"]]),be=["tabindex"],ye=["tabindex"],xe=["colspan"],_e=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)},$([{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))}}),Le="",Z=_(_e,[["__scopeId","data-v-b2e2ed2d"]]),Ie=["tabindex"],Ee={key:0,tabIndex:-1,class:"list-index"},ke=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&&$([{selectors:l,handlers:e.addNavigation}]),(d,f)=>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:f[0]||(f[0]=u=>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()]])}}),Ve="",O=_(ke,[["__scopeId","data-v-4c71a067"]]);let k;const Ce=new Uint8Array(16);function Ae(){if(!k&&(k=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!k))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return k(Ce)}const m=[];for(let t=0;t<256;++t)m.push((t+256).toString(16).slice(1));function Se(t,e=0){return m[t[e+0]]+m[t[e+1]]+m[t[e+2]]+m[t[e+3]]+"-"+m[t[e+4]]+m[t[e+5]]+"-"+m[t[e+6]]+m[t[e+7]]+"-"+m[t[e+8]]+m[t[e+9]]+"-"+m[t[e+10]]+m[t[e+11]]+m[t[e+12]]+m[t[e+13]]+m[t[e+14]]+m[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||Ae)();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 Se(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 Te={key:0},De={class:"atable-header-row",tabindex:"-1"},$e={key:0,id:"header-index"},Be=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",Te,[n.createElementVNode("tr",De,[n.unref(o).zeroColumn?(n.openBlock(),n.createElementBlock("th",$e)):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)}}),je="",R=_(Be,[["__scopeId","data-v-16e66636"]]),Oe=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))}}),Ue="",P=_(Oe,[["__scopeId","data-v-10a48b2a"]]),Re=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,d)=>{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 f=d.dataset.rowindex,u=d.dataset.colindex,c=document.querySelectorAll(`[data-rowindex='${f}'][data-colindex='${u}']`);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,(f,u)=>(n.openBlock(),n.createBlock(O,{key:f.id||n.unref(v)(),row:f,rowIndex:u,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}:${u}`,tableid:n.unref(r).id,col:c,spellcheck:"false",rowIndex:u,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))}}),We="",te=_(Re,[["__scopeId","data-v-819abcc5"]]);function Pe(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=Pe,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 index aff8d13d..a6167d32 100644 --- a/atable/dist/atable.umd.cjs.map +++ b/atable/dist/atable.umd.cjs.map @@ -1 +1 @@ -{"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","oldValue","clickOutside","$parent","nextTick","$parentCell","install","app","ACell","AExpansionRow","ARow","ATable","ATableHeader","ATableModal"],"mappings":"0QACA,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,CACT,CACA,SAASK,GAAEL,EAAG,CACZ,OAAOM,EAAAA,gBAAG,GAAIC,iBAAEP,CAAC,EAAG,IAAM,EAC5B,CACA,SAASQ,EAAER,EAAG,CACZ,IAAIS,EACJ,MAAMC,EAAIR,EAAEF,CAAC,EACb,OAAQS,EAAIC,GAAK,KAAO,OAASA,EAAE,MAAQ,KAAOD,EAAIC,CACxD,CACA,MAAMC,EAAIb,EAAI,OAAS,OACvB,SAASc,MAAKZ,EAAG,CACf,IAAIS,EAAGC,EAAGG,EAAGC,EACb,GAAIf,GAAEC,EAAE,CAAC,CAAC,GAAK,MAAM,QAAQA,EAAE,CAAC,CAAC,GAAK,CAACU,EAAGG,EAAGC,CAAC,EAAId,EAAGS,EAAIE,GA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oBAAqBI,CAAQ,CACnC,EACA,CAAE,KAAM,EAAK,CAAA,EAmDR,MAAAE,EAAgB1D,GAAsB,QACtCc,EAAAxB,EAAU,MAAM,SAAhB,MAAAwB,EAAwB,SAASd,EAAM,SACvCV,EAAU,MAAM,UAEnBA,EAAU,MAAM,QAAU,GAE5B,EAGM,cAAA,iBAAiB,QAASoE,CAAY,EACtC,OAAA,iBAAiB,UAAY1D,GAAyB,CACxD,GAAAA,EAAM,MAAQ,UACbV,EAAU,MAAM,QAAS,CAC5BA,EAAU,MAAM,QAAU,GAGpB,MAAAqE,EAAUrE,EAAU,MAAM,OAC5BqE,GAEEC,EAAA,SAAA,EAAW,KAAK,IAAM,CAGpB,MAAAtC,EAAWqC,EAAQ,QAAQ,SAC3BhB,EAAWgB,EAAQ,QAAQ,SAC3BE,EAAc,SAAS,iBAAiB,mBAAmBvC,CAAQ,qBAAqBqB,CAAQ,IAAI,EACtGkB,GACDA,EAAY,CAAC,EAA2B,OAC3C,CACA,CAEH,CACD,CACA,6gECzKD,SAASC,GAAQC,EAAwB,CACpCA,EAAA,UAAU,QAASC,CAAK,EACxBD,EAAA,UAAU,gBAAiBE,CAAa,EACxCF,EAAA,UAAU,OAAQG,CAAI,EACtBH,EAAA,UAAU,SAAUI,EAAM,EAC1BJ,EAAA,UAAU,eAAgBK,CAAY,EACtCL,EAAA,UAAU,cAAeM,CAAW,CACzC","x_google_ignoreList":[4,5,6,7]} \ No newline at end of file +{"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","oldValue","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,CACT,CACA,SAASK,GAAEL,EAAG,CACZ,OAAOM,EAAAA,gBAAG,GAAIC,iBAAEP,CAAC,EAAG,IAAM,EAC5B,CACA,SAASQ,EAAER,EAAG,CACZ,IAAIS,EACJ,MAAMC,EAAIR,EAAEF,CAAC,EACb,OAAQS,EAAIC,GAAK,KAAO,OAASA,EAAE,MAAQ,KAAOD,EAAIC,CACxD,CACA,MAAMC,EAAIb,EAAI,OAAS,OACvB,SAASc,MAAKZ,EAAG,CACf,IAAIS,EAAGC,EAAGG,EAAGC,EACb,GAAIf,GA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tEkE,EAAAA,QAAAhE,EAAU,GAAIA,CAAS,EAE/BiE,EAAA,MACC,IAAMjE,EAAU,KAChB,CAACkE,EAAUC,IAAa,CACvBL,EAAK,oBAAqBI,CAAQ,CACnC,EACA,CAAE,KAAM,EAAK,CAAA,EAmDR,MAAAE,EAAgB1D,GAAsB,QACtCc,EAAAxB,EAAU,MAAM,SAAhB,MAAAwB,EAAwB,SAASd,EAAM,SACvCV,EAAU,MAAM,UAEnBA,EAAU,MAAM,QAAU,GAE5B,EAGM,cAAA,iBAAiB,QAASoE,CAAY,EACtC,OAAA,iBAAiB,UAAY1D,GAAyB,CACxD,GAAAA,EAAM,MAAQ,UACbV,EAAU,MAAM,QAAS,CAC5BA,EAAU,MAAM,QAAU,GAGpB,MAAAqE,EAAUrE,EAAU,MAAM,OAC5BqE,GAEEC,EAAA,SAAA,EAAW,KAAK,IAAM,CAGpB,MAAAtC,EAAWqC,EAAQ,QAAQ,SAC3BhB,EAAWgB,EAAQ,QAAQ,SAC3BE,EAAc,SAAS,iBAAiB,mBAAmBvC,CAAQ,qBAAqBqB,CAAQ,IAAI,EACtGkB,GACDA,EAAY,CAAC,EAA2B,OAC3C,CACA,CAEH,CACD,CACA,6gECzKD,SAASC,GAAQC,EAAwB,CACpCA,EAAA,UAAU,QAASC,CAAK,EACxBD,EAAA,UAAU,gBAAiBE,CAAa,EACxCF,EAAA,UAAU,OAAQG,CAAI,EACtBH,EAAA,UAAU,SAAUI,EAAM,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 index 276c8dc9..8a47cadf 100644 --- a/atable/dist/style.css +++ b/atable/dist/style.css @@ -1 +1 @@ -[data-v-1738c6fc]: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-1738c6fc]{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-1738c6fc]:focus,td[data-v-1738c6fc]: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-2bb821ae]: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-2bb821ae]{color:var(--header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch}.expandable-row[data-v-2bb821ae]{border-top:1px solid var(--row-border-color);height:var(--atable-row-height)}.expanded-row[data-v-2bb821ae]{border-bottom:1px solid var(--row-border-color);border-top:1px solid var(--row-border-color)}.expanded-row-content[data-v-2bb821ae]{border-bottom:1px solid var(--row-border-color);border-top:1px solid var(--row-border-color);padding:1.5rem}[data-v-c758303d]: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-c758303d]{border-top:1px solid var(--row-border-color);height:var(--atable-row-height)}.list-index[data-v-c758303d]{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(--6b10edcf);max-width:var(--6b10edcf)}.tree-index[data-v-c758303d]{color:var(--header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch}[data-v-8a8d9cee]: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-8a8d9cee]{background-color:var(--gray-5)}#header-index[data-v-8a8d9cee]{width:var(--1cb0fcc9);max-width:var(--1cb0fcc9)}th[data-v-8a8d9cee]{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-8a8d9cee]:focus{outline:none}[data-v-8ac70767]: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-8ac70767]{z-index:100;position:absolute;background-color:var(--row-color-zebra-dark)}[data-v-9137b4c3]: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-9137b4c3]{display:table;border-collapse:collapse;caret-color:var(--brand-color)}table.atable[data-v-9137b4c3],.atable[data-v-9137b4c3]{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-9137b4c3]{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)} +[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-819abcc5]: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-819abcc5]{display:table;border-collapse:collapse;caret-color:var(--brand-color)}table.atable[data-v-819abcc5],.atable[data-v-819abcc5]{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-819abcc5]{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 ec190472..7e7a6730 100644 --- a/atable/package.json +++ b/atable/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/atable", + "name": "@stonecrop/atable", "version": "0.2.2", "license": "MIT", "type": "module", @@ -30,13 +30,13 @@ "test:ui": "vitest --ui" }, "dependencies": { - "@agritheory/themes": "workspace:*", - "@agritheory/utilities": "workspace:*", + "@stonecrop/themes": "workspace:*", + "@stonecrop/utilities": "workspace:*", "uuid": "^9.0.0", "vue": "^3.2.47" }, "devDependencies": { - "@agritheory/aform": "workspace:*", + "@stonecrop/aform": "workspace:*", "@histoire/plugin-vue": "^0.16.1", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.5", @@ -57,7 +57,7 @@ "vue-router": "^4" }, "peerDependencies": { - "@agritheory/aform": "workspace:*" + "@stonecrop/aform": "workspace:*" }, "engines": { "node": ">=20.11.0" diff --git a/atable/src/components/ACell.vue b/atable/src/components/ACell.vue index 7648dd05..0743e154 100644 --- a/atable/src/components/ACell.vue +++ b/atable/src/components/ACell.vue @@ -27,7 +27,7 @@ diff --git a/atable/stories/list.story.vue b/atable/stories/list.story.vue index 2db662db..0a9108e2 100644 --- a/atable/stories/list.story.vue +++ b/atable/stories/list.story.vue @@ -277,7 +277,7 @@ rowNav['keydown.enter'] = rowNav['keydown.down'] diff --git a/atable/vite.config.ts b/atable/vite.config.ts index c88c404e..a02db0c4 100644 --- a/atable/vite.config.ts +++ b/atable/vite.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ sourcemap: true, lib: { entry: resolve(projectRootDir, 'src/index.ts'), - name: '@agritheory/atable', + name: '@stonecrop/atable', }, rollupOptions: { external: ['vue'], diff --git a/beam/dev/vite.config.js b/beam/dev/vite.config.js index 876b026e..16e498ff 100644 --- a/beam/dev/vite.config.js +++ b/beam/dev/vite.config.js @@ -19,7 +19,7 @@ module.exports = { build: { lib: { entry: resolve(__dirname, '../src/index.js'), - name: '@agritheory/beam', + name: '@stonecrop/beam', }, rollupOptions: { external: ['vue'], diff --git a/beam/package.json b/beam/package.json index c52ef89c..f6a5b2bd 100644 --- a/beam/package.json +++ b/beam/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/beam", + "name": "@stonecrop/beam", "version": "0.2.2", "license": "MIT", "scripts": { diff --git a/code_editor/dist/code-editor.umd.cjs b/code_editor/dist/code-editor.umd.cjs index 257f48de..06ec5ae3 100644 --- a/code_editor/dist/code-editor.umd.cjs +++ b/code_editor/dist/code-editor.umd.cjs @@ -1,4 +1,4 @@ -(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["@agritheory/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=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 v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(je){return je};return b.selector(v),v(r.current)}function c(v){z(t,o,i,a)(v)}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= 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":"+QAAA,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,OAAO,SAAUC,EAAK,CAC1D,OAAO,OAAO,yBAAyBJ,EAAQI,CAAG,EAAE,UAC1D,CAAK,GACDF,EAAK,KAAK,MAAMA,EAAMC,CAAO,CAC9B,CAED,OAAOD,CACT,CAEA,SAASG,EAAeC,EAAQ,CAC9B,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAS,UAAUD,CAAC,GAAK,KAAO,UAAUA,CAAC,EAAI,GAE/CA,EAAI,EACNR,EAAQ,OAAOS,CAAM,EAAG,EAAI,EAAE,QAAQ,SAAUX,EAAK,CACnDF,EAAgBW,EAAQT,EAAKW,EAAOX,CAAG,CAAC,CAChD,CAAO,EACQ,OAAO,0BAChB,OAAO,iBAAiBS,EAAQ,OAAO,0BAA0BE,C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CACC,WAAY,SACZ,WAAY,SACZ,MAAO,gBACR,EACA,CACC,WAAY,SACZ,WAAY,SACZ,MAAO,gCACR,EACA,CACC,WAAY,SACZ,WAAY,SACZ,MAAO,gBACR,EACA,CACC,WAAY,SACZ,WAAY,SACZ,MAAO,kBACR,EACA,CACC,WAAY,SACZ,UAAW,OACX,MAAO,iBACR,EACA,CACC,WAAY,SACZ,MAAO,kBACR,EACA,CACC,WAAY,SACZ,UAAW,OACX,MAAO,gBACR,EACA,CACC,WAAY,SACZ,MAAO,aACR,EACA,CACC,WAAY,SACZ,MAAO,wBACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,2BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,8BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,4BACR,EACA,CACC,WAAY,SACZ,MAAO,2BACR,EACA,CACC,WAAY,SACZ,UAAW,YACX,MAAO,+BACR,EACA,CACC,WAAY,SACZ,UAAW,YACX,MAAO,mBACR,CACD,CACD,0HClVA,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,wQC/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 +{"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,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CACC,WAAY,SACZ,MAAO,SACR,EACA,CACC,WAAY,SACZ,MAAO,gCACR,EACA,CACC,WAAY,SACZ,MAAO,gBACR,EACA,CACC,WAAY,SACZ,MAAO,UACR,EACA,CACC,WAAY,SACZ,MAAO,sBACR,EACA,CACC,WAAY,SACZ,MAAO,yBACR,EACA,CACC,WAAY,SACZ,MAAO,mBACR,EACA,CACC,WAAY,SACZ,MAAO,QACR,EACA,CACC,WAAY,SACZ,MAAO,aACR,EACA,CACC,WAAY,SACZ,MAAO,6BACR,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,MA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AAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,2BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,8BACR,EACA,CACC,WAAY,SACZ,MAAO,0BACR,EACA,CACC,WAAY,SACZ,MAAO,4BACR,EACA,CACC,WAAY,SACZ,MAAO,2BACR,EACA,CACC,WAAY,SACZ,UAAW,YACX,MAAO,+BACR,EACA,CACC,WAAY,SACZ,UAAW,YACX,MAAO,mBACR,CACD,CACD,0HClVA,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,wQC/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/package.json b/code_editor/package.json index 61d9d3dc..7995d7ef 100644 --- a/code_editor/package.json +++ b/code_editor/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/code-editor", + "name": "@stonecrop/code-editor", "version": "0.2.2", "license": "MIT", "type": "module", @@ -26,14 +26,14 @@ "story:preview": "histoire preview" }, "dependencies": { - "@agritheory/themes": "workspace:*", - "@agritheory/utilities": "workspace:*", + "@stonecrop/themes": "workspace:*", + "@stonecrop/utilities": "workspace:*", "@monaco-editor/loader": "~1.3.2", "monaco-editor": "~0.34.1", "vue": "^3.2.47" }, "devDependencies": { - "@agritheory/atable": "workspace:*", + "@stonecrop/atable": "workspace:*", "@histoire/plugin-vue": "^0.16.1", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.5", diff --git a/code_editor/vite.config.ts b/code_editor/vite.config.ts index f214f687..e30e096c 100644 --- a/code_editor/vite.config.ts +++ b/code_editor/vite.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ sourcemap: true, lib: { entry: resolve(projectRootDir, 'src/index.ts'), - name: '@agritheory/code-editor', + name: '@stonecrop/code-editor', }, rollupOptions: { external: ['vue'], diff --git a/common/changes/@stonecrop/aform/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/aform/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..3c0f5971 --- /dev/null +++ b/common/changes/@stonecrop/aform/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/aform", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/aform" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/atable/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/atable/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..e1192bfc --- /dev/null +++ b/common/changes/@stonecrop/atable/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/atable", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/atable" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/code-editor/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/code-editor/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..82d699ef --- /dev/null +++ b/common/changes/@stonecrop/code-editor/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/code-editor", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/code-editor" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/desktop/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/desktop/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..57b2df8d --- /dev/null +++ b/common/changes/@stonecrop/desktop/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/desktop", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/desktop" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/graphql-client/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/graphql-client/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..311ec0a0 --- /dev/null +++ b/common/changes/@stonecrop/graphql-client/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/graphql-client", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/graphql-client" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/node-editor/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/node-editor/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..ce4d47f3 --- /dev/null +++ b/common/changes/@stonecrop/node-editor/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/node-editor", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/node-editor" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/stonecrop/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/stonecrop/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..62482627 --- /dev/null +++ b/common/changes/@stonecrop/stonecrop/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/stonecrop", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/stonecrop" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/themes/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/themes/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..5dfac6ed --- /dev/null +++ b/common/changes/@stonecrop/themes/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/themes", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/themes" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/utilities/fix-publish-npm_2024-04-16-06-45.json b/common/changes/@stonecrop/utilities/fix-publish-npm_2024-04-16-06-45.json new file mode 100644 index 00000000..f26c5e03 --- /dev/null +++ b/common/changes/@stonecrop/utilities/fix-publish-npm_2024-04-16-06-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/utilities", + "comment": "Update package name", + "type": "none" + } + ], + "packageName": "@stonecrop/utilities" +} \ No newline at end of file diff --git a/common/config/rush/.npmrc b/common/config/rush/.npmrc index e43e66ed..61fa0cd9 100644 --- a/common/config/rush/.npmrc +++ b/common/config/rush/.npmrc @@ -18,8 +18,8 @@ # # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} # -@agritheory:registry=https://npm.pkg.github.com/ -//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} +@stonecrop:registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} registry=https://registry.npmjs.org/ always-auth=false diff --git a/common/config/rush/.npmrc-publish b/common/config/rush/.npmrc-publish index 62a01ca7..c64c2cc5 100644 --- a/common/config/rush/.npmrc-publish +++ b/common/config/rush/.npmrc-publish @@ -18,5 +18,5 @@ # # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} # -@agritheory:registry=https://npm.pkg.github.com/ -//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} +@stonecrop:registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index b14a0dc1..015e77b3 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -3,31 +3,31 @@ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/approved-packages.schema.json", "packages": [ { - "name": "@agritheory/aform", + "name": "@stonecrop/aform", "allowedCategories": [ "prototype" ] }, { - "name": "@agritheory/atable", + "name": "@stonecrop/atable", "allowedCategories": [ "prototype" ] }, { - "name": "@agritheory/desktop", + "name": "@stonecrop/desktop", "allowedCategories": [ "prototype" ] }, { - "name": "@agritheory/node-editor", + "name": "@stonecrop/node-editor", "allowedCategories": [ "prototype" ] }, { - "name": "@agritheory/stonecrop", + "name": "@stonecrop/stonecrop", "allowedCategories": [ "prototype", "utilities" ] }, { - "name": "@agritheory/themes", + "name": "@stonecrop/themes", "allowedCategories": [ "prototype" ] }, { - "name": "@agritheory/utilities", + "name": "@stonecrop/utilities", "allowedCategories": [ "prototype" ] }, { diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c8ac122e..9cbe5914 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: ../../aform: dependencies: - '@agritheory/themes': + '@stonecrop/themes': specifier: workspace:* version: link:../themes - '@agritheory/utilities': + '@stonecrop/utilities': specifier: workspace:* version: link:../utilities uuid: @@ -23,7 +23,7 @@ importers: specifier: ^3.2.47 version: 3.4.19(typescript@5.3.3) devDependencies: - '@agritheory/atable': + '@stonecrop/atable': specifier: workspace:* version: link:../atable '@histoire/plugin-vue': @@ -83,10 +83,10 @@ importers: ../../atable: dependencies: - '@agritheory/themes': + '@stonecrop/themes': specifier: workspace:* version: link:../themes - '@agritheory/utilities': + '@stonecrop/utilities': specifier: workspace:* version: link:../utilities uuid: @@ -96,7 +96,7 @@ importers: specifier: ^3.2.47 version: 3.4.19(typescript@5.3.3) devDependencies: - '@agritheory/aform': + '@stonecrop/aform': specifier: workspace:* version: link:../aform '@histoire/plugin-vue': @@ -156,10 +156,10 @@ importers: ../../code_editor: dependencies: - '@agritheory/themes': + '@stonecrop/themes': specifier: workspace:* version: link:../themes - '@agritheory/utilities': + '@stonecrop/utilities': specifier: workspace:* version: link:../utilities '@monaco-editor/loader': @@ -172,7 +172,7 @@ importers: specifier: ^3.2.47 version: 3.4.19(typescript@5.3.3) devDependencies: - '@agritheory/atable': + '@stonecrop/atable': specifier: workspace:* version: link:../atable '@histoire/plugin-vue': @@ -217,16 +217,16 @@ importers: ../../desktop: dependencies: - '@agritheory/aform': + '@stonecrop/aform': specifier: workspace:* version: link:../aform - '@agritheory/atable': + '@stonecrop/atable': specifier: workspace:* version: link:../atable - '@agritheory/stonecrop': + '@stonecrop/stonecrop': specifier: workspace:* version: link:../stonecrop - '@agritheory/themes': + '@stonecrop/themes': specifier: workspace:* version: link:../themes immutable: @@ -275,22 +275,22 @@ importers: ../../examples: dependencies: - '@agritheory/aform': + '@stonecrop/aform': specifier: workspace:* version: link:../aform - '@agritheory/atable': + '@stonecrop/atable': specifier: workspace:* version: link:../atable - '@agritheory/desktop': + '@stonecrop/desktop': specifier: workspace:* version: link:../desktop - '@agritheory/node-editor': + '@stonecrop/node-editor': specifier: workspace:* version: link:../node_editor - '@agritheory/stonecrop': + '@stonecrop/stonecrop': specifier: workspace:* version: link:../stonecrop - '@agritheory/themes': + '@stonecrop/themes': specifier: workspace:* version: link:../themes '@miragejs/graphql': @@ -342,7 +342,7 @@ importers: ../../graphql_client: dependencies: - '@agritheory/stonecrop': + '@stonecrop/stonecrop': specifier: workspace:* version: link:../stonecrop graphql: @@ -453,10 +453,10 @@ importers: specifier: ~4.37.2 version: 4.37.2 devDependencies: - '@agritheory/aform': + '@stonecrop/aform': specifier: workspace:* version: link:../aform - '@agritheory/atable': + '@stonecrop/atable': specifier: workspace:* version: link:../atable '@typescript-eslint/eslint-plugin': diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index 0c22eeb5..de15a8cb 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.3", + "version": "0.2.4", "nextBump": "patch" } // { diff --git a/common/scripts/install-run-rush-pnpm.js b/common/scripts/install-run-rush-pnpm.js index 72a7bfdf..2356649f 100644 --- a/common/scripts/install-run-rush-pnpm.js +++ b/common/scripts/install-run-rush-pnpm.js @@ -10,6 +10,9 @@ // node common/scripts/install-run-rush-pnpm.js pnpm-command // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index fe5101a2..9676fc71 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -8,6 +8,9 @@ // node common/scripts/install-run-rush.js install // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; @@ -137,8 +140,8 @@ function _getRushVersion(logger) { return rushJsonMatches[1]; } catch (e) { - throw new Error(`Unable to determine the required version of Rush from rush.json (${rushJsonFolder}). ` + - "The 'rushVersion' field is either not assigned in rush.json or was specified " + + throw new Error(`Unable to determine the required version of Rush from ${RUSH_JSON_FILENAME} (${rushJsonFolder}). ` + + `The 'rushVersion' field is either not assigned in ${RUSH_JSON_FILENAME} or was specified ` + 'using an unexpected syntax.'); } } @@ -197,7 +200,7 @@ function _run() { } runWithErrorAndStatusCode(logger, () => { const version = _getRushVersion(logger); - logger.info(`The rush.json configuration requests Rush version ${version}`); + logger.info(`The ${RUSH_JSON_FILENAME} configuration requests Rush version ${version}`); const lockFilePath = process.env[INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE]; if (lockFilePath) { logger.info(`Found ${INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE}="${lockFilePath}", installing with lockfile.`); diff --git a/common/scripts/install-run-rushx.js b/common/scripts/install-run-rushx.js index 0a0235f2..6581521f 100644 --- a/common/scripts/install-run-rushx.js +++ b/common/scripts/install-run-rushx.js @@ -10,6 +10,9 @@ // node common/scripts/install-run-rushx.js custom-command // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 11bb97c0..9283c445 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -8,6 +8,9 @@ // node common/scripts/install-run.js qrcode@1.2.2 qrcode https://rushjs.io // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; @@ -42,13 +45,22 @@ __webpack_require__.r(__webpack_exports__); */ // create a global _combinedNpmrc for cache purpose const _combinedNpmrcMap = new Map(); -function _trimNpmrcFile(sourceNpmrcPath, extraLines = []) { +function _trimNpmrcFile(options) { + const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options; const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); if (combinedNpmrcFromCache !== undefined) { return combinedNpmrcFromCache; } - let npmrcFileLines = fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n'); - npmrcFileLines.push(...extraLines); + let npmrcFileLines = []; + if (linesToPrepend) { + npmrcFileLines.push(...linesToPrepend); + } + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + npmrcFileLines.push(...fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n')); + } + if (linesToAppend) { + npmrcFileLines.push(...linesToAppend); + } npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); const resultLines = []; // This finds environment variable tokens that look like "${VAR_NAME}" @@ -93,51 +105,40 @@ function _trimNpmrcFile(sourceNpmrcPath, extraLines = []) { _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); return combinedNpmrc; } -/** - * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims - * unusable lines from the .npmrc file. - * - * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in - * the .npmrc file to provide different authentication tokens for different registry. - * However, if the environment variable is undefined, it expands to an empty string, which - * produces a valid-looking mapping with an invalid URL that causes an error. Instead, - * we'd prefer to skip that line and continue looking in other places such as the user's - * home directory. - * - * @returns - * The text of the the .npmrc with lines containing undefined variables commented out. - */ -function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath, extraLines) { +function _copyAndTrimNpmrcFile(options) { + const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options; logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose logger.info(` --> "${targetNpmrcPath}"`); - const combinedNpmrc = _trimNpmrcFile(sourceNpmrcPath, extraLines); + const combinedNpmrc = _trimNpmrcFile({ + sourceNpmrcPath, + linesToPrepend, + linesToAppend + }); fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); return combinedNpmrc; } -/** - * syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file. - * If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder. - * - * IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc() - * - * @returns - * The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned. - */ -function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { - // eslint-disable-next-line no-console - info: console.log, - // eslint-disable-next-line no-console - error: console.error -}, extraLines) { +function syncNpmrc(options) { + const { sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { + // eslint-disable-next-line no-console + info: console.log, + // eslint-disable-next-line no-console + error: console.error + }, createIfMissing = false, linesToAppend, linesToPrepend } = options; const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc'); try { - if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath) || createIfMissing) { // Ensure the target folder exists if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcFolder)) { fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(targetNpmrcFolder, { recursive: true }); } - return _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath, extraLines); + return _copyAndTrimNpmrcFile({ + sourceNpmrcPath, + targetNpmrcPath, + logger, + linesToAppend, + linesToPrepend + }); } else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target @@ -155,7 +156,7 @@ function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { return false; } - const trimmedNpmrcFile = _trimNpmrcFile(sourceNpmrcPath); + const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath }); const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); return trimmedNpmrcFile.match(variableKeyRegExp) !== null; } @@ -340,7 +341,7 @@ let _npmPath = undefined; function getNpmPath() { if (!_npmPath) { try { - if (os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32') { + if (_isWindows()) { // We're on Windows const whereOutput = child_process__WEBPACK_IMPORTED_MODULE_0__.execSync('where npm', { stdio: [] }).toString(); const lines = whereOutput.split(os__WEBPACK_IMPORTED_MODULE_2__.EOL).filter((line) => !!line); @@ -436,7 +437,11 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { try { const rushTempFolder = _getRushTempFolder(rushCommonFolder); const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); - (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, rushTempFolder, undefined, logger); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ + sourceNpmrcFolder, + targetNpmrcFolder: rushTempFolder, + logger + }); const npmPath = getNpmPath(); // This returns something that looks like: // ``` @@ -455,10 +460,13 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { // ``` // // if only a single version matches. - const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier', '--json'], { + const spawnSyncOptions = { cwd: rushTempFolder, - stdio: [] - }); + stdio: [], + shell: _isWindows() + }; + const platformNpmPath = _getPlatformPath(npmPath); + const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformNpmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier', '--json'], spawnSyncOptions); if (npmVersionSpawnResult.status !== 0) { throw new Error(`"npm view" returned error code ${npmVersionSpawnResult.status}`); } @@ -503,7 +511,7 @@ function findRushJsonFolder() { } } while (basePath !== (tempPath = path__WEBPACK_IMPORTED_MODULE_3__.dirname(basePath))); // Exit the loop when we hit the disk root if (!_rushJsonFolder) { - throw new Error('Unable to find rush.json.'); + throw new Error(`Unable to find ${RUSH_JSON_FILENAME}.`); } } return _rushJsonFolder; @@ -591,10 +599,12 @@ function _installPackage(logger, packageInstallFolder, name, version, command) { try { logger.info(`Installing ${name}...`); const npmPath = getNpmPath(); - const result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, [command], { + const platformNpmPath = _getPlatformPath(npmPath); + const result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformNpmPath, [command], { stdio: 'inherit', cwd: packageInstallFolder, - env: process.env + env: process.env, + shell: _isWindows() }); if (result.status !== 0) { throw new Error(`"npm ${command}" encountered an error`); @@ -610,9 +620,18 @@ function _installPackage(logger, packageInstallFolder, name, version, command) { */ function _getBinPath(packageInstallFolder, binName) { const binFolderPath = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); - const resolvedBinName = os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32' ? `${binName}.cmd` : binName; + const resolvedBinName = _isWindows() ? `${binName}.cmd` : binName; return path__WEBPACK_IMPORTED_MODULE_3__.resolve(binFolderPath, resolvedBinName); } +/** + * Returns a cross-platform path - windows must enclose any path containing spaces within double quotes. + */ +function _getPlatformPath(platformPath) { + return _isWindows() && platformPath.includes(' ') ? `"${platformPath}"` : platformPath; +} +function _isWindows() { + return os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32'; +} /** * Write a flag file to the package's install directory, signifying that the install was successful. */ @@ -634,7 +653,11 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack // The package isn't already installed _cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath); const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); - (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, packageInstallFolder, undefined, logger); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ + sourceNpmrcFolder, + targetNpmrcFolder: packageInstallFolder, + logger + }); _createPackageJson(packageInstallFolder, packageName, packageVersion); const command = lockFilePath ? 'ci' : 'install'; _installPackage(logger, packageInstallFolder, packageName, packageVersion, command); @@ -650,15 +673,14 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack const originalEnvPath = process.env.PATH || ''; let result; try { - // Node.js on Windows can not spawn a file when the path has a space on it - // unless the path gets wrapped in a cmd friendly way and shell mode is used - const shouldUseShell = binPath.includes(' ') && os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32'; - const platformBinPath = shouldUseShell ? `"${binPath}"` : binPath; + // `npm` bin stubs on Windows are `.cmd` files + // Node.js will not directly invoke a `.cmd` file unless `shell` is set to `true` + const platformBinPath = _getPlatformPath(binPath); process.env.PATH = [binFolderPath, originalEnvPath].join(path__WEBPACK_IMPORTED_MODULE_3__.delimiter); result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformBinPath, packageBinArgs, { stdio: 'inherit', windowsVerbatimArguments: false, - shell: shouldUseShell, + shell: _isWindows(), cwd: process.cwd(), env: process.env }); diff --git a/desktop/dist/desktop.js b/desktop/dist/desktop.js index 01df05fc..7bd61f6f 100644 --- a/desktop/dist/desktop.js +++ b/desktop/dist/desktop.js @@ -4523,7 +4523,7 @@ const Ic = ["data-colindex", "data-rowindex", "data-editable", "contenteditable" for (const [o, r] of t) n[o] = r; return n; -}, xc = /* @__PURE__ */ qe(Pc, [["__scopeId", "data-v-1738c6fc"]]), Cc = ["tabindex"], $c = { +}, xc = /* @__PURE__ */ qe(Pc, [["__scopeId", "data-v-07dfe445"]]), Cc = ["tabindex"], $c = { key: 0, tabIndex: -1, class: "list-index" @@ -4538,7 +4538,7 @@ const Ic = ["data-colindex", "data-rowindex", "data-editable", "contenteditable" }, setup(e) { vo((l) => ({ - "6b10edcf": k(r) + "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); @@ -4565,7 +4565,7 @@ const Ic = ["data-colindex", "data-rowindex", "data-editable", "contenteditable" [jt, i()] ]); } -}), Rc = /* @__PURE__ */ qe(Nc, [["__scopeId", "data-v-c758303d"]]); +}), Rc = /* @__PURE__ */ qe(Nc, [["__scopeId", "data-v-4c71a067"]]); let tt; const Ac = new Uint8Array(16); function Tc() { @@ -4664,7 +4664,7 @@ const Lc = { key: 0 }, jc = { }, setup(e) { vo((r) => ({ - "1cb0fcc9": k(n) + "12d06943": k(n) })); const t = Z(e.tableid), n = t.numberedRowWidth.value, o = (r) => ({ minWidth: r.width || "40ch", @@ -4686,7 +4686,7 @@ const Lc = { key: 0 }, jc = { ]) ])) : ke("", !0); } -}), Hc = /* @__PURE__ */ qe(Uc, [["__scopeId", "data-v-8a8d9cee"]]), Wc = /* @__PURE__ */ q({ +}), Hc = /* @__PURE__ */ qe(Uc, [["__scopeId", "data-v-16e66636"]]), Wc = /* @__PURE__ */ q({ __name: "ATableModal", props: { colIndex: {}, @@ -4708,7 +4708,7 @@ const Lc = { key: 0 }, jc = { me(n.$slots, "default", {}, void 0, !0) ], 544)); } -}), Fc = /* @__PURE__ */ qe(Wc, [["__scopeId", "data-v-8ac70767"]]), Gc = /* @__PURE__ */ q({ +}), Fc = /* @__PURE__ */ qe(Wc, [["__scopeId", "data-v-10a48b2a"]]), Gc = /* @__PURE__ */ q({ __name: "ATable", props: { id: {}, @@ -4808,7 +4808,7 @@ const Lc = { key: 0 }, jc = { ], !0) ], 4)); } -}), zc = /* @__PURE__ */ qe(Gc, [["__scopeId", "data-v-9137b4c3"]]), Qc = /* @__PURE__ */ q({ +}), zc = /* @__PURE__ */ qe(Gc, [["__scopeId", "data-v-819abcc5"]]), Qc = /* @__PURE__ */ q({ __name: "Records", setup(e) { const { stonecrop: t, isReady: n } = No(), o = { view: "list" }; diff --git a/desktop/dist/desktop.js.map b/desktop/dist/desktop.js.map index f4d48323..520a7734 100644 --- a/desktop/dist/desktop.js.map +++ b/desktop/dist/desktop.js.map @@ -1 +1 @@ -{"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 k, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as w, vModelCheckbox as ye, toDisplayString as C, vShow as $, resolveComponent as ge, createBlock as F, withCtx as be, onMounted as se, onBeforeUnmount as _e, ref as g, watch as H, unref as O, getCurrentScope as we, onScopeDispose as Ce, inject as ae, nextTick as ke, Fragment as x, renderList as V, normalizeStyle as De, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ee, mergeProps as Ie, createTextVNode as Me, renderSlot as Te, createVNode as Se, resolveDirective as Oe } from \"vue\";\nconst $e = { id: \"checkbox-container\" }, Le = [\"id\", \"readonly\", \"required\"], xe = { id: \"custom-checkbox\" }, Ve = [\"for\"], Be = [\"innerHTML\"], Pe = /* @__PURE__ */ k({\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 w(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 [ye, s.value]\n ]),\n i(\"span\", xe, C(s.value), 1)\n ]),\n i(\"label\", {\n for: l.uuid,\n id: \"checkbox-label\"\n }, C(l.label), 9, Ve),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Be), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst I = (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__ */ I(Pe, [[\"__scopeId\", \"data-v-743cd4db\"]]), Fe = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), He = /* @__PURE__ */ k({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, o) => {\n const n = ge(\"ATableModal\");\n return f(), F(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: be(() => [\n Fe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar N;\nconst ie = typeof window < \"u\", Re = (e) => typeof e == \"string\", Ue = () => {\n};\nie && (N = window == null ? void 0 : window.navigator) != null && N.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 we() ? (Ce(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, y, b, m) => (c.addEventListener(y, b, m), () => c.removeEventListener(y, b, m)), p = H(() => [q(t), ue(s)], ([c, y]) => {\n a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, y))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return Ye(u), u;\n}\nconst W = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nW[z] = W[z] || {};\nfunction Ne(e, { window: t = ce, scrollTarget: o } = {}) {\n const n = g(!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 H(() => 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 We = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? We(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 D = (e) => {\n let t = Ne(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(o)) ? j(o) : o;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !D(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !D(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) && D(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], y = u.filter((m) => L.includes(m)), b = L.some((m) => {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n return s.getModifierState(T);\n });\n if (y.length > 0) {\n if (b) {\n for (const m of L)\n if (u.includes(m)) {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n s.getModifierState(T) && 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 }), _e(() => {\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, E = 7, at = /* @__PURE__ */ k({\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 = g(), l = g(), a = g(), r = g([]);\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 ke();\n const M = document.getElementsByClassName(\"selecteddate\");\n if (M.length > 0)\n M[0].focus();\n else {\n const h = document.getElementsByClassName(\"todaysdate\");\n h.length > 0 && h[0].focus();\n }\n }), H([l, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const d = new Date(a.value, l.value, 1), M = d.getDay(), h = d.setDate(d.getDate() - M);\n for (let _ of Array(43).keys())\n r.value.push(h + _ * 864e5);\n }, u = () => {\n a.value -= 1;\n }, c = () => {\n a.value += 1;\n }, y = () => {\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 }, T = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, M) => {\n s.value = new Date(r.value[M]), 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\": y,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": c\n }\n }\n ]), (d, M) => 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: y,\n tabindex: -1\n }, \"<\"),\n i(\"th\", ot, C(ve.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), v(x, null, V(st, (h) => i(\"tr\", { key: h }, [\n (f(), v(x, null, V(E, (_) => i(\"td\", {\n key: (h - 1) * E + _,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: De({\n border: T(r.value[(h - 1) * E + _]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(h - 1) * E + _]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Ae((he) => fe(he, (h - 1) * E + _), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(h - 1) * E + _]),\n selecteddate: T(r.value[(h - 1) * E + _])\n })\n }, C(new Date(r.value[(h - 1) * E + _]).getDate()), 15, lt)), 64))\n ])), 64))\n ])\n ], 8, nt));\n }\n});\nconst rt = /* @__PURE__ */ I(at, [[\"__scopeId\", \"data-v-fcdc102d\"]]), it = k({\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});\nconst 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 w(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 w(i(\"ul\", ct, [\n e.isLoading ? (f(), v(\"li\", dt, \"Loading results...\")) : (f(!0), v(x, { key: 1 }, V(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 }, C(a), 11, pt))), 128))\n ], 512), [\n [$, e.isOpen]\n ]),\n i(\"label\", null, C(e.label), 1)\n ])\n ], 2);\n}\nconst mt = /* @__PURE__ */ I(it, [[\"render\", ft]]), vt = /* @__PURE__ */ k({\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});\nconst ht = /* @__PURE__ */ I(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), yt = /* @__PURE__ */ k({\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 = g(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(x, null, V(r.modelValue, (u, c) => (f(), F(Ee(u.component), Ie({\n key: c,\n schema: u,\n modelValue: a.value[c].value,\n \"onUpdate:modelValue\": (y) => a.value[c].value = y,\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});\nconst pe = /* @__PURE__ */ I(yt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), gt = /* @__PURE__ */ k({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, o = g(t.data || []);\n let n = g(!1), s = g(t.collapsible);\n const l = g(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 Me(C(r.label) + \" \", 1),\n O(s) ? (f(), F(ht, {\n key: 0,\n collapsed: O(n)\n }, null, 8, [\"collapsed\"])) : re(\"\", !0)\n ], 32),\n Te(r.$slots, \"default\", { collapsed: O(n) }, () => [\n w(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});\nconst bt = /* @__PURE__ */ I(gt, [[\"__scopeId\", \"data-v-cad9b578\"]]), _t = [\"id\", \"disabled\", \"required\"], wt = [\"for\"], Ct = [\"innerHTML\"], kt = /* @__PURE__ */ k({\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 w(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, _t), [\n [R, s.value]\n ]),\n i(\"label\", { for: l.uuid }, C(l.label), 9, wt),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Ct), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Dt = /* @__PURE__ */ I(kt, [[\"__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 Et(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 It(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 Mt(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 Tt(e, t) {\n const o = Et(t);\n if (!o)\n return;\n const n = \"#\", s = e.value, l = It(s, n);\n if (l) {\n const a = Mt(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 = k({\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 = g(!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: Tt\n }\n});\nconst Ot = [\"id\", \"disabled\", \"maxlength\", \"required\"], $t = [\"for\"], Lt = [\"innerHTML\"];\nfunction xt(e, t, o, n, s, l) {\n const a = Oe(\"mask\");\n return f(), v(\"div\", null, [\n w(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 }, C(e.label), 9, $t),\n w(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Lt), [\n [$, e.validation.errorMessage]\n ])\n ]);\n}\nconst Vt = /* @__PURE__ */ I(St, [[\"render\", xt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Pt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", He), e.component(\"ADate\", rt), e.component(\"ADropdown\", mt), e.component(\"AFieldset\", bt), e.component(\"AForm\", pe), e.component(\"ANumericInput\", Dt), e.component(\"ATextInput\", Vt);\n}\nexport {\n qe as ACheckbox,\n He as AComboBox,\n rt as ADate,\n mt as ADropdown,\n bt as AFieldset,\n pe as AForm,\n Dt as ANumericInput,\n Vt 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 router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\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, router3);\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, router3, 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 _e, ref as E, watch as j, unref as r, getCurrentScope as Ie, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\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 Ie() ? (Ee(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 Re(...t) {\n let e, n, o, a;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return $e;\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 Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!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 && Re(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 = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, _ = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (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 && (!_(n) || !x(n)) ? W(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 && (!_(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 && (!_(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 && (!_(o) || !x(o)) ? W(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 && (!_(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 && (!_(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!_(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!_(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\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) => _(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = Ve[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 I = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(I);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const I = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(I) && 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 }), _e(() => {\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 We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\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 I;\n const e = t, n = O(e.tableid), o = E(null);\n let a = E(!1);\n const l = S(() => {\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 = S(() => n.columns[e.colIndex].align || \"center\"), d = S(() => 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, (I = n.display[e.rowIndex]) == null ? void 0 : I.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), V({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, $(l.value), 1))\n ], 40, We));\n }\n});\nconst C = (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__ */ C(Qe, [[\"__scopeId\", \"data-v-1738c6fc\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\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 = E(null), a = E(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 T(\"tr\", V(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, $(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 T(\"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});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-2bb821ae\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\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 \"6b10edcf\": r(a)\n }));\n const e = t, n = O(e.tableid), o = E(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, $(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 }, $(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});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-c758303d\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(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 = A(n), this.config = A(a), this.table = l || A(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = A({ 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 A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => 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__ */ k({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"1cb0fcc9\": 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 T(\"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 ke($(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst ve = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-8a8d9cee\"]]), it = /* @__PURE__ */ k({\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});\nconst ye = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-8ac70767\"]]), dt = /* @__PURE__ */ k({\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 Ce(l.id, l), j(\n () => l.rows,\n (i, d) => {\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 && Ae().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 T(\"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), V({\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});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-9137b4c3\"]]);\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","I","o","n","s","N","ie","Qe","W","z","G","We","K","ze","Ge","J","Ke","Je","k","yt","g","l","r","p","a","S","f","v","x","V","F","Ee","Ie","y","pe","le","At","Et","t","It","Mt","Tt","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","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","router3","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","Te","$e","fe","Oe","De","U","me","Re","c","j","X","Y","Se","E","Z","Pe","He","Le","ee","Me","Ne","_","te","Ue","B","ne","je","oe","Q","D","Ve","we","q","xe","_e","Be","O","P","$","C","he","Xe","Ye","Ze","de","ce","ue","be","R","et","w","tt","nt","se","ge","ot","A","lt","at","rt","st","T","M","L","H","ke","ve","it","ye","dt","Ce","Ae","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,QAAIC,EAAM,UACTF,EAAO,QAAQ;AAAA,SAEd,GAAG;AAAA,IAAA,GAGDQ,IAAe,MAAM;AAC1B,MAAAN,EAAM,QAAQ,IACdC,EAAa,QAAQ,IACrB,aAAaF,EAAQ,KAAK,GAC1BD,EAAO,QAAQ;AAAA,IAAA,GAGVS,IAAiB,CAACC,MAAkB;AACzC,YAAMC,IAAe,CAACb,EAAU,MAAMY,CAAK,EAAE;AAC9B,MAAAL,KACLP,EAAA,MAAMY,CAAK,EAAE,OAAOC;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eCtHbC,GAAA;;;qDC8CZC,KAAI,CAAC,GAAG,MAAM;AAClB,QAAMC,IAAI,EAAE,aAAa;AACzB,aAAW,CAACC,GAAGC,CAAC,KAAK;AACnB,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEC9GnDtgC,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 k, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as w, vModelCheckbox as ye, toDisplayString as C, vShow as $, resolveComponent as ge, createBlock as F, withCtx as be, onMounted as se, onBeforeUnmount as _e, ref as g, watch as H, unref as O, getCurrentScope as we, onScopeDispose as Ce, inject as ae, nextTick as ke, Fragment as x, renderList as V, normalizeStyle as De, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ee, mergeProps as Ie, createTextVNode as Me, renderSlot as Te, createVNode as Se, resolveDirective as Oe } from \"vue\";\nconst $e = { id: \"checkbox-container\" }, Le = [\"id\", \"readonly\", \"required\"], xe = { id: \"custom-checkbox\" }, Ve = [\"for\"], Be = [\"innerHTML\"], Pe = /* @__PURE__ */ k({\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 w(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 [ye, s.value]\n ]),\n i(\"span\", xe, C(s.value), 1)\n ]),\n i(\"label\", {\n for: l.uuid,\n id: \"checkbox-label\"\n }, C(l.label), 9, Ve),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Be), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst I = (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__ */ I(Pe, [[\"__scopeId\", \"data-v-743cd4db\"]]), Fe = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), He = /* @__PURE__ */ k({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, o) => {\n const n = ge(\"ATableModal\");\n return f(), F(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: be(() => [\n Fe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar N;\nconst ie = typeof window < \"u\", Re = (e) => typeof e == \"string\", Ue = () => {\n};\nie && (N = window == null ? void 0 : window.navigator) != null && N.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 we() ? (Ce(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, y, b, m) => (c.addEventListener(y, b, m), () => c.removeEventListener(y, b, m)), p = H(() => [q(t), ue(s)], ([c, y]) => {\n a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, y))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return Ye(u), u;\n}\nconst W = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nW[z] = W[z] || {};\nfunction Ne(e, { window: t = ce, scrollTarget: o } = {}) {\n const n = g(!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 H(() => 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 We = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? We(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 D = (e) => {\n let t = Ne(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(o)) ? j(o) : o;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !D(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !D(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) && D(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], y = u.filter((m) => L.includes(m)), b = L.some((m) => {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n return s.getModifierState(T);\n });\n if (y.length > 0) {\n if (b) {\n for (const m of L)\n if (u.includes(m)) {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n s.getModifierState(T) && 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 }), _e(() => {\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, E = 7, at = /* @__PURE__ */ k({\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 = g(), l = g(), a = g(), r = g([]);\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 ke();\n const M = document.getElementsByClassName(\"selecteddate\");\n if (M.length > 0)\n M[0].focus();\n else {\n const h = document.getElementsByClassName(\"todaysdate\");\n h.length > 0 && h[0].focus();\n }\n }), H([l, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const d = new Date(a.value, l.value, 1), M = d.getDay(), h = d.setDate(d.getDate() - M);\n for (let _ of Array(43).keys())\n r.value.push(h + _ * 864e5);\n }, u = () => {\n a.value -= 1;\n }, c = () => {\n a.value += 1;\n }, y = () => {\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 }, T = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, M) => {\n s.value = new Date(r.value[M]), 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\": y,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": c\n }\n }\n ]), (d, M) => 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: y,\n tabindex: -1\n }, \"<\"),\n i(\"th\", ot, C(ve.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), v(x, null, V(st, (h) => i(\"tr\", { key: h }, [\n (f(), v(x, null, V(E, (_) => i(\"td\", {\n key: (h - 1) * E + _,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: De({\n border: T(r.value[(h - 1) * E + _]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(h - 1) * E + _]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Ae((he) => fe(he, (h - 1) * E + _), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(h - 1) * E + _]),\n selecteddate: T(r.value[(h - 1) * E + _])\n })\n }, C(new Date(r.value[(h - 1) * E + _]).getDate()), 15, lt)), 64))\n ])), 64))\n ])\n ], 8, nt));\n }\n});\nconst rt = /* @__PURE__ */ I(at, [[\"__scopeId\", \"data-v-169f1184\"]]), it = k({\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});\nconst 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 w(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 w(i(\"ul\", ct, [\n e.isLoading ? (f(), v(\"li\", dt, \"Loading results...\")) : (f(!0), v(x, { key: 1 }, V(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 }, C(a), 11, pt))), 128))\n ], 512), [\n [$, e.isOpen]\n ]),\n i(\"label\", null, C(e.label), 1)\n ])\n ], 2);\n}\nconst mt = /* @__PURE__ */ I(it, [[\"render\", ft]]), vt = /* @__PURE__ */ k({\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});\nconst ht = /* @__PURE__ */ I(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), yt = /* @__PURE__ */ k({\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 = g(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(x, null, V(r.modelValue, (u, c) => (f(), F(Ee(u.component), Ie({\n key: c,\n schema: u,\n modelValue: a.value[c].value,\n \"onUpdate:modelValue\": (y) => a.value[c].value = y,\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});\nconst pe = /* @__PURE__ */ I(yt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), gt = /* @__PURE__ */ k({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, o = g(t.data || []);\n let n = g(!1), s = g(t.collapsible);\n const l = g(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 Me(C(r.label) + \" \", 1),\n O(s) ? (f(), F(ht, {\n key: 0,\n collapsed: O(n)\n }, null, 8, [\"collapsed\"])) : re(\"\", !0)\n ], 32),\n Te(r.$slots, \"default\", { collapsed: O(n) }, () => [\n w(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});\nconst bt = /* @__PURE__ */ I(gt, [[\"__scopeId\", \"data-v-cad9b578\"]]), _t = [\"id\", \"disabled\", \"required\"], wt = [\"for\"], Ct = [\"innerHTML\"], kt = /* @__PURE__ */ k({\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 w(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, _t), [\n [R, s.value]\n ]),\n i(\"label\", { for: l.uuid }, C(l.label), 9, wt),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Ct), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Dt = /* @__PURE__ */ I(kt, [[\"__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 Et(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 It(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 Mt(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 Tt(e, t) {\n const o = Et(t);\n if (!o)\n return;\n const n = \"#\", s = e.value, l = It(s, n);\n if (l) {\n const a = Mt(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 = k({\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 = g(!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: Tt\n }\n});\nconst Ot = [\"id\", \"disabled\", \"maxlength\", \"required\"], $t = [\"for\"], Lt = [\"innerHTML\"];\nfunction xt(e, t, o, n, s, l) {\n const a = Oe(\"mask\");\n return f(), v(\"div\", null, [\n w(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 }, C(e.label), 9, $t),\n w(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Lt), [\n [$, e.validation.errorMessage]\n ])\n ]);\n}\nconst Vt = /* @__PURE__ */ I(St, [[\"render\", xt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Pt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", He), e.component(\"ADate\", rt), e.component(\"ADropdown\", mt), e.component(\"AFieldset\", bt), e.component(\"AForm\", pe), e.component(\"ANumericInput\", Dt), e.component(\"ATextInput\", Vt);\n}\nexport {\n qe as ACheckbox,\n He as AComboBox,\n rt as ADate,\n mt as ADropdown,\n bt as AFieldset,\n pe as AForm,\n Dt as ANumericInput,\n Vt 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 router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\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, router3);\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, router3, 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 _e, ref as E, watch as j, unref as r, getCurrentScope as Ie, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\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 Ie() ? (Ee(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 Re(...t) {\n let e, n, o, a;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return $e;\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 Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!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 && Re(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 = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, _ = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (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 && (!_(n) || !x(n)) ? W(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 && (!_(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 && (!_(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 && (!_(o) || !x(o)) ? W(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 && (!_(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 && (!_(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!_(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!_(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\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) => _(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = Ve[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 I = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(I);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const I = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(I) && 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 }), _e(() => {\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 We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\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 I;\n const e = t, n = O(e.tableid), o = E(null);\n let a = E(!1);\n const l = S(() => {\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 = S(() => n.columns[e.colIndex].align || \"center\"), d = S(() => 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, (I = n.display[e.rowIndex]) == null ? void 0 : I.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), V({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, $(l.value), 1))\n ], 40, We));\n }\n});\nconst C = (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__ */ C(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\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 = E(null), a = E(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 T(\"tr\", V(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, $(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 T(\"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});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\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 = E(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, $(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 }, $(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});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(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 = A(n), this.config = A(a), this.table = l || A(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = A({ 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 A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => 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__ */ k({\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 T(\"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 ke($(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst ve = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ k({\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});\nconst ye = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ k({\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 Ce(l.id, l), j(\n () => l.rows,\n (i, d) => {\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 && Ae().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 T(\"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), V({\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});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-819abcc5\"]]);\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","I","o","n","s","N","ie","Qe","W","z","G","We","K","ze","Ge","J","Ke","Je","k","yt","g","l","r","p","a","S","f","v","x","V","F","Ee","Ie","y","pe","le","At","Et","t","It","Mt","Tt","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","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","router3","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","Te","$e","fe","Oe","De","U","me","Re","c","j","X","Y","Se","E","Z","Pe","He","Le","ee","Me","Ne","_","te","Ue","B","ne","je","oe","Q","D","Ve","we","q","xe","_e","Be","O","P","$","C","he","Xe","Ye","Ze","de","ce","ue","be","R","et","w","tt","nt","se","ge","ot","A","lt","at","rt","st","T","M","L","H","ke","ve","it","ye","dt","Ce","Ae","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,QAAIC,EAAM,UACTF,EAAO,QAAQ;AAAA,SAEd,GAAG;AAAA,IAAA,GAGDQ,IAAe,MAAM;AAC1B,MAAAN,EAAM,QAAQ,IACdC,EAAa,QAAQ,IACrB,aAAaF,EAAQ,KAAK,GAC1BD,EAAO,QAAQ;AAAA,IAAA,GAGVS,IAAiB,CAACC,MAAkB;AACzC,YAAMC,IAAe,CAACb,EAAU,MAAMY,CAAK,EAAE;AAC9B,MAAAL,KACLP,EAAA,MAAMY,CAAK,EAAE,OAAOC;AAAA,IAAA;;;;;;;;;;;;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IAAA,GAGjB+1B,IAAe,OAAO/1B,MAAsC;AACjE,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB,GACtB,MAAM61B,EAAa;AAAA,IAAA,GAGdG,IAAe,MAA6C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEC9GnDtgC,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 diff --git a/desktop/dist/desktop.umd.cjs b/desktop/dist/desktop.umd.cjs index bbaf8bc1..a81d62a1 100644 --- a/desktop/dist/desktop.umd.cjs +++ b/desktop/dist/desktop.umd.cjs @@ -1,4 +1,4 @@ -(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["@agritheory/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))}}),Zi="",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=Ko(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))]))}}),[["__scopeId","data-v-74d66cf2"]]),Lt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function nr(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function or(e){var t;let n=e.value;if(n){const o=nr(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 rr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function sr(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 ar(e,t){const n=or(t);if(!n)return;const o="#",r=e.value,a=rr(r,o);if(a){const c=sr(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:ar}});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 _e{constructor(t,n,o,r,a){if(this.name="Stonecrop",_e._root)return _e._root;_e._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 ir(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const cr=typeof Proxy=="function",lr="devtools-plugin:setup",ur="plugin:settings:set";let pe,Ke;function dr(){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 fr(){return dr()?Ke.now():Date.now()}class pr{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 fr()}},n&&n.on(ur,(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=ir(),a=cr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(lr,e,t);else{const c=a?new pr(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))}}),Zi="",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=Ko(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))]))}}),[["__scopeId","data-v-74d66cf2"]]),Lt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function nr(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function or(e){var t;let n=e.value;if(n){const o=nr(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 rr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function sr(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 ar(e,t){const n=or(t);if(!n)return;const o="#",r=e.value,a=rr(r,o);if(a){const c=sr(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:ar}});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 _e{constructor(t,n,o,r,a){if(this.name="Stonecrop",_e._root)return _e._root;_e._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 ir(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const cr=typeof Proxy=="function",lr="devtools-plugin:setup",ur="plugin:settings:set";let pe,Ke;function dr(){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 fr(){return dr()?Ke.now():Date.now()}class pr{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 fr()}},n&&n.on(ur,(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=ir(),a=cr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(lr,e,t);else{const c=a?new pr(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 @@ -33,7 +33,7 @@ Use slot props instead: ${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,_){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}),_||w);const A=w;A.redirectedFrom=_;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)&&_&&(_._count=_._count?_._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}),_||A)}else H=R(A,E,!0,N,$);return b(A,E,H),H})}function To(m,_){const w=T(m,_);return w?Promise.reject(w):Promise.resolve()}function K(m){const _=We.values().next().value;return _&&typeof _.runWithContext=="function"?_.runWithContext(m):m()}function k(m,_){let w;const[E,$,D]=ea(m,_);w=dt(E.reverse(),"beforeRouteLeave",m,_);for(const C of E)C.leaveGuards.forEach(A=>{w.push(ie(A,m,_))});const N=To.bind(null,m,_);return w.push(N),we(w).then(()=>{w=[];for(const C of a.list())w.push(ie(C,m,_));return w.push(N),we(w)}).then(()=>{w=dt($,"beforeRouteUpdate",m,_);for(const C of $)C.updateGuards.forEach(A=>{w.push(ie(A,m,_))});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,_));else w.push(ie(C.beforeEnter,m,_));return w.push(N),we(w)}).then(()=>(m.matched.forEach(C=>C.enterCallbacks={}),w=dt(D,"beforeRouteEnter",m,_),w.push(N),we(w))).then(()=>{w=[];for(const C of c.list())w.push(ie(C,m,_));return w.push(N),we(w)}).catch(C=>ee(C,8)?C:Promise.reject(C))}function b(m,_,w){i.list().forEach(E=>K(()=>E(m,_,w)))}function R(m,_,w,E,$){const D=T(m,_);if(D)return D;const N=_===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,_,w,N),Nt()}let V;function de(){V||(V=r.listen((m,_,w)=>{const E=I(m),$=Q(E);if($){S(x($,{replace:!0}),E).catch(ke);return}d=E;const D=u.value;Z&&qr(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,_,w){Nt(m);const E=Fe.list();return E.length?E.forEach($=>$(m,_,w)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function Ki(){return Y&&u.value!==ae?Promise.resolve():new Promise((m,_)=>{xe.add([m,_])})}function Nt(m){return Y||(Y=!m,de(),xe.list().forEach(([_,w])=>m?w(m):_()),xe.reset()),m}function Ao(m,_,w,E){const{scrollBehavior:$}=e;if(!Z||!$)return Promise.resolve();const D=!w&&Kr(un(m.fullPath,0))||(E||!w)&&history.state&&history.state.scroll||null;return s.nextTick().then(()=>$(m,_,D)).then(N=>N&&Qr(N)).catch(N=>U(N,m,_))}const Pt=m=>r.go(m);let xt;const We=new Set,Ji={currentRoute:u,listening:!0,addRoute:h,removeRoute:y,hasRoute:v,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:Ki,install(m){const _=this;m.component("RouterLink",Ms),m.component("RouterView",Hs),m.config.globalProperties.$router=_,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,_),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&&zs(m,_,t)}};function we(m){return m.reduce((_,w)=>_.then(()=>K(w)),Promise.resolve())}return Ji}function ea(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]}Zs({history:Zr(),routes:[]});function ta(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 na(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 oa=Le,ra="native";function sa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function aa(e){e.bc.close(),e.subFns=[]}function ia(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function ca(e,t){e.messagesCallback=t}function la(){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 ua(){return 150}var da={create:sa,close:aa,onMessage:ca,postMessage:ia,canBeUsed:la,type:ra,averageResponseTime:ua,microSeconds:oa},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,fa(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function fa(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 pa=Le,ha="pubkey.broadcast-channel-0-",te="messages",je={durability:"relaxed"},ma="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 ga(e){var t=Wn(),n=ha+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 ya(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 wa(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 ka(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 Sa(e){e.closed=!0,e.db.close()}function Ia(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return ya(e.db,e.uuid,t)}).then(function(){na(0,10)===0&&ba(e)}),e.writeBlockPromise}function Oa(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Gn(e)}function Ca(){return!!Wn()}function Na(e){return e.idb.fallbackInterval*2}var Pa={create:Ea,close:Sa,onMessage:Oa,postMessage:Ia,canBeUsed:Ca,type:ma,averageResponseTime:Na,microSeconds:pa},xa=Le,$a="pubkey.broadcastChannel-",Ra="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 $a+e}function Ta(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 Aa(e,t){var n=qn(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Da(e){window.removeEventListener("storage",e)}function Va(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=Aa(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),Za(e)}function to(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ei(e)}function Za(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 ei(e){if(e._iL&&!Zn(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}class _t extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function no(e){return Object(e)!==e}const ti=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ni(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===ti}function oi(e){return Object.prototype.toString.call(e).slice(8,-1)}function ri(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,v]of d)a.push(`.get(${no(g)?Et(g):"..."})`),f+=`,${i(g)},${i(v)}`;f+="]";break;default:if(!ni(d))throw new _t("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(d).length>0)throw new _t("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 v in d)g&&(f+=","),g=!0,a.push(`.${v}`),f+=`${ye(v)}:${i(d[v])}`,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?vt.toString():e===0&&1/e<0?bt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ai(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 ii=(e,t)=>Object.keys(t).includes(e),ci=({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)||!ii(d,o.$state)||ai(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};$r().use(ci({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(tr),{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",li=e=>typeof e=="string",ui=()=>{};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 di(e){return e}function fi(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 pi(...e){let t,n,o,r;if(li(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=ho):[t,n,o,r]=e,!t)return ui;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 fi(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 hi(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&&pi(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 mi=Object.defineProperty,wo=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable,_o=(e,t,n)=>t in e?mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wi=(e,t)=>{for(var n in t||(t={}))gi.call(t,n)&&_o(e,n,t[n]);if(wo)for(var n of wo(t))yi.call(t,n)&&_o(e,n,t[n]);return e};wi({linear:di},{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=hi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,vo=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},vi=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"],bi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Oo={"keydown.up":e=>{const t=vo(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=vi(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=vo(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=bi[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 Ei=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],ki={key:1},Si=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 v=o.columns[n.colIndex].format;return typeof v=="function"?v(g):typeof v=="string"?Function(`"use strict";return (${v})`)()(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 v=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=v.top+v.height,o.modal.left=v.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,v)=>v&&g===0&&v>0?`${v}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,v)=>(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",ki,s.toDisplayString(c.value),1))],40,Ei))}}),Pe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=Pe(Si,[["__scopeId","data-v-1738c6fc"]]),Oi=["tabindex"],Ci={key:0,tabIndex:-1,class:"list-index"},Ni=Pe(s.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:-1},addNavigation:{}},setup(e){s.useCssVars(u=>({"6b10edcf":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",Ci,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,Oi)),[[s.vShow,c()]])}}),[["__scopeId","data-v-c758303d"]]);let He;const Pi=new Uint8Array(16);function xi(){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(Pi)}const M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function $i(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 Ri=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),No={randomUUID:Ri};function Po(e,t,n){if(No.randomUUID&&!t&&!e)return No.randomUUID();e=e||{};const o=e.random||(e.rng||xi)();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 $i(o)}class Ti{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 Ai={key:0},Di={class:"atable-header-row",tabindex:"-1"},Vi={key:0,id:"header-index"},Bi=Pe(s.defineComponent({__name:"ATableHeader",props:{columns:{},config:{},tableid:{}},setup(e){s.useCssVars(r=>({"1cb0fcc9":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",Ai,[s.createElementVNode("tr",Di,[s.unref(t).zeroColumn?(s.openBlock(),s.createElementBlock("th",Vi)):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)}}),[["__scopeId","data-v-8a8d9cee"]]),Mi=Pe(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))}}),[["__scopeId","data-v-8ac70767"]]),Li=Pe(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 Ti(n.id,n.columns,r,n.config);s.provide(a.id,a),s.watch(()=>a.rows,(i,u)=>{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(Bi,{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(Ni,{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(Mi,{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))}}),[["__scopeId","data-v-9137b4c3"]]),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(Li),{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),ji={class:"tabs"},Ui={tabindex:"0"},Hi={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"},Fi=[$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 +`: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,v]of d)a.push(`.get(${no(g)?Et(g):"..."})`),f+=`,${i(g)},${i(v)}`;f+="]";break;default:if(!ni(d))throw new _t("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(d).length>0)throw new _t("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 v in d)g&&(f+=","),g=!0,a.push(`.${v}`),f+=`${ye(v)}:${i(d[v])}`,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?vt.toString():e===0&&1/e<0?bt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ai(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 ii=(e,t)=>Object.keys(t).includes(e),ci=({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)||!ii(d,o.$state)||ai(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};$r().use(ci({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(tr),{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",li=e=>typeof e=="string",ui=()=>{};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 di(e){return e}function fi(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 pi(...e){let t,n,o,r;if(li(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=ho):[t,n,o,r]=e,!t)return ui;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 fi(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 hi(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&&pi(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 mi=Object.defineProperty,wo=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable,_o=(e,t,n)=>t in e?mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wi=(e,t)=>{for(var n in t||(t={}))gi.call(t,n)&&_o(e,n,t[n]);if(wo)for(var n of wo(t))yi.call(t,n)&&_o(e,n,t[n]);return e};wi({linear:di},{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=hi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,vo=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},vi=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"],bi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Oo={"keydown.up":e=>{const t=vo(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=vi(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=vo(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=bi[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 Ei=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],ki={key:1},Si=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 v=o.columns[n.colIndex].format;return typeof v=="function"?v(g):typeof v=="string"?Function(`"use strict";return (${v})`)()(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 v=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=v.top+v.height,o.modal.left=v.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,v)=>v&&g===0&&v>0?`${v}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,v)=>(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",ki,s.toDisplayString(c.value),1))],40,Ei))}}),Pe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=Pe(Si,[["__scopeId","data-v-07dfe445"]]),Oi=["tabindex"],Ci={key:0,tabIndex:-1,class:"list-index"},Ni=Pe(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",Ci,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,Oi)),[[s.vShow,c()]])}}),[["__scopeId","data-v-4c71a067"]]);let He;const Pi=new Uint8Array(16);function xi(){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(Pi)}const M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function $i(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 Ri=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),No={randomUUID:Ri};function Po(e,t,n){if(No.randomUUID&&!t&&!e)return No.randomUUID();e=e||{};const o=e.random||(e.rng||xi)();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 $i(o)}class Ti{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 Ai={key:0},Di={class:"atable-header-row",tabindex:"-1"},Vi={key:0,id:"header-index"},Bi=Pe(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",Ai,[s.createElementVNode("tr",Di,[s.unref(t).zeroColumn?(s.openBlock(),s.createElementBlock("th",Vi)):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)}}),[["__scopeId","data-v-16e66636"]]),Mi=Pe(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))}}),[["__scopeId","data-v-10a48b2a"]]),Li=Pe(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 Ti(n.id,n.columns,r,n.config);s.provide(a.id,a),s.watch(()=>a.rows,(i,u)=>{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(Bi,{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(Ni,{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(Mi,{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))}}),[["__scopeId","data-v-819abcc5"]]),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(Li),{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),ji={class:"tabs"},Ui={tabindex:"0"},Hi={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"},Fi=[$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 diff --git a/desktop/dist/desktop.umd.cjs.map b/desktop/dist/desktop.umd.cjs.map index e5809844..96fa5e95 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 k, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as w, vModelCheckbox as ye, toDisplayString as C, vShow as $, resolveComponent as ge, createBlock as F, withCtx as be, onMounted as se, onBeforeUnmount as _e, ref as g, watch as H, unref as O, getCurrentScope as we, onScopeDispose as Ce, inject as ae, nextTick as ke, Fragment as x, renderList as V, normalizeStyle as De, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ee, mergeProps as Ie, createTextVNode as Me, renderSlot as Te, createVNode as Se, resolveDirective as Oe } from \"vue\";\nconst $e = { id: \"checkbox-container\" }, Le = [\"id\", \"readonly\", \"required\"], xe = { id: \"custom-checkbox\" }, Ve = [\"for\"], Be = [\"innerHTML\"], Pe = /* @__PURE__ */ k({\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 w(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 [ye, s.value]\n ]),\n i(\"span\", xe, C(s.value), 1)\n ]),\n i(\"label\", {\n for: l.uuid,\n id: \"checkbox-label\"\n }, C(l.label), 9, Ve),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Be), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst I = (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__ */ I(Pe, [[\"__scopeId\", \"data-v-743cd4db\"]]), Fe = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), He = /* @__PURE__ */ k({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, o) => {\n const n = ge(\"ATableModal\");\n return f(), F(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: be(() => [\n Fe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar N;\nconst ie = typeof window < \"u\", Re = (e) => typeof e == \"string\", Ue = () => {\n};\nie && (N = window == null ? void 0 : window.navigator) != null && N.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 we() ? (Ce(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, y, b, m) => (c.addEventListener(y, b, m), () => c.removeEventListener(y, b, m)), p = H(() => [q(t), ue(s)], ([c, y]) => {\n a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, y))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return Ye(u), u;\n}\nconst W = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nW[z] = W[z] || {};\nfunction Ne(e, { window: t = ce, scrollTarget: o } = {}) {\n const n = g(!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 H(() => 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 We = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? We(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 D = (e) => {\n let t = Ne(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(o)) ? j(o) : o;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !D(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !D(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) && D(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], y = u.filter((m) => L.includes(m)), b = L.some((m) => {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n return s.getModifierState(T);\n });\n if (y.length > 0) {\n if (b) {\n for (const m of L)\n if (u.includes(m)) {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n s.getModifierState(T) && 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 }), _e(() => {\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, E = 7, at = /* @__PURE__ */ k({\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 = g(), l = g(), a = g(), r = g([]);\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 ke();\n const M = document.getElementsByClassName(\"selecteddate\");\n if (M.length > 0)\n M[0].focus();\n else {\n const h = document.getElementsByClassName(\"todaysdate\");\n h.length > 0 && h[0].focus();\n }\n }), H([l, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const d = new Date(a.value, l.value, 1), M = d.getDay(), h = d.setDate(d.getDate() - M);\n for (let _ of Array(43).keys())\n r.value.push(h + _ * 864e5);\n }, u = () => {\n a.value -= 1;\n }, c = () => {\n a.value += 1;\n }, y = () => {\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 }, T = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, M) => {\n s.value = new Date(r.value[M]), 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\": y,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": c\n }\n }\n ]), (d, M) => 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: y,\n tabindex: -1\n }, \"<\"),\n i(\"th\", ot, C(ve.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), v(x, null, V(st, (h) => i(\"tr\", { key: h }, [\n (f(), v(x, null, V(E, (_) => i(\"td\", {\n key: (h - 1) * E + _,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: De({\n border: T(r.value[(h - 1) * E + _]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(h - 1) * E + _]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Ae((he) => fe(he, (h - 1) * E + _), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(h - 1) * E + _]),\n selecteddate: T(r.value[(h - 1) * E + _])\n })\n }, C(new Date(r.value[(h - 1) * E + _]).getDate()), 15, lt)), 64))\n ])), 64))\n ])\n ], 8, nt));\n }\n});\nconst rt = /* @__PURE__ */ I(at, [[\"__scopeId\", \"data-v-fcdc102d\"]]), it = k({\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});\nconst 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 w(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 w(i(\"ul\", ct, [\n e.isLoading ? (f(), v(\"li\", dt, \"Loading results...\")) : (f(!0), v(x, { key: 1 }, V(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 }, C(a), 11, pt))), 128))\n ], 512), [\n [$, e.isOpen]\n ]),\n i(\"label\", null, C(e.label), 1)\n ])\n ], 2);\n}\nconst mt = /* @__PURE__ */ I(it, [[\"render\", ft]]), vt = /* @__PURE__ */ k({\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});\nconst ht = /* @__PURE__ */ I(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), yt = /* @__PURE__ */ k({\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 = g(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(x, null, V(r.modelValue, (u, c) => (f(), F(Ee(u.component), Ie({\n key: c,\n schema: u,\n modelValue: a.value[c].value,\n \"onUpdate:modelValue\": (y) => a.value[c].value = y,\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});\nconst pe = /* @__PURE__ */ I(yt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), gt = /* @__PURE__ */ k({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, o = g(t.data || []);\n let n = g(!1), s = g(t.collapsible);\n const l = g(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 Me(C(r.label) + \" \", 1),\n O(s) ? (f(), F(ht, {\n key: 0,\n collapsed: O(n)\n }, null, 8, [\"collapsed\"])) : re(\"\", !0)\n ], 32),\n Te(r.$slots, \"default\", { collapsed: O(n) }, () => [\n w(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});\nconst bt = /* @__PURE__ */ I(gt, [[\"__scopeId\", \"data-v-cad9b578\"]]), _t = [\"id\", \"disabled\", \"required\"], wt = [\"for\"], Ct = [\"innerHTML\"], kt = /* @__PURE__ */ k({\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 w(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, _t), [\n [R, s.value]\n ]),\n i(\"label\", { for: l.uuid }, C(l.label), 9, wt),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Ct), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Dt = /* @__PURE__ */ I(kt, [[\"__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 Et(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 It(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 Mt(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 Tt(e, t) {\n const o = Et(t);\n if (!o)\n return;\n const n = \"#\", s = e.value, l = It(s, n);\n if (l) {\n const a = Mt(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 = k({\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 = g(!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: Tt\n }\n});\nconst Ot = [\"id\", \"disabled\", \"maxlength\", \"required\"], $t = [\"for\"], Lt = [\"innerHTML\"];\nfunction xt(e, t, o, n, s, l) {\n const a = Oe(\"mask\");\n return f(), v(\"div\", null, [\n w(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 }, C(e.label), 9, $t),\n w(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Lt), [\n [$, e.validation.errorMessage]\n ])\n ]);\n}\nconst Vt = /* @__PURE__ */ I(St, [[\"render\", xt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Pt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", He), e.component(\"ADate\", rt), e.component(\"ADropdown\", mt), e.component(\"AFieldset\", bt), e.component(\"AForm\", pe), e.component(\"ANumericInput\", Dt), e.component(\"ATextInput\", Vt);\n}\nexport {\n qe as ACheckbox,\n He as AComboBox,\n rt as ADate,\n mt as ADropdown,\n bt as AFieldset,\n pe as AForm,\n Dt as ANumericInput,\n Vt 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 router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\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, router3);\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, router3, 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 _e, ref as E, watch as j, unref as r, getCurrentScope as Ie, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\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 Ie() ? (Ee(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 Re(...t) {\n let e, n, o, a;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return $e;\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 Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!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 && Re(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 = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, _ = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (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 && (!_(n) || !x(n)) ? W(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 && (!_(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 && (!_(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 && (!_(o) || !x(o)) ? W(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 && (!_(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 && (!_(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!_(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!_(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\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) => _(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = Ve[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 I = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(I);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const I = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(I) && 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 }), _e(() => {\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 We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\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 I;\n const e = t, n = O(e.tableid), o = E(null);\n let a = E(!1);\n const l = S(() => {\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 = S(() => n.columns[e.colIndex].align || \"center\"), d = S(() => 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, (I = n.display[e.rowIndex]) == null ? void 0 : I.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), V({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, $(l.value), 1))\n ], 40, We));\n }\n});\nconst C = (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__ */ C(Qe, [[\"__scopeId\", \"data-v-1738c6fc\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\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 = E(null), a = E(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 T(\"tr\", V(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, $(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 T(\"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});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-2bb821ae\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\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 \"6b10edcf\": r(a)\n }));\n const e = t, n = O(e.tableid), o = E(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, $(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 }, $(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});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-c758303d\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(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 = A(n), this.config = A(a), this.table = l || A(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = A({ 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 A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => 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__ */ k({\n __name: \"ATableHeader\",\n props: {\n columns: {},\n config: {},\n tableid: {}\n },\n setup(t) {\n de((l) => ({\n \"1cb0fcc9\": 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 T(\"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 ke($(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst ve = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-8a8d9cee\"]]), it = /* @__PURE__ */ k({\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});\nconst ye = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-8ac70767\"]]), dt = /* @__PURE__ */ k({\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 Ce(l.id, l), j(\n () => l.rows,\n (i, d) => {\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 && Ae().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 T(\"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), V({\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});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-9137b4c3\"]]);\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","I","o","n","s","N","Qe","W","z","W$1","G","We","K","ze","Ge","J","Ke","k","pe","g","l","r","p","u","c","a","S","f","v","x","V","F","Ee","Ie","y","le","At","Et","t","It","Mt","Tt","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","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","router3","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","Te","$e","fe","Oe","De","U","me","Re","j","X","Y","Se","E","Z","Pe","He","Le","ee","Me","_","te","Ue","B","ne","je","oe","Q","D","Ve","we","q","xe","_e","Be","O","P","ie","$","C","he","Xe","Ye","be","de","ce","ue","R","et","w","tt","nt","se","ge","ot","A","lt","at","rt","ve","T","M","L","H","ke","ye","ct","Ce","Ae","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":"mzCA6EA,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,EAGD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AAY,CACjBL,EAAA,MAAQ,CAACA,EAAe,MACvC,MAAM7uB,WAAS,IAAM,CACpB+uB,EAAY,MAAM,OAAM,CACxB,CAAA,EAGII,EAAqBv1B,GAA8B,CACxDA,EAAM,eAAe,EACrBA,EAAM,gBAAgB,CAAA,EAGjBw1B,EAAe,MAAOx1B,GAAsC,CACjEA,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MAAMs1B,EAAa,CAAA,EAGdG,EAAe,IAA6C,CAAA,wqDC9GnD//B,GAAA,CACd,QAAU+K,GAAa,CAClBA,EAAA,UAAU,YAAai1B,EAAS,EAChCj1B,EAAA,UAAU,iBAAkBk1B,EAAc,EAC1Cl1B,EAAA,UAAU,UAAWm1B,EAAO,EAC5Bn1B,EAAA,UAAU,UAAWo1B,EAAO,EAC5Bp1B,EAAA,UAAU,WAAYq1B,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 k, computed as S, openBlock as f, createElementBlock as v, createElementVNode as i, withDirectives as w, vModelCheckbox as ye, toDisplayString as C, vShow as $, resolveComponent as ge, createBlock as F, withCtx as be, onMounted as se, onBeforeUnmount as _e, ref as g, watch as H, unref as O, getCurrentScope as we, onScopeDispose as Ce, inject as ae, nextTick as ke, Fragment as x, renderList as V, normalizeStyle as De, withModifiers as Ae, normalizeClass as B, createCommentVNode as re, withKeys as P, vModelText as R, resolveDynamicComponent as Ee, mergeProps as Ie, createTextVNode as Me, renderSlot as Te, createVNode as Se, resolveDirective as Oe } from \"vue\";\nconst $e = { id: \"checkbox-container\" }, Le = [\"id\", \"readonly\", \"required\"], xe = { id: \"custom-checkbox\" }, Ve = [\"for\"], Be = [\"innerHTML\"], Pe = /* @__PURE__ */ k({\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 w(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 [ye, s.value]\n ]),\n i(\"span\", xe, C(s.value), 1)\n ]),\n i(\"label\", {\n for: l.uuid,\n id: \"checkbox-label\"\n }, C(l.label), 9, Ve),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Be), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst I = (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__ */ I(Pe, [[\"__scopeId\", \"data-v-743cd4db\"]]), Fe = /* @__PURE__ */ i(\"div\", null, [\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" }),\n /* @__PURE__ */ i(\"input\", { type: \"text\" })\n], -1), He = /* @__PURE__ */ k({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, o) => {\n const n = ge(\"ATableModal\");\n return f(), F(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: be(() => [\n Fe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n});\nvar N;\nconst ie = typeof window < \"u\", Re = (e) => typeof e == \"string\", Ue = () => {\n};\nie && (N = window == null ? void 0 : window.navigator) != null && N.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 we() ? (Ce(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, y, b, m) => (c.addEventListener(y, b, m), () => c.removeEventListener(y, b, m)), p = H(() => [q(t), ue(s)], ([c, y]) => {\n a(), c && l.push(...o.flatMap((b) => n.map((m) => r(c, b, m, y))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n p(), a();\n };\n return Ye(u), u;\n}\nconst W = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, z = \"__vueuse_ssr_handlers__\";\nW[z] = W[z] || {};\nfunction Ne(e, { window: t = ce, scrollTarget: o } = {}) {\n const n = g(!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 H(() => 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 We = Object.defineProperty, K = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, J = (e, t, o) => t in e ? We(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 D = (e) => {\n let t = Ne(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(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) || !D(o)) ? j(o) : o;\n}, ne = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!A(t) || !D(t)) ? j(t) : t;\n}, oe = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!A(t) || !D(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) && D(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], y = u.filter((m) => L.includes(m)), b = L.some((m) => {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n return s.getModifierState(T);\n });\n if (y.length > 0) {\n if (b) {\n for (const m of L)\n if (u.includes(m)) {\n const T = m.charAt(0).toUpperCase() + m.slice(1);\n s.getModifierState(T) && 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 }), _e(() => {\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, E = 7, at = /* @__PURE__ */ k({\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 = g(), l = g(), a = g(), r = g([]);\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 ke();\n const M = document.getElementsByClassName(\"selecteddate\");\n if (M.length > 0)\n M[0].focus();\n else {\n const h = document.getElementsByClassName(\"todaysdate\");\n h.length > 0 && h[0].focus();\n }\n }), H([l, a], () => {\n p();\n });\n const p = () => {\n r.value = [];\n const d = new Date(a.value, l.value, 1), M = d.getDay(), h = d.setDate(d.getDate() - M);\n for (let _ of Array(43).keys())\n r.value.push(h + _ * 864e5);\n }, u = () => {\n a.value -= 1;\n }, c = () => {\n a.value += 1;\n }, y = () => {\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 }, T = (d) => new Date(d).toDateString() === new Date(s.value).toDateString(), fe = (d, M) => {\n s.value = new Date(r.value[M]), 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\": y,\n \"keydown.shift.pageup\": u,\n \"keydown.pagedown\": b,\n \"keydown.shift.pagedown\": c\n }\n }\n ]), (d, M) => 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: y,\n tabindex: -1\n }, \"<\"),\n i(\"th\", ot, C(ve.value), 1),\n i(\"td\", {\n onClick: b,\n tabindex: -1\n }, \">\")\n ]),\n (f(), v(x, null, V(st, (h) => i(\"tr\", { key: h }, [\n (f(), v(x, null, V(E, (_) => i(\"td\", {\n key: (h - 1) * E + _,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n style: De({\n border: T(r.value[(h - 1) * E + _]) ? \"2px solid var(--focus-cell-outline)\" : \"none\",\n borderBottomColor: m(r.value[(h - 1) * E + _]) ? \"var(--focus-cell-outline)\" : \"none\"\n }),\n onClick: Ae((he) => fe(he, (h - 1) * E + _), [\"prevent\", \"stop\"]),\n class: B({\n todaysdate: m(r.value[(h - 1) * E + _]),\n selecteddate: T(r.value[(h - 1) * E + _])\n })\n }, C(new Date(r.value[(h - 1) * E + _]).getDate()), 15, lt)), 64))\n ])), 64))\n ])\n ], 8, nt));\n }\n});\nconst rt = /* @__PURE__ */ I(at, [[\"__scopeId\", \"data-v-169f1184\"]]), it = k({\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});\nconst 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 w(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 w(i(\"ul\", ct, [\n e.isLoading ? (f(), v(\"li\", dt, \"Loading results...\")) : (f(!0), v(x, { key: 1 }, V(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 }, C(a), 11, pt))), 128))\n ], 512), [\n [$, e.isOpen]\n ]),\n i(\"label\", null, C(e.label), 1)\n ])\n ], 2);\n}\nconst mt = /* @__PURE__ */ I(it, [[\"render\", ft]]), vt = /* @__PURE__ */ k({\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});\nconst ht = /* @__PURE__ */ I(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), yt = /* @__PURE__ */ k({\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 = g(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(x, null, V(r.modelValue, (u, c) => (f(), F(Ee(u.component), Ie({\n key: c,\n schema: u,\n modelValue: a.value[c].value,\n \"onUpdate:modelValue\": (y) => a.value[c].value = y,\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});\nconst pe = /* @__PURE__ */ I(yt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), gt = /* @__PURE__ */ k({\n __name: \"AFieldset\",\n props: {\n schema: {},\n label: {},\n collapsible: { type: Boolean },\n data: {}\n },\n setup(e) {\n const t = e, o = g(t.data || []);\n let n = g(!1), s = g(t.collapsible);\n const l = g(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 Me(C(r.label) + \" \", 1),\n O(s) ? (f(), F(ht, {\n key: 0,\n collapsed: O(n)\n }, null, 8, [\"collapsed\"])) : re(\"\", !0)\n ], 32),\n Te(r.$slots, \"default\", { collapsed: O(n) }, () => [\n w(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});\nconst bt = /* @__PURE__ */ I(gt, [[\"__scopeId\", \"data-v-cad9b578\"]]), _t = [\"id\", \"disabled\", \"required\"], wt = [\"for\"], Ct = [\"innerHTML\"], kt = /* @__PURE__ */ k({\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 w(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, _t), [\n [R, s.value]\n ]),\n i(\"label\", { for: l.uuid }, C(l.label), 9, wt),\n w(i(\"p\", {\n innerHTML: l.validation.errorMessage\n }, null, 8, Ct), [\n [$, l.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Dt = /* @__PURE__ */ I(kt, [[\"__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 Et(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 It(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 Mt(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 Tt(e, t) {\n const o = Et(t);\n if (!o)\n return;\n const n = \"#\", s = e.value, l = It(s, n);\n if (l) {\n const a = Mt(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 = k({\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 = g(!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: Tt\n }\n});\nconst Ot = [\"id\", \"disabled\", \"maxlength\", \"required\"], $t = [\"for\"], Lt = [\"innerHTML\"];\nfunction xt(e, t, o, n, s, l) {\n const a = Oe(\"mask\");\n return f(), v(\"div\", null, [\n w(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 }, C(e.label), 9, $t),\n w(i(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Lt), [\n [$, e.validation.errorMessage]\n ])\n ]);\n}\nconst Vt = /* @__PURE__ */ I(St, [[\"render\", xt], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Pt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", He), e.component(\"ADate\", rt), e.component(\"ADropdown\", mt), e.component(\"AFieldset\", bt), e.component(\"AForm\", pe), e.component(\"ANumericInput\", Dt), e.component(\"ATextInput\", Vt);\n}\nexport {\n qe as ACheckbox,\n He as AComboBox,\n rt as ADate,\n mt as ADropdown,\n bt as AFieldset,\n pe as AForm,\n Dt as ANumericInput,\n Vt 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 router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\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, router3);\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, router3, 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 _e, ref as E, watch as j, unref as r, getCurrentScope as Ie, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as m, createElementBlock as b, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as y, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\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 Ie() ? (Ee(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 Re(...t) {\n let e, n, o, a;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, a] = t, e = me) : [e, n, o, a] = t, !e)\n return $e;\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 Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!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 && Re(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 = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, _ = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (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 && (!_(n) || !x(n)) ? W(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 && (!_(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 && (!_(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 && (!_(o) || !x(o)) ? W(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 && (!_(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 && (!_(n) || !x(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!_(e) || !x(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!_(e) || !x(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\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) => _(s) && x(s));\n return l;\n }, n = (o) => (a) => {\n const l = Ve[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 I = h.charAt(0).toUpperCase() + h.slice(1);\n return a.getModifierState(I);\n });\n if (c.length > 0) {\n if (v) {\n for (const h of D)\n if (p.includes(h)) {\n const I = h.charAt(0).toUpperCase() + h.slice(1);\n a.getModifierState(I) && 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 }), _e(() => {\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 We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\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 I;\n const e = t, n = O(e.tableid), o = E(null);\n let a = E(!1);\n const l = S(() => {\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 = S(() => n.columns[e.colIndex].align || \"center\"), d = S(() => 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, (I = n.display[e.rowIndex]) == null ? void 0 : I.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), V({\n key: 0,\n value: l.value\n }, r(n).columns[u.colIndex].cellComponentProps), null, 16, [\"value\"])) : (m(), b(\"span\", Be, $(l.value), 1))\n ], 40, We));\n }\n});\nconst C = (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__ */ C(Qe, [[\"__scopeId\", \"data-v-07dfe445\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\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 = E(null), a = E(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 T(\"tr\", V(s.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: s.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (d) => r(n).toggleRowExpand(s.rowIndex)),\n class: \"row-index\"\n }, $(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 T(\"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});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-b2e2ed2d\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\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 = E(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, $(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 }, $(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});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-4c71a067\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(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 = A(n), this.config = A(a), this.table = l || A(this.createTableObject()), this.display = this.createDisplayObject(s), this.modal = A({ 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 A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => 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__ */ k({\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 T(\"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 ke($(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst ve = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-16e66636\"]]), it = /* @__PURE__ */ k({\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});\nconst ye = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-10a48b2a\"]]), dt = /* @__PURE__ */ k({\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 Ce(l.id, l), j(\n () => l.rows,\n (i, d) => {\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 && Ae().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 T(\"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), V({\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});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-819abcc5\"]]);\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","I","o","n","s","N","Qe","W","z","W$1","G","We","K","ze","Ge","J","Ke","k","pe","g","l","r","p","u","c","a","S","f","v","x","V","F","Ee","Ie","y","le","At","Et","t","It","Mt","Tt","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","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","router3","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","Te","$e","fe","Oe","De","U","me","Re","j","X","Y","Se","E","Z","Pe","He","Le","ee","Me","_","te","Ue","B","ne","je","oe","Q","D","Ve","we","q","xe","_e","Be","O","P","ie","$","C","he","Xe","Ye","be","de","ce","ue","R","et","w","tt","nt","se","ge","ot","A","lt","at","rt","ve","T","M","L","H","ke","ye","ct","Ce","Ae","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,CA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EAAM,gBAAgB,CAAA,EAGjBw1B,EAAe,MAAOx1B,GAAsC,CACjEA,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MAAMs1B,EAAa,CAAA,EAGdG,EAAe,IAA6C,CAAA,wqDC9GnD//B,GAAA,CACd,QAAU+K,GAAa,CAClBA,EAAA,UAAU,YAAai1B,EAAS,EAChCj1B,EAAA,UAAU,iBAAkBk1B,EAAc,EAC1Cl1B,EAAA,UAAU,UAAWm1B,EAAO,EAC5Bn1B,EAAA,UAAU,UAAWo1B,EAAO,EAC5Bp1B,EAAA,UAAU,WAAYq1B,EAAQ,CACnC,CACD"} \ No newline at end of file diff --git a/desktop/package.json b/desktop/package.json index 56e9d68c..84239434 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/desktop", + "name": "@stonecrop/desktop", "version": "0.2.2", "description": "desktop specific components for Stonecrop UI", "license": "MIT", @@ -26,10 +26,10 @@ "story:dev": "vite dev stories/ -c stories/vite.config.ts" }, "dependencies": { - "@agritheory/aform": "workspace:*", - "@agritheory/atable": "workspace:*", - "@agritheory/stonecrop": "workspace:*", - "@agritheory/themes": "workspace:*", + "@stonecrop/aform": "workspace:*", + "@stonecrop/atable": "workspace:*", + "@stonecrop/stonecrop": "workspace:*", + "@stonecrop/themes": "workspace:*", "immutable": "^4.3.0", "vue": "^3.2.47", "xstate": "~4.37.2" diff --git a/desktop/src/components/Doctype.vue b/desktop/src/components/Doctype.vue index dc9637b4..1517cf35 100644 --- a/desktop/src/components/Doctype.vue +++ b/desktop/src/components/Doctype.vue @@ -6,9 +6,9 @@ import { ref, watch } from 'vue' import { useRoute } from 'vue-router' -import { AForm } from '@agritheory/aform' -import type { SchemaTypes } from '@agritheory/aform/types' -import { DoctypeMeta, useStonecrop } from '@agritheory/stonecrop' +import { AForm } from '@stonecrop/aform' +import type { SchemaTypes } from '@stonecrop/aform/types' +import { DoctypeMeta, useStonecrop } from '@stonecrop/stonecrop' const { stonecrop, isReady } = useStonecrop() const schema = ref([]) diff --git a/desktop/src/components/Records.vue b/desktop/src/components/Records.vue index 70a76878..c71340d9 100644 --- a/desktop/src/components/Records.vue +++ b/desktop/src/components/Records.vue @@ -7,8 +7,8 @@ \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":"qRACA,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,i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B,GAAA,CAEhB8B,EAAiB9B,CAAQ,CAE1B,CAAA,CACA,EAIK8B,EAAmBjC,GAAY,CACpC,IAAI0B,EAAS,CAAA,EACTI,EAAQ,CAAA,EACRI,EAAY,CAAA,EAChB,QAASntB,EAAI,EAAGA,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 +{"version":3,"file":"node-editor.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vue-flow+core@1.19.4_vue@3.4.19/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,E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B,EAAA,KAAKF,EAAUzB,CAAG,CAAC,EAE3B,OAAA2B,CACR,EACA,IAAiB1B,GAAA,CAEhB8B,EAAiB9B,CAAQ,CAE1B,CAAA,CACA,EAIK8B,EAAmBjC,GAAY,CACpC,IAAI0B,EAAS,CAAA,EACTI,EAAQ,CAAA,EACRI,EAAY,CAAA,EAChB,QAASntB,EAAI,EAAGA,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 a9f4d5b3..2b97d4db 100644 --- a/node_editor/package.json +++ b/node_editor/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/node-editor", + "name": "@stonecrop/node-editor", "version": "0.2.2", "description": "Node editor UI for Stonecrop", "license": "MIT", diff --git a/node_editor/vite.config.ts b/node_editor/vite.config.ts index a2aa2d5f..e7105a68 100644 --- a/node_editor/vite.config.ts +++ b/node_editor/vite.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ sourcemap: true, lib: { entry: resolve(projectRootDir, 'src/index.ts'), - name: '@agritheory/node-editor', + name: '@stonecrop/node-editor', }, rollupOptions: { external: ['vue'], diff --git a/rush.json b/rush.json index 1e5a96ab..b8a4a341 100644 --- a/rush.json +++ b/rush.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", - "rushVersion": "5.113.4", + "rushVersion": "5.120.3", "pnpmVersion": "8.15.2", "approvedPackagesPolicy": { "reviewCategories": ["production", "tool", "prototype", "documentation", "utilities"], @@ -18,71 +18,70 @@ "preRushBuild": [], "postRushBuild": [] }, - "variants": [], "ensureConsistentVersions": true, "hotfixChangeEnabled": false, "telemetryEnabled": false, "projects": [ { - "packageName": "@agritheory/aform", + "packageName": "@stonecrop/aform", "projectFolder": "aform", "reviewCategory": "prototype", // to avoid circular dependency problems - "decoupledLocalDependencies": ["@agritheory/atable"], + "decoupledLocalDependencies": ["@stonecrop/atable"], "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/atable", + "packageName": "@stonecrop/atable", "projectFolder": "atable", "reviewCategory": "prototype", // to avoid circular dependency problems - "decoupledLocalDependencies": ["@agritheory/aform"], + "decoupledLocalDependencies": ["@stonecrop/aform"], "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/desktop", + "packageName": "@stonecrop/desktop", "projectFolder": "desktop", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/code-editor", + "packageName": "@stonecrop/code-editor", "projectFolder": "code_editor", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/examples", + "packageName": "@stonecrop/examples", "projectFolder": "examples", "reviewCategory": "prototype", "shouldPublish": false }, { - "packageName": "@agritheory/node-editor", + "packageName": "@stonecrop/node-editor", "projectFolder": "node_editor", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/stonecrop", + "packageName": "@stonecrop/stonecrop", "projectFolder": "stonecrop", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/themes", + "packageName": "@stonecrop/themes", "projectFolder": "themes", "reviewCategory": "prototype", "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/utilities", + "packageName": "@stonecrop/utilities", "projectFolder": "utilities", "reviewCategory": "utilities", "versionPolicyName": "stonecrop" }, { - "packageName": "@agritheory/graphql-client", + "packageName": "@stonecrop/graphql-client", "projectFolder": "graphql_client", "reviewCategory": "utilities", "versionPolicyName": "stonecrop" diff --git a/stonecrop/dist/stonecrop.umd.cjs b/stonecrop/dist/stonecrop.umd.cjs index df75176f..ff6d2b62 100644 --- a/stonecrop/dist/stonecrop.umd.cjs +++ b/stonecrop/dist/stonecrop.umd.cjs @@ -1,5 +1,5 @@ (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["@agritheory/stonecrop"] = {}, global2.Vue)); + 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) { diff --git a/stonecrop/package.json b/stonecrop/package.json index 2aae8208..bd5640cd 100644 --- a/stonecrop/package.json +++ b/stonecrop/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/stonecrop", + "name": "@stonecrop/stonecrop", "version": "0.2.2", "description": "schema helper", "license": "MIT", @@ -35,8 +35,8 @@ "xstate": "~4.37.2" }, "devDependencies": { - "@agritheory/aform": "workspace:*", - "@agritheory/atable": "workspace:*", + "@stonecrop/aform": "workspace:*", + "@stonecrop/atable": "workspace:*", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "@vitejs/plugin-vue": "^4.2.1", diff --git a/stonecrop/types/index.ts b/stonecrop/types/index.ts index 3d75a22d..ba4de349 100644 --- a/stonecrop/types/index.ts +++ b/stonecrop/types/index.ts @@ -3,7 +3,7 @@ import { Component } from 'vue' import { Router } from 'vue-router' import { MachineConfig, StateMachine } from 'xstate' -import type { SchemaTypes } from '@agritheory/aform/types' +import type { SchemaTypes } from '@stonecrop/aform/types' import DoctypeMeta from '@/doctype' diff --git a/stonecrop/vite.config.ts b/stonecrop/vite.config.ts index c659e062..c41e442e 100644 --- a/stonecrop/vite.config.ts +++ b/stonecrop/vite.config.ts @@ -6,7 +6,7 @@ const projectRootDir = resolve(__dirname) export default defineConfig({ plugins: [vue()], - optimizeDeps: { exclude: ['@agritheory/atable', '@agritheory/aform'] }, + optimizeDeps: { exclude: ['@stonecrop/atable', '@stonecrop/aform'] }, resolve: { alias: { '@': resolve(projectRootDir, 'src'), @@ -16,7 +16,7 @@ export default defineConfig({ minify: false, lib: { entry: resolve(projectRootDir, 'src/index.ts'), - name: '@agritheory/stonecrop', + name: '@stonecrop/stonecrop', }, rollupOptions: { external: ['vue'], diff --git a/themes/package.json b/themes/package.json index 9c43fe32..123adf74 100644 --- a/themes/package.json +++ b/themes/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/themes", + "name": "@stonecrop/themes", "version": "0.0.0", "type": "module", "scripts": { diff --git a/themes/vite.config.js b/themes/vite.config.js index ee38d45b..0f749698 100644 --- a/themes/vite.config.js +++ b/themes/vite.config.js @@ -15,7 +15,7 @@ export default defineConfig({ sourcemap: true, lib: { entry: resolve(projectRootDir, 'index.js'), - name: '@agritheory/themes', + name: '@stonecrop/themes', }, rollupOptions: { external: ['vue'], diff --git a/utilities/README.md b/utilities/README.md index d1e40129..d644f8ab 100644 --- a/utilities/README.md +++ b/utilities/README.md @@ -1,3 +1,3 @@ # Utilities -`@agritheory/utilities` contains helper functions and utilities for working with other `@agritheory` libraries. \ No newline at end of file +`@stonecrop/utilities` contains helper functions and utilities for working with other `@stonecrop` libraries. \ No newline at end of file diff --git a/utilities/dist/utilities.umd.cjs b/utilities/dist/utilities.umd.cjs index 9676d78f..5a99a736 100644 --- a/utilities/dist/utilities.umd.cjs +++ b/utilities/dist/utilities.umd.cjs @@ -1,2 +1,2 @@ -(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["@agritheory/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 l=[],s=()=>{l.forEach(c=>c()),l.length=0},f=(c,y,g,i)=>(c.addEventListener(y,g,i),()=>c.removeEventListener(y,g,i)),T=a.watch(()=>[$(t),_(o)],([c,y])=>{s(),c&&l.push(...r.flatMap(g=>n.map(i=>f(c,g,i,y))))},{immediate:!0,flush:"post"}),m=()=>{T(),s()};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 l=t.document,s=$(e);if(!s)n.value=!1;else{const f=s.getBoundingClientRect();n.value=f.top<=(t.innerHeight||l.documentElement.clientHeight)&&f.left<=(t.innerWidth||l.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 l=Array.from(n.children)[e.cellIndex];l&&(t=l)}}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 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&&(!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 l=Array.from(n.children)[e.cellIndex];l&&(t=l)}}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 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&&(!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 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(f=>d(f)&&p(f));return l},r=n=>o=>{const l=Z[o.key]||o.key.toLowerCase();if(C.includes(l))return;const s=n.handlers||Q;for(const f of Object.keys(s)){const[T,...m]=f.split(".");if(T==="keydown"&&m.includes(l)){const c=s[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 l of o)l.addEventListener("keydown",r(n))}}),a.onBeforeUnmount(()=>{for(const n of e){const o=t(n);for(const l of o)l.removeEventListener("keydown",r(n))}})}function te(e){}u.defaultKeypressHandlers=Q,u.install=te,u.useKeyboardNav=ee,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); +(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 index 5a6ad61b..d0d1cbbe 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.19/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.19/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":"6QAgCA,IAAIA,EACJ,MAAMC,EAAW,OAAO,OAAW,IAU7BC,EAA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Y,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 +{"version":3,"file":"utilities.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.4.19/node_modules/@vueuse/shared/index.mjs","../../common/temp/node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.4.19/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,EAAk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S,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 acf1afbd..6a14a27d 100644 --- a/utilities/package.json +++ b/utilities/package.json @@ -1,5 +1,5 @@ { - "name": "@agritheory/utilities", + "name": "@stonecrop/utilities", "version": "0.2.2", "license": "MIT", "type": "module", diff --git a/utilities/vite.config.ts b/utilities/vite.config.ts index 243d7389..7ce552f4 100644 --- a/utilities/vite.config.ts +++ b/utilities/vite.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ sourcemap: true, lib: { entry: resolve(projectRootDir, 'src/index.ts'), - name: '@agritheory/utilities', + name: '@stonecrop/utilities', }, rollupOptions: { external: ['vue'],