@aerogel/core 0.1.1-next.785e2c42ed379bc0f268c637d1023a51f5832d80 → 0.1.1-next.794da2a581990f8be4a2f33880a77e15fa1e40a7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/aerogel-core.d.ts +237 -265
  2. package/dist/aerogel-core.js +1358 -1324
  3. package/dist/aerogel-core.js.map +1 -1
  4. package/package.json +4 -2
  5. package/src/components/AppOverlays.vue +3 -2
  6. package/src/components/contracts/AlertModal.ts +1 -1
  7. package/src/components/contracts/Button.ts +1 -1
  8. package/src/components/contracts/ConfirmModal.ts +5 -2
  9. package/src/components/contracts/Modal.ts +8 -3
  10. package/src/components/contracts/PromptModal.ts +6 -2
  11. package/src/components/contracts/Toast.ts +1 -1
  12. package/src/components/headless/HeadlessInputInput.vue +13 -5
  13. package/src/components/headless/HeadlessModal.vue +6 -34
  14. package/src/components/headless/HeadlessModalContent.vue +5 -12
  15. package/src/components/index.ts +0 -1
  16. package/src/components/ui/AdvancedOptions.vue +4 -13
  17. package/src/components/ui/Button.vue +1 -0
  18. package/src/components/ui/ConfirmModal.vue +7 -2
  19. package/src/components/ui/Details.vue +23 -0
  20. package/src/components/ui/Form.vue +1 -1
  21. package/src/components/ui/Input.vue +12 -4
  22. package/src/components/ui/LoadingModal.vue +1 -2
  23. package/src/components/ui/Modal.vue +53 -33
  24. package/src/components/ui/ProgressBar.vue +16 -2
  25. package/src/components/ui/PromptModal.vue +7 -2
  26. package/src/components/ui/Toast.vue +1 -0
  27. package/src/components/ui/index.ts +1 -1
  28. package/src/directives/index.ts +7 -7
  29. package/src/errors/Errors.ts +4 -0
  30. package/src/forms/FormController.ts +4 -0
  31. package/src/index.css +9 -0
  32. package/src/ui/UI.state.ts +0 -11
  33. package/src/ui/UI.ts +42 -125
  34. package/src/ui/index.ts +1 -0
  35. package/src/ui/modals.ts +36 -0
  36. package/src/utils/composition/reactiveSet.test.ts +32 -0
  37. package/src/utils/composition/reactiveSet.ts +53 -0
  38. package/src/utils/index.ts +2 -0
  39. package/src/utils/time.ts +2 -0
  40. package/src/components/AppModals.vue +0 -14
  41. package/src/components/ui/ModalContext.vue +0 -31
@@ -1,42 +1,44 @@
1
- var St = Object.defineProperty;
2
- var Tt = (t, s, e) => s in t ? St(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
- var _ = (t, s, e) => Tt(t, typeof s != "symbol" ? s + "" : s, e);
4
- import { markRaw as E, Comment as Mt, Text as Ht, Static as Et, inject as X, reactive as pe, unref as o, onUnmounted as ge, ref as U, computed as c, readonly as ve, nextTick as Oe, useAttrs as Ne, onMounted as Vt, watch as Me, toRaw as Lt, watchEffect as Y, defineComponent as g, createBlock as h, openBlock as u, mergeProps as H, withCtx as f, renderSlot as w, createPropsRestProxy as N, createVNode as p, normalizeProps as ne, guardReactiveProps as ae, createTextVNode as I, toDisplayString as x, normalizeClass as k, createElementBlock as b, Fragment as D, renderList as F, provide as le, resolveDynamicComponent as W, useSlots as He, createCommentVNode as T, createElementVNode as y, h as It, toRef as Re, useTemplateRef as G, withModifiers as We, withDirectives as Ke, vModelCheckbox as qt, normalizeStyle as zt, resolveComponent as Rt, createApp as Pt, vModelText as At } from "vue";
5
- import { JSError as be, stringToSlug as Dt, tap as ee, MagicObject as Qe, PromisedValue as K, Storage as O, objectOnly as oe, arrayFrom as Je, isEmpty as xe, objectDeepClone as jt, fail as Q, facade as te, arrayRemove as Se, getEnv as Bt, updateLocationQueryParameters as Ft, forever as Ut, toString as B, objectWithout as Ot, noop as Nt, debounce as Wt, stringMatchAll as Ze, isDevelopment as J, isTesting as Ee, after as ue, uuid as re, required as Kt, isObject as ce, objectWithoutEmpty as Xe, value as Qt, isInstanceOf as Pe, stringExcerpt as Jt, arraySorted as Zt, ListenersManager as Xt, toError as Yt, round as Gt } from "@noeldemartin/utils";
6
- import j from "virtual:aerogel";
7
- import { createPinia as es, setActivePinia as ts, defineStore as ss } from "pinia";
8
- import rs from "dompurify";
9
- import { marked as ns, Renderer as Ae } from "marked";
10
- import as from "clsx";
11
- import { cva as ls } from "class-variance-authority";
12
- import { twMerge as os } from "tailwind-merge";
13
- import { Primitive as is, SelectValue as De, SelectTrigger as us, SelectIcon as cs, SelectItem as ds, SelectItemText as ps, SelectPortal as ms, SelectContent as fs, SelectViewport as hs, SelectRoot as gs, Label as vs, useForwardExpose as Ve, SwitchRoot as bs, SwitchThumb as ys, DialogRoot as ws, DialogPortal as $s, DialogContent as _s, DialogDescription as xs, DialogOverlay as Cs, DialogTitle as ks, ToastClose as Ss, ToastRoot as Ts, ToastProvider as Ms, ToastViewport as Hs, DropdownMenuItem as Es, DropdownMenuContent as Vs, DropdownMenuRoot as Ls, DropdownMenuTrigger as Is, DropdownMenuPortal as qs } from "reka-ui";
14
- class Te extends be {
1
+ var At = Object.defineProperty;
2
+ var Dt = (t, s, e) => s in t ? At(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
+ var C = (t, s, e) => Dt(t, typeof s != "symbol" ? s + "" : s, e);
4
+ import { markRaw as V, Comment as Bt, Text as jt, Static as Ft, inject as Y, reactive as ve, unref as l, onUnmounted as $e, ref as N, computed as c, readonly as _e, nextTick as Ut, useAttrs as st, onMounted as rt, watch as Le, toRaw as Ot, customRef as Nt, watchEffect as G, defineComponent as g, createBlock as m, openBlock as o, mergeProps as H, withCtx as f, renderSlot as $, createPropsRestProxy as K, createVNode as d, normalizeProps as ce, guardReactiveProps as de, createTextVNode as L, toDisplayString as x, normalizeClass as _, createElementBlock as b, Fragment as D, renderList as U, provide as pe, resolveDynamicComponent as ee, useSlots as Ie, createCommentVNode as E, createElementVNode as y, h as Wt, useTemplateRef as te, withModifiers as nt, withDirectives as at, vModelCheckbox as Kt, normalizeStyle as Oe, resolveComponent as Qt, createApp as Jt, vModelText as Zt } from "vue";
5
+ import { JSError as Ce, stringToSlug as Xt, tap as se, MagicObject as lt, PromisedValue as J, Storage as O, objectOnly as ae, arrayFrom as ot, isEmpty as Te, objectDeepClone as Yt, fail as W, facade as re, arrayRemove as He, getEnv as Gt, updateLocationQueryParameters as es, forever as ts, toString as j, objectWithout as ss, noop as rs, debounce as ns, stringMatchAll as it, isDevelopment as Z, isTesting as ze, after as oe, uuid as ue, isObject as he, objectWithoutEmpty as ut, value as as, isInstanceOf as Ne, stringExcerpt as ls, arraySorted as os, ListenersManager as is, toError as us, round as cs } from "@noeldemartin/utils";
6
+ import B from "virtual:aerogel";
7
+ import { createPinia as ds, setActivePinia as ps, defineStore as fs } from "pinia";
8
+ import ms from "dompurify";
9
+ import { marked as hs, Renderer as We } from "marked";
10
+ import { injectModal as ct, useModal as gs, createModal as vs, showModal as Ke, closeModal as Qe, modals as le, ModalComponent as bs, ModalsPortal as ys } from "@noeldemartin/vue-modals";
11
+ import { ModalComponent as co, ModalsPortal as po, closeModal as fo, createModal as mo, injectModal as ho, modals as go, showModal as vo } from "@noeldemartin/vue-modals";
12
+ import ws from "clsx";
13
+ import { cva as $s } from "class-variance-authority";
14
+ import { twMerge as _s } from "tailwind-merge";
15
+ import { Primitive as Cs, SelectValue as Je, SelectTrigger as xs, SelectIcon as Ss, SelectItem as ks, SelectItemText as Ts, SelectPortal as Ms, SelectContent as Es, SelectViewport as Hs, SelectRoot as Vs, Label as Ls, useForwardExpose as Re, SwitchRoot as Is, SwitchThumb as zs, DialogRoot as Rs, DialogPortal as qs, DialogContent as Ps, DialogDescription as As, DialogOverlay as Ds, DialogTitle as Bs, ToastClose as js, ToastRoot as Fs, ToastProvider as Us, ToastViewport as Os, DropdownMenuItem as Ns, DropdownMenuContent as Ws, DropdownMenuRoot as Ks, DropdownMenuTrigger as Qs, DropdownMenuPortal as Js } from "reka-ui";
16
+ class Ve extends Ce {
15
17
  constructor(s, e) {
16
18
  super(`Service '${s}' failed booting`, { cause: e });
17
19
  }
18
20
  }
19
- function zs() {
20
- return j.namespace ?? Dt(j.name);
21
+ function Zs() {
22
+ return B.namespace ?? Xt(B.name);
21
23
  }
22
- let Le = null;
23
- function Ye() {
24
- return Le ?? Rs();
24
+ let qe = null;
25
+ function dt() {
26
+ return qe ?? Xs();
25
27
  }
26
- function Rs() {
27
- return ee(es(), (t) => {
28
- Le = t, ts(t);
28
+ function Xs() {
29
+ return se(ds(), (t) => {
30
+ qe = t, ps(t);
29
31
  });
30
32
  }
31
- function Ps() {
32
- return Le ?? Ye();
33
+ function Ys() {
34
+ return qe ?? dt();
33
35
  }
34
- function As(t, s) {
35
- return Ye(), ss(t, s)();
36
+ function Gs(t, s) {
37
+ return dt(), fs(t, s)();
36
38
  }
37
- function ye(t) {
39
+ function xe(t) {
38
40
  var s;
39
- return s = class extends we {
41
+ return s = class extends Se {
40
42
  usesStore() {
41
43
  return !0;
42
44
  }
@@ -70,19 +72,19 @@ To fix this problem, declare your initialState as a function instead.`
70
72
  var r;
71
73
  return ((r = t.restore) == null ? void 0 : r.call(t, e)) ?? e;
72
74
  }
73
- }, _(s, "persist", t.persist ?? []), s;
75
+ }, C(s, "persist", t.persist ?? []), s;
74
76
  }
75
- var ke;
76
- let we = (ke = class extends Qe {
77
+ var Ee;
78
+ let Se = (Ee = class extends lt {
77
79
  constructor() {
78
80
  super();
79
- _(this, "_name");
80
- _(this, "_booted");
81
- _(this, "_computedStateKeys");
82
- _(this, "_watchers");
83
- _(this, "_store");
81
+ C(this, "_name");
82
+ C(this, "_booted");
83
+ C(this, "_computedStateKeys");
84
+ C(this, "_watchers");
85
+ C(this, "_store");
84
86
  const e = this.getComputedStateDefinition();
85
- this._name = this.getName() ?? new.target.name, this._booted = new K(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && As(this._name, {
87
+ this._name = this.getName() ?? new.target.name, this._booted = new J(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && Gs(this._name, {
86
88
  state: () => this.getInitialState(),
87
89
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
90
  getters: e
@@ -95,7 +97,7 @@ let we = (ke = class extends Qe {
95
97
  return super.static(e);
96
98
  }
97
99
  launch() {
98
- const e = (r) => this._booted.reject(new Te(this._name, r));
100
+ const e = (r) => this._booted.reject(new Ve(this._name, r));
99
101
  try {
100
102
  this.frameworkBoot().then(() => this.boot()).then(() => this._booted.resolve()).catch(e);
101
103
  } catch (r) {
@@ -116,14 +118,14 @@ let we = (ke = class extends Qe {
116
118
  setState(e, r) {
117
119
  if (!this._store)
118
120
  return;
119
- const n = typeof e == "string" ? { [e]: r } : e, a = oe(this._store.$state, Object.keys(n));
121
+ const n = typeof e == "string" ? { [e]: r } : e, a = ae(this._store.$state, Object.keys(n));
120
122
  Object.assign(this._store.$state, n), this.onStateUpdated(n, a);
121
123
  }
122
124
  updatePersistedState(e) {
123
125
  if (!this._store)
124
126
  return;
125
- const r = Je(e), n = oe(this._store.$state, r);
126
- xe(n) || this.onPersistentStateUpdated(n);
127
+ const r = ot(e), n = ae(this._store.$state, r);
128
+ Te(n) || this.onPersistentStateUpdated(n);
127
129
  }
128
130
  __get(e) {
129
131
  return this.hasState(e) ? this.getState(e) : super.__get(e);
@@ -132,21 +134,21 @@ let we = (ke = class extends Qe {
132
134
  this.setState({ [e]: r });
133
135
  }
134
136
  get storageKey() {
135
- return `${zs()}:${this._name}`;
137
+ return `${Zs()}:${this._name}`;
136
138
  }
137
139
  onStateUpdated(e, r) {
138
- const n = oe(e, this.static("persist"));
139
- xe(n) || this.onPersistentStateUpdated(n);
140
+ const n = ae(e, this.static("persist"));
141
+ Te(n) || this.onPersistentStateUpdated(n);
140
142
  for (const a in e) {
141
- const i = this._watchers[a];
142
- !i || e[a] === r[a] || i.call(this, e[a], r[a]);
143
+ const u = this._watchers[a];
144
+ !u || e[a] === r[a] || u.call(this, e[a], r[a]);
143
145
  }
144
146
  }
145
147
  onPersistentStateUpdated(e) {
146
148
  const r = O.get(this.storageKey);
147
149
  r && O.set(this.storageKey, {
148
150
  ...r,
149
- ...this.serializePersistedState(jt(e))
151
+ ...this.serializePersistedState(Yt(e))
150
152
  });
151
153
  }
152
154
  usesStore() {
@@ -176,28 +178,28 @@ let we = (ke = class extends Qe {
176
178
  async boot() {
177
179
  }
178
180
  restorePersistedState() {
179
- if (!(!this.usesStore() || xe(this.static("persist")))) {
181
+ if (!(!this.usesStore() || Te(this.static("persist")))) {
180
182
  if (O.has(this.storageKey)) {
181
183
  const e = O.require(this.storageKey);
182
184
  this.setState(this.deserializePersistedState(e));
183
185
  return;
184
186
  }
185
- O.set(this.storageKey, oe(this.getState(), this.static("persist")));
187
+ O.set(this.storageKey, ae(this.getState(), this.static("persist")));
186
188
  }
187
189
  }
188
190
  requireStore() {
189
- return this._store ? this._store : Q(`Failed getting '${this._name}' store`);
191
+ return this._store ? this._store : W(`Failed getting '${this._name}' store`);
190
192
  }
191
- }, _(ke, "persist", []), ke);
192
- const ol = {
193
+ }, C(Ee, "persist", []), Ee);
194
+ const Cl = {
193
195
  Low: -256,
194
196
  Default: 0,
195
197
  High: 256
196
198
  };
197
- class Ds extends we {
199
+ class er extends Se {
198
200
  constructor() {
199
201
  super(...arguments);
200
- _(this, "listeners", {});
202
+ C(this, "listeners", {});
201
203
  }
202
204
  async boot() {
203
205
  Object.entries(globalThis.__aerogelEvents__ ?? {}).forEach(([e, r]) => (
@@ -208,57 +210,57 @@ class Ds extends we {
208
210
  async emit(e, r) {
209
211
  var a;
210
212
  const n = this.listeners[e] ?? { priorities: [], handlers: {} };
211
- for (const i of n.priorities)
212
- await Promise.all(((a = n.handlers[i]) == null ? void 0 : a.map((l) => l(r))) ?? []);
213
+ for (const u of n.priorities)
214
+ await Promise.all(((a = n.handlers[u]) == null ? void 0 : a.map((i) => i(r))) ?? []);
213
215
  }
214
216
  // prettier-ignore
215
217
  /* eslint-enable max-len */
216
218
  on(e, r, n) {
217
- const a = typeof r == "function" ? {} : typeof r == "number" ? { priority: r } : r, i = typeof r == "function" ? r : n;
218
- return this.registerListener(e, a, i), () => this.off(e, i);
219
+ const a = typeof r == "function" ? {} : typeof r == "number" ? { priority: r } : r, u = typeof r == "function" ? r : n;
220
+ return this.registerListener(e, a, u), () => this.off(e, u);
219
221
  }
220
222
  // prettier-ignore
221
223
  /* eslint-enable max-len */
222
224
  once(e, r, n) {
223
225
  let a = null;
224
- const i = typeof r == "function" ? {} : r, l = typeof r == "function" ? r : n;
225
- return ee(
226
+ const u = typeof r == "function" ? {} : r, i = typeof r == "function" ? r : n;
227
+ return se(
226
228
  () => a && this.off(e, a),
227
- (d) => {
228
- a = (...v) => (d(), l(...v)), this.registerListener(e, i, l);
229
+ (p) => {
230
+ a = (...v) => (p(), i(...v)), this.registerListener(e, u, i);
229
231
  }
230
232
  );
231
233
  }
232
234
  off(e, r) {
233
- var i;
235
+ var u;
234
236
  const n = this.listeners[e];
235
237
  if (!n)
236
238
  return;
237
239
  const a = [...n.priorities];
238
- for (const l of a)
239
- Se(n.handlers[l] ?? [], r), ((i = n.handlers[l]) == null ? void 0 : i.length) === 0 && (delete n.handlers[l], Se(n.priorities, l));
240
+ for (const i of a)
241
+ He(n.handlers[i] ?? [], r), ((u = n.handlers[i]) == null ? void 0 : u.length) === 0 && (delete n.handlers[i], He(n.priorities, i));
240
242
  n.priorities.length === 0 && delete this.listeners[e];
241
243
  }
242
244
  registerListener(e, r, n) {
243
- var d, v, $;
245
+ var p, v, w;
244
246
  const a = r.priority ?? 0;
245
247
  e in this.listeners || (this.listeners[e] = { priorities: [], handlers: {} });
246
- const i = ((d = this.listeners[e]) == null ? void 0 : d.priorities) ?? Q(`priorities missing for event '${e}'`), l = ((v = this.listeners[e]) == null ? void 0 : v.handlers) ?? Q(`handlers missing for event '${e}'`);
247
- i.includes(a) || (i.push(a), i.sort((m, C) => C - m), l[a] = []), ($ = l[a]) == null || $.push(n);
248
+ const u = ((p = this.listeners[e]) == null ? void 0 : p.priorities) ?? W(`priorities missing for event '${e}'`), i = ((v = this.listeners[e]) == null ? void 0 : v.handlers) ?? W(`handlers missing for event '${e}'`);
249
+ u.includes(a) || (u.push(a), u.sort((h, k) => k - h), i[a] = []), (w = i[a]) == null || w.push(n);
248
250
  }
249
251
  }
250
- const R = te(Ds);
251
- function il(t) {
252
+ const F = re(er);
253
+ function xl(t) {
252
254
  return t;
253
255
  }
254
- const js = ye({
256
+ const tr = xe({
255
257
  name: "app",
256
258
  initialState: {
257
259
  plugins: {},
258
260
  instance: null,
259
- environment: Bt() ?? "development",
260
- version: j.version,
261
- sourceUrl: j.sourceUrl,
261
+ environment: Gt() ?? "development",
262
+ version: B.version,
263
+ sourceUrl: B.sourceUrl,
262
264
  settings: []
263
265
  },
264
266
  computed: {
@@ -266,19 +268,19 @@ const js = ye({
266
268
  staging: (t) => t.environment === "staging",
267
269
  testing: (t) => t.environment === "test" || t.environment === "testing",
268
270
  versionName(t) {
269
- return this.development ? "dev." + j.sourceHash.toString().substring(0, 7) : this.staging ? "staging." + j.sourceHash.toString().substring(0, 7) : `v${t.version}`;
271
+ return this.development ? "dev." + B.sourceHash.toString().substring(0, 7) : this.staging ? "staging." + B.sourceHash.toString().substring(0, 7) : `v${t.version}`;
270
272
  },
271
273
  versionUrl(t) {
272
- return t.sourceUrl + (this.development || this.staging ? `/tree/${j.sourceHash}` : `/releases/tag/${this.versionName}`);
274
+ return t.sourceUrl + (this.development || this.staging ? `/tree/${B.sourceHash}` : `/releases/tag/${this.versionName}`);
273
275
  }
274
276
  }
275
277
  });
276
- class Bs extends js {
278
+ class sr extends tr {
277
279
  constructor() {
278
280
  super(...arguments);
279
- _(this, "name", j.name);
280
- _(this, "ready", new K());
281
- _(this, "mounted", new K());
281
+ C(this, "name", B.name);
282
+ C(this, "ready", new J());
283
+ C(this, "mounted", new J());
282
284
  }
283
285
  isReady() {
284
286
  return this.ready.isResolved();
@@ -287,13 +289,13 @@ class Bs extends js {
287
289
  return this.mounted.isResolved();
288
290
  }
289
291
  addSetting(e) {
290
- this.settings.push(E(e));
292
+ this.settings.push(V(e));
291
293
  }
292
294
  async whenReady(e) {
293
295
  return await this.ready.then(e);
294
296
  }
295
297
  async reload(e) {
296
- e && Ft(e), location.reload(), await Ut();
298
+ e && es(e), location.reload(), await ts();
297
299
  }
298
300
  plugin(e) {
299
301
  return this.plugins[e] ?? null;
@@ -303,14 +305,14 @@ class Bs extends js {
303
305
  return ((r = this.instance) == null ? void 0 : r.config.globalProperties[e]) ?? null;
304
306
  }
305
307
  async boot() {
306
- R.once("application-ready", () => this.ready.resolve()), R.once("application-mounted", () => this.mounted.resolve());
308
+ F.once("application-ready", () => this.ready.resolve()), F.once("application-mounted", () => this.mounted.resolve());
307
309
  }
308
310
  }
309
- const A = te(Bs);
310
- function ul(t) {
311
+ const A = re(sr);
312
+ function Sl(t) {
311
313
  return t;
312
314
  }
313
- async function Fs(t, ...s) {
315
+ async function rr(t, ...s) {
314
316
  A.setState(
315
317
  "plugins",
316
318
  t.reduce(
@@ -319,55 +321,55 @@ async function Fs(t, ...s) {
319
321
  )
320
322
  ), await Promise.all(t.map((e) => e.install(...s)) ?? []);
321
323
  }
322
- function Us(t) {
323
- return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${B(r)}"`, "");
324
+ function nr(t) {
325
+ return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${j(r)}"`, "");
324
326
  }
325
- function cl(t) {
327
+ function kl(t) {
326
328
  return t;
327
329
  }
328
- function Os(t) {
329
- const s = X(t);
330
- return s ? pe(s) : void 0;
330
+ function ar(t) {
331
+ const s = Y(t);
332
+ return s ? ve(s) : void 0;
331
333
  }
332
- function V(t, s) {
333
- return Os(t) ?? Q(s ?? `Could not resolve '${B(t)}' injection key`);
334
+ function R(t, s) {
335
+ return ar(t) ?? W(s ?? `Could not resolve '${j(t)}' injection key`);
334
336
  }
335
- function Ns(t, s) {
336
- return X(t) ?? Q(s ?? `Could not resolve '${B(t)}' injection key`);
337
+ function lr(t, s) {
338
+ return Y(t) ?? W(s ?? `Could not resolve '${j(t)}' injection key`);
337
339
  }
338
- function Ge(t) {
339
- return typeof t == "string" ? t : t.type === Mt ? "" : t.type === Ht || t.type === Et ? t.children : t.type === "br" ? `
340
+ function pt(t) {
341
+ return typeof t == "string" ? t : t.type === Bt ? "" : t.type === jt || t.type === Ft ? t.children : t.type === "br" ? `
340
342
 
341
- ` : `<${t.type} ${Us(t)}>${Array.from(t.children).map(Ge).join("")}</${t.type}>`;
343
+ ` : `<${t.type} ${nr(t)}>${Array.from(t.children).map(pt).join("")}</${t.type}>`;
342
344
  }
343
- const Ce = /* @__PURE__ */ new WeakMap(), Ws = {
345
+ const Me = /* @__PURE__ */ new WeakMap(), or = {
344
346
  mounted(t, { value: s, modifiers: e }) {
345
347
  const r = typeof s == "function" ? s : null, n = () => {
346
348
  const a = t.getBoundingClientRect();
347
349
  e.css && (t.style.setProperty("--width", `${a.width}px`), t.style.setProperty("--height", `${a.height}px`)), r == null || r({ width: a.width, height: a.height });
348
350
  };
349
- e.watch && Ce.set(t, ee(new ResizeObserver(n)).observe(t)), n();
351
+ e.watch && Me.set(t, se(new ResizeObserver(n)).observe(t)), n();
350
352
  },
351
353
  unmounted(t) {
352
354
  var s;
353
- (s = Ce.get(t)) == null || s.unobserve(t), Ce.delete(t);
355
+ (s = Me.get(t)) == null || s.unobserve(t), Me.delete(t);
354
356
  }
355
357
  };
356
- function et(t, s) {
357
- const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, i = ls(n, a);
358
- return M(i(r), o(e));
358
+ function ft(t, s) {
359
+ const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, u = $s(n, a);
360
+ return T(u(r), l(e));
359
361
  }
360
- function M(...t) {
361
- return os(as(t));
362
+ function T(...t) {
363
+ return _s(ws(t));
362
364
  }
363
- function tt(t, s) {
364
- const e = R.on(t, s);
365
- ge(() => e());
365
+ function Tl(t, s) {
366
+ const e = F.on(t, s);
367
+ $e(() => e());
366
368
  }
367
- const Ks = {
369
+ const ir = {
368
370
  required: (t) => t ? void 0 : "required"
369
371
  };
370
- function Qs(t, s) {
372
+ function ur(t, s) {
371
373
  var e;
372
374
  if (t == null)
373
375
  return !0;
@@ -386,43 +388,43 @@ function Qs(t, s) {
386
388
  return typeof t == "object";
387
389
  }
388
390
  }
389
- const de = { ...Ks };
390
- function dl(t, s) {
391
- de[t] = s;
391
+ const ge = { ...ir };
392
+ function Ml(t, s) {
393
+ ge[t] = s;
392
394
  }
393
- function Js(t, s) {
394
- return Qs(t, s) ? [] : ["invalid_value"];
395
+ function cr(t, s) {
396
+ return ur(t, s) ? [] : ["invalid_value"];
395
397
  }
396
- function Zs(t, s) {
398
+ function dr(t, s) {
397
399
  var r;
398
- const e = (r = de[s]) == null ? void 0 : r.call(de, t);
399
- return e ? Je(e) : [];
400
+ const e = (r = ge[s]) == null ? void 0 : r.call(ge, t);
401
+ return e ? ot(e) : [];
400
402
  }
401
- const pl = Symbol(), je = /* @__PURE__ */ new WeakMap();
402
- class Xs extends Qe {
403
+ const El = Symbol(), Ze = /* @__PURE__ */ new WeakMap();
404
+ class pr extends lt {
403
405
  constructor(e) {
404
406
  super();
405
- _(this, "errors");
406
- _(this, "_fields");
407
- _(this, "_data");
408
- _(this, "_submitted");
409
- _(this, "_errors");
410
- _(this, "_listeners", {});
411
- this._fields = e, this._submitted = U(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), je.set(
407
+ C(this, "errors");
408
+ C(this, "_fields");
409
+ C(this, "_data");
410
+ C(this, "_submitted");
411
+ C(this, "_errors");
412
+ C(this, "_listeners", {});
413
+ this._fields = e, this._submitted = N(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), Ze.set(
412
414
  this,
413
415
  c(() => !Object.values(this._errors).some((r) => r !== null))
414
- ), this.errors = ve(this._errors);
416
+ ), this.errors = _e(this._errors);
415
417
  }
416
418
  get valid() {
417
419
  var e;
418
- return !!((e = je.get(this)) != null && e.value);
420
+ return !!((e = Ze.get(this)) != null && e.value);
419
421
  }
420
422
  get submitted() {
421
423
  return this._submitted.value;
422
424
  }
423
425
  setFieldValue(e, r) {
424
- const n = this._fields[e] ?? Q(`Trying to set undefined '${B(e)}' field`);
425
- this._data[e] = n.type === "string" && (n.trim ?? !0) ? B(r).trim() : r, this._submitted.value && this.validate();
426
+ const n = this._fields[e] ?? W(`Trying to set undefined '${j(e)}' field`);
427
+ this._data[e] = n.type === "string" && (n.trim ?? !0) ? j(r).trim() : r, this._submitted.value && this.validate();
426
428
  }
427
429
  getFieldValue(e) {
428
430
  return this._data[e];
@@ -431,6 +433,9 @@ class Xs extends Qe {
431
433
  var r, n;
432
434
  return ((n = (r = this._fields[e]) == null ? void 0 : r.rules) == null ? void 0 : n.split("|")) ?? [];
433
435
  }
436
+ setFieldErrors(e, r) {
437
+ this._errors[e] = r;
438
+ }
434
439
  getFieldType(e) {
435
440
  var r;
436
441
  return ((r = this._fields[e]) == null ? void 0 : r.type) ?? null;
@@ -459,11 +464,11 @@ class Xs extends Qe {
459
464
  return (n = this._listeners)[e] ?? (n[e] = []), (a = this._listeners[e]) == null || a.push(r), () => this.off(e, r);
460
465
  }
461
466
  off(e, r) {
462
- Se(this._listeners[e] ?? [], r);
467
+ He(this._listeners[e] ?? [], r);
463
468
  }
464
469
  async focus(e) {
465
470
  var r;
466
- await Oe(), (r = this._listeners.focus) == null || r.forEach((n) => n(e));
471
+ await Ut(), (r = this._listeners.focus) == null || r.forEach((n) => n(e));
467
472
  }
468
473
  __get(e) {
469
474
  return e in this._fields ? this.getFieldValue(e) : super.__get(e);
@@ -476,24 +481,24 @@ class Xs extends Qe {
476
481
  this.setFieldValue(e, r);
477
482
  }
478
483
  getFieldErrors(e, r) {
479
- var l;
480
- const n = [], a = this._data[e], i = ((l = r.rules) == null ? void 0 : l.split("|")) ?? [];
481
- n.push(...Js(a, r));
482
- for (const d of i)
483
- d !== "required" && a == null || n.push(...Zs(a, d));
484
+ var i;
485
+ const n = [], a = this._data[e], u = ((i = r.rules) == null ? void 0 : i.split("|")) ?? [];
486
+ n.push(...cr(a, r));
487
+ for (const p of u)
488
+ p !== "required" && a == null || n.push(...dr(a, p));
484
489
  return n.length > 0 ? n : null;
485
490
  }
486
491
  getInitialData(e) {
487
492
  if (this.static().isConjuring())
488
493
  return {};
489
- const r = Object.entries(e).reduce((n, [a, i]) => (n[a] = i.default ?? null, n), {});
490
- return pe(r);
494
+ const r = Object.entries(e).reduce((n, [a, u]) => (n[a] = u.default ?? null, n), {});
495
+ return ve(r);
491
496
  }
492
497
  getInitialErrors(e) {
493
498
  if (this.static().isConjuring())
494
499
  return {};
495
500
  const r = Object.keys(e).reduce((n, a) => (n[a] = null, n), {});
496
- return pe(r);
501
+ return ve(r);
497
502
  }
498
503
  resetData() {
499
504
  for (const [e, r] of Object.entries(this._fields))
@@ -503,90 +508,117 @@ class Xs extends Qe {
503
508
  Object.keys(this._errors).forEach((r) => delete this._errors[r]), e && Object.assign(this._errors, e);
504
509
  }
505
510
  }
506
- function st(t, s) {
507
- const e = X("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
508
- ge(() => r == null ? void 0 : r());
511
+ function mt(t, s) {
512
+ const e = Y("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
513
+ $e(() => r == null ? void 0 : r());
514
+ }
515
+ function ht(t) {
516
+ return new pr(t);
509
517
  }
510
- function rt(t) {
511
- return new Xs(t);
518
+ function Pe() {
519
+ const t = st(), s = c(() => t.class);
520
+ return [c(() => ss(t, "class")), s];
512
521
  }
513
- function Ie() {
514
- const t = Ne(), s = c(() => t.class);
515
- return [c(() => Ot(t, "class")), s];
522
+ function Hl(t) {
523
+ let s = rs;
524
+ rt(() => s = t()), $e(() => s());
516
525
  }
517
- function ml(t) {
518
- let s = Nt;
519
- Vt(() => s = t()), ge(() => s());
526
+ function Vl(t, s) {
527
+ const e = ve(O.get(t) ?? s);
528
+ return Le(e, () => O.set(t, Ot(e))), e;
520
529
  }
521
- function fl(t, s) {
522
- const e = pe(O.get(t) ?? s);
523
- return Me(e, () => O.set(t, Lt(e))), e;
530
+ function fr(t) {
531
+ let s = new Set(t), e, r;
532
+ const n = Nt((a, u) => (r = a, e = u, {
533
+ get: () => s,
534
+ set: () => W("Attempted to write read-only reactive set")
535
+ }));
536
+ return {
537
+ values() {
538
+ return r(), Array.from(n.value.values());
539
+ },
540
+ has(a) {
541
+ return r(), n.value.has(a);
542
+ },
543
+ add(a) {
544
+ e(), n.value.add(a);
545
+ },
546
+ delete(a) {
547
+ e(), n.value.delete(a);
548
+ },
549
+ clear() {
550
+ e(), n.value.clear();
551
+ },
552
+ reset(a) {
553
+ e(), s = new Set(a);
554
+ }
555
+ };
524
556
  }
525
- function hl(t) {
526
- const s = U(), e = c(t);
527
- return Me(e, async () => s.value = await e.value, { immediate: !0 }), s;
557
+ function Ll(t) {
558
+ const s = N(), e = c(t);
559
+ return Le(e, async () => s.value = await e.value, { immediate: !0 }), s;
528
560
  }
529
- function gl(t, s) {
530
- const e = s ? t : {}, r = s ?? t, n = U(e.initial ?? null), a = Wt((i) => n.value = i, e.delay ?? 300);
531
- return Y(() => a(r())), n;
561
+ function Il(t, s) {
562
+ const e = s ? t : {}, r = s ?? t, n = N(e.initial ?? null), a = ns((u) => n.value = u, e.delay ?? 300);
563
+ return G(() => a(r())), n;
532
564
  }
533
565
  let ie = null;
534
- function Ys() {
535
- return ee(new Ae(), (t) => {
566
+ function mr() {
567
+ return se(new We(), (t) => {
536
568
  t.link = function(s) {
537
- const e = Ae.prototype.link.apply(this, [s]);
569
+ const e = We.prototype.link.apply(this, [s]);
538
570
  return s.href.startsWith("#") ? e : e.replace("<a", '<a target="_blank"');
539
571
  };
540
572
  });
541
573
  }
542
- function Gs(t) {
543
- const s = Ze(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
574
+ function hr(t) {
575
+ const s = it(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
544
576
  for (const [e, r, n] of s)
545
577
  t = t.replace(e, `<button type="button" data-markdown-action="${r}">${n}</button>`);
546
578
  return t;
547
579
  }
548
- function er(t) {
549
- const s = Ze(t, /<a[^>]*href="#route:([^"]+)"[^>]*>([^<]+)<\/a>/g);
580
+ function gr(t) {
581
+ const s = it(t, /<a[^>]*href="#route:([^"]+)"[^>]*>([^<]+)<\/a>/g);
550
582
  for (const [e, r, n] of s) {
551
583
  const a = (ie == null ? void 0 : ie.resolve(r)) ?? r;
552
584
  t = t.replace(e, `<a data-markdown-route="${r}" href="${a}">${n}</a>`);
553
585
  }
554
586
  return t;
555
587
  }
556
- function tr() {
588
+ function vr() {
557
589
  return ie;
558
590
  }
559
- function vl(t) {
591
+ function zl(t) {
560
592
  ie = t;
561
593
  }
562
- function sr(t) {
563
- let s = ns(t, { renderer: Ys(), async: !1 });
564
- return s = nt(s), s = Gs(s), s = er(s), s;
594
+ function br(t) {
595
+ let s = hs(t, { renderer: mr(), async: !1 });
596
+ return s = gt(s), s = hr(s), s = gr(s), s;
565
597
  }
566
- function nt(t) {
567
- return rs.sanitize(t, { ADD_ATTR: ["target"] });
598
+ function gt(t) {
599
+ return ms.sanitize(t, { ADD_ATTR: ["target"] });
568
600
  }
569
- const rr = {
601
+ const yr = 6e4, Xe = -(/* @__PURE__ */ new Date()).getTimezoneOffset() * -yr, wr = {
570
602
  mounted(t, { value: s }) {
571
- t.innerHTML = nt(s);
603
+ t.innerHTML = gt(s);
572
604
  }
573
- }, nr = {
574
- measure: Ws,
575
- "safe-html": rr
576
- }, ar = {
605
+ }, $r = {
606
+ measure: or,
607
+ "safe-html": wr
608
+ }, _r = {
577
609
  install(t, s) {
578
610
  const e = {
579
- ...nr,
611
+ ...$r,
580
612
  ...s.directives
581
613
  };
582
614
  for (const [r, n] of Object.entries(e))
583
615
  t.directive(r, n);
584
616
  }
585
617
  };
586
- class lr extends we {
618
+ class Cr extends Se {
587
619
  constructor() {
588
620
  super(...arguments);
589
- _(this, "cache");
621
+ C(this, "cache");
590
622
  }
591
623
  async get(e) {
592
624
  return await (await this.open()).match(e) ?? null;
@@ -599,73 +631,80 @@ class lr extends we {
599
631
  (await n.keys(e)).length !== 0 && await n.put(e, r);
600
632
  }
601
633
  async open() {
602
- return this.cache = this.cache ?? ee(new K(), (e) => {
634
+ return this.cache = this.cache ?? se(new J(), (e) => {
603
635
  caches.open("app").then((r) => e.resolve(r));
604
636
  });
605
637
  }
606
638
  }
607
- const bl = te(lr);
608
- class or extends we {
639
+ const Rl = re(Cr);
640
+ class xr extends Se {
609
641
  async purge() {
610
- await R.emit("purge-storage");
642
+ await F.emit("purge-storage");
611
643
  }
612
644
  }
613
- const at = te(or);
614
- function yl(t, s) {
645
+ const vt = re(xr);
646
+ function ql(t, s) {
615
647
  return {
616
648
  ...t,
617
- ...oe(s, Object.keys(t))
649
+ ...ae(s, Object.keys(t))
618
650
  };
619
651
  }
620
- const ir = {
652
+ const Sr = {
621
653
  $app: A,
622
- $events: R,
623
- $storage: at
654
+ $events: F,
655
+ $storage: vt
624
656
  };
625
- async function $e(t, s) {
657
+ async function ke(t, s) {
626
658
  await Promise.all(
627
659
  Object.entries(s).map(async ([e, r]) => {
628
660
  await r.launch().catch((n) => {
629
- var a, i;
630
- return (i = (a = t.config).errorHandler) == null ? void 0 : i.call(a, n, null, `Failed launching ${e}.`);
661
+ var a, u;
662
+ return (u = (a = t.config).errorHandler) == null ? void 0 : u.call(a, n, null, `Failed launching ${e}.`);
631
663
  });
632
664
  })
633
- ), Object.assign(t.config.globalProperties, s), (J() || Ee()) && Object.assign(globalThis, s);
665
+ ), Object.assign(t.config.globalProperties, s), (Z() || ze()) && Object.assign(globalThis, s);
634
666
  }
635
- const ur = {
667
+ const kr = {
636
668
  async install(t, s) {
637
669
  var r;
638
670
  const e = {
639
- ...ir,
671
+ ...Sr,
640
672
  ...s.services
641
673
  };
642
- t.use(Ps()), (r = s.settings) == null || r.forEach((n) => A.addSetting(n)), await $e(t, e);
643
- }
644
- }, lt = 768, me = {
674
+ t.use(Ys()), (r = s.settings) == null || r.forEach((n) => A.addSetting(n)), await ke(t, e);
675
+ }
676
+ }, Ye = /* @__PURE__ */ new WeakSet();
677
+ function Ae() {
678
+ const t = ct(), { close: s, remove: e, ...r } = gs(Ye.has(t) ? {} : { removeOnClose: !1 });
679
+ return Ye.add(t), {
680
+ ...r,
681
+ async close(n) {
682
+ s(n), await oe(1e3), e();
683
+ }
684
+ };
685
+ }
686
+ const bt = 768, be = {
645
687
  Mobile: "mobile",
646
688
  Desktop: "desktop"
647
689
  };
648
- function ot() {
649
- return globalThis.innerWidth > lt ? me.Desktop : me.Mobile;
690
+ function yt() {
691
+ return globalThis.innerWidth > bt ? be.Desktop : be.Mobile;
650
692
  }
651
- const cr = ye({
693
+ const Tr = xe({
652
694
  name: "ui",
653
695
  initialState: {
654
- modals: [],
655
696
  toasts: [],
656
- layout: ot()
697
+ layout: yt()
657
698
  },
658
699
  computed: {
659
- desktop: ({ layout: t }) => t === me.Desktop,
660
- mobile: ({ layout: t }) => t === me.Mobile,
661
- openModals: ({ modals: t }) => t.filter(({ closing: s }) => !s)
700
+ desktop: ({ layout: t }) => t === be.Desktop,
701
+ mobile: ({ layout: t }) => t === be.Mobile
662
702
  }
663
703
  });
664
- class dr extends cr {
704
+ class Mr extends Tr {
665
705
  constructor() {
666
706
  super(...arguments);
667
- _(this, "modalCallbacks", {});
668
- _(this, "components", {});
707
+ C(this, "components", {});
669
708
  }
670
709
  registerComponent(e, r) {
671
710
  this.components[e] = r;
@@ -674,7 +713,7 @@ class dr extends cr {
674
713
  return this.components[e] ?? null;
675
714
  }
676
715
  requireComponent(e) {
677
- return this.resolveComponent(e) ?? Q(`UI Component '${e}' is not defined!`);
716
+ return this.resolveComponent(e) ?? W(`UI Component '${e}' is not defined!`);
678
717
  }
679
718
  alert(e, r) {
680
719
  const n = () => typeof r != "string" ? { message: e } : {
@@ -686,7 +725,7 @@ class dr extends cr {
686
725
  // prettier-ignore
687
726
  /* eslint-enable max-len */
688
727
  async confirm(e, r, n) {
689
- const i = typeof r != "string" ? {
728
+ const u = typeof r != "string" ? {
690
729
  ...r ?? {},
691
730
  message: e,
692
731
  required: !!(r != null && r.required)
@@ -695,31 +734,31 @@ class dr extends cr {
695
734
  title: e,
696
735
  message: r,
697
736
  required: !!(n != null && n.required)
698
- }, l = await this.modalForm(this.requireComponent("confirm-modal"), i), d = typeof l == "object" ? l[0] : l ?? !1, v = typeof l == "object" ? l[1] : Object.entries(i.checkboxes ?? {}).reduce(
699
- ($, [m, { default: C }]) => ({
700
- [m]: C ?? !1,
701
- ...$
737
+ }, { response: i } = await this.modal(this.requireComponent("confirm-modal"), u), p = typeof i == "object" ? i[0] : i ?? !1, v = typeof i == "object" ? i[1] : Object.entries(u.checkboxes ?? {}).reduce(
738
+ (w, [h, { default: k }]) => ({
739
+ [h]: k ?? !1,
740
+ ...w
702
741
  }),
703
742
  {}
704
743
  );
705
- for (const [$, m] of Object.entries(i.checkboxes ?? {}))
706
- if (!(!m.required || v[$]))
707
- return d && J() && console.warn(`Confirmed confirm modal was suppressed because required '${$}' checkbox was missing`), [!1, v];
708
- return "checkboxes" in i ? [d, v] : d;
744
+ for (const [w, h] of Object.entries(u.checkboxes ?? {}))
745
+ if (!(!h.required || v[w]))
746
+ return p && Z() && console.warn(`Confirmed confirm modal was suppressed because required '${w}' checkbox was missing`), [!1, v];
747
+ return "checkboxes" in u ? [p, v] : p;
709
748
  }
710
749
  async prompt(e, r, n) {
711
- const a = (n == null ? void 0 : n.trim) ?? !0, i = () => typeof r != "string" ? {
750
+ const a = (n == null ? void 0 : n.trim) ?? !0, u = () => typeof r != "string" ? {
712
751
  message: e,
713
752
  ...r ?? {}
714
753
  } : {
715
754
  title: e,
716
755
  message: r,
717
756
  ...n ?? {}
718
- }, l = await this.modalForm(this.requireComponent("prompt-modal"), i());
719
- return (a && typeof l == "string" ? l == null ? void 0 : l.trim() : l) ?? null;
757
+ }, { response: i } = await this.modal(this.requireComponent("prompt-modal"), u());
758
+ return (a && typeof i == "string" ? i == null ? void 0 : i.trim() : i) ?? null;
720
759
  }
721
760
  async loading(e, r) {
722
- const n = (m) => typeof m == "function" ? Promise.resolve(m()) : m, a = () => {
761
+ const n = (h) => typeof h == "function" ? Promise.resolve(h()) : h, a = () => {
723
762
  if (typeof e == "string")
724
763
  return {
725
764
  props: { message: e },
@@ -727,93 +766,59 @@ class dr extends cr {
727
766
  };
728
767
  if (typeof e == "function" || e instanceof Promise)
729
768
  return { operationPromise: n(e) };
730
- const { delay: m, ...C } = e;
769
+ const { delay: h, ...k } = e;
731
770
  return {
732
- props: C,
733
- delay: o(m),
771
+ props: k,
772
+ delay: l(h),
734
773
  operationPromise: n(r)
735
774
  };
736
775
  };
737
- let i = !1;
738
- const { operationPromise: l, props: d, delay: v } = a();
739
- if (v && await Promise.race([ue({ ms: v }).then(() => i = !0), l]), v && !i)
740
- return l;
741
- const $ = await this.modal(this.requireComponent("loading-modal"), d);
776
+ let u = !1;
777
+ const { operationPromise: i, props: p, delay: v } = a();
778
+ if (v && await Promise.race([oe({ ms: v }).then(() => u = !0), i]), v && !u)
779
+ return i;
780
+ const w = vs(this.requireComponent("loading-modal"), p);
781
+ Ke(w);
742
782
  try {
743
- const m = await l;
744
- return await ue({ ms: 500 }), m;
783
+ const h = await i;
784
+ return await oe({ ms: 500 }), h;
745
785
  } finally {
746
- await this.closeModal($.id);
786
+ await Qe(w.id, { removeAfter: 1e3 });
747
787
  }
748
788
  }
749
789
  toast(e, r = {}) {
750
- const { component: n, ...a } = r, i = {
751
- id: re(),
790
+ const { component: n, ...a } = r, u = {
791
+ id: ue(),
752
792
  properties: { message: e, ...a },
753
- component: E(n ?? this.requireComponent("toast"))
793
+ component: V(n ?? this.requireComponent("toast"))
754
794
  };
755
- this.setState("toasts", this.toasts.concat(i));
756
- }
757
- async modal(e, r) {
758
- const n = re(), a = {}, i = {
759
- id: n,
760
- closing: !1,
761
- properties: r ?? {},
762
- component: E(e),
763
- beforeClose: new Promise((d) => a.willClose = d),
764
- afterClose: new Promise((d) => a.hasClosed = d)
765
- }, l = this.modals.concat(i);
766
- return this.modalCallbacks[i.id] = a, this.setState({ modals: l }), await Oe(), i;
767
- }
768
- async modalForm(e, r) {
769
- return await (await this.modal(e, r)).beforeClose;
770
- }
771
- async closeModal(e, r) {
772
- if (!A.isMounted()) {
773
- await this.removeModal(e, r);
774
- return;
775
- }
776
- await R.emit("close-modal", { id: e, result: r });
795
+ this.setState("toasts", this.toasts.concat(u));
796
+ }
797
+ modal(e, r) {
798
+ return Ke(e, r ?? {});
777
799
  }
778
800
  async closeAllModals() {
779
- for (; this.modals.length > 0; )
780
- await this.closeModal(Kt(this.modals[this.modals.length - 1]).id);
801
+ await Promise.all(le.value.map(({ id: e }) => Qe(e, { removeAfter: 1e3 })));
781
802
  }
782
803
  async boot() {
783
- this.watchModalEvents(), this.watchMountedEvent(), this.watchViewportBreakpoints();
784
- }
785
- async removeModal(e, r) {
786
- var n, a;
787
- this.setState(
788
- "modals",
789
- this.modals.filter((i) => i.id !== e)
790
- ), (a = (n = this.modalCallbacks[e]) == null ? void 0 : n.hasClosed) == null || a.call(n, r), delete this.modalCallbacks[e];
791
- }
792
- watchModalEvents() {
793
- R.on("modal-will-close", ({ modal: { id: e }, result: r }) => {
794
- var a, i;
795
- const n = this.modals.find((l) => e === l.id);
796
- n && (n.closing = !0), (i = (a = this.modalCallbacks[e]) == null ? void 0 : a.willClose) == null || i.call(a, r);
797
- }), R.on("modal-has-closed", async ({ modal: { id: e }, result: r }) => {
798
- await this.removeModal(e, r);
799
- });
804
+ this.watchMountedEvent(), this.watchViewportBreakpoints();
800
805
  }
801
806
  watchMountedEvent() {
802
- R.once("application-mounted", async () => {
807
+ F.once("application-mounted", async () => {
803
808
  if (!globalThis.document || !globalThis.getComputedStyle)
804
809
  return;
805
810
  const e = globalThis.document.getElementById("splash");
806
- e && (globalThis.getComputedStyle(e).opacity !== "0" && (e.style.opacity = "0", await ue({ ms: 600 })), e.remove());
811
+ e && (globalThis.getComputedStyle(e).opacity !== "0" && (e.style.opacity = "0", await oe({ ms: 600 })), e.remove());
807
812
  });
808
813
  }
809
814
  watchViewportBreakpoints() {
810
815
  if (!globalThis.matchMedia)
811
816
  return;
812
- globalThis.matchMedia(`(min-width: ${lt}px)`).addEventListener("change", () => this.setState({ layout: ot() }));
817
+ globalThis.matchMedia(`(min-width: ${bt}px)`).addEventListener("change", () => this.setState({ layout: yt() }));
813
818
  }
814
819
  }
815
- const z = te(dr);
816
- class pr {
820
+ const P = re(Mr);
821
+ class Er {
817
822
  constructor(s, e) {
818
823
  this.locale = s, this.fallbackLocale = e;
819
824
  }
@@ -833,13 +838,13 @@ class pr {
833
838
  return ["en"];
834
839
  }
835
840
  translate(s) {
836
- return J() && console.warn("Lang provider is missing"), s;
841
+ return Z() && console.warn("Lang provider is missing"), s;
837
842
  }
838
843
  translateWithDefault(s, e) {
839
- return J() && console.warn("Lang provider is missing"), e;
844
+ return Z() && console.warn("Lang provider is missing"), e;
840
845
  }
841
846
  }
842
- const mr = ye({
847
+ const Hr = xe({
843
848
  name: "lang",
844
849
  persist: ["locale", "fallbackLocale"],
845
850
  initialState: {
@@ -848,11 +853,11 @@ const mr = ye({
848
853
  fallbackLocale: "en"
849
854
  }
850
855
  });
851
- class fr extends mr {
856
+ class Vr extends Hr {
852
857
  constructor() {
853
858
  super();
854
- _(this, "provider");
855
- this.provider = new pr(
859
+ C(this, "provider");
860
+ this.provider = new Er(
856
861
  this.getState("locale") ?? this.getBrowserLocale(),
857
862
  this.getState("fallbackLocale")
858
863
  );
@@ -880,7 +885,7 @@ class fr extends mr {
880
885
  );
881
886
  }
882
887
  }
883
- const Z = te(fr), it = Z.translate.bind(Z), S = Z.translateWithDefault.bind(Z), hr = ye({
888
+ const X = re(Vr), wt = X.translate.bind(X), S = X.translateWithDefault.bind(X), Lr = xe({
884
889
  name: "errors",
885
890
  initialState: {
886
891
  logs: [],
@@ -893,12 +898,13 @@ const Z = te(fr), it = Z.translate.bind(Z), S = Z.translateWithDefault.bind(Z),
893
898
  hasStartupErrors: ({ startupErrors: t }) => t.length > 0
894
899
  }
895
900
  });
896
- class gr extends hr {
901
+ class Ir extends Lr {
897
902
  constructor() {
898
903
  super(...arguments);
899
- _(this, "forceReporting", !1);
900
- _(this, "enabled", !0);
901
- _(this, "eruda", null);
904
+ C(this, "forceReporting", !1);
905
+ C(this, "enabled", !0);
906
+ C(this, "eruda", null);
907
+ C(this, "erudaPlugins", null);
902
908
  }
903
909
  enable() {
904
910
  this.enabled = !0;
@@ -908,18 +914,18 @@ class gr extends hr {
908
914
  }
909
915
  async inspect(e, r) {
910
916
  if (Array.isArray(e) && e.length === 0) {
911
- z.alert(S("errors.inspectEmpty", "Nothing to inspect!"));
917
+ P.alert(S("errors.inspectEmpty", "Nothing to inspect!"));
912
918
  return;
913
919
  }
914
920
  const n = Array.isArray(e) ? e[0] : this.isErrorReport(e) ? e : await this.createErrorReport(e), a = Array.isArray(e) ? e : r ?? [n];
915
- z.modal(z.requireComponent("error-report-modal"), { report: n, reports: a });
921
+ P.modal(P.requireComponent("error-report-modal"), { report: n, reports: a });
916
922
  }
917
923
  async report(e, r) {
918
- if (await R.emit("error", { error: e, message: r }), Ee("unit") || (J() && this.logError(e), !this.enabled))
924
+ if (await F.emit("error", { error: e, message: r }), ze("unit") || (Z() && this.logError(e), !this.enabled))
919
925
  throw e;
920
926
  if (!A.isMounted()) {
921
- const i = await this.createStartupErrorReport(e);
922
- i && this.setState({ startupErrors: this.startupErrors.concat(i) });
927
+ const u = await this.createStartupErrorReport(e);
928
+ u && this.setState({ startupErrors: this.startupErrors.concat(u) });
923
929
  return;
924
930
  }
925
931
  const n = await this.createErrorReport(e), a = {
@@ -927,7 +933,7 @@ class gr extends hr {
927
933
  seen: !1,
928
934
  date: /* @__PURE__ */ new Date()
929
935
  };
930
- z.toast(
936
+ P.toast(
931
937
  r ?? S("errors.notice", "Something went wrong, but it's not your fault. Try again!"),
932
938
  {
933
939
  variant: "danger",
@@ -935,14 +941,14 @@ class gr extends hr {
935
941
  {
936
942
  label: S("errors.viewDetails", "View details"),
937
943
  dismiss: !0,
938
- click: () => z.modal(z.requireComponent("error-report-modal"), { report: n, reports: [n] })
944
+ click: () => P.modal(P.requireComponent("error-report-modal"), { report: n, reports: [n] })
939
945
  }
940
946
  ]
941
947
  }
942
948
  ), this.setState({ logs: [a].concat(this.logs) });
943
949
  }
944
950
  reportDevelopmentError(e, r) {
945
- J() && (r && console.warn(r), this.logError(e));
951
+ Z() && (r && console.warn(r), this.logError(e));
946
952
  }
947
953
  see(e) {
948
954
  this.setState({
@@ -953,27 +959,30 @@ class gr extends hr {
953
959
  });
954
960
  }
955
961
  async boot() {
956
- Y(async () => {
962
+ G(async () => {
957
963
  var e;
958
964
  if (!this.debug) {
959
965
  (e = this.eruda) == null || e.destroy();
960
966
  return;
961
967
  }
962
- this.eruda ?? (this.eruda = (await import("eruda")).default), this.eruda.init();
968
+ this.eruda ?? (this.eruda = (await import("eruda")).default), this.erudaPlugins ?? (this.erudaPlugins = [(await import("eruda-indexeddb")).default]), this.eruda.init(), this.erudaPlugins.forEach((r) => {
969
+ var n;
970
+ return (n = this.eruda) == null ? void 0 : n.add(r);
971
+ });
963
972
  });
964
973
  }
965
974
  logError(e) {
966
- console.error(e), ce(e) && e.cause && this.logError(e.cause);
975
+ console.error(e), he(e) && e.cause && this.logError(e.cause);
967
976
  }
968
977
  isErrorReport(e) {
969
- return ce(e) && "title" in e;
978
+ return he(e) && "title" in e;
970
979
  }
971
980
  async createErrorReport(e) {
972
- return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof be ? this.createErrorReportFromError(e) : ce(e) ? Xe({
973
- title: B(
981
+ return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof Ce ? this.createErrorReportFromError(e) : he(e) ? ut({
982
+ title: j(
974
983
  e.name ?? e.title ?? S("errors.unknown", "Unknown Error")
975
984
  ),
976
- description: B(
985
+ description: j(
977
986
  e.message ?? e.description ?? S("errors.unknownDescription", "Unknown error object")
978
987
  ),
979
988
  error: e
@@ -983,7 +992,7 @@ class gr extends hr {
983
992
  };
984
993
  }
985
994
  async createStartupErrorReport(e) {
986
- return e instanceof Te ? e.cause instanceof Te ? null : this.createErrorReport(e.cause) : this.createErrorReport(e);
995
+ return e instanceof Ve ? e.cause instanceof Ve ? null : this.createErrorReport(e.cause) : this.createErrorReport(e);
987
996
  }
988
997
  createErrorReportFromError(e, r = {}) {
989
998
  return {
@@ -995,7 +1004,7 @@ class gr extends hr {
995
1004
  };
996
1005
  }
997
1006
  }
998
- const ut = te(gr), ct = /* @__PURE__ */ g({
1007
+ const $t = re(Ir), _t = /* @__PURE__ */ g({
999
1008
  __name: "HeadlessButton",
1000
1009
  props: {
1001
1010
  class: {},
@@ -1012,8 +1021,8 @@ const ut = te(gr), ct = /* @__PURE__ */ g({
1012
1021
  },
1013
1022
  setup(t) {
1014
1023
  const s = c(() => t.as ? { as: t.as } : t.route ? {
1015
- as: z.resolveComponent("router-link") ?? "a",
1016
- to: Xe({
1024
+ as: P.resolveComponent("router-link") ?? "a",
1025
+ to: ut({
1017
1026
  name: t.route,
1018
1027
  params: t.routeParams,
1019
1028
  query: t.routeQuery
@@ -1026,18 +1035,18 @@ const ut = te(gr), ct = /* @__PURE__ */ g({
1026
1035
  as: "button",
1027
1036
  type: t.submit ? "submit" : "button"
1028
1037
  });
1029
- return (e, r) => (u(), h(o(is), H({
1038
+ return (e, r) => (o(), m(l(Cs), H({
1030
1039
  class: t.class,
1031
1040
  "as-child": e.asChild,
1032
1041
  disabled: e.disabled
1033
1042
  }, s.value), {
1034
1043
  default: f(() => [
1035
- w(e.$slots, "default")
1044
+ $(e.$slots, "default")
1036
1045
  ]),
1037
1046
  _: 3
1038
1047
  }, 16, ["class", "as-child", "disabled"]));
1039
1048
  }
1040
- }), q = /* @__PURE__ */ g({
1049
+ }), I = /* @__PURE__ */ g({
1041
1050
  __name: "Button",
1042
1051
  props: {
1043
1052
  class: {},
@@ -1053,7 +1062,7 @@ const ut = te(gr), ct = /* @__PURE__ */ g({
1053
1062
  as: {}
1054
1063
  },
1055
1064
  setup(t) {
1056
- const s = N(t, ["class", "size", "variant", "disabled"]), e = c(() => et(
1065
+ const s = K(t, ["class", "size", "variant", "disabled"]), e = c(() => ft(
1057
1066
  { baseClasses: t.class, variant: t.variant, size: t.size, disabled: t.disabled },
1058
1067
  {
1059
1068
  baseClasses: "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
@@ -1062,6 +1071,7 @@ const ut = te(gr), ct = /* @__PURE__ */ g({
1062
1071
  default: "bg-primary-600 text-white focus-visible:outline-primary-600",
1063
1072
  secondary: "bg-background text-gray-900 ring-gray-300",
1064
1073
  danger: "bg-red-600 text-white focus-visible:outline-red-600",
1074
+ warning: "bg-yellow-600 text-white focus-visible:outline-yellow-600",
1065
1075
  ghost: "bg-transparent",
1066
1076
  outline: "bg-transparent text-primary-600 ring-primary-600",
1067
1077
  link: "text-links"
@@ -1148,62 +1158,62 @@ const ut = te(gr), ct = /* @__PURE__ */ g({
1148
1158
  }
1149
1159
  }
1150
1160
  ));
1151
- return (r, n) => (u(), h(ct, H({
1161
+ return (r, n) => (o(), m(_t, H({
1152
1162
  class: e.value,
1153
1163
  disabled: r.disabled
1154
1164
  }, s), {
1155
1165
  default: f(() => [
1156
- w(r.$slots, "default")
1166
+ $(r.$slots, "default")
1157
1167
  ]),
1158
1168
  _: 3
1159
1169
  }, 16, ["class", "disabled"]));
1160
1170
  }
1161
1171
  });
1162
- function vr(t) {
1172
+ function zr(t) {
1163
1173
  return typeof t == "object" && t !== null && "label" in t;
1164
1174
  }
1165
- const dt = /* @__PURE__ */ g({
1175
+ const Ct = /* @__PURE__ */ g({
1166
1176
  __name: "HeadlessSelectValue",
1167
1177
  setup(t) {
1168
- const s = V(
1178
+ const s = R(
1169
1179
  "select",
1170
1180
  "<HeadlessSelectValue> must be a child of a <HeadlessSelect>"
1171
1181
  );
1172
- return (e, r) => e.$slots.default ? (u(), h(o(De), {
1182
+ return (e, r) => e.$slots.default ? (o(), m(l(Je), {
1173
1183
  key: 0,
1174
- placeholder: o(s).placeholder
1184
+ placeholder: l(s).placeholder
1175
1185
  }, {
1176
1186
  default: f(() => [
1177
- w(e.$slots, "default")
1187
+ $(e.$slots, "default")
1178
1188
  ]),
1179
1189
  _: 3
1180
- }, 8, ["placeholder"])) : (u(), h(o(De), {
1190
+ }, 8, ["placeholder"])) : (o(), m(l(Je), {
1181
1191
  key: 1,
1182
- placeholder: o(s).placeholder
1192
+ placeholder: l(s).placeholder
1183
1193
  }, null, 8, ["placeholder"]));
1184
1194
  }
1185
- }), pt = /* @__PURE__ */ g({
1195
+ }), xt = /* @__PURE__ */ g({
1186
1196
  __name: "HeadlessSelectTrigger",
1187
1197
  setup(t) {
1188
- const s = V(
1198
+ const s = R(
1189
1199
  "select",
1190
1200
  "<HeadlessSelectTrigger> must be a child of a <HeadlessSelect>"
1191
1201
  );
1192
- return (e, r) => (u(), h(o(us), {
1193
- id: o(s).id
1202
+ return (e, r) => (o(), m(l(xs), {
1203
+ id: l(s).id
1194
1204
  }, {
1195
1205
  default: f(() => [
1196
- w(e.$slots, "default", {}, () => [
1197
- p(dt, {
1198
- placeholder: o(s).placeholder
1206
+ $(e.$slots, "default", {}, () => [
1207
+ d(Ct, {
1208
+ placeholder: l(s).placeholder
1199
1209
  }, null, 8, ["placeholder"]),
1200
- p(o(cs))
1210
+ d(l(Ss))
1201
1211
  ])
1202
1212
  ]),
1203
1213
  _: 3
1204
1214
  }, 8, ["id"]));
1205
1215
  }
1206
- }), mt = /* @__PURE__ */ g({
1216
+ }), St = /* @__PURE__ */ g({
1207
1217
  __name: "HeadlessSelectOption",
1208
1218
  props: {
1209
1219
  value: {},
@@ -1213,20 +1223,20 @@ const dt = /* @__PURE__ */ g({
1213
1223
  as: {}
1214
1224
  },
1215
1225
  setup(t) {
1216
- const s = V(
1226
+ const s = R(
1217
1227
  "select",
1218
1228
  "<HeadlessSelectOption> must be a child of a <HeadlessSelect>"
1219
1229
  ), e = c(() => {
1220
1230
  var n;
1221
1231
  const r = (n = s.options) == null ? void 0 : n.find((a) => a.value === t.value);
1222
- return r ? r.label : B(t.value);
1232
+ return r ? r.label : j(t.value);
1223
1233
  });
1224
- return (r, n) => (u(), h(o(ds), ne(ae(r.$props)), {
1234
+ return (r, n) => (o(), m(l(ks), ce(de(r.$props)), {
1225
1235
  default: f(() => [
1226
- p(o(ps), null, {
1236
+ d(l(Ts), null, {
1227
1237
  default: f(() => [
1228
- w(r.$slots, "default", {}, () => [
1229
- I(x(e.value), 1)
1238
+ $(r.$slots, "default", {}, () => [
1239
+ L(x(e.value), 1)
1230
1240
  ])
1231
1241
  ]),
1232
1242
  _: 3
@@ -1235,33 +1245,33 @@ const dt = /* @__PURE__ */ g({
1235
1245
  _: 3
1236
1246
  }, 16));
1237
1247
  }
1238
- }), ft = /* @__PURE__ */ g({
1248
+ }), kt = /* @__PURE__ */ g({
1239
1249
  __name: "HeadlessSelectOptions",
1240
1250
  props: {
1241
1251
  class: {},
1242
1252
  innerClass: {}
1243
1253
  },
1244
1254
  setup(t) {
1245
- const s = V(
1255
+ const s = R(
1246
1256
  "select",
1247
1257
  "<HeadlessSelectOptions> must be a child of a <HeadlessSelect>"
1248
- ), e = c(() => M("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
1249
- return (r, n) => (u(), h(o(ms), null, {
1258
+ ), e = c(() => T("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
1259
+ return (r, n) => (o(), m(l(Ms), null, {
1250
1260
  default: f(() => [
1251
- p(o(fs), {
1261
+ d(l(Es), {
1252
1262
  position: "popper",
1253
- class: k(e.value),
1254
- align: o(s).align,
1255
- side: o(s).side,
1263
+ class: _(e.value),
1264
+ align: l(s).align,
1265
+ side: l(s).side,
1256
1266
  "side-offset": 4
1257
1267
  }, {
1258
1268
  default: f(() => [
1259
- p(o(hs), {
1260
- class: k(r.innerClass)
1269
+ d(l(Hs), {
1270
+ class: _(r.innerClass)
1261
1271
  }, {
1262
1272
  default: f(() => [
1263
- w(r.$slots, "default", {}, () => [
1264
- (u(!0), b(D, null, F(o(s).options ?? [], (a) => (u(), h(mt, {
1273
+ $(r.$slots, "default", {}, () => [
1274
+ (o(!0), b(D, null, U(l(s).options ?? [], (a) => (o(), m(St, {
1265
1275
  key: a.key,
1266
1276
  value: a.value
1267
1277
  }, null, 8, ["value"]))), 128))
@@ -1276,7 +1286,7 @@ const dt = /* @__PURE__ */ g({
1276
1286
  _: 3
1277
1287
  }));
1278
1288
  }
1279
- }), br = /* @__PURE__ */ g({
1289
+ }), Rr = /* @__PURE__ */ g({
1280
1290
  inheritAttrs: !1,
1281
1291
  __name: "HeadlessSelect",
1282
1292
  props: {
@@ -1296,56 +1306,56 @@ const dt = /* @__PURE__ */ g({
1296
1306
  },
1297
1307
  emits: ["update:modelValue"],
1298
1308
  setup(t, { expose: s, emit: e }) {
1299
- const r = e, n = X("form", null), a = c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), i = c(() => a.value), l = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), d = c(() => t.options ? t.options.map((m) => ({
1300
- key: re(),
1301
- label: t.renderOption ? t.renderOption(m) : vr(m) ? Qt(m.label) : B(m),
1302
- value: m
1309
+ const r = e, n = Y("form", null), a = c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), u = c(() => a.value), i = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), p = c(() => t.options ? t.options.map((h) => ({
1310
+ key: ue(),
1311
+ label: t.renderOption ? t.renderOption(h) : zr(h) ? as(h.label) : j(h),
1312
+ value: h
1303
1313
  })) : null), v = {
1304
1314
  labelClass: t.labelClass,
1305
1315
  optionsClass: t.optionsClass,
1306
1316
  align: t.align,
1307
1317
  side: t.side,
1308
1318
  value: a,
1309
- id: `select-${re()}`,
1319
+ id: `select-${ue()}`,
1310
1320
  name: c(() => t.name),
1311
1321
  label: c(() => t.label),
1312
1322
  description: c(() => t.description),
1313
1323
  placeholder: c(() => t.placeholder ?? S("ui.select", "Select an option")),
1314
- options: d,
1324
+ options: p,
1315
1325
  selectedOption: c(() => {
1316
- var m;
1317
- return (m = d.value) == null ? void 0 : m.find((C) => C.value === t.modelValue);
1326
+ var h;
1327
+ return (h = p.value) == null ? void 0 : h.find((k) => k.value === t.modelValue);
1318
1328
  }),
1319
- errors: ve(l),
1329
+ errors: _e(i),
1320
1330
  required: c(() => {
1321
1331
  if (!(!t.name || !n))
1322
1332
  return n.getFieldRules(t.name).includes("required");
1323
1333
  }),
1324
- update(m) {
1334
+ update(h) {
1325
1335
  if (n && t.name) {
1326
- n.setFieldValue(t.name, m);
1336
+ n.setFieldValue(t.name, h);
1327
1337
  return;
1328
1338
  }
1329
- r("update:modelValue", m);
1339
+ r("update:modelValue", h);
1330
1340
  }
1331
1341
  };
1332
- function $(m) {
1333
- v.update(m);
1342
+ function w(h) {
1343
+ v.update(h);
1334
1344
  }
1335
- return le("select", v), s(v), (m, C) => (u(), h(o(gs), {
1336
- "model-value": i.value,
1337
- by: m.compareOptions,
1338
- "onUpdate:modelValue": C[0] || (C[0] = (L) => $(L))
1345
+ return pe("select", v), s(v), (h, k) => (o(), m(l(Vs), {
1346
+ "model-value": u.value,
1347
+ by: h.compareOptions,
1348
+ "onUpdate:modelValue": k[0] || (k[0] = (q) => w(q))
1339
1349
  }, {
1340
- default: f(({ open: L }) => [
1341
- (u(), h(W(m.as), ne(ae(m.$attrs)), {
1350
+ default: f(({ open: q }) => [
1351
+ (o(), m(ee(h.as), ce(de(h.$attrs)), {
1342
1352
  default: f(() => [
1343
- w(m.$slots, "default", {
1344
- modelValue: m.modelValue,
1345
- open: L
1353
+ $(h.$slots, "default", {
1354
+ modelValue: h.modelValue,
1355
+ open: q
1346
1356
  }, () => [
1347
- p(pt),
1348
- p(ft)
1357
+ d(xt),
1358
+ d(kt)
1349
1359
  ])
1350
1360
  ]),
1351
1361
  _: 2
@@ -1354,50 +1364,50 @@ const dt = /* @__PURE__ */ g({
1354
1364
  _: 3
1355
1365
  }, 8, ["model-value", "by"]));
1356
1366
  }
1357
- }), Be = /* @__PURE__ */ g({
1367
+ }), Ge = /* @__PURE__ */ g({
1358
1368
  __name: "HeadlessSelectLabel",
1359
1369
  props: {
1360
1370
  asChild: { type: Boolean },
1361
1371
  as: {}
1362
1372
  },
1363
1373
  setup(t) {
1364
- const s = V(
1374
+ const s = R(
1365
1375
  "select",
1366
1376
  "<HeadlessSelectLabel> must be a child of a <HeadlessSelect>"
1367
- ), e = He(), r = c(() => !!(s.label || e.default));
1368
- return (n, a) => r.value ? (u(), h(o(vs), H({
1377
+ ), e = Ie(), r = c(() => !!(s.label || e.default));
1378
+ return (n, a) => r.value ? (o(), m(l(Ls), H({
1369
1379
  key: 0,
1370
- for: o(s).id
1380
+ for: l(s).id
1371
1381
  }, n.$props), {
1372
1382
  default: f(() => [
1373
- w(n.$slots, "default", {}, () => [
1374
- I(x(o(s).label), 1)
1383
+ $(n.$slots, "default", {}, () => [
1384
+ L(x(l(s).label), 1)
1375
1385
  ])
1376
1386
  ]),
1377
1387
  _: 3
1378
- }, 16, ["for"])) : T("", !0);
1388
+ }, 16, ["for"])) : E("", !0);
1379
1389
  }
1380
- }), ht = /* @__PURE__ */ g({
1390
+ }), Tt = /* @__PURE__ */ g({
1381
1391
  __name: "SelectLabel",
1382
1392
  props: {
1383
1393
  class: {}
1384
1394
  },
1385
1395
  setup(t) {
1386
- const s = V("select", "<SelectLabel> must be a child of a <Select>"), e = c(() => M("block text-sm leading-6 font-medium text-gray-900", s.labelClass, t.class));
1387
- return (r, n) => r.$slots.default ? (u(), h(Be, {
1396
+ const s = R("select", "<SelectLabel> must be a child of a <Select>"), e = c(() => T("block text-sm leading-6 font-medium text-gray-900", s.labelClass, t.class));
1397
+ return (r, n) => r.$slots.default ? (o(), m(Ge, {
1388
1398
  key: 0,
1389
- class: k(e.value)
1399
+ class: _(e.value)
1390
1400
  }, {
1391
1401
  default: f(() => [
1392
- w(r.$slots, "default")
1402
+ $(r.$slots, "default")
1393
1403
  ]),
1394
1404
  _: 3
1395
- }, 8, ["class"])) : (u(), h(Be, {
1405
+ }, 8, ["class"])) : (o(), m(Ge, {
1396
1406
  key: 1,
1397
- class: k(e.value)
1407
+ class: _(e.value)
1398
1408
  }, null, 8, ["class"]));
1399
1409
  }
1400
- }), Fe = /* @__PURE__ */ g({
1410
+ }), et = /* @__PURE__ */ g({
1401
1411
  __name: "SelectOption",
1402
1412
  props: {
1403
1413
  value: {},
@@ -1405,62 +1415,62 @@ const dt = /* @__PURE__ */ g({
1405
1415
  innerClass: {}
1406
1416
  },
1407
1417
  setup(t) {
1408
- const s = c(() => M("group p-1 outline-none", t.class)), e = c(() => M(
1418
+ const s = c(() => T("group p-1 outline-none", t.class)), e = c(() => T(
1409
1419
  // eslint-disable-next-line vue/max-len
1410
1420
  "relative flex max-w-[calc(100vw-2rem)] cursor-pointer items-center truncate rounded-md gap-2 px-2 py-1 text-sm select-none *:truncate group-data-[highlighted]:bg-gray-100 group-data-[state=checked]:font-semibold group-data-[state=unchecked]:opacity-50",
1411
1421
  t.innerClass
1412
1422
  ));
1413
- return (r, n) => (u(), h(mt, {
1414
- class: k(s.value),
1423
+ return (r, n) => (o(), m(St, {
1424
+ class: _(s.value),
1415
1425
  value: r.value
1416
1426
  }, {
1417
1427
  default: f(() => [
1418
1428
  y("div", {
1419
- class: k(e.value)
1429
+ class: _(e.value)
1420
1430
  }, [
1421
- w(r.$slots, "default")
1431
+ $(r.$slots, "default")
1422
1432
  ], 2)
1423
1433
  ]),
1424
1434
  _: 3
1425
1435
  }, 8, ["class", "value"]));
1426
1436
  }
1427
- }), gt = /* @__PURE__ */ g({
1437
+ }), Mt = /* @__PURE__ */ g({
1428
1438
  __name: "SelectOptions",
1429
1439
  props: {
1430
1440
  class: {}
1431
1441
  },
1432
1442
  setup(t) {
1433
- const s = V("select", "<SelectOptions> must be a child of a <Select>"), e = c(() => M(
1443
+ const s = R("select", "<SelectOptions> must be a child of a <Select>"), e = c(() => T(
1434
1444
  "z-50 overflow-auto rounded-lg bg-white text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden",
1435
1445
  s.optionsClass,
1436
1446
  t.class
1437
1447
  ));
1438
- return (r, n) => (u(), h(ft, {
1439
- class: k(e.value)
1448
+ return (r, n) => (o(), m(kt, {
1449
+ class: _(e.value)
1440
1450
  }, {
1441
1451
  default: f(() => {
1442
1452
  var a;
1443
1453
  return [
1444
- (a = o(s).options) != null && a.length ? w(r.$slots, "default", { key: 0 }, () => {
1445
- var i;
1454
+ (a = l(s).options) != null && a.length ? $(r.$slots, "default", { key: 0 }, () => {
1455
+ var u;
1446
1456
  return [
1447
- (u(!0), b(D, null, F(((i = o(s)) == null ? void 0 : i.options) ?? [], (l) => (u(), h(Fe, {
1448
- key: l.key,
1449
- value: l.value
1457
+ (o(!0), b(D, null, U(((u = l(s)) == null ? void 0 : u.options) ?? [], (i) => (o(), m(et, {
1458
+ key: i.key,
1459
+ value: i.value
1450
1460
  }, {
1451
1461
  default: f(() => [
1452
- I(x(l.label), 1)
1462
+ L(x(i.label), 1)
1453
1463
  ]),
1454
1464
  _: 2
1455
1465
  }, 1032, ["value"]))), 128))
1456
1466
  ];
1457
- }) : w(r.$slots, "default", { key: 1 }, () => [
1458
- p(Fe, {
1467
+ }) : $(r.$slots, "default", { key: 1 }, () => [
1468
+ d(et, {
1459
1469
  disabled: "",
1460
1470
  value: null
1461
1471
  }, {
1462
1472
  default: f(() => [
1463
- I(x(r.$td("ui.selectEmpty", "No options available")), 1)
1473
+ L(x(r.$td("ui.selectEmpty", "No options available")), 1)
1464
1474
  ]),
1465
1475
  _: 1
1466
1476
  })
@@ -1470,42 +1480,42 @@ const dt = /* @__PURE__ */ g({
1470
1480
  _: 3
1471
1481
  }, 8, ["class"]));
1472
1482
  }
1473
- }), yr = {
1483
+ }), qr = {
1474
1484
  viewBox: "0 0 20 20",
1475
1485
  width: "1.2em",
1476
1486
  height: "1.2em"
1477
1487
  };
1478
- function wr(t, s) {
1479
- return u(), b("svg", yr, s[0] || (s[0] = [
1488
+ function Pr(t, s) {
1489
+ return o(), b("svg", qr, s[0] || (s[0] = [
1480
1490
  y("path", {
1481
1491
  fill: "currentColor",
1482
1492
  d: "m9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828L5.757 6.586L4.343 8z"
1483
1493
  }, null, -1)
1484
1494
  ]));
1485
1495
  }
1486
- const $r = E({ name: "zondicons-cheveron-down", render: wr }), vt = /* @__PURE__ */ g({
1496
+ const Ar = V({ name: "zondicons-cheveron-down", render: Pr }), Et = /* @__PURE__ */ g({
1487
1497
  __name: "SelectTrigger",
1488
1498
  props: {
1489
1499
  class: {}
1490
1500
  },
1491
1501
  setup(t) {
1492
- const s = V("select", "<SelectTrigger> must be a child of a <Select>"), e = c(() => M(
1502
+ const s = R("select", "<SelectTrigger> must be a child of a <Select>"), e = c(() => T(
1493
1503
  // eslint-disable-next-line vue/max-len
1494
1504
  "focus:outline-primary-600 data-[state=open]:outline-primary-600 grid w-full cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 sm:text-sm/6",
1495
1505
  { "mt-1": s.label },
1496
1506
  t.class
1497
1507
  ));
1498
- return (r, n) => (u(), h(pt, {
1499
- class: k(e.value)
1508
+ return (r, n) => (o(), m(xt, {
1509
+ class: _(e.value)
1500
1510
  }, {
1501
1511
  default: f(() => [
1502
- p(dt, { class: "col-start-1 row-start-1 truncate pr-6" }),
1503
- p(o($r), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
1512
+ d(Ct, { class: "col-start-1 row-start-1 truncate pr-6" }),
1513
+ d(l(Ar), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
1504
1514
  ]),
1505
1515
  _: 1
1506
1516
  }, 8, ["class"]));
1507
1517
  }
1508
- }), _r = /* @__PURE__ */ g({
1518
+ }), Dr = /* @__PURE__ */ g({
1509
1519
  __name: "Select",
1510
1520
  props: {
1511
1521
  as: {},
@@ -1524,72 +1534,72 @@ const $r = E({ name: "zondicons-cheveron-down", render: wr }), vt = /* @__PURE__
1524
1534
  },
1525
1535
  emits: ["update:modelValue"],
1526
1536
  setup(t) {
1527
- const { forwardRef: s } = Ve();
1528
- return (e, r) => (u(), h(br, H({ ref: o(s) }, e.$props, {
1537
+ const { forwardRef: s } = Re();
1538
+ return (e, r) => (o(), m(Rr, H({ ref: l(s) }, e.$props, {
1529
1539
  "onUpdate:modelValue": r[0] || (r[0] = (n) => e.$emit("update:modelValue", n))
1530
1540
  }), {
1531
1541
  default: f(() => [
1532
- p(ht),
1533
- w(e.$slots, "default", {}, () => [
1534
- p(vt),
1535
- p(gt)
1542
+ d(Tt),
1543
+ $(e.$slots, "default", {}, () => [
1544
+ d(Et),
1545
+ d(Mt)
1536
1546
  ])
1537
1547
  ]),
1538
1548
  _: 3
1539
1549
  }, 16));
1540
1550
  }
1541
- }), xr = { class: "grow" }, Cr = /* @__PURE__ */ g({
1551
+ }), Br = { class: "grow" }, jr = /* @__PURE__ */ g({
1542
1552
  __name: "Language",
1543
1553
  setup(t) {
1544
- const s = Z.getBrowserLocale(), e = c(() => [null, ...Z.locales]);
1554
+ const s = X.getBrowserLocale(), e = c(() => [null, ...X.locales]);
1545
1555
  function r(n) {
1546
- return (n && j.locales[n]) ?? S("settings.localeDefault", "{locale} (default)", {
1547
- locale: j.locales[s] ?? s
1556
+ return (n && B.locales[n]) ?? S("settings.localeDefault", "{locale} (default)", {
1557
+ locale: B.locales[s] ?? s
1548
1558
  });
1549
1559
  }
1550
- return (n, a) => (u(), h(_r, {
1560
+ return (n, a) => (o(), m(Dr, {
1551
1561
  modelValue: n.$lang.locale,
1552
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.$lang.locale = i),
1562
+ "onUpdate:modelValue": a[0] || (a[0] = (u) => n.$lang.locale = u),
1553
1563
  class: "flex flex-col items-start md:flex-row",
1554
1564
  as: "div",
1555
1565
  options: e.value,
1556
1566
  "render-option": r
1557
1567
  }, {
1558
1568
  default: f(() => [
1559
- y("div", xr, [
1560
- p(ht, { class: "text-base font-semibold" }, {
1569
+ y("div", Br, [
1570
+ d(Tt, { class: "text-base font-semibold" }, {
1561
1571
  default: f(() => [
1562
- I(x(n.$td("settings.locale", "Language")), 1)
1572
+ L(x(n.$td("settings.locale", "Language")), 1)
1563
1573
  ]),
1564
1574
  _: 1
1565
1575
  }),
1566
- p(P, {
1576
+ d(z, {
1567
1577
  "lang-key": "settings.localeDescription",
1568
1578
  "lang-default": "Choose the application's language.",
1569
1579
  class: "mt-1 text-sm text-gray-500"
1570
1580
  })
1571
1581
  ]),
1572
- p(q, {
1582
+ d(I, {
1573
1583
  variant: "ghost",
1574
- as: vt,
1584
+ as: Et,
1575
1585
  class: "grid w-auto outline-none"
1576
1586
  }),
1577
- p(gt)
1587
+ d(Mt)
1578
1588
  ]),
1579
1589
  _: 1
1580
1590
  }, 8, ["modelValue", "options"]));
1581
1591
  }
1582
- }), kr = [
1592
+ }), Fr = [
1583
1593
  {
1584
1594
  priority: 100,
1585
- component: Cr
1595
+ component: jr
1586
1596
  }
1587
- ], Sr = { $lang: Z }, Tr = {
1597
+ ], Ur = { $lang: X }, Or = {
1588
1598
  async install(t) {
1589
1599
  var s;
1590
- (s = t.config.globalProperties).$t ?? (s.$t = it), t.config.globalProperties.$td = S, kr.forEach((e) => A.addSetting(e)), await $e(t, Sr);
1600
+ (s = t.config.globalProperties).$t ?? (s.$t = wt), t.config.globalProperties.$td = S, Fr.forEach((e) => A.addSetting(e)), await ke(t, Ur);
1591
1601
  }
1592
- }, Mr = /* @__PURE__ */ g({
1602
+ }, Nr = /* @__PURE__ */ g({
1593
1603
  __name: "Markdown",
1594
1604
  props: {
1595
1605
  as: {},
@@ -1601,38 +1611,38 @@ const $r = E({ name: "zondicons-cheveron-down", render: wr }), vt = /* @__PURE__
1601
1611
  actions: {}
1602
1612
  },
1603
1613
  setup(t) {
1604
- const s = Ne(), e = He(), r = c(() => e.default ? e.default().map(Ge).join("") : t.text ?? (t.langKey && (t.langDefault ? S(t.langKey, t.langDefault, t.langParams ?? {}) : it(t.langKey, t.langParams ?? {})))), n = c(() => {
1614
+ const s = st(), e = Ie(), r = c(() => e.default ? e.default().map(pt).join("") : t.text ?? (t.langKey && (t.langDefault ? S(t.langKey, t.langDefault, t.langParams ?? {}) : wt(t.langKey, t.langParams ?? {})))), n = c(() => {
1605
1615
  if (!r.value)
1606
1616
  return null;
1607
- let l = sr(r.value);
1608
- return t.inline && (l = l.replace("<p>", "<span>").replace("</p>", "</span>")), l;
1609
- }), a = () => It(t.as ?? (t.inline ? "span" : "div"), {
1617
+ let i = br(r.value);
1618
+ return t.inline && (i = i.replace("<p>", "<span>").replace("</p>", "</span>")), i;
1619
+ }), a = () => Wt(t.as ?? (t.inline ? "span" : "div"), {
1610
1620
  innerHTML: n.value,
1611
- onClick: i,
1621
+ onClick: u,
1612
1622
  ...s,
1613
1623
  class: `${s.class ?? ""} ${t.inline ? "" : "prose"}`
1614
1624
  });
1615
- async function i(l) {
1616
- var v, $;
1617
- const { target: d } = l;
1618
- if (Pe(d, HTMLElement) && d.dataset.markdownAction) {
1619
- ($ = (v = t.actions) == null ? void 0 : v[d.dataset.markdownAction]) == null || $.call(v);
1625
+ async function u(i) {
1626
+ var v, w;
1627
+ const { target: p } = i;
1628
+ if (Ne(p, HTMLElement) && p.dataset.markdownAction) {
1629
+ (w = (v = t.actions) == null ? void 0 : v[p.dataset.markdownAction]) == null || w.call(v);
1620
1630
  return;
1621
1631
  }
1622
- if (Pe(d, HTMLAnchorElement) && d.dataset.markdownRoute) {
1623
- const m = tr();
1624
- m && (l.preventDefault(), m.visit(d.dataset.markdownRoute));
1632
+ if (Ne(p, HTMLAnchorElement) && p.dataset.markdownRoute) {
1633
+ const h = vr();
1634
+ h && (i.preventDefault(), h.visit(p.dataset.markdownRoute));
1625
1635
  return;
1626
1636
  }
1627
1637
  }
1628
- return (l, d) => (u(), h(a));
1638
+ return (i, p) => (o(), m(a));
1629
1639
  }
1630
- }), Hr = (t, s) => {
1640
+ }), Wr = (t, s) => {
1631
1641
  const e = t.__vccOpts || t;
1632
1642
  for (const [r, n] of s)
1633
1643
  e[r] = n;
1634
1644
  return e;
1635
- }, P = /* @__PURE__ */ Hr(Mr, [["__scopeId", "data-v-8b211cfb"]]), Er = { class: "flex-grow" }, Vr = ["id"], Lr = /* @__PURE__ */ g({
1645
+ }, z = /* @__PURE__ */ Wr(Nr, [["__scopeId", "data-v-8b211cfb"]]), Kr = { class: "flex-grow" }, Qr = ["id"], Jr = /* @__PURE__ */ g({
1636
1646
  __name: "Setting",
1637
1647
  props: {
1638
1648
  title: {},
@@ -1642,29 +1652,29 @@ const $r = E({ name: "zondicons-cheveron-down", render: wr }), vt = /* @__PURE__
1642
1652
  layout: { default: "horizontal" }
1643
1653
  },
1644
1654
  setup(t) {
1645
- const s = c(() => M(t.class, "flex flex-col justify-center gap-1"));
1646
- return (e, r) => (u(), b("div", {
1647
- class: k(["mt-4 flex", { "flex-col": e.layout === "vertical" }])
1655
+ const s = c(() => T(t.class, "flex flex-col justify-center gap-1"));
1656
+ return (e, r) => (o(), b("div", {
1657
+ class: _(["mt-4 flex", { "flex-col": e.layout === "vertical" }])
1648
1658
  }, [
1649
- y("div", Er, [
1659
+ y("div", Kr, [
1650
1660
  y("h3", {
1651
1661
  id: e.titleId,
1652
1662
  class: "text-base font-semibold"
1653
- }, x(e.title), 9, Vr),
1654
- e.description ? (u(), h(P, {
1663
+ }, x(e.title), 9, Qr),
1664
+ e.description ? (o(), m(z, {
1655
1665
  key: 0,
1656
1666
  text: e.description,
1657
1667
  class: "mt-1 text-sm text-gray-500"
1658
- }, null, 8, ["text"])) : T("", !0)
1668
+ }, null, 8, ["text"])) : E("", !0)
1659
1669
  ]),
1660
1670
  y("div", {
1661
- class: k(s.value)
1671
+ class: _(s.value)
1662
1672
  }, [
1663
- w(e.$slots, "default")
1673
+ $(e.$slots, "default")
1664
1674
  ], 2)
1665
1675
  ], 2));
1666
1676
  }
1667
- }), Ir = ["for"], qr = /* @__PURE__ */ g({
1677
+ }), Zr = ["for"], Xr = /* @__PURE__ */ g({
1668
1678
  inheritAttrs: !1,
1669
1679
  __name: "HeadlessSwitch",
1670
1680
  props: {
@@ -1679,71 +1689,71 @@ const $r = E({ name: "zondicons-cheveron-down", render: wr }), vt = /* @__PURE__
1679
1689
  },
1680
1690
  emits: ["update:modelValue"],
1681
1691
  setup(t, { expose: s, emit: e }) {
1682
- const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), i = {
1683
- id: `switch-${re()}`,
1692
+ const r = e, n = Y("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = {
1693
+ id: `switch-${ue()}`,
1684
1694
  name: c(() => t.name),
1685
1695
  label: c(() => t.label),
1686
1696
  description: c(() => t.description),
1687
1697
  value: c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
1688
- errors: ve(a),
1698
+ errors: _e(a),
1689
1699
  required: c(() => {
1690
1700
  if (!(!t.name || !n))
1691
1701
  return n.getFieldRules(t.name).includes("required");
1692
1702
  }),
1693
- update(l) {
1703
+ update(i) {
1694
1704
  if (n && t.name) {
1695
- n.setFieldValue(t.name, l);
1705
+ n.setFieldValue(t.name, i);
1696
1706
  return;
1697
1707
  }
1698
- r("update:modelValue", l);
1708
+ r("update:modelValue", i);
1699
1709
  }
1700
1710
  };
1701
- return s(i), Y(() => {
1711
+ return s(u), G(() => {
1702
1712
  !t.description && !a.value || console.warn("Errors and description not implemented in <HeadlessSwitch>");
1703
- }), (l, d) => (u(), b("div", {
1704
- class: k(t.class)
1713
+ }), (i, p) => (o(), b("div", {
1714
+ class: _(t.class)
1705
1715
  }, [
1706
- l.label ? (u(), b("label", {
1716
+ i.label ? (o(), b("label", {
1707
1717
  key: 0,
1708
- for: i.id,
1709
- class: k(l.labelClass)
1710
- }, x(l.label), 11, Ir)) : T("", !0),
1711
- p(o(bs), H({
1712
- id: i.id,
1713
- name: l.name,
1714
- "model-value": i.value.value
1715
- }, l.$attrs, {
1716
- class: l.inputClass,
1717
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
1718
+ for: u.id,
1719
+ class: _(i.labelClass)
1720
+ }, x(i.label), 11, Zr)) : E("", !0),
1721
+ d(l(Is), H({
1722
+ id: u.id,
1723
+ name: i.name,
1724
+ "model-value": u.value.value
1725
+ }, i.$attrs, {
1726
+ class: i.inputClass,
1727
+ "onUpdate:modelValue": p[0] || (p[0] = (v) => i.$emit("update:modelValue", v))
1718
1728
  }), {
1719
1729
  default: f(() => [
1720
- p(o(ys), {
1721
- class: k(l.thumbClass)
1730
+ d(l(zs), {
1731
+ class: _(i.thumbClass)
1722
1732
  }, null, 8, ["class"])
1723
1733
  ]),
1724
1734
  _: 1
1725
1735
  }, 16, ["id", "name", "model-value", "class"])
1726
1736
  ], 2));
1727
1737
  }
1728
- }), zr = /* @__PURE__ */ g({
1738
+ }), Yr = /* @__PURE__ */ g({
1729
1739
  __name: "Switch",
1730
1740
  setup(t) {
1731
- return (s, e) => (u(), h(qr, {
1741
+ return (s, e) => (o(), m(Xr, {
1732
1742
  class: "flex flex-row items-center gap-1",
1733
1743
  "input-class": "disabled:opacity-50 disabled:cursor-not-allowed data-[state=checked]:bg-primary-600 data-[state=unchecked]:bg-gray-200 relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focusdisabled:opacity-50 disabled:cursor-not-allowed :ring-2 focus:ring-primary-600 focus:ring-offset-2 focus:outline-hidden",
1734
1744
  "thumb-class": "data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 pointer-events-none inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out"
1735
1745
  }));
1736
1746
  }
1737
- }), Rr = /* @__PURE__ */ g({
1747
+ }), Gr = /* @__PURE__ */ g({
1738
1748
  __name: "Debug",
1739
1749
  setup(t) {
1740
- return (s, e) => (u(), h(Lr, {
1750
+ return (s, e) => (o(), m(Jr, {
1741
1751
  "title-id": "debug-setting",
1742
1752
  title: s.$td("settings.debug", "Debugging"),
1743
1753
  description: s.$td("settings.debugDescription", "Enable debugging with [Eruda](https://eruda.liriliri.io/).")
1744
1754
  }, {
1745
1755
  default: f(() => [
1746
- p(zr, {
1756
+ d(Yr, {
1747
1757
  modelValue: s.$errors.debug,
1748
1758
  "onUpdate:modelValue": e[0] || (e[0] = (r) => s.$errors.debug = r),
1749
1759
  "aria-labelledby": "debug-setting"
@@ -1752,85 +1762,78 @@ const $r = E({ name: "zondicons-cheveron-down", render: wr }), vt = /* @__PURE__
1752
1762
  _: 1
1753
1763
  }, 8, ["title", "description"]));
1754
1764
  }
1755
- }), Pr = [
1765
+ }), en = [
1756
1766
  {
1757
1767
  priority: 10,
1758
- component: Rr
1768
+ component: Gr
1759
1769
  }
1760
- ], bt = [];
1761
- function wl(t) {
1762
- bt.push(t);
1770
+ ], Ht = [];
1771
+ function Pl(t) {
1772
+ Ht.push(t);
1763
1773
  }
1764
- function yt(t) {
1765
- for (const s of bt) {
1774
+ function Vt(t) {
1775
+ for (const s of Ht) {
1766
1776
  const e = s(t);
1767
1777
  if (e)
1768
1778
  return e;
1769
1779
  }
1770
- return typeof t == "string" ? t : t instanceof Error || t instanceof be ? t.message : ce(t) ? B(t.message ?? t.description ?? "Unknown error object") : S("errors.unknown", "Unknown Error");
1780
+ return typeof t == "string" ? t : t instanceof Error || t instanceof Ce ? t.message : he(t) ? j(t.message ?? t.description ?? "Unknown error object") : S("errors.unknown", "Unknown Error");
1771
1781
  }
1772
- class Ue extends be {
1782
+ class tt extends Ce {
1773
1783
  }
1774
- const Ar = { $errors: ut }, Dr = (t) => (ut.report(t), !0);
1775
- function jr(t, s = () => !1) {
1776
- const e = (r) => s(r) || Dr(r);
1777
- t.config.errorHandler = e, globalThis.onerror = (r, n, a, i, l) => e(l ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
1784
+ const tn = { $errors: $t }, sn = (t) => ($t.report(t), !0);
1785
+ function rn(t, s = () => !1) {
1786
+ const e = (r) => s(r) || sn(r);
1787
+ t.config.errorHandler = e, globalThis.onerror = (r, n, a, u, i) => e(i ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
1778
1788
  }
1779
- const Br = {
1789
+ const nn = {
1780
1790
  async install(t, s) {
1781
- jr(t, s.handleError), Pr.forEach((e) => A.addSetting(e)), await $e(t, Ar);
1791
+ rn(t, s.handleError), en.forEach((e) => A.addSetting(e)), await ke(t, tn);
1782
1792
  }
1783
- }, Fr = {
1793
+ }, an = {
1784
1794
  async install() {
1785
- Ee() && (globalThis.testingRuntime = {
1786
- on: (...t) => R.on(...t),
1795
+ ze() && (globalThis.testingRuntime = {
1796
+ on: (...t) => F.on(...t),
1787
1797
  service: (t) => A.service(t)
1788
1798
  });
1789
1799
  }
1790
- }, Ur = {
1800
+ }, ln = {
1791
1801
  viewBox: "0 0 20 20",
1792
1802
  width: "1.2em",
1793
1803
  height: "1.2em"
1794
1804
  };
1795
- function Or(t, s) {
1796
- return u(), b("svg", Ur, s[0] || (s[0] = [
1805
+ function on(t, s) {
1806
+ return o(), b("svg", ln, s[0] || (s[0] = [
1797
1807
  y("path", {
1798
1808
  fill: "currentColor",
1799
1809
  d: "M10 8.586L2.929 1.515L1.515 2.929L8.586 10l-7.071 7.071l1.414 1.414L10 11.414l7.071 7.071l1.414-1.414L11.414 10l7.071-7.071l-1.414-1.414z"
1800
1810
  }, null, -1)
1801
1811
  ]));
1802
1812
  }
1803
- const Nr = E({ name: "zondicons-close", render: Or }), Wr = /* @__PURE__ */ g({
1813
+ const un = V({ name: "zondicons-close", render: on }), cn = /* @__PURE__ */ g({
1804
1814
  __name: "HeadlessModal",
1805
1815
  props: {
1806
1816
  persistent: { type: Boolean },
1817
+ fullscreen: { type: Boolean },
1818
+ fullscreenMobile: { type: Boolean },
1807
1819
  title: {},
1808
1820
  titleHidden: { type: Boolean },
1809
1821
  description: {},
1810
1822
  descriptionHidden: { type: Boolean }
1811
1823
  },
1812
1824
  setup(t, { expose: s }) {
1813
- const e = U(null), { modal: r } = V(
1814
- "modal",
1815
- "could not obtain modal reference from <HeadlessModal>, did you render this component manually? Show it using $ui.modal() instead"
1816
- );
1817
- s({ close: i, $content: e });
1818
- const { forwardRef: n } = Ve(), a = U(!1);
1819
- le("$modalContentRef", e), tt("close-modal", async ({ id: l, result: d }) => {
1820
- l === r.id && await i(d);
1821
- });
1822
- async function i(l) {
1823
- a.value || (await R.emit("modal-will-close", { modal: r, result: l }), a.value = !0, await R.emit("modal-has-closed", { modal: r, result: l }));
1824
- }
1825
- return (l, d) => (u(), h(o(ws), {
1826
- ref: o(n),
1825
+ const e = N(null), { close: r } = Ae();
1826
+ s({ $content: e });
1827
+ const { forwardRef: n } = Re();
1828
+ return pe("$modalContentRef", e), (a, u) => (o(), m(l(Rs), {
1829
+ ref: l(n),
1827
1830
  open: "",
1828
- "onUpdate:open": d[0] || (d[0] = (v) => l.persistent || i())
1831
+ "onUpdate:open": u[0] || (u[0] = (i) => a.persistent || i || l(r)())
1829
1832
  }, {
1830
1833
  default: f(() => [
1831
- p(o($s), null, {
1834
+ d(l(qs), null, {
1832
1835
  default: f(() => [
1833
- w(l.$slots, "default", { close: i })
1836
+ $(a.$slots, "default", { close: l(r) })
1834
1837
  ]),
1835
1838
  _: 3
1836
1839
  })
@@ -1838,58 +1841,36 @@ const Nr = E({ name: "zondicons-close", render: Or }), Wr = /* @__PURE__ */ g({
1838
1841
  _: 3
1839
1842
  }, 512));
1840
1843
  }
1841
- }), wt = /* @__PURE__ */ g({
1842
- __name: "ModalContext",
1843
- props: {
1844
- modal: {},
1845
- childIndex: {}
1846
- },
1847
- setup(t) {
1848
- const s = t, e = c(() => {
1849
- const r = {};
1850
- for (const n in s.modal.properties)
1851
- r[n] = o(s.modal.properties[n]);
1852
- return r;
1853
- });
1854
- return le("modal", {
1855
- modal: Re(s, "modal"),
1856
- childIndex: Re(s, "childIndex")
1857
- }), (r, n) => (u(), h(W(r.modal.component), ne(ae(e.value)), null, 16));
1858
- }
1859
- }), Kr = /* @__PURE__ */ g({
1844
+ }), dn = /* @__PURE__ */ g({
1860
1845
  __name: "HeadlessModalContent",
1861
1846
  setup(t) {
1862
- const { childIndex: s = 0 } = V(
1863
- "modal",
1864
- "could not obtain modal reference from <HeadlessModalContent>, did you render this component manually? Show it using $ui.modal() instead"
1865
- ), e = Ns("$modalContentRef"), r = G("$contentRef"), n = c(() => z.modals[s] ?? null);
1866
- return Y(() => e.value = r.value), (a, i) => (u(), h(o(_s), { ref: "$contentRef" }, {
1847
+ const { child: s } = Ae(), e = lr("$modalContentRef"), r = te("$contentRef");
1848
+ return G(() => e.value = r.value), (n, a) => (o(), m(l(Ps), { ref: "$contentRef" }, {
1867
1849
  default: f(() => [
1868
- w(a.$slots, "default"),
1869
- n.value ? (u(), h(wt, {
1850
+ $(n.$slots, "default"),
1851
+ l(s) ? (o(), m(l(bs), {
1870
1852
  key: 0,
1871
- "child-index": o(s) + 1,
1872
- modal: n.value
1873
- }, null, 8, ["child-index", "modal"])) : T("", !0)
1853
+ is: l(s)
1854
+ }, null, 8, ["is"])) : E("", !0)
1874
1855
  ]),
1875
1856
  _: 3
1876
1857
  }, 512));
1877
1858
  }
1878
- }), Qr = /* @__PURE__ */ g({
1859
+ }), pn = /* @__PURE__ */ g({
1879
1860
  __name: "HeadlessModalDescription",
1880
1861
  props: {
1881
1862
  asChild: { type: Boolean },
1882
1863
  as: {}
1883
1864
  },
1884
1865
  setup(t) {
1885
- return (s, e) => (u(), h(o(xs), ne(ae(s.$props)), {
1866
+ return (s, e) => (o(), m(l(As), ce(de(s.$props)), {
1886
1867
  default: f(() => [
1887
- w(s.$slots, "default")
1868
+ $(s.$slots, "default")
1888
1869
  ]),
1889
1870
  _: 3
1890
1871
  }, 16));
1891
1872
  }
1892
- }), Jr = /* @__PURE__ */ g({
1873
+ }), fn = /* @__PURE__ */ g({
1893
1874
  __name: "HeadlessModalOverlay",
1894
1875
  props: {
1895
1876
  forceMount: { type: Boolean },
@@ -1897,34 +1878,33 @@ const Nr = E({ name: "zondicons-close", render: Or }), Wr = /* @__PURE__ */ g({
1897
1878
  as: {}
1898
1879
  },
1899
1880
  setup(t) {
1900
- return (s, e) => (u(), h(o(Cs), ne(ae(s.$props)), {
1881
+ return (s, e) => (o(), m(l(Ds), ce(de(s.$props)), {
1901
1882
  default: f(() => [
1902
- w(s.$slots, "default")
1883
+ $(s.$slots, "default")
1903
1884
  ]),
1904
1885
  _: 3
1905
1886
  }, 16));
1906
1887
  }
1907
- }), Zr = /* @__PURE__ */ g({
1888
+ }), mn = /* @__PURE__ */ g({
1908
1889
  __name: "HeadlessModalTitle",
1909
1890
  props: {
1910
1891
  asChild: { type: Boolean },
1911
1892
  as: {}
1912
1893
  },
1913
1894
  setup(t) {
1914
- return (s, e) => (u(), h(o(ks), ne(ae(s.$props)), {
1895
+ return (s, e) => (o(), m(l(Bs), ce(de(s.$props)), {
1915
1896
  default: f(() => [
1916
- w(s.$slots, "default")
1897
+ $(s.$slots, "default")
1917
1898
  ]),
1918
1899
  _: 3
1919
1900
  }, 16));
1920
1901
  }
1921
- }), Xr = {
1922
- key: 0,
1923
- class: "absolute top-0 right-0 hidden pt-3.5 pr-2.5 sm:block"
1924
- }, Yr = ["onClick"], Gr = { class: "sr-only" }, se = /* @__PURE__ */ g({
1902
+ }), hn = ["onClick"], gn = { class: "sr-only" }, me = fr(), ne = /* @__PURE__ */ g({
1925
1903
  __name: "Modal",
1926
1904
  props: {
1927
1905
  persistent: { type: Boolean },
1906
+ fullscreen: { type: Boolean },
1907
+ fullscreenMobile: { type: Boolean },
1928
1908
  title: {},
1929
1909
  titleHidden: { type: Boolean },
1930
1910
  description: {},
@@ -1934,117 +1914,132 @@ const Nr = E({ name: "zondicons-close", render: Or }), Wr = /* @__PURE__ */ g({
1934
1914
  closeHidden: { type: Boolean }
1935
1915
  },
1936
1916
  setup(t, { expose: s }) {
1937
- const e = N(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden"]);
1917
+ const e = K(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden", "fullscreen", "fullscreenMobile"]);
1938
1918
  s({
1939
- close: async (m) => {
1940
- var C;
1941
- return (C = a.value) == null ? void 0 : C.close(m);
1942
- },
1943
1919
  $content: c(() => {
1944
- var m;
1945
- return (m = a.value) == null ? void 0 : m.$content;
1920
+ var M;
1921
+ return (M = i.value) == null ? void 0 : M.$content;
1946
1922
  })
1947
1923
  });
1948
- const { forwardRef: r, currentRef: n } = Ve(), a = n, i = V("modal"), l = c(() => !i.modal.closing && i.childIndex === z.openModals.length), d = c(() => t.description ? {} : { "aria-describedby": void 0 }), v = c(() => M("max-h-[90vh] overflow-auto px-4 pb-4", { "pt-4": !t.title || t.titleHidden }, t.class)), $ = c(() => M(
1949
- "isolate fixed top-1/2 left-1/2 z-50 w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2",
1950
- "overflow-hidden rounded-lg bg-white text-left shadow-xl sm:max-w-lg",
1951
- "animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
1952
- "transition-[scale,opacity] will-change-[scale,opacity] duration-300",
1953
- {
1954
- "scale-50 opacity-0": !l.value,
1955
- "scale-100 opacity-100": l.value
1956
- },
1924
+ const { forwardRef: r, currentRef: n } = Re(), { id: a, visible: u } = Ae(), i = n, p = ct(), v = c(
1925
+ () => {
1926
+ var M;
1927
+ return u.value && ((M = le.value.toReversed().find((je) => je.visible.value)) == null ? void 0 : M.id) === a.value;
1928
+ }
1929
+ ), w = c(() => le.value.find((M) => M.visible.value)), h = c(() => le.value.some((M) => me.has(M))), k = c(() => t.description ? {} : { "aria-describedby": void 0 }), q = c(() => T(
1930
+ "overflow-auto px-4 pb-4 flex flex-col flex-1",
1931
+ { "pt-4": !t.title || t.titleHidden, "max-h-[90vh]": !Q.value },
1932
+ t.class
1933
+ )), Q = c(() => t.fullscreen || t.fullscreenMobile && P.mobile), Pt = c(() => T(
1934
+ "isolate fixed z-50 flex flex-col overflow-hidden bg-white text-left duration-300",
1935
+ Q.value ? [
1936
+ "inset-0 transition-[transform,translate] will-change-[transform,translate]",
1937
+ me.has(p.value) || "animate-[slide-in_var(--tw-duration)_ease-in-out]",
1938
+ v.value ? "translate-y-0" : "translate-y-full"
1939
+ ] : [
1940
+ "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full",
1941
+ "max-w-[calc(100%-2rem)] rounded-lg shadow-xl sm:max-w-lg",
1942
+ "transition-[scale,opacity] will-change-[scale,opacity]",
1943
+ me.has(p.value) || "animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
1944
+ v.value ? "scale-100 opacity-100" : "scale-50 opacity-0"
1945
+ ],
1957
1946
  t.wrapperClass
1958
1947
  ));
1959
- return tt("modal-will-close", async ({ modal: { id: m } }) => {
1960
- m === i.modal.id && await ue({ ms: 300 });
1961
- }), (m, C) => (u(), h(Wr, H(e, {
1962
- ref: (L) => o(r)(L),
1963
- persistent: m.persistent
1948
+ return rt(() => oe(500).then(() => me.add(p.value))), (M, je) => (o(), m(cn, H(e, {
1949
+ ref: (fe) => l(r)(fe),
1950
+ persistent: M.persistent
1964
1951
  }), {
1965
- default: f(({ close: L }) => [
1966
- p(Jr, {
1967
- class: k(["fixed inset-0 animate-[fade-in_var(--tw-duration)_ease-in-out] transition-opacity duration-300 will-change-[opacity]", {
1968
- "bg-black/30": o(i).childIndex === 1,
1969
- "opacity-0": o(i).childIndex === 1 && o(i).modal.closing
1970
- }])
1971
- }, null, 8, ["class"]),
1972
- p(Kr, H(d.value, { class: $.value }), {
1973
- default: f(() => [
1974
- !m.persistent && !m.closeHidden ? (u(), b("div", Xr, [
1975
- y("button", {
1976
- type: "button",
1977
- class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
1978
- onClick: (_e) => L()
1952
+ default: f(({ close: fe }) => {
1953
+ var Fe, Ue;
1954
+ return [
1955
+ d(fn, {
1956
+ class: _(["fixed inset-0 transition-opacity duration-300 will-change-[opacity]", {
1957
+ "animate-[fade-in_var(--tw-duration)_ease-in-out]": !h.value,
1958
+ "bg-black/30": ((Fe = w.value) == null ? void 0 : Fe.id) === l(a) || !w.value && ((Ue = l(le)[0]) == null ? void 0 : Ue.id) === l(a),
1959
+ "opacity-0": !w.value,
1960
+ hidden: Q.value
1961
+ }])
1962
+ }, null, 8, ["class"]),
1963
+ d(dn, H(k.value, { class: Pt.value }), {
1964
+ default: f(() => [
1965
+ !M.persistent && !M.closeHidden ? (o(), b("div", {
1966
+ key: 0,
1967
+ class: _(["absolute top-0 right-0 pt-3.5 pr-2.5", { "hidden sm:block": !Q.value }])
1979
1968
  }, [
1980
- y("span", Gr, x(m.$td("ui.close", "Close")), 1),
1981
- p(o(Nr), { class: "size-4" })
1982
- ], 8, Yr)
1983
- ])) : T("", !0),
1984
- m.title ? (u(), h(Zr, {
1985
- key: 1,
1986
- class: k(["px-4 pt-5 text-base font-semibold text-gray-900", {
1987
- "sr-only": m.titleHidden,
1988
- "pb-0": m.description && !m.descriptionHidden,
1989
- "pb-2": !m.description || m.descriptionHidden
1990
- }])
1991
- }, {
1992
- default: f(() => [
1993
- p(P, {
1994
- text: m.title,
1995
- inline: ""
1996
- }, null, 8, ["text"])
1997
- ]),
1998
- _: 1
1999
- }, 8, ["class"])) : T("", !0),
2000
- m.description ? (u(), h(Qr, {
2001
- key: 2,
2002
- class: k(["px-4 pt-1 pb-2", { "sr-only": m.descriptionHidden }])
2003
- }, {
2004
- default: f(() => [
2005
- p(P, {
2006
- text: m.description,
2007
- class: "text-sm leading-6 text-gray-500"
2008
- }, null, 8, ["text"])
2009
- ]),
2010
- _: 1
2011
- }, 8, ["class"])) : T("", !0),
2012
- y("div", {
2013
- class: k(v.value)
2014
- }, [
2015
- w(m.$slots, "default", { close: L })
2016
- ], 2)
2017
- ]),
2018
- _: 2
2019
- }, 1040, ["class"])
2020
- ]),
1969
+ y("button", {
1970
+ type: "button",
1971
+ class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
1972
+ onClick: (ul) => fe()
1973
+ }, [
1974
+ y("span", gn, x(M.$td("ui.close", "Close")), 1),
1975
+ d(l(un), { class: "size-4" })
1976
+ ], 8, hn)
1977
+ ], 2)) : E("", !0),
1978
+ M.title ? (o(), m(mn, {
1979
+ key: 1,
1980
+ class: _(["px-4 pt-5 text-base font-semibold text-gray-900", {
1981
+ "sr-only": M.titleHidden,
1982
+ "pb-0": M.description && !M.descriptionHidden,
1983
+ "pb-2": !M.description || M.descriptionHidden
1984
+ }])
1985
+ }, {
1986
+ default: f(() => [
1987
+ d(z, {
1988
+ text: M.title,
1989
+ inline: ""
1990
+ }, null, 8, ["text"])
1991
+ ]),
1992
+ _: 1
1993
+ }, 8, ["class"])) : E("", !0),
1994
+ M.description ? (o(), m(pn, {
1995
+ key: 2,
1996
+ class: _(["px-4 pt-1 pb-2", { "sr-only": M.descriptionHidden }])
1997
+ }, {
1998
+ default: f(() => [
1999
+ d(z, {
2000
+ text: M.description,
2001
+ class: "text-sm leading-6 text-gray-500"
2002
+ }, null, 8, ["text"])
2003
+ ]),
2004
+ _: 1
2005
+ }, 8, ["class"])) : E("", !0),
2006
+ y("div", {
2007
+ class: _(q.value)
2008
+ }, [
2009
+ $(M.$slots, "default", { close: fe })
2010
+ ], 2)
2011
+ ]),
2012
+ _: 2
2013
+ }, 1040, ["class"])
2014
+ ];
2015
+ }),
2021
2016
  _: 3
2022
2017
  }, 16, ["persistent"]));
2023
2018
  }
2024
2019
  });
2025
- function en(t) {
2020
+ function vn(t) {
2026
2021
  const s = c(() => t.title ?? S("ui.alert", "Alert")), e = c(() => !t.title);
2027
2022
  return { renderedTitle: s, titleHidden: e };
2028
2023
  }
2029
- const tn = /* @__PURE__ */ g({
2024
+ const bn = /* @__PURE__ */ g({
2030
2025
  __name: "AlertModal",
2031
2026
  props: {
2032
2027
  title: {},
2033
2028
  message: {}
2034
2029
  },
2035
2030
  setup(t, { expose: s }) {
2036
- const e = t, { renderedTitle: r, titleHidden: n } = en(e);
2037
- return s(), (a, i) => (u(), h(se, {
2038
- title: o(r),
2039
- "title-hidden": o(n)
2031
+ const e = t, { renderedTitle: r, titleHidden: n } = vn(e);
2032
+ return s(), (a, u) => (o(), m(ne, {
2033
+ title: l(r),
2034
+ "title-hidden": l(n)
2040
2035
  }, {
2041
2036
  default: f(() => [
2042
- p(P, { text: a.message }, null, 8, ["text"])
2037
+ d(z, { text: a.message }, null, 8, ["text"])
2043
2038
  ]),
2044
2039
  _: 1
2045
2040
  }, 8, ["title", "title-hidden"]));
2046
2041
  }
2047
- }), $t = /* @__PURE__ */ g({
2042
+ }), Lt = /* @__PURE__ */ g({
2048
2043
  __name: "Form",
2049
2044
  props: {
2050
2045
  form: {}
@@ -2053,39 +2048,36 @@ const tn = /* @__PURE__ */ g({
2053
2048
  setup(t, { emit: s }) {
2054
2049
  let e;
2055
2050
  const r = s;
2056
- return Y((n) => {
2051
+ return G((n) => {
2057
2052
  var a;
2058
2053
  e == null || e(), e = (a = t.form) == null ? void 0 : a.on("submit", () => r("submit")), n(() => e == null ? void 0 : e());
2059
- }), le("form", t.form), (n, a) => (u(), b("form", {
2060
- onSubmit: a[0] || (a[0] = We((i) => {
2061
- var l;
2062
- return (l = n.form) == null ? void 0 : l.submit();
2063
- }, ["prevent"]))
2054
+ }), pe("form", t.form), (n, a) => (o(), b("form", {
2055
+ onSubmit: a[0] || (a[0] = nt((u) => n.form ? n.form.submit() : n.$emit("submit"), ["prevent"]))
2064
2056
  }, [
2065
- w(n.$slots, "default")
2057
+ $(n.$slots, "default")
2066
2058
  ], 32));
2067
2059
  }
2068
2060
  });
2069
- function sn(t) {
2070
- const s = rt(
2061
+ function yn(t) {
2062
+ const s = ht(
2071
2063
  Object.entries(t.checkboxes ?? {}).reduce(
2072
- (i, [l, d]) => ({
2073
- [l]: {
2064
+ (u, [i, p]) => ({
2065
+ [i]: {
2074
2066
  type: "boolean",
2075
- default: d.default,
2076
- required: d.required ? "required" : void 0
2067
+ default: p.default,
2068
+ required: p.required ? "required" : void 0
2077
2069
  },
2078
- ...i
2070
+ ...u
2079
2071
  }),
2080
2072
  {}
2081
2073
  )
2082
2074
  ), e = c(() => t.title ?? S("ui.confirm", "Confirm")), r = c(() => !t.title), n = c(() => t.acceptText ?? S("ui.accept", "Ok")), a = c(() => t.cancelText ?? S("ui.cancel", "Cancel"));
2083
2075
  return { form: s, renderedTitle: e, titleHidden: r, renderedAcceptText: n, renderedCancelText: a };
2084
2076
  }
2085
- const rn = {
2077
+ const wn = {
2086
2078
  key: 0,
2087
2079
  class: "mt-4 flex flex-col text-sm text-gray-600"
2088
- }, nn = { class: "flex items-center" }, an = ["onUpdate:modelValue", "required"], ln = { class: "ml-1.5" }, on = { class: "mt-4 flex flex-row-reverse gap-2" }, un = /* @__PURE__ */ g({
2080
+ }, $n = { class: "flex items-center" }, _n = ["onUpdate:modelValue", "required"], Cn = { class: "ml-1.5" }, xn = { class: "mt-4 flex flex-row-reverse gap-2" }, Sn = /* @__PURE__ */ g({
2089
2081
  __name: "ConfirmModal",
2090
2082
  props: {
2091
2083
  title: {},
@@ -2098,55 +2090,56 @@ const rn = {
2098
2090
  actions: {},
2099
2091
  required: { type: Boolean }
2100
2092
  },
2093
+ emits: ["close"],
2101
2094
  setup(t, { expose: s }) {
2102
- const e = N(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: i, renderedCancelText: l } = sn(e);
2103
- return s(), (d, v) => (u(), h(se, {
2104
- title: o(n),
2105
- "title-hidden": o(a),
2095
+ const e = K(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: u, renderedCancelText: i } = yn(e);
2096
+ return s(), (p, v) => (o(), m(ne, {
2097
+ title: l(n),
2098
+ "title-hidden": l(a),
2106
2099
  persistent: ""
2107
2100
  }, {
2108
- default: f(({ close: $ }) => [
2109
- p($t, {
2110
- form: o(r),
2111
- onSubmit: (m) => $([!0, o(r).data()])
2101
+ default: f(({ close: w }) => [
2102
+ d(Lt, {
2103
+ form: l(r),
2104
+ onSubmit: (h) => w([!0, l(r).data()])
2112
2105
  }, {
2113
2106
  default: f(() => [
2114
- p(P, {
2115
- text: d.message,
2116
- actions: d.actions
2107
+ d(z, {
2108
+ text: p.message,
2109
+ actions: p.actions
2117
2110
  }, null, 8, ["text", "actions"]),
2118
- d.checkboxes ? (u(), b("ul", rn, [
2119
- (u(!0), b(D, null, F(d.checkboxes, (m, C) => (u(), b("li", { key: C }, [
2120
- y("label", nn, [
2121
- Ke(y("input", {
2122
- "onUpdate:modelValue": (L) => o(r)[C] = L,
2111
+ p.checkboxes ? (o(), b("ul", wn, [
2112
+ (o(!0), b(D, null, U(p.checkboxes, (h, k) => (o(), b("li", { key: k }, [
2113
+ y("label", $n, [
2114
+ at(y("input", {
2115
+ "onUpdate:modelValue": (q) => l(r)[k] = q,
2123
2116
  type: "checkbox",
2124
- required: m.required,
2117
+ required: h.required,
2125
2118
  class: "border-primary-600 text-primary-600 hover:bg-primary-50 hover:checked:bg-primary-500 focus:ring-primary-600 focus-visible:ring-primary-600 rounded border-2"
2126
- }, null, 8, an), [
2127
- [qt, o(r)[C]]
2119
+ }, null, 8, _n), [
2120
+ [Kt, l(r)[k]]
2128
2121
  ]),
2129
- y("span", ln, x(m.label), 1)
2122
+ y("span", Cn, x(h.label), 1)
2130
2123
  ])
2131
2124
  ]))), 128))
2132
- ])) : T("", !0),
2133
- y("div", on, [
2134
- p(q, {
2135
- variant: d.acceptVariant,
2125
+ ])) : E("", !0),
2126
+ y("div", xn, [
2127
+ d(I, {
2128
+ variant: p.acceptVariant,
2136
2129
  submit: ""
2137
2130
  }, {
2138
2131
  default: f(() => [
2139
- I(x(o(i)), 1)
2132
+ L(x(l(u)), 1)
2140
2133
  ]),
2141
2134
  _: 1
2142
2135
  }, 8, ["variant"]),
2143
- d.required ? T("", !0) : (u(), h(q, {
2136
+ p.required ? E("", !0) : (o(), m(I, {
2144
2137
  key: 0,
2145
- variant: d.cancelVariant,
2146
- onClick: (m) => $(!1)
2138
+ variant: p.cancelVariant,
2139
+ onClick: (h) => w(!1)
2147
2140
  }, {
2148
2141
  default: f(() => [
2149
- I(x(o(l)), 1)
2142
+ L(x(l(i)), 1)
2150
2143
  ]),
2151
2144
  _: 2
2152
2145
  }, 1032, ["variant", "onClick"]))
@@ -2158,85 +2151,85 @@ const rn = {
2158
2151
  _: 1
2159
2152
  }, 8, ["title", "title-hidden"]));
2160
2153
  }
2161
- }), cn = {
2154
+ }), kn = {
2162
2155
  viewBox: "0 0 20 20",
2163
2156
  width: "1.2em",
2164
2157
  height: "1.2em"
2165
2158
  };
2166
- function dn(t, s) {
2167
- return u(), b("svg", cn, s[0] || (s[0] = [
2159
+ function Tn(t, s) {
2160
+ return o(), b("svg", kn, s[0] || (s[0] = [
2168
2161
  y("path", {
2169
2162
  fill: "currentColor",
2170
2163
  d: "M7.05 9.293L6.343 10L12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"
2171
2164
  }, null, -1)
2172
2165
  ]));
2173
2166
  }
2174
- const pn = E({ name: "zondicons-cheveron-left", render: dn }), mn = {
2167
+ const Mn = V({ name: "zondicons-cheveron-left", render: Tn }), En = {
2175
2168
  viewBox: "0 0 20 20",
2176
2169
  width: "1.2em",
2177
2170
  height: "1.2em"
2178
2171
  };
2179
- function fn(t, s) {
2180
- return u(), b("svg", mn, s[0] || (s[0] = [
2172
+ function Hn(t, s) {
2173
+ return o(), b("svg", En, s[0] || (s[0] = [
2181
2174
  y("path", {
2182
2175
  fill: "currentColor",
2183
2176
  d: "m12.95 10.707l.707-.707L8 4.343L6.586 5.757L10.828 10l-4.242 4.243L8 15.657z"
2184
2177
  }, null, -1)
2185
2178
  ]));
2186
2179
  }
2187
- const _t = E({ name: "zondicons-cheveron-right", render: fn }), hn = {
2180
+ const It = V({ name: "zondicons-cheveron-right", render: Hn }), Vn = {
2188
2181
  viewBox: "0 0 20 20",
2189
2182
  width: "1.2em",
2190
2183
  height: "1.2em"
2191
2184
  };
2192
- function gn(t, s) {
2193
- return u(), b("svg", hn, s[0] || (s[0] = [
2185
+ function Ln(t, s) {
2186
+ return o(), b("svg", Vn, s[0] || (s[0] = [
2194
2187
  y("path", {
2195
2188
  fill: "currentColor",
2196
2189
  d: "M2.93 17.07A10 10 0 1 1 17.07 2.93A10 10 0 0 1 2.93 17.07M9 5v6h2V5zm0 8v2h2v-2z"
2197
2190
  }, null, -1)
2198
2191
  ]));
2199
2192
  }
2200
- const qe = E({ name: "zondicons-exclamation-solid", render: gn }), vn = {
2193
+ const De = V({ name: "zondicons-exclamation-solid", render: Ln }), In = {
2201
2194
  viewBox: "0 0 24 24",
2202
2195
  width: "1.2em",
2203
2196
  height: "1.2em"
2204
2197
  };
2205
- function bn(t, s) {
2206
- return u(), b("svg", vn, s[0] || (s[0] = [
2198
+ function zn(t, s) {
2199
+ return o(), b("svg", In, s[0] || (s[0] = [
2207
2200
  y("path", {
2208
2201
  fill: "currentColor",
2209
2202
  d: "M20 19V7H4v12zm0-16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm-7 14v-2h5v2zm-3.42-4L5.57 9H8.4l3.3 3.3c.39.39.39 1.03 0 1.42L8.42 17H5.59z"
2210
2203
  }, null, -1)
2211
2204
  ]));
2212
2205
  }
2213
- const yn = E({ name: "mdi-console", render: bn }), wn = {
2206
+ const Rn = V({ name: "mdi-console", render: zn }), qn = {
2214
2207
  viewBox: "0 0 20 20",
2215
2208
  width: "1.2em",
2216
2209
  height: "1.2em"
2217
2210
  };
2218
- function $n(t, s) {
2219
- return u(), b("svg", wn, s[0] || (s[0] = [
2211
+ function Pn(t, s) {
2212
+ return o(), b("svg", qn, s[0] || (s[0] = [
2220
2213
  y("path", {
2221
2214
  fill: "currentColor",
2222
2215
  d: "M6 6V2c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2zm2 0h4a2 2 0 0 1 2 2v4h4V2H8zM2 8v10h10V8z"
2223
2216
  }, null, -1)
2224
2217
  ]));
2225
2218
  }
2226
- const _n = E({ name: "zondicons-copy", render: $n }), xn = {
2219
+ const An = V({ name: "zondicons-copy", render: Pn }), Dn = {
2227
2220
  viewBox: "0 0 24 24",
2228
2221
  width: "1.2em",
2229
2222
  height: "1.2em"
2230
2223
  };
2231
- function Cn(t, s) {
2232
- return u(), b("svg", xn, s[0] || (s[0] = [
2224
+ function Bn(t, s) {
2225
+ return o(), b("svg", Dn, s[0] || (s[0] = [
2233
2226
  y("path", {
2234
2227
  fill: "currentColor",
2235
2228
  d: "M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
2236
2229
  }, null, -1)
2237
2230
  ]));
2238
2231
  }
2239
- const kn = E({ name: "mdi-github", render: Cn }), Sn = { class: "flex" }, Tn = { class: "sr-only" }, Mn = /* @__PURE__ */ g({
2232
+ const jn = V({ name: "mdi-github", render: Bn }), Fn = { class: "flex" }, Un = { class: "sr-only" }, On = /* @__PURE__ */ g({
2240
2233
  __name: "ErrorReportModalButtons",
2241
2234
  props: {
2242
2235
  report: {}
@@ -2245,13 +2238,13 @@ const kn = E({ name: "mdi-github", render: Cn }), Sn = { class: "flex" }, Tn = {
2245
2238
  const s = t, e = c(() => s.report.description ? `${s.report.title}: ${s.report.description}` : s.report.title), r = c(() => {
2246
2239
  if (!A.sourceUrl)
2247
2240
  return !1;
2248
- const a = encodeURIComponent(e.value), i = encodeURIComponent(
2241
+ const a = encodeURIComponent(e.value), u = encodeURIComponent(
2249
2242
  [
2250
2243
  "[Please, explain here what you were trying to do when this error appeared]",
2251
2244
  "",
2252
2245
  "Error details:",
2253
2246
  "```",
2254
- Jt(
2247
+ ls(
2255
2248
  s.report.details ?? "Details missing from report",
2256
2249
  1800 - a.length - A.sourceUrl.length
2257
2250
  ).trim(),
@@ -2259,26 +2252,26 @@ const kn = E({ name: "mdi-github", render: Cn }), Sn = { class: "flex" }, Tn = {
2259
2252
  ].join(`
2260
2253
  `)
2261
2254
  );
2262
- return `${A.sourceUrl}/issues/new?title=${a}&body=${i}`;
2263
- }), n = c(() => ee(
2255
+ return `${A.sourceUrl}/issues/new?title=${a}&body=${u}`;
2256
+ }), n = c(() => se(
2264
2257
  [
2265
2258
  {
2266
2259
  id: "clipboard",
2267
2260
  description: "Copy to clipboard",
2268
- iconComponent: _n,
2261
+ iconComponent: An,
2269
2262
  async click() {
2270
2263
  await navigator.clipboard.writeText(`${e.value}
2271
2264
 
2272
- ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information copied to clipboard"));
2265
+ ${s.report.details}`), P.toast(S("errors.copiedToClipboard", "Debug information copied to clipboard"));
2273
2266
  }
2274
2267
  },
2275
2268
  {
2276
2269
  id: "console",
2277
2270
  description: "Log to console",
2278
- iconComponent: yn,
2271
+ iconComponent: Rn,
2279
2272
  click() {
2280
2273
  const a = s.report.error ?? s.report;
2281
- window.error = a, console.error(a), z.toast(
2274
+ window.error = a, console.error(a), P.toast(
2282
2275
  S(
2283
2276
  "errors.addedToConsole",
2284
2277
  "You can now use the **error** variable in the console"
@@ -2291,24 +2284,24 @@ ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information
2291
2284
  r.value && a.push({
2292
2285
  id: "github",
2293
2286
  description: "Report in GitHub",
2294
- iconComponent: kn,
2287
+ iconComponent: jn,
2295
2288
  url: r.value
2296
2289
  });
2297
2290
  }
2298
2291
  ));
2299
- return (a, i) => (u(), b("div", Sn, [
2300
- (u(!0), b(D, null, F(n.value, (l) => w(a.$slots, "default", H({ ref_for: !0 }, l), () => [
2301
- p(q, {
2292
+ return (a, u) => (o(), b("div", Fn, [
2293
+ (o(!0), b(D, null, U(n.value, (i) => $(a.$slots, "default", H({ ref_for: !0 }, i), () => [
2294
+ d(I, {
2302
2295
  size: "icon",
2303
2296
  variant: "ghost",
2304
2297
  class: "group whitespace-nowrap",
2305
- href: l.url,
2306
- title: a.$td(`errors.report_${l.id}`, l.description),
2307
- onClick: l.click
2298
+ href: i.url,
2299
+ title: a.$td(`errors.report_${i.id}`, i.description),
2300
+ onClick: i.click
2308
2301
  }, {
2309
2302
  default: f(() => [
2310
- y("span", Tn, x(a.$td(`errors.report_${l.id}`, l.description)), 1),
2311
- (u(), h(W(l.iconComponent), {
2303
+ y("span", Un, x(a.$td(`errors.report_${i.id}`, i.description)), 1),
2304
+ (o(), m(ee(i.iconComponent), {
2312
2305
  class: "size-4",
2313
2306
  "aria-hidden": "true"
2314
2307
  }))
@@ -2318,7 +2311,7 @@ ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information
2318
2311
  ])), 256))
2319
2312
  ]));
2320
2313
  }
2321
- }), Hn = /* @__PURE__ */ g({
2314
+ }), Nn = /* @__PURE__ */ g({
2322
2315
  __name: "ErrorReportModalTitle",
2323
2316
  props: {
2324
2317
  report: {},
@@ -2327,17 +2320,17 @@ ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information
2327
2320
  },
2328
2321
  setup(t) {
2329
2322
  const s = c(() => !t.totalReports || t.totalReports <= 1 ? t.report.title : `${t.report.title} (${t.currentReport}/${t.totalReports})`);
2330
- return (e, r) => (u(), h(P, {
2323
+ return (e, r) => (o(), m(z, {
2331
2324
  text: s.value,
2332
2325
  inline: ""
2333
2326
  }, null, 8, ["text"]));
2334
2327
  }
2335
2328
  });
2336
- function En(t) {
2337
- const s = U(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = c(() => t.reports[s.value]), r = c(
2329
+ function Wn(t) {
2330
+ const s = N(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = c(() => t.reports[s.value]), r = c(
2338
2331
  () => {
2339
- var i;
2340
- return ((i = e.value.details) == null ? void 0 : i.trim()) || S("errors.detailsEmpty", "This error is missing a stacktrace.");
2332
+ var u;
2333
+ return ((u = e.value.details) == null ? void 0 : u.trim()) || S("errors.detailsEmpty", "This error is missing a stacktrace.");
2341
2334
  }
2342
2335
  ), n = S("errors.previousReport", "Show previous report"), a = S("errors.nextReport", "Show next report");
2343
2336
  return {
@@ -2348,92 +2341,92 @@ function En(t) {
2348
2341
  activeReport: e
2349
2342
  };
2350
2343
  }
2351
- const Vn = { class: "px-4 pt-5 pb-4" }, Ln = { class: "flex justify-between gap-4" }, In = { class: "flex items-center gap-2" }, qn = {
2344
+ const Kn = { class: "px-4 pt-5 pb-4" }, Qn = { class: "flex justify-between gap-4" }, Jn = { class: "flex items-center gap-2" }, Zn = {
2352
2345
  key: 0,
2353
2346
  class: "flex gap-0.5"
2354
- }, zn = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, Rn = ["textContent"], Pn = /* @__PURE__ */ g({
2347
+ }, Xn = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, Yn = ["textContent"], Gn = /* @__PURE__ */ g({
2355
2348
  __name: "ErrorReportModal",
2356
2349
  props: {
2357
2350
  report: {},
2358
2351
  reports: {}
2359
2352
  },
2360
2353
  setup(t, { expose: s }) {
2361
- const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: i, activeReport: l } = En(e);
2362
- return s(), (d, v) => (u(), h(se, {
2363
- title: d.$td("errors.report", "Error report"),
2354
+ const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: u, activeReport: i } = Wn(e);
2355
+ return s(), (p, v) => (o(), m(ne, {
2356
+ title: p.$td("errors.report", "Error report"),
2364
2357
  "title-hidden": "",
2365
2358
  "close-hidden": "",
2366
2359
  class: "p-0",
2367
2360
  "wrapper-class": "sm:w-auto sm:min-w-lg sm:max-w-[80vw]"
2368
2361
  }, {
2369
2362
  default: f(() => [
2370
- y("div", Vn, [
2371
- y("h2", Ln, [
2372
- y("div", In, [
2373
- p(o(qe), { class: "size-5 text-red-600" }),
2374
- p(Hn, {
2363
+ y("div", Kn, [
2364
+ y("h2", Qn, [
2365
+ y("div", Jn, [
2366
+ d(l(De), { class: "size-5 text-red-600" }),
2367
+ d(Nn, {
2375
2368
  class: "text-lg leading-6 font-semibold text-gray-900",
2376
- report: o(l),
2377
- "current-report": o(r) + 1,
2378
- "total-reports": d.reports.length
2369
+ report: l(i),
2370
+ "current-report": l(r) + 1,
2371
+ "total-reports": p.reports.length
2379
2372
  }, null, 8, ["report", "current-report", "total-reports"]),
2380
- d.reports.length > 1 ? (u(), b("span", qn, [
2381
- p(q, {
2373
+ p.reports.length > 1 ? (o(), b("span", Zn, [
2374
+ d(I, {
2382
2375
  size: "icon",
2383
2376
  variant: "ghost",
2384
- disabled: o(r) === 0,
2385
- "aria-label": o(i),
2386
- title: o(i),
2387
- onClick: v[0] || (v[0] = ($) => r.value--)
2377
+ disabled: l(r) === 0,
2378
+ "aria-label": l(u),
2379
+ title: l(u),
2380
+ onClick: v[0] || (v[0] = (w) => r.value--)
2388
2381
  }, {
2389
2382
  default: f(() => [
2390
- p(o(pn), { class: "size-4" })
2383
+ d(l(Mn), { class: "size-4" })
2391
2384
  ]),
2392
2385
  _: 1
2393
2386
  }, 8, ["disabled", "aria-label", "title"]),
2394
- p(q, {
2387
+ d(I, {
2395
2388
  size: "icon",
2396
2389
  variant: "ghost",
2397
- disabled: o(r) === d.reports.length - 1,
2398
- "aria-label": o(a),
2399
- title: o(a),
2400
- onClick: v[1] || (v[1] = ($) => r.value++)
2390
+ disabled: l(r) === p.reports.length - 1,
2391
+ "aria-label": l(a),
2392
+ title: l(a),
2393
+ onClick: v[1] || (v[1] = (w) => r.value++)
2401
2394
  }, {
2402
2395
  default: f(() => [
2403
- p(o(_t), { class: "size-4" })
2396
+ d(l(It), { class: "size-4" })
2404
2397
  ]),
2405
2398
  _: 1
2406
2399
  }, 8, ["disabled", "aria-label", "title"])
2407
- ])) : T("", !0)
2400
+ ])) : E("", !0)
2408
2401
  ]),
2409
- p(Mn, {
2410
- report: o(l),
2402
+ d(On, {
2403
+ report: l(i),
2411
2404
  class: "gap-0.5"
2412
2405
  }, null, 8, ["report"])
2413
2406
  ]),
2414
- o(l).description ? (u(), h(P, {
2407
+ l(i).description ? (o(), m(z, {
2415
2408
  key: 0,
2416
- text: o(l).description,
2409
+ text: l(i).description,
2417
2410
  class: "text-gray-600"
2418
- }, null, 8, ["text"])) : T("", !0)
2411
+ }, null, 8, ["text"])) : E("", !0)
2419
2412
  ]),
2420
- y("div", zn, [
2413
+ y("div", Xn, [
2421
2414
  y("pre", {
2422
2415
  class: "p-4 text-xs text-red-800",
2423
- textContent: x(o(n))
2424
- }, null, 8, Rn)
2416
+ textContent: x(l(n))
2417
+ }, null, 8, Yn)
2425
2418
  ])
2426
2419
  ]),
2427
2420
  _: 1
2428
2421
  }, 8, ["title"]));
2429
2422
  }
2430
- }), An = {
2423
+ }), ea = {
2431
2424
  viewBox: "0 0 24 24",
2432
2425
  width: "1.2em",
2433
2426
  height: "1.2em"
2434
2427
  };
2435
- function Dn(t, s) {
2436
- return u(), b("svg", An, s[0] || (s[0] = [
2428
+ function ta(t, s) {
2429
+ return o(), b("svg", ea, s[0] || (s[0] = [
2437
2430
  y("path", {
2438
2431
  fill: "currentColor",
2439
2432
  d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
@@ -2453,40 +2446,50 @@ function Dn(t, s) {
2453
2446
  ], -1)
2454
2447
  ]));
2455
2448
  }
2456
- const jn = E({ name: "svg-spinners-90-ring-with-bg", render: Dn }), Bn = { class: "mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, Fn = { class: "sr-only" }, Un = /* @__PURE__ */ g({
2449
+ const sa = V({ name: "svg-spinners-90-ring-with-bg", render: ta }), ra = { class: "relative mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, na = { class: "sr-only" }, aa = /* @__PURE__ */ g({
2457
2450
  __name: "ProgressBar",
2458
2451
  props: {
2459
2452
  filledClass: {},
2453
+ overflowClass: {},
2460
2454
  progress: {},
2461
2455
  job: {}
2462
2456
  },
2463
2457
  setup(t) {
2464
2458
  let s;
2465
- const e = U(0), r = c(() => M("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = c(() => typeof t.progress == "number" ? t.progress : e.value);
2466
- return Me(
2459
+ const e = N(0), r = c(() => T("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = c(() => T(
2460
+ "absolute inset-y-0 right-0 size-full rounded-r-full border-l-3 border-gray-200",
2461
+ "bg-primary-900 transition-[width] duration-500 ease-linear",
2462
+ t.overflowClass
2463
+ )), a = c(() => typeof t.progress == "number" ? t.progress : e.value), u = c(() => a.value > 1 ? 100 * ((a.value - 1) / a.value) : null);
2464
+ return Le(
2467
2465
  () => t.job,
2468
2466
  () => {
2469
- s && s(), e.value = t.job ? t.job.progress : 0, s = t.job && t.job.listeners.add({ onUpdated: (a) => e.value = a });
2467
+ s && s(), e.value = t.job ? t.job.progress : 0, s = t.job && t.job.listeners.add({ onUpdated: (i) => e.value = i });
2470
2468
  },
2471
2469
  { immediate: !0 }
2472
- ), ge(() => s && s()), (a, i) => (u(), b("div", Bn, [
2470
+ ), $e(() => s && s()), (i, p) => (o(), b("div", ra, [
2473
2471
  y("div", {
2474
- class: k(r.value),
2475
- style: zt(`transform:translateX(-${(1 - n.value) * 100}%)`)
2472
+ class: _(r.value),
2473
+ style: Oe(`transform:translateX(-${(1 - a.value) * 100}%)`)
2476
2474
  }, null, 6),
2477
- y("span", Fn, x(a.$td("ui.progress", "{progress}% complete", {
2478
- progress: n.value * 100
2475
+ u.value ? (o(), b("div", {
2476
+ key: 0,
2477
+ class: _(n.value),
2478
+ style: Oe({ width: `${u.value}%` })
2479
+ }, null, 6)) : E("", !0),
2480
+ y("span", na, x(i.$td("ui.progress", "{progress}% complete", {
2481
+ progress: a.value * 100
2479
2482
  })), 1)
2480
2483
  ]));
2481
2484
  }
2482
2485
  });
2483
- function On(t) {
2486
+ function la(t) {
2484
2487
  const s = c(() => t.title ?? S("ui.loading", "Loading")), e = c(
2485
2488
  () => t.message ?? S("ui.loadingInProgress", "Loading in progress...")
2486
2489
  ), r = c(() => typeof t.progress == "number" || !!t.job), n = c(() => !t.title);
2487
2490
  return { renderedTitle: s, renderedMessage: e, titleHidden: n, showProgress: r };
2488
2491
  }
2489
- const Nn = /* @__PURE__ */ g({
2492
+ const oa = /* @__PURE__ */ g({
2490
2493
  __name: "LoadingModal",
2491
2494
  props: {
2492
2495
  title: {},
@@ -2495,30 +2498,30 @@ const Nn = /* @__PURE__ */ g({
2495
2498
  job: {}
2496
2499
  },
2497
2500
  setup(t, { expose: s }) {
2498
- const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: i } = On(e);
2499
- return s(), (l, d) => (u(), h(se, {
2501
+ const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: u } = la(e);
2502
+ return s(), (i, p) => (o(), m(ne, {
2500
2503
  persistent: "",
2501
- class: k(["flex", { "flex-col-reverse": o(i), "items-center justify-center gap-2": !o(i) }]),
2502
2504
  "wrapper-class": "w-auto",
2503
- title: o(r),
2504
- "title-hidden": o(a)
2505
+ title: l(r),
2506
+ "title-hidden": l(a),
2507
+ class: _({ "flex-col-reverse": l(u), "flex-row items-center justify-center gap-2": !l(u) })
2505
2508
  }, {
2506
2509
  default: f(() => [
2507
- o(i) ? (u(), h(Un, {
2510
+ l(u) ? (o(), m(aa, {
2508
2511
  key: 0,
2509
- progress: l.progress,
2510
- job: l.job,
2512
+ progress: i.progress,
2513
+ job: i.job,
2511
2514
  class: "min-w-[min(400px,80vw)]"
2512
- }, null, 8, ["progress", "job"])) : (u(), h(o(jn), {
2515
+ }, null, 8, ["progress", "job"])) : (o(), m(l(sa), {
2513
2516
  key: 1,
2514
2517
  class: "text-primary-600 mr-1 size-6"
2515
2518
  })),
2516
- p(P, { text: o(n) }, null, 8, ["text"])
2519
+ d(z, { text: l(n) }, null, 8, ["text"])
2517
2520
  ]),
2518
2521
  _: 1
2519
2522
  }, 8, ["title", "title-hidden", "class"]));
2520
2523
  }
2521
- }), ze = /* @__PURE__ */ g({
2524
+ }), Be = /* @__PURE__ */ g({
2522
2525
  __name: "HeadlessInput",
2523
2526
  props: {
2524
2527
  name: {},
@@ -2529,128 +2532,133 @@ const Nn = /* @__PURE__ */ g({
2529
2532
  },
2530
2533
  emits: ["update:modelValue"],
2531
2534
  setup(t, { expose: s, emit: e }) {
2532
- const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), i = {
2533
- id: `input-${re()}`,
2535
+ const r = e, n = Y("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = {
2536
+ id: `input-${ue()}`,
2534
2537
  name: c(() => t.name),
2535
2538
  label: c(() => t.label),
2536
2539
  description: c(() => t.description),
2537
2540
  value: c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
2538
- errors: ve(a),
2541
+ errors: _e(a),
2539
2542
  required: c(() => {
2540
2543
  if (!(!t.name || !n))
2541
2544
  return n.getFieldRules(t.name).includes("required");
2542
2545
  }),
2543
- update(l) {
2546
+ update(i) {
2544
2547
  if (n && t.name) {
2545
- n.setFieldValue(t.name, l);
2548
+ n.setFieldValue(t.name, i);
2546
2549
  return;
2547
2550
  }
2548
- r("update:modelValue", l);
2551
+ r("update:modelValue", i);
2549
2552
  }
2550
2553
  };
2551
- return le("input", i), s(i), (l, d) => (u(), h(W(l.as), null, {
2554
+ return pe("input", u), s(u), (i, p) => (o(), m(ee(i.as), null, {
2552
2555
  default: f(() => [
2553
- w(l.$slots, "default")
2556
+ $(i.$slots, "default")
2554
2557
  ]),
2555
2558
  _: 3
2556
2559
  }));
2557
2560
  }
2558
- }), Wn = ["for"], fe = /* @__PURE__ */ g({
2561
+ }), ia = ["for"], ye = /* @__PURE__ */ g({
2559
2562
  __name: "HeadlessInputLabel",
2560
2563
  setup(t) {
2561
- const s = V("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = He(), r = c(() => !!(s.label || e.default));
2562
- return (n, a) => r.value ? (u(), b("label", {
2564
+ const s = R("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = Ie(), r = c(() => !!(s.label || e.default));
2565
+ return (n, a) => r.value ? (o(), b("label", {
2563
2566
  key: 0,
2564
- for: o(s).id
2567
+ for: l(s).id
2565
2568
  }, [
2566
- w(n.$slots, "default", {}, () => [
2567
- I(x(o(s).label), 1)
2569
+ $(n.$slots, "default", {}, () => [
2570
+ L(x(l(s).label), 1)
2568
2571
  ])
2569
- ], 8, Wn)) : T("", !0);
2572
+ ], 8, ia)) : E("", !0);
2570
2573
  }
2571
- }), Kn = ["id", "name", "checked", "type", "required", "aria-invalid", "aria-describedby"], xt = /* @__PURE__ */ g({
2574
+ }), ua = ["id", "name", "checked", "type", "required", "aria-invalid", "aria-describedby"], zt = /* @__PURE__ */ g({
2572
2575
  __name: "HeadlessInputInput",
2573
2576
  props: {
2574
2577
  type: {}
2575
2578
  },
2576
2579
  setup(t) {
2577
- const s = G("$inputRef"), e = V("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = X("form", null), n = c(() => e.name ?? void 0), a = c(() => e.value), i = c(() => {
2580
+ const s = te("$inputRef"), e = R("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = Y("form", null), n = c(() => e.name ?? void 0), a = c(() => e.value), u = c(() => {
2578
2581
  if (t.type)
2579
2582
  return t.type;
2580
- const $ = (n.value && (r == null ? void 0 : r.getFieldType(n.value))) ?? "";
2581
- return ["text", "email", "number", "tel", "url"].includes($) ? $ : "text";
2582
- }), l = c(() => {
2583
- if (t.type === "checkbox")
2583
+ const w = (n.value && (r == null ? void 0 : r.getFieldType(n.value))) ?? "";
2584
+ return ["text", "email", "number", "tel", "url"].includes(w) ? w : "text";
2585
+ }), i = c(() => {
2586
+ if (u.value === "checkbox")
2584
2587
  return !!a.value;
2585
2588
  });
2586
- function d() {
2589
+ function p() {
2587
2590
  s.value && e.update(v());
2588
2591
  }
2589
2592
  function v() {
2590
2593
  if (!s.value)
2591
2594
  return null;
2592
- switch (t.type) {
2595
+ switch (u.value) {
2593
2596
  case "checkbox":
2594
2597
  return s.value.checked;
2595
2598
  case "date":
2596
- return s.value.valueAsDate;
2599
+ case "time":
2600
+ case "datetime-local":
2601
+ return new Date(Math.round(s.value.valueAsNumber / 6e4) * 6e4 + Xe);
2602
+ case "number":
2603
+ return s.value.valueAsNumber;
2597
2604
  default:
2598
2605
  return s.value.value;
2599
2606
  }
2600
2607
  }
2601
- return st(e, () => {
2602
- var $;
2603
- return ($ = s.value) == null ? void 0 : $.focus();
2604
- }), Y(() => {
2608
+ return mt(e, () => {
2609
+ var w;
2610
+ return (w = s.value) == null ? void 0 : w.focus();
2611
+ }), G(() => {
2605
2612
  if (s.value) {
2606
- if (t.type === "date" && a.value instanceof Date) {
2607
- s.value.valueAsDate = a.value;
2613
+ if (["date", "time", "datetime-local"].includes(u.value) && a.value instanceof Date) {
2614
+ const w = Math.round(a.value.getTime() / 6e4) * 6e4;
2615
+ s.value.valueAsNumber = w - Xe, e.update(new Date(w));
2608
2616
  return;
2609
2617
  }
2610
2618
  s.value.value = a.value ?? null;
2611
2619
  }
2612
- }), ($, m) => (u(), b("input", {
2613
- id: o(e).id,
2620
+ }), (w, h) => (o(), b("input", {
2621
+ id: l(e).id,
2614
2622
  ref: "$inputRef",
2615
2623
  name: n.value,
2616
- checked: l.value,
2617
- type: i.value,
2618
- required: o(e).required ?? void 0,
2619
- "aria-invalid": o(e).errors ? "true" : "false",
2620
- "aria-describedby": o(e).errors ? `${o(e).id}-error` : o(e).description ? `${o(e).id}-description` : void 0,
2621
- onInput: d
2622
- }, null, 40, Kn));
2623
- }
2624
- }), Ct = /* @__PURE__ */ g({
2624
+ checked: i.value,
2625
+ type: u.value,
2626
+ required: l(e).required ?? void 0,
2627
+ "aria-invalid": l(e).errors ? "true" : "false",
2628
+ "aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
2629
+ onInput: p
2630
+ }, null, 40, ua));
2631
+ }
2632
+ }), Rt = /* @__PURE__ */ g({
2625
2633
  inheritAttrs: !1,
2626
2634
  __name: "HeadlessInputDescription",
2627
2635
  setup(t) {
2628
- const s = V(
2636
+ const s = R(
2629
2637
  "input",
2630
2638
  "<HeadlessInputDescription> must be a child of a <HeadlessInput>"
2631
2639
  ), e = c(() => typeof s.description == "string" ? s.description : ""), r = c(() => !!s.description);
2632
- return (n, a) => w(n.$slots, "default", {
2633
- id: `${o(s).id}-description`
2640
+ return (n, a) => $(n.$slots, "default", {
2641
+ id: `${l(s).id}-description`
2634
2642
  }, () => [
2635
- r.value ? (u(), h(P, H({ key: 0 }, n.$attrs, {
2636
- id: `${o(s).id}-description`,
2643
+ r.value ? (o(), m(z, H({ key: 0 }, n.$attrs, {
2644
+ id: `${l(s).id}-description`,
2637
2645
  text: e.value
2638
- }), null, 16, ["id", "text"])) : T("", !0)
2646
+ }), null, 16, ["id", "text"])) : E("", !0)
2639
2647
  ]);
2640
2648
  }
2641
- }), Qn = ["id"], he = /* @__PURE__ */ g({
2649
+ }), ca = ["id"], we = /* @__PURE__ */ g({
2642
2650
  __name: "HeadlessInputError",
2643
2651
  setup(t) {
2644
- const s = V("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = c(() => s.errors ? S(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
2645
- return (r, n) => e.value ? (u(), b("p", {
2652
+ const s = R("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = c(() => s.errors ? S(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
2653
+ return (r, n) => e.value ? (o(), b("p", {
2646
2654
  key: 0,
2647
- id: `${o(s).id}-error`
2648
- }, x(e.value), 9, Qn)) : T("", !0);
2655
+ id: `${l(s).id}-error`
2656
+ }, x(e.value), 9, ca)) : E("", !0);
2649
2657
  }
2650
- }), Jn = {
2658
+ }), da = {
2651
2659
  key: 0,
2652
2660
  class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
2653
- }, Zn = /* @__PURE__ */ g({
2661
+ }, pa = /* @__PURE__ */ g({
2654
2662
  inheritAttrs: !1,
2655
2663
  __name: "Input",
2656
2664
  props: {
@@ -2659,65 +2667,71 @@ const Nn = /* @__PURE__ */ g({
2659
2667
  description: {},
2660
2668
  modelValue: {},
2661
2669
  inputClass: {},
2662
- wrapperClass: {}
2670
+ wrapperClass: {},
2671
+ descriptionClass: {},
2672
+ errorClass: {}
2663
2673
  },
2664
2674
  emits: ["update:modelValue"],
2665
2675
  setup(t) {
2666
- const s = N(t, ["label", "inputClass", "wrapperClass"]), e = G("$inputRef"), [r, n] = Ie(), a = c(() => M("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), i = c(() => {
2667
- var l, d, v;
2668
- return M(
2676
+ const s = K(t, ["label", "inputClass", "wrapperClass", "descriptionClass", "errorClass"]), e = te("$inputRef"), [r, n] = Pe(), a = c(() => T("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), u = c(() => T("mt-2 text-sm text-gray-600", t.descriptionClass)), i = c(() => T("mt-2 text-sm text-red-600", t.errorClass)), p = c(() => {
2677
+ var v, w, h;
2678
+ return T(
2669
2679
  // eslint-disable-next-line vue/max-len
2670
2680
  "block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
2671
2681
  {
2672
- "focus:ring-primary-600": !((l = e.value) != null && l.errors),
2673
- "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((d = e.value) != null && d.errors),
2674
- "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (v = e.value) == null ? void 0 : v.errors
2682
+ "focus:ring-primary-600": !((v = e.value) != null && v.errors),
2683
+ "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((w = e.value) != null && w.errors),
2684
+ "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (h = e.value) == null ? void 0 : h.errors
2675
2685
  },
2676
2686
  t.inputClass
2677
2687
  );
2678
2688
  });
2679
- return (l, d) => (u(), h(ze, H({
2689
+ return (v, w) => (o(), m(Be, H({
2680
2690
  ref: "$inputRef",
2681
- label: l.label,
2682
- class: o(n)
2691
+ label: v.label,
2692
+ class: l(n)
2683
2693
  }, s, {
2684
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
2694
+ "onUpdate:modelValue": w[0] || (w[0] = (h) => v.$emit("update:modelValue", h))
2685
2695
  }), {
2686
2696
  default: f(() => {
2687
- var v;
2697
+ var h;
2688
2698
  return [
2689
- p(fe, { class: "block text-sm leading-6 font-medium text-gray-900" }),
2699
+ d(ye, { class: "block text-sm leading-6 font-medium text-gray-900" }),
2690
2700
  y("div", {
2691
- class: k(a.value)
2701
+ class: _(a.value)
2692
2702
  }, [
2693
- p(xt, H(o(r), { class: i.value }), null, 16, ["class"]),
2694
- (v = e.value) != null && v.errors ? (u(), b("div", Jn, [
2695
- p(o(qe), { class: "size-5 text-red-500" })
2696
- ])) : T("", !0)
2703
+ d(zt, H(l(r), { class: p.value }), null, 16, ["class"]),
2704
+ (h = e.value) != null && h.errors ? (o(), b("div", da, [
2705
+ d(l(De), { class: "size-5 text-red-500" })
2706
+ ])) : E("", !0)
2697
2707
  ], 2),
2698
- p(Ct, { class: "mt-2 text-sm text-gray-600" }),
2699
- p(he, { class: "mt-2 text-sm text-red-600" })
2708
+ d(Rt, {
2709
+ class: _(u.value)
2710
+ }, null, 8, ["class"]),
2711
+ d(we, {
2712
+ class: _(i.value)
2713
+ }, null, 8, ["class"])
2700
2714
  ];
2701
2715
  }),
2702
2716
  _: 1
2703
2717
  }, 16, ["label", "class"]));
2704
2718
  }
2705
2719
  });
2706
- function $l(t, s = {}) {
2720
+ function Al(t, s = {}) {
2707
2721
  return {
2708
2722
  default: t,
2709
2723
  type: "boolean",
2710
2724
  rules: s.rules
2711
2725
  };
2712
2726
  }
2713
- function _l(t, s = {}) {
2727
+ function Dl(t, s = {}) {
2714
2728
  return {
2715
2729
  default: t,
2716
2730
  type: "date",
2717
2731
  rules: s.rules
2718
2732
  };
2719
2733
  }
2720
- function xl(t, s, e = {}) {
2734
+ function Bl(t, s, e = {}) {
2721
2735
  return {
2722
2736
  default: s,
2723
2737
  type: "enum",
@@ -2725,21 +2739,21 @@ function xl(t, s, e = {}) {
2725
2739
  values: t
2726
2740
  };
2727
2741
  }
2728
- function Cl(t) {
2742
+ function jl(t) {
2729
2743
  return {
2730
2744
  default: t,
2731
2745
  type: "boolean",
2732
2746
  rules: "required"
2733
2747
  };
2734
2748
  }
2735
- function kl(t) {
2749
+ function Fl(t) {
2736
2750
  return {
2737
2751
  default: t,
2738
2752
  type: "date",
2739
2753
  rules: "required"
2740
2754
  };
2741
2755
  }
2742
- function Sl(t, s) {
2756
+ function Ul(t, s) {
2743
2757
  return {
2744
2758
  default: s,
2745
2759
  type: "enum",
@@ -2747,55 +2761,55 @@ function Sl(t, s) {
2747
2761
  values: t
2748
2762
  };
2749
2763
  }
2750
- function Tl(t) {
2764
+ function Ol(t) {
2751
2765
  return {
2752
2766
  default: t,
2753
2767
  type: "number",
2754
2768
  rules: "required"
2755
2769
  };
2756
2770
  }
2757
- function Ml(t) {
2771
+ function Nl(t) {
2758
2772
  return {
2759
2773
  default: t,
2760
2774
  type: "object",
2761
2775
  rules: "required"
2762
2776
  };
2763
2777
  }
2764
- function Xn(t) {
2778
+ function fa(t) {
2765
2779
  return {
2766
2780
  default: t,
2767
2781
  type: "string",
2768
2782
  rules: "required"
2769
2783
  };
2770
2784
  }
2771
- function Hl(t, s = {}) {
2785
+ function Wl(t, s = {}) {
2772
2786
  return {
2773
2787
  default: t,
2774
2788
  type: "number",
2775
2789
  rules: s.rules
2776
2790
  };
2777
2791
  }
2778
- function El(t, s = {}) {
2792
+ function Kl(t, s = {}) {
2779
2793
  return {
2780
2794
  default: t,
2781
2795
  type: "object",
2782
2796
  rules: s.rules
2783
2797
  };
2784
2798
  }
2785
- function Vl(t, s = {}) {
2799
+ function Ql(t, s = {}) {
2786
2800
  return {
2787
2801
  default: t,
2788
2802
  type: "string",
2789
2803
  rules: s.rules
2790
2804
  };
2791
2805
  }
2792
- function Yn(t) {
2793
- const s = rt({
2794
- draft: Xn(t.defaultValue ?? "")
2806
+ function ma(t) {
2807
+ const s = ht({
2808
+ draft: fa(t.defaultValue ?? "")
2795
2809
  }), e = c(() => t.title ?? t.message), r = c(() => t.title ? t.message : null), n = c(() => t.acceptText ?? S("ui.accept", "Ok")), a = c(() => t.cancelText ?? S("ui.cancel", "Cancel"));
2796
2810
  return { form: s, renderedTitle: e, renderedMessage: r, renderedAcceptText: n, renderedCancelText: a };
2797
2811
  }
2798
- const Gn = { class: "mt-4 flex flex-row-reverse gap-2" }, ea = /* @__PURE__ */ g({
2812
+ const ha = { class: "mt-4 flex flex-row-reverse gap-2" }, ga = /* @__PURE__ */ g({
2799
2813
  __name: "PromptModal",
2800
2814
  props: {
2801
2815
  title: {},
@@ -2808,44 +2822,45 @@ const Gn = { class: "mt-4 flex flex-row-reverse gap-2" }, ea = /* @__PURE__ */ g
2808
2822
  cancelText: {},
2809
2823
  cancelVariant: { default: "secondary" }
2810
2824
  },
2825
+ emits: ["close"],
2811
2826
  setup(t, { expose: s }) {
2812
- const e = N(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: i, renderedCancelText: l } = Yn(e);
2813
- return s(), (d, v) => (u(), h(se, {
2814
- title: o(n),
2827
+ const e = K(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: u, renderedCancelText: i } = ma(e);
2828
+ return s(), (p, v) => (o(), m(ne, {
2829
+ title: l(n),
2815
2830
  persistent: ""
2816
2831
  }, {
2817
- default: f(({ close: $ }) => [
2818
- p($t, {
2819
- form: o(r),
2820
- onSubmit: (m) => $(o(r).draft)
2832
+ default: f(({ close: w }) => [
2833
+ d(Lt, {
2834
+ form: l(r),
2835
+ onSubmit: (h) => w(l(r).draft)
2821
2836
  }, {
2822
2837
  default: f(() => [
2823
- o(a) ? (u(), h(P, {
2838
+ l(a) ? (o(), m(z, {
2824
2839
  key: 0,
2825
- text: o(a)
2826
- }, null, 8, ["text"])) : T("", !0),
2827
- p(Zn, {
2840
+ text: l(a)
2841
+ }, null, 8, ["text"])) : E("", !0),
2842
+ d(pa, {
2828
2843
  name: "draft",
2829
2844
  class: "mt-2",
2830
- placeholder: d.placeholder,
2831
- label: d.label
2845
+ placeholder: p.placeholder,
2846
+ label: p.label
2832
2847
  }, null, 8, ["placeholder", "label"]),
2833
- y("div", Gn, [
2834
- p(q, {
2835
- variant: d.acceptVariant,
2848
+ y("div", ha, [
2849
+ d(I, {
2850
+ variant: p.acceptVariant,
2836
2851
  submit: ""
2837
2852
  }, {
2838
2853
  default: f(() => [
2839
- I(x(o(i)), 1)
2854
+ L(x(l(u)), 1)
2840
2855
  ]),
2841
2856
  _: 1
2842
2857
  }, 8, ["variant"]),
2843
- p(q, {
2844
- variant: d.cancelVariant,
2845
- onClick: (m) => $()
2858
+ d(I, {
2859
+ variant: p.cancelVariant,
2860
+ onClick: (h) => w()
2846
2861
  }, {
2847
2862
  default: f(() => [
2848
- I(x(o(l)), 1)
2863
+ L(x(l(i)), 1)
2849
2864
  ]),
2850
2865
  _: 2
2851
2866
  }, 1032, ["variant", "onClick"])
@@ -2857,63 +2872,63 @@ const Gn = { class: "mt-4 flex flex-row-reverse gap-2" }, ea = /* @__PURE__ */ g
2857
2872
  _: 1
2858
2873
  }, 8, ["title"]));
2859
2874
  }
2860
- }), ta = {
2875
+ }), va = {
2861
2876
  viewBox: "0 0 24 24",
2862
2877
  width: "1.2em",
2863
2878
  height: "1.2em"
2864
2879
  };
2865
- function sa(t, s) {
2866
- return u(), b("svg", ta, s[0] || (s[0] = [
2880
+ function ba(t, s) {
2881
+ return o(), b("svg", va, s[0] || (s[0] = [
2867
2882
  y("path", {
2868
2883
  fill: "currentColor",
2869
2884
  d: "M12 21q-1.625 0-3.012-.8T6.8 18H4v-2h2.1q-.075-.5-.088-1T6 14H4v-2h2q0-.5.012-1t.088-1H4V8h2.8q.35-.575.788-1.075T8.6 6.05L7 4.4L8.4 3l2.15 2.15q.7-.225 1.425-.225t1.425.225L15.6 3L17 4.4l-1.65 1.65q.575.375 1.038.862T17.2 8H20v2h-2.1q.075.5.088 1T18 12h2v2h-2q0 .5-.013 1t-.087 1H20v2h-2.8q-.8 1.4-2.187 2.2T12 21m-2-5h4v-2h-4zm0-4h4v-2h-4z"
2870
2885
  }, null, -1)
2871
2886
  ]));
2872
2887
  }
2873
- const ra = E({ name: "material-symbols-bug-report", render: sa }), na = {
2888
+ const ya = V({ name: "material-symbols-bug-report", render: ba }), wa = {
2874
2889
  viewBox: "0 0 24 24",
2875
2890
  width: "1.2em",
2876
2891
  height: "1.2em"
2877
2892
  };
2878
- function aa(t, s) {
2879
- return u(), b("svg", na, s[0] || (s[0] = [
2893
+ function $a(t, s) {
2894
+ return o(), b("svg", wa, s[0] || (s[0] = [
2880
2895
  y("path", {
2881
2896
  fill: "currentColor",
2882
2897
  d: "M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zm5-7.1l1.9 1.9q.275.275.7.275t.7-.275t.275-.7t-.275-.7l-1.9-1.9l1.9-1.9q.275-.275.275-.7t-.275-.7t-.7-.275t-.7.275L12 11.1l-1.9-1.9q-.275-.275-.7-.275t-.7.275t-.275.7t.275.7l1.9 1.9l-1.9 1.9q-.275.275-.275.7t.275.7t.7.275t.7-.275z"
2883
2898
  }, null, -1)
2884
2899
  ]));
2885
2900
  }
2886
- const la = E({ name: "material-symbols-delete-forever-rounded", render: aa }), oa = {
2901
+ const _a = V({ name: "material-symbols-delete-forever-rounded", render: $a }), Ca = {
2887
2902
  viewBox: "0 0 24 24",
2888
2903
  width: "1.2em",
2889
2904
  height: "1.2em"
2890
2905
  };
2891
- function ia(t, s) {
2892
- return u(), b("svg", oa, s[0] || (s[0] = [
2906
+ function xa(t, s) {
2907
+ return o(), b("svg", Ca, s[0] || (s[0] = [
2893
2908
  y("path", {
2894
2909
  fill: "currentColor",
2895
2910
  d: "M11.25 13.5q.95 0 1.6-.65t.65-1.6t-.65-1.6t-1.6-.65t-1.6.65t-.65 1.6t.65 1.6t1.6.65m4.825 4l-2.625-2.625q-.5.325-1.062.475t-1.138.15q-1.775 0-3.012-1.237T7 11.25t1.238-3.012T11.25 7t3.013 1.238T15.5 11.25q0 .575-.162 1.138t-.488 1.062l2.65 2.65zM5 21q-.825 0-1.412-.587T3 19v-4h2v4h4v2zm10 0v-2h4v-4h2v4q0 .825-.587 1.413T19 21zM3 9V5q0-.825.588-1.412T5 3h4v2H5v4zm16 0V5h-4V3h4q.825 0 1.413.588T21 5v4z"
2896
2911
  }, null, -1)
2897
2912
  ]));
2898
2913
  }
2899
- const ua = E({ name: "material-symbols-frame-inspect", render: ia }), ca = {
2914
+ const Sa = V({ name: "material-symbols-frame-inspect", render: xa }), ka = {
2900
2915
  viewBox: "0 0 24 24",
2901
2916
  width: "1.2em",
2902
2917
  height: "1.2em"
2903
2918
  };
2904
- function da(t, s) {
2905
- return u(), b("svg", ca, s[0] || (s[0] = [
2919
+ function Ta(t, s) {
2920
+ return o(), b("svg", ka, s[0] || (s[0] = [
2906
2921
  y("path", {
2907
2922
  fill: "currentColor",
2908
2923
  d: "M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.712T19 4t.713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.712-.288T13 10t.288-.712T14 9h3.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12t1.75 4.25T12 18q1.7 0 3.113-.862t2.187-2.313q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20"
2909
2924
  }, null, -1)
2910
2925
  ]));
2911
2926
  }
2912
- const pa = E({ name: "material-symbols-refresh-rounded", render: da }), ma = { class: "grid grow place-items-center" }, fa = { class: "flex flex-col items-center p-8" }, ha = { class: "mt-0 mb-0 text-center text-4xl font-medium text-red-600" }, ga = { class: "mt-4 grid grid-cols-1 gap-2 sm:grid-cols-2 [&_button]:justify-start sm:[&_button]:size-32 sm:[&_button]:flex-col sm:[&_button]:justify-center [&_svg]:size-6 sm:[&_svg]:size-8" }, va = /* @__PURE__ */ g({
2927
+ const Ma = V({ name: "material-symbols-refresh-rounded", render: Ta }), Ea = { class: "grid grow place-items-center" }, Ha = { class: "flex flex-col items-center p-8" }, Va = { class: "mt-0 mb-0 text-center text-4xl font-medium text-red-600" }, La = { class: "mt-4 grid grid-cols-1 gap-2 sm:grid-cols-2 [&_button]:justify-start sm:[&_button]:size-32 sm:[&_button]:flex-col sm:[&_button]:justify-center [&_svg]:size-6 sm:[&_svg]:size-8" }, Ia = /* @__PURE__ */ g({
2913
2928
  __name: "StartupCrash",
2914
2929
  setup(t) {
2915
2930
  async function s() {
2916
- await z.confirm(
2931
+ await P.confirm(
2917
2932
  S("startupCrash.purgeConfirmTitle", "Delete everything?"),
2918
2933
  S(
2919
2934
  "startupCrash.purgeConfirmMessage",
@@ -2925,59 +2940,59 @@ Do you still want to proceed?`
2925
2940
  acceptVariant: "danger",
2926
2941
  acceptText: S("startupCrash.purgeConfirmAccept", "Purge device")
2927
2942
  }
2928
- ) && (await at.purge(), await A.reload());
2943
+ ) && (await vt.purge(), await A.reload());
2929
2944
  }
2930
2945
  return (e, r) => {
2931
- const n = Rt("i-majesticons-exclamation");
2932
- return u(), b("div", ma, [
2933
- y("div", fa, [
2934
- p(n, { class: "size-20 text-red-600" }),
2935
- y("h1", ha, x(e.$td("startupCrash.title", "Oops, something went wrong!")), 1),
2936
- p(P, {
2946
+ const n = Qt("i-majesticons-exclamation");
2947
+ return o(), b("div", Ea, [
2948
+ y("div", Ha, [
2949
+ d(n, { class: "size-20 text-red-600" }),
2950
+ y("h1", Va, x(e.$td("startupCrash.title", "Oops, something went wrong!")), 1),
2951
+ d(z, {
2937
2952
  text: e.$td(
2938
2953
  "startupCrash.message",
2939
2954
  "There was a problem starting the application, but here's some things you can do:"
2940
2955
  ),
2941
2956
  class: "mt-4 text-center"
2942
2957
  }, null, 8, ["text"]),
2943
- y("div", ga, [
2944
- p(q, {
2958
+ y("div", La, [
2959
+ d(I, {
2945
2960
  variant: "danger",
2946
2961
  onClick: r[0] || (r[0] = (a) => e.$app.reload())
2947
2962
  }, {
2948
2963
  default: f(() => [
2949
- p(o(pa)),
2950
- I(" " + x(e.$td("startupCrash.reload", "Try again")), 1)
2964
+ d(l(Ma)),
2965
+ L(" " + x(e.$td("startupCrash.reload", "Try again")), 1)
2951
2966
  ]),
2952
2967
  _: 1
2953
2968
  }),
2954
- p(q, {
2969
+ d(I, {
2955
2970
  variant: "danger",
2956
2971
  onClick: r[1] || (r[1] = (a) => e.$errors.inspect(e.$errors.startupErrors))
2957
2972
  }, {
2958
2973
  default: f(() => [
2959
- p(o(ra)),
2960
- I(" " + x(e.$td("startupCrash.inspect", "View error details")), 1)
2974
+ d(l(ya)),
2975
+ L(" " + x(e.$td("startupCrash.inspect", "View error details")), 1)
2961
2976
  ]),
2962
2977
  _: 1
2963
2978
  }),
2964
- p(q, {
2979
+ d(I, {
2965
2980
  variant: "danger",
2966
2981
  onClick: r[2] || (r[2] = (a) => s())
2967
2982
  }, {
2968
2983
  default: f(() => [
2969
- p(o(la)),
2970
- I(" " + x(e.$td("startupCrash.purge", "Purge device")), 1)
2984
+ d(l(_a)),
2985
+ L(" " + x(e.$td("startupCrash.purge", "Purge device")), 1)
2971
2986
  ]),
2972
2987
  _: 1
2973
2988
  }),
2974
- p(q, {
2989
+ d(I, {
2975
2990
  variant: "danger",
2976
2991
  onClick: r[3] || (r[3] = (a) => e.$errors.debug = !e.$errors.debug)
2977
2992
  }, {
2978
2993
  default: f(() => [
2979
- p(o(ua)),
2980
- I(" " + x(e.$td("startupCrash.debug", "Toggle debugging")), 1)
2994
+ d(l(Sa)),
2995
+ L(" " + x(e.$td("startupCrash.debug", "Toggle debugging")), 1)
2981
2996
  ]),
2982
2997
  _: 1
2983
2998
  })
@@ -2986,23 +3001,23 @@ Do you still want to proceed?`
2986
3001
  ]);
2987
3002
  };
2988
3003
  }
2989
- }), kt = /* @__PURE__ */ g({
3004
+ }), qt = /* @__PURE__ */ g({
2990
3005
  __name: "HeadlessToastAction",
2991
3006
  props: {
2992
3007
  action: {}
2993
3008
  },
2994
3009
  setup(t) {
2995
- return (s, e) => (u(), h(W(s.action.dismiss ? o(Ss) : "button"), {
3010
+ return (s, e) => (o(), m(ee(s.action.dismiss ? l(js) : "button"), {
2996
3011
  type: "button",
2997
3012
  onClick: s.action.click
2998
3013
  }, {
2999
3014
  default: f(() => [
3000
- I(x(s.action.label), 1)
3015
+ L(x(s.action.label), 1)
3001
3016
  ]),
3002
3017
  _: 1
3003
3018
  }, 8, ["onClick"]));
3004
3019
  }
3005
- }), ba = { key: 0 }, ya = /* @__PURE__ */ g({
3020
+ }), za = { key: 0 }, Ra = /* @__PURE__ */ g({
3006
3021
  __name: "HeadlessToast",
3007
3022
  props: {
3008
3023
  message: {},
@@ -3010,11 +3025,11 @@ Do you still want to proceed?`
3010
3025
  variant: {}
3011
3026
  },
3012
3027
  setup(t) {
3013
- return (s, e) => (u(), h(o(Ts), null, {
3028
+ return (s, e) => (o(), m(l(Fs), null, {
3014
3029
  default: f(() => [
3015
- w(s.$slots, "default", {}, () => [
3016
- s.message ? (u(), b("span", ba, x(s.message), 1)) : T("", !0),
3017
- (u(!0), b(D, null, F(s.actions, (r, n) => (u(), h(kt, {
3030
+ $(s.$slots, "default", {}, () => [
3031
+ s.message ? (o(), b("span", za, x(s.message), 1)) : E("", !0),
3032
+ (o(!0), b(D, null, U(s.actions, (r, n) => (o(), m(qt, {
3018
3033
  key: n,
3019
3034
  action: r
3020
3035
  }, null, 8, ["action"]))), 128))
@@ -3023,7 +3038,7 @@ Do you still want to proceed?`
3023
3038
  _: 3
3024
3039
  }));
3025
3040
  }
3026
- }), wa = /* @__PURE__ */ g({
3041
+ }), qa = /* @__PURE__ */ g({
3027
3042
  __name: "Toast",
3028
3043
  props: {
3029
3044
  message: {},
@@ -3032,14 +3047,15 @@ Do you still want to proceed?`
3032
3047
  class: {}
3033
3048
  },
3034
3049
  setup(t, { expose: s }) {
3035
- const e = c(() => et(
3050
+ const e = c(() => ft(
3036
3051
  { baseClasses: t.class, variant: t.variant },
3037
3052
  {
3038
3053
  baseClasses: "flex items-center gap-2 rounded-md p-2 ring-1 shadow-lg border-gray-200",
3039
3054
  variants: {
3040
3055
  variant: {
3041
3056
  secondary: "bg-gray-900 text-white ring-black",
3042
- danger: "bg-red-50 text-red-900 ring-red-100"
3057
+ danger: "bg-red-50 text-red-900 ring-red-100",
3058
+ warning: "bg-yellow-50 text-yellow-900 ring-yellow-100"
3043
3059
  }
3044
3060
  },
3045
3061
  defaultVariants: {
@@ -3047,134 +3063,141 @@ Do you still want to proceed?`
3047
3063
  }
3048
3064
  }
3049
3065
  ));
3050
- return s(), (r, n) => (u(), h(ya, {
3051
- class: k(e.value)
3066
+ return s(), (r, n) => (o(), m(Ra, {
3067
+ class: _(e.value)
3052
3068
  }, {
3053
3069
  default: f(() => [
3054
- r.message ? (u(), h(P, {
3070
+ r.message ? (o(), m(z, {
3055
3071
  key: 0,
3056
3072
  text: r.message,
3057
3073
  inline: ""
3058
- }, null, 8, ["text"])) : T("", !0),
3059
- (u(!0), b(D, null, F(r.actions, (a, i) => (u(), h(q, {
3060
- key: i,
3074
+ }, null, 8, ["text"])) : E("", !0),
3075
+ (o(!0), b(D, null, U(r.actions, (a, u) => (o(), m(I, {
3076
+ key: u,
3061
3077
  action: a,
3062
3078
  variant: r.variant,
3063
- as: kt
3079
+ as: qt
3064
3080
  }, null, 8, ["action", "variant"]))), 128))
3065
3081
  ]),
3066
3082
  _: 1
3067
3083
  }, 8, ["class"]));
3068
3084
  }
3069
- }), $a = { $ui: z }, _a = {
3085
+ }), Pa = { $ui: P }, Aa = {
3070
3086
  async install(t, s) {
3071
3087
  const e = {
3072
- "alert-modal": tn,
3073
- "confirm-modal": un,
3074
- "error-report-modal": Pn,
3075
- "loading-modal": Nn,
3076
- "prompt-modal": ea,
3077
- "startup-crash": va,
3078
- toast: wa,
3088
+ "alert-modal": bn,
3089
+ "confirm-modal": Sn,
3090
+ "error-report-modal": Gn,
3091
+ "loading-modal": oa,
3092
+ "prompt-modal": ga,
3093
+ "startup-crash": Ia,
3094
+ toast: qa,
3079
3095
  ...s.components
3080
3096
  };
3081
3097
  for (const [r, n] of Object.entries(e))
3082
- z.registerComponent(r, n);
3083
- await $e(t, $a);
3098
+ P.registerComponent(r, n);
3099
+ await ke(t, Pa);
3084
3100
  }
3085
3101
  };
3086
- async function xa(t, s = {}) {
3102
+ async function Da(t, s = {}) {
3087
3103
  var r;
3088
- const e = [Fr, ar, Br, Tr, ur, _a, ...s.plugins ?? []];
3089
- A.instance = t, await Fs(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await R.emit("application-ready");
3104
+ const e = [an, _r, nn, Or, kr, Aa, ...s.plugins ?? []];
3105
+ A.instance = t, await rr(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await F.emit("application-ready");
3090
3106
  }
3091
- async function Ll(t, s = {}) {
3107
+ async function Jl(t, s = {}) {
3092
3108
  var r;
3093
- const e = Pt(t);
3094
- J() && (window.$aerogel = e), await xa(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await R.emit("application-mounted");
3109
+ const e = Jt(t);
3110
+ Z() && (window.$aerogel = e), await Da(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await F.emit("application-mounted");
3095
3111
  }
3096
- const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3097
- __name: "AppModals",
3098
- setup(t) {
3099
- const s = c(() => z.modals[0] ?? null);
3100
- return (e, r) => s.value ? (u(), b("aside", Ca, [
3101
- p(wt, {
3102
- "child-index": 1,
3103
- modal: s.value
3104
- }, null, 8, ["modal"])
3105
- ])) : T("", !0);
3106
- }
3107
- }), Sa = /* @__PURE__ */ g({
3112
+ const Ba = /* @__PURE__ */ g({
3108
3113
  __name: "AppToasts",
3109
3114
  setup(t) {
3110
- return (s, e) => (u(), h(o(Ms), null, {
3115
+ return (s, e) => (o(), m(l(Us), null, {
3111
3116
  default: f(() => [
3112
- (u(!0), b(D, null, F(s.$ui.toasts, (r) => (u(), h(W(r.component), H({
3117
+ (o(!0), b(D, null, U(s.$ui.toasts, (r) => (o(), m(ee(r.component), H({
3113
3118
  id: r.id,
3114
- key: r.id,
3115
- ref_for: !0
3116
- }, r.properties), null, 16, ["id"]))), 128)),
3117
- p(o(Hs), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
3119
+ key: r.id
3120
+ }, { ref_for: !0 }, r.properties), null, 16, ["id"]))), 128)),
3121
+ d(l(Os), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
3118
3122
  ]),
3119
3123
  _: 1
3120
3124
  }));
3121
3125
  }
3122
- }), Ta = /* @__PURE__ */ g({
3126
+ }), ja = /* @__PURE__ */ g({
3123
3127
  __name: "AppOverlays",
3124
3128
  setup(t) {
3125
- return (s, e) => (u(), b(D, null, [
3126
- p(ka),
3127
- p(Sa)
3129
+ return (s, e) => (o(), b(D, null, [
3130
+ d(l(ys), { nested: "" }),
3131
+ d(Ba)
3128
3132
  ], 64));
3129
3133
  }
3130
- }), Ma = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, Il = /* @__PURE__ */ g({
3134
+ }), Fa = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, Zl = /* @__PURE__ */ g({
3131
3135
  __name: "AppLayout",
3132
3136
  setup(t) {
3133
- return (s, e) => (u(), b("div", Ma, [
3134
- s.$errors.hasStartupErrors ? w(s.$slots, "startup-crash", { key: 0 }, () => [
3135
- (u(), h(W(s.$ui.requireComponent("startup-crash"))))
3136
- ]) : w(s.$slots, "default", { key: 1 }),
3137
- p(Ta)
3137
+ return (s, e) => (o(), b("div", Fa, [
3138
+ s.$errors.hasStartupErrors ? $(s.$slots, "startup-crash", { key: 0 }, () => [
3139
+ (o(), m(ee(s.$ui.requireComponent("startup-crash"))))
3140
+ ]) : $(s.$slots, "default", { key: 1 }),
3141
+ d(ja)
3138
3142
  ]));
3139
3143
  }
3140
- }), Ha = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], Ea = /* @__PURE__ */ g({
3144
+ }), Ua = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], Oa = /* @__PURE__ */ g({
3141
3145
  __name: "HeadlessInputTextArea",
3142
3146
  setup(t) {
3143
- const s = G("$textAreaRef"), e = V(
3147
+ const s = te("$textAreaRef"), e = R(
3144
3148
  "input",
3145
3149
  "<HeadlessInputTextArea> must be a child of a <HeadlessInput>"
3146
3150
  ), r = c(() => e.name ?? void 0), n = c(() => e.value);
3147
3151
  function a() {
3148
3152
  s.value && e.update(s.value.value);
3149
3153
  }
3150
- return st(e, () => {
3151
- var i;
3152
- return (i = s.value) == null ? void 0 : i.focus();
3153
- }), (i, l) => (u(), b("textarea", {
3154
- id: o(e).id,
3154
+ return mt(e, () => {
3155
+ var u;
3156
+ return (u = s.value) == null ? void 0 : u.focus();
3157
+ }), (u, i) => (o(), b("textarea", {
3158
+ id: l(e).id,
3155
3159
  ref: "$textAreaRef",
3156
3160
  name: r.value,
3157
3161
  value: n.value,
3158
- required: o(e).required ?? void 0,
3159
- "aria-invalid": o(e).errors ? "true" : "false",
3160
- "aria-describedby": o(e).errors ? `${o(e).id}-error` : o(e).description ? `${o(e).id}-description` : void 0,
3162
+ required: l(e).required ?? void 0,
3163
+ "aria-invalid": l(e).errors ? "true" : "false",
3164
+ "aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
3161
3165
  onInput: a
3162
- }, null, 40, Ha));
3166
+ }, null, 40, Ua));
3163
3167
  }
3164
- }), Va = { class: "group" }, La = { class: "-ml-2 flex w-[max-content] items-center rounded-lg py-2 pr-3 pl-1 hover:bg-gray-100 focus-visible:outline focus-visible:outline-gray-700" }, Ia = { class: "pt-2 pl-4" }, ql = /* @__PURE__ */ g({
3165
- __name: "AdvancedOptions",
3168
+ }), Na = { class: "group" }, Wa = { class: "-ml-2 flex w-[max-content] items-center rounded-lg py-2 pr-3 pl-1 hover:bg-gray-100 focus-visible:outline focus-visible:outline-gray-700" }, Ka = /* @__PURE__ */ g({
3169
+ __name: "Details",
3170
+ props: {
3171
+ label: {},
3172
+ contentClass: {}
3173
+ },
3166
3174
  setup(t) {
3167
- return (s, e) => (u(), b("details", Va, [
3168
- y("summary", La, [
3169
- p(o(_t), { class: "size-6 transition-transform group-open:rotate-90" }),
3170
- y("span", null, x(s.$td("ui.advancedOptions", "Advanced options")), 1)
3175
+ const s = c(() => T("pt-2 pl-4", t.contentClass));
3176
+ return (e, r) => (o(), b("details", Na, [
3177
+ y("summary", Wa, [
3178
+ d(l(It), { class: "size-6 transition-transform group-open:rotate-90" }),
3179
+ y("span", null, x(e.label), 1)
3171
3180
  ]),
3172
- y("div", Ia, [
3173
- w(s.$slots, "default")
3174
- ])
3181
+ y("div", {
3182
+ class: _(s.value)
3183
+ }, [
3184
+ $(e.$slots, "default")
3185
+ ], 2)
3175
3186
  ]));
3176
3187
  }
3177
- }), qa = { class: "flex h-6 items-center" }, zl = /* @__PURE__ */ g({
3188
+ }), Xl = /* @__PURE__ */ g({
3189
+ __name: "AdvancedOptions",
3190
+ setup(t) {
3191
+ return (s, e) => (o(), m(Ka, {
3192
+ label: s.$td("ui.advancedOptions", "Advanced options")
3193
+ }, {
3194
+ default: f(() => [
3195
+ $(s.$slots, "default")
3196
+ ]),
3197
+ _: 3
3198
+ }, 8, ["label"]));
3199
+ }
3200
+ }), Qa = { class: "flex h-6 items-center" }, Yl = /* @__PURE__ */ g({
3178
3201
  inheritAttrs: !1,
3179
3202
  __name: "Checkbox",
3180
3203
  props: {
@@ -3187,53 +3210,53 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3187
3210
  },
3188
3211
  emits: ["update:modelValue"],
3189
3212
  setup(t) {
3190
- const s = N(t, ["inputClass", "labelClass"]), e = G("$inputRef"), [r, n] = Ie(), a = c(() => M("relative flex items-start", n.value)), i = c(() => {
3191
- var d, v;
3192
- return M(
3213
+ const s = K(t, ["inputClass", "labelClass"]), e = te("$inputRef"), [r, n] = Pe(), a = c(() => T("relative flex items-start", n.value)), u = c(() => {
3214
+ var p, v;
3215
+ return T(
3193
3216
  "size-4 rounded text-primary-600 not-checked:hover:bg-gray-200 checked:hover:text-primary-500 checked:border-0",
3194
3217
  {
3195
- "border-gray-300 focus:ring-primary-600": !((d = e.value) != null && d.errors),
3218
+ "border-gray-300 focus:ring-primary-600": !((p = e.value) != null && p.errors),
3196
3219
  "border-red-400 border-2 focus:ring-red-600": (v = e.value) == null ? void 0 : v.errors
3197
3220
  },
3198
3221
  t.inputClass
3199
3222
  );
3200
- }), l = c(() => M("ml-2 text-sm leading-6", t.labelClass));
3201
- return (d, v) => (u(), h(ze, H({
3223
+ }), i = c(() => T("ml-2 text-sm leading-6", t.labelClass));
3224
+ return (p, v) => (o(), m(Be, H({
3202
3225
  ref: "$inputRef",
3203
3226
  class: a.value
3204
3227
  }, s, {
3205
- "onUpdate:modelValue": v[0] || (v[0] = ($) => d.$emit("update:modelValue", $))
3228
+ "onUpdate:modelValue": v[0] || (v[0] = (w) => p.$emit("update:modelValue", w))
3206
3229
  }), {
3207
3230
  default: f(() => [
3208
- y("div", qa, [
3209
- p(xt, H(o(r), {
3231
+ y("div", Qa, [
3232
+ d(zt, H(l(r), {
3210
3233
  type: "checkbox",
3211
- class: i.value
3234
+ class: u.value
3212
3235
  }), null, 16, ["class"])
3213
3236
  ]),
3214
- d.$slots.default ? (u(), b("div", {
3237
+ p.$slots.default ? (o(), b("div", {
3215
3238
  key: 0,
3216
- class: k(l.value)
3239
+ class: _(i.value)
3217
3240
  }, [
3218
- p(fe, { class: "text-gray-900" }, {
3241
+ d(ye, { class: "text-gray-900" }, {
3219
3242
  default: f(() => [
3220
- w(d.$slots, "default")
3243
+ $(p.$slots, "default")
3221
3244
  ]),
3222
3245
  _: 3
3223
3246
  }),
3224
- p(he, { class: "text-red-600" })
3225
- ], 2)) : d.label ? (u(), b("div", {
3247
+ d(we, { class: "text-red-600" })
3248
+ ], 2)) : p.label ? (o(), b("div", {
3226
3249
  key: 1,
3227
- class: k(l.value)
3250
+ class: _(i.value)
3228
3251
  }, [
3229
- p(fe, { class: "text-gray-900" }),
3230
- p(he, { class: "text-red-600" })
3231
- ], 2)) : T("", !0)
3252
+ d(ye, { class: "text-gray-900" }),
3253
+ d(we, { class: "text-red-600" })
3254
+ ], 2)) : E("", !0)
3232
3255
  ]),
3233
3256
  _: 3
3234
3257
  }, 16, ["class"]));
3235
3258
  }
3236
- }), za = /* @__PURE__ */ g({
3259
+ }), Ja = /* @__PURE__ */ g({
3237
3260
  __name: "DropdownMenuOption",
3238
3261
  props: {
3239
3262
  class: {},
@@ -3242,40 +3265,40 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3242
3265
  },
3243
3266
  emits: ["select"],
3244
3267
  setup(t) {
3245
- const s = N(t, ["class"]), e = c(() => M(
3268
+ const s = K(t, ["class"]), e = c(() => T(
3246
3269
  "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-gray-900 data-[highlighted]:bg-gray-100",
3247
3270
  t.class
3248
3271
  ));
3249
- return (r, n) => (u(), h(o(Es), H({ class: e.value }, s, {
3272
+ return (r, n) => (o(), m(l(Ns), H({ class: e.value }, s, {
3250
3273
  onSelect: n[0] || (n[0] = (a) => r.$emit("select"))
3251
3274
  }), {
3252
3275
  default: f(() => [
3253
- w(r.$slots, "default")
3276
+ $(r.$slots, "default")
3254
3277
  ]),
3255
3278
  _: 3
3256
3279
  }, 16, ["class"]));
3257
3280
  }
3258
- }), Ra = /* @__PURE__ */ g({
3281
+ }), Za = /* @__PURE__ */ g({
3259
3282
  __name: "DropdownMenuOptions",
3260
3283
  setup(t) {
3261
- const s = V(
3284
+ const s = R(
3262
3285
  "dropdown-menu",
3263
3286
  "<DropdownMenuOptions> must be a child of a <DropdownMenu>"
3264
3287
  );
3265
- return (e, r) => (u(), h(o(Vs), {
3288
+ return (e, r) => (o(), m(l(Ws), {
3266
3289
  class: "gap-y-0.5 rounded-lg bg-white p-1.5 shadow-lg ring-1 ring-black/5",
3267
- align: o(s).align,
3268
- side: o(s).side
3290
+ align: l(s).align,
3291
+ side: l(s).side
3269
3292
  }, {
3270
3293
  default: f(() => [
3271
- w(e.$slots, "default", {}, () => [
3272
- (u(!0), b(D, null, F(o(s).options, (n, a) => (u(), h(za, H(
3294
+ $(e.$slots, "default", {}, () => [
3295
+ (o(!0), b(D, null, U(l(s).options, (n, a) => (o(), m(Ja, H(
3273
3296
  {
3274
3297
  key: a,
3275
- as: n.route || n.href ? ct : void 0,
3276
- class: n.class,
3277
- ref_for: !0
3298
+ as: n.route || n.href ? _t : void 0,
3299
+ class: n.class
3278
3300
  },
3301
+ { ref_for: !0 },
3279
3302
  n.route || n.href ? {
3280
3303
  href: n.href,
3281
3304
  route: n.route,
@@ -3283,14 +3306,14 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3283
3306
  routeQuery: n.routeQuery
3284
3307
  } : {},
3285
3308
  {
3286
- onSelect: (i) => {
3287
- var l;
3288
- return (l = n.click) == null ? void 0 : l.call(n);
3309
+ onSelect: (u) => {
3310
+ var i;
3311
+ return (i = n.click) == null ? void 0 : i.call(n);
3289
3312
  }
3290
3313
  }
3291
3314
  ), {
3292
3315
  default: f(() => [
3293
- I(x(n.label), 1)
3316
+ L(x(n.label), 1)
3294
3317
  ]),
3295
3318
  _: 2
3296
3319
  }, 1040, ["as", "class", "onSelect"]))), 128))
@@ -3299,7 +3322,7 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3299
3322
  _: 3
3300
3323
  }, 8, ["align", "side"]));
3301
3324
  }
3302
- }), Rl = /* @__PURE__ */ g({
3325
+ }), Gl = /* @__PURE__ */ g({
3303
3326
  __name: "DropdownMenu",
3304
3327
  props: {
3305
3328
  align: {},
@@ -3315,18 +3338,18 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3315
3338
  return (r = t.options) == null ? void 0 : r.filter(Boolean);
3316
3339
  })
3317
3340
  };
3318
- return le("dropdown-menu", e), s(e), (r, n) => (u(), h(o(Ls), null, {
3341
+ return pe("dropdown-menu", e), s(e), (r, n) => (o(), m(l(Ks), null, {
3319
3342
  default: f(() => [
3320
- p(o(Is), null, {
3343
+ d(l(Qs), null, {
3321
3344
  default: f(() => [
3322
- w(r.$slots, "default")
3345
+ $(r.$slots, "default")
3323
3346
  ]),
3324
3347
  _: 3
3325
3348
  }),
3326
- p(o(qs), null, {
3349
+ d(l(Js), null, {
3327
3350
  default: f(() => [
3328
- w(r.$slots, "options", {}, () => [
3329
- p(Ra)
3351
+ $(r.$slots, "options", {}, () => [
3352
+ d(Za)
3330
3353
  ])
3331
3354
  ]),
3332
3355
  _: 3
@@ -3335,7 +3358,7 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3335
3358
  _: 3
3336
3359
  }));
3337
3360
  }
3338
- }), Pa = ["aria-hidden"], Aa = ["tabindex", "aria-label", "type"], Pl = /* @__PURE__ */ g({
3361
+ }), Xa = ["aria-hidden"], Ya = ["tabindex", "aria-label", "type"], eo = /* @__PURE__ */ g({
3339
3362
  __name: "EditableContent",
3340
3363
  props: {
3341
3364
  type: { default: "text" },
@@ -3348,106 +3371,106 @@ const Ca = { key: 0 }, ka = /* @__PURE__ */ g({
3348
3371
  },
3349
3372
  emits: ["update", "save"],
3350
3373
  setup(t, { emit: s }) {
3351
- const e = s, r = G("$inputRef"), n = U(null), a = U(t.text), i = c(() => M("inline whitespace-pre", t.contentClass)), l = c(() => M("invisible whitespace-pre", t.contentClass)), d = c(() => M("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
3374
+ const e = s, r = te("$inputRef"), n = N(null), a = N(t.text), u = c(() => T("inline whitespace-pre", t.contentClass)), i = c(() => T("invisible whitespace-pre", t.contentClass)), p = c(() => T("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
3352
3375
  function v() {
3353
3376
  n.value = t.text;
3354
3377
  }
3355
- function $() {
3378
+ function w() {
3356
3379
  n.value && (t.type !== "number" && a.value.trim().length === 0 && (a.value = n.value, e("update", a.value)), n.value = null, e("save"));
3357
3380
  }
3358
- return Y(() => a.value = t.text), (m, C) => (u(), b("div", {
3359
- class: k(["relative", { "pointer-events-none!": m.disabled && !n.value }])
3381
+ return G(() => a.value = t.text), (h, k) => (o(), b("div", {
3382
+ class: _(["relative", { "pointer-events-none!": h.disabled && !n.value }])
3360
3383
  }, [
3361
- n.value ? (u(), b("span", {
3384
+ n.value ? (o(), b("span", {
3362
3385
  key: 1,
3363
- class: k(l.value)
3364
- }, x(a.value), 3)) : (u(), b("div", {
3386
+ class: _(i.value)
3387
+ }, x(a.value), 3)) : (o(), b("div", {
3365
3388
  key: 0,
3366
- class: k(i.value)
3389
+ class: _(u.value)
3367
3390
  }, [
3368
- w(m.$slots, "default")
3391
+ $(h.$slots, "default")
3369
3392
  ], 2)),
3370
- m.type === "number" ? (u(), b("span", {
3393
+ h.type === "number" ? (o(), b("span", {
3371
3394
  key: 2,
3372
- class: k(["inline-block transition-[width]", n.value ? "w-5" : "w-0"])
3373
- }, null, 2)) : T("", !0),
3395
+ class: _(["inline-block transition-[width]", n.value ? "w-5" : "w-0"])
3396
+ }, null, 2)) : E("", !0),
3374
3397
  y("form", {
3375
3398
  class: "w-full",
3376
- "aria-hidden": m.formAriaHidden,
3377
- onSubmit: C[4] || (C[4] = We((L) => {
3378
- var _e;
3379
- return (_e = r.value) == null ? void 0 : _e.blur();
3399
+ "aria-hidden": h.formAriaHidden,
3400
+ onSubmit: k[4] || (k[4] = nt((q) => {
3401
+ var Q;
3402
+ return (Q = r.value) == null ? void 0 : Q.blur();
3380
3403
  }, ["prevent"]))
3381
3404
  }, [
3382
- Ke(y("input", {
3405
+ at(y("input", {
3383
3406
  ref: "$inputRef",
3384
- "onUpdate:modelValue": C[0] || (C[0] = (L) => a.value = L),
3385
- tabindex: m.tabindex ?? void 0,
3386
- "aria-label": m.ariaLabel ?? void 0,
3387
- type: m.type,
3388
- class: k([
3389
- d.value,
3390
- { "opacity-0": !n.value, "appearance-textfield": !n.value && m.type === "number" }
3407
+ "onUpdate:modelValue": k[0] || (k[0] = (q) => a.value = q),
3408
+ tabindex: h.tabindex ?? void 0,
3409
+ "aria-label": h.ariaLabel ?? void 0,
3410
+ type: h.type,
3411
+ class: _([
3412
+ p.value,
3413
+ { "opacity-0": !n.value, "appearance-textfield": !n.value && h.type === "number" }
3391
3414
  ]),
3392
- onKeyup: C[1] || (C[1] = (L) => m.$emit("update", a.value)),
3393
- onFocus: C[2] || (C[2] = (L) => v()),
3394
- onBlur: C[3] || (C[3] = (L) => $())
3395
- }, null, 42, Aa), [
3396
- [At, a.value]
3415
+ onKeyup: k[1] || (k[1] = (q) => h.$emit("update", a.value)),
3416
+ onFocus: k[2] || (k[2] = (q) => v()),
3417
+ onBlur: k[3] || (k[3] = (q) => w())
3418
+ }, null, 42, Ya), [
3419
+ [Zt, a.value]
3397
3420
  ])
3398
- ], 40, Pa)
3421
+ ], 40, Xa)
3399
3422
  ], 2));
3400
3423
  }
3401
- }), Da = {
3424
+ }), Ga = {
3402
3425
  viewBox: "0 0 512 512",
3403
3426
  width: "1.2em",
3404
3427
  height: "1.2em"
3405
3428
  };
3406
- function ja(t, s) {
3407
- return u(), b("svg", Da, s[0] || (s[0] = [
3429
+ function el(t, s) {
3430
+ return o(), b("svg", Ga, s[0] || (s[0] = [
3408
3431
  y("path", {
3409
3432
  fill: "currentColor",
3410
3433
  d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17m-198.6-1.83a20 20 0 1 1 20-20a20 20 0 0 1-20 20m21.72-201.15l-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7Z"
3411
3434
  }, null, -1)
3412
3435
  ]));
3413
3436
  }
3414
- const Ba = E({ name: "ion-warning", render: ja }), Fa = {
3437
+ const tl = V({ name: "ion-warning", render: el }), sl = {
3415
3438
  viewBox: "0 0 20 20",
3416
3439
  width: "1.2em",
3417
3440
  height: "1.2em"
3418
3441
  };
3419
- function Ua(t, s) {
3420
- return u(), b("svg", Fa, s[0] || (s[0] = [
3442
+ function rl(t, s) {
3443
+ return o(), b("svg", sl, s[0] || (s[0] = [
3421
3444
  y("path", {
3422
3445
  fill: "currentColor",
3423
3446
  d: "M.2 10a11 11 0 0 1 19.6 0A11 11 0 0 1 .2 10m9.8 4a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0-2a2 2 0 1 1 0-4a2 2 0 0 1 0 4"
3424
3447
  }, null, -1)
3425
3448
  ]));
3426
3449
  }
3427
- const Oa = E({ name: "zondicons-view-show", render: Ua }), Na = { class: "font-medium" }, Wa = ["datetime"], Ka = /* @__PURE__ */ g({
3450
+ const nl = V({ name: "zondicons-view-show", render: rl }), al = { class: "font-medium" }, ll = ["datetime"], ol = /* @__PURE__ */ g({
3428
3451
  __name: "ErrorLogsModal",
3429
3452
  setup(t) {
3430
- return (s, e) => (u(), h(se, {
3453
+ return (s, e) => (o(), m(ne, {
3431
3454
  title: s.$td("errors.report", "Errors ({count})", { count: s.$errors.logs.length })
3432
3455
  }, {
3433
3456
  default: f(() => [
3434
3457
  y("ol", null, [
3435
- (u(!0), b(D, null, F(s.$errors.logs, (r, n) => (u(), b("li", {
3458
+ (o(!0), b(D, null, U(s.$errors.logs, (r, n) => (o(), b("li", {
3436
3459
  key: n,
3437
3460
  class: "mb-2 flex max-w-prose min-w-56 justify-between py-2 last:mb-0"
3438
3461
  }, [
3439
3462
  y("div", null, [
3440
- y("h3", Na, x(r.report.title), 1),
3463
+ y("h3", al, x(r.report.title), 1),
3441
3464
  y("time", {
3442
3465
  datetime: r.date.toISOString(),
3443
3466
  class: "text-xs text-gray-700"
3444
- }, x(r.date.toLocaleTimeString()), 9, Wa),
3445
- p(P, {
3467
+ }, x(r.date.toLocaleTimeString()), 9, ll),
3468
+ d(z, {
3446
3469
  class: "text-sm text-gray-500",
3447
- text: r.report.description ?? o(yt)(r.report)
3470
+ text: r.report.description ?? l(Vt)(r.report)
3448
3471
  }, null, 8, ["text"])
3449
3472
  ]),
3450
- p(q, {
3473
+ d(I, {
3451
3474
  size: "icon",
3452
3475
  variant: "ghost",
3453
3476
  "aria-label": s.$td("errors.viewDetails", "View details"),
@@ -3455,11 +3478,11 @@ const Oa = E({ name: "zondicons-view-show", render: Ua }), Na = { class: "font-m
3455
3478
  class: "self-center",
3456
3479
  onClick: (a) => s.$errors.inspect(
3457
3480
  r.report,
3458
- s.$errors.logs.map(({ report: i }) => i)
3481
+ s.$errors.logs.map(({ report: u }) => u)
3459
3482
  )
3460
3483
  }, {
3461
3484
  default: f(() => [
3462
- p(o(Oa), {
3485
+ d(l(nl), {
3463
3486
  class: "size-4",
3464
3487
  "aria-hidden": "true"
3465
3488
  })
@@ -3472,36 +3495,36 @@ const Oa = E({ name: "zondicons-view-show", render: Ua }), Na = { class: "font-m
3472
3495
  _: 1
3473
3496
  }, 8, ["title"]));
3474
3497
  }
3475
- }), Al = /* @__PURE__ */ g({
3498
+ }), to = /* @__PURE__ */ g({
3476
3499
  __name: "ErrorLogs",
3477
3500
  setup(t) {
3478
- return (s, e) => s.$errors.logs.length > 0 ? (u(), h(q, {
3501
+ return (s, e) => s.$errors.logs.length > 0 ? (o(), m(I, {
3479
3502
  key: 0,
3480
3503
  size: "icon",
3481
3504
  variant: "ghost",
3482
3505
  title: s.$td("errors.viewLogs", "View error logs"),
3483
3506
  "aria-label": s.$td("errors.viewLogs", "View error logs"),
3484
- onClick: e[0] || (e[0] = (r) => s.$ui.modal(Ka))
3507
+ onClick: e[0] || (e[0] = (r) => s.$ui.modal(ol))
3485
3508
  }, {
3486
3509
  default: f(() => [
3487
- p(o(Ba), { class: "size-6 text-red-500" })
3510
+ d(l(tl), { class: "size-6 text-red-500" })
3488
3511
  ]),
3489
3512
  _: 1
3490
- }, 8, ["title", "aria-label"])) : T("", !0);
3513
+ }, 8, ["title", "aria-label"])) : E("", !0);
3491
3514
  }
3492
- }), Dl = /* @__PURE__ */ g({
3515
+ }), so = /* @__PURE__ */ g({
3493
3516
  __name: "ErrorMessage",
3494
3517
  props: {
3495
3518
  error: {}
3496
3519
  },
3497
3520
  setup(t) {
3498
- const s = c(() => yt(t.error));
3499
- return (e, r) => (u(), h(P, {
3521
+ const s = c(() => Vt(t.error));
3522
+ return (e, r) => (o(), m(z, {
3500
3523
  text: s.value,
3501
3524
  inline: ""
3502
3525
  }, null, 8, ["text"]));
3503
3526
  }
3504
- }), jl = /* @__PURE__ */ g({
3527
+ }), ro = /* @__PURE__ */ g({
3505
3528
  __name: "Link",
3506
3529
  props: {
3507
3530
  class: {},
@@ -3516,30 +3539,30 @@ const Oa = E({ name: "zondicons-view-show", render: Ua }), Na = { class: "font-m
3516
3539
  as: {}
3517
3540
  },
3518
3541
  setup(t) {
3519
- return (s, e) => (u(), h(q, H({ variant: "link" }, s.$props), {
3542
+ return (s, e) => (o(), m(I, H({ variant: "link" }, s.$props), {
3520
3543
  default: f(() => [
3521
- w(s.$slots, "default")
3544
+ $(s.$slots, "default")
3522
3545
  ]),
3523
3546
  _: 3
3524
3547
  }, 16));
3525
3548
  }
3526
- }), Bl = /* @__PURE__ */ g({
3549
+ }), no = /* @__PURE__ */ g({
3527
3550
  __name: "SettingsModal",
3528
3551
  setup(t) {
3529
- const s = c(() => Zt(A.settings, "priority", "desc"));
3530
- return (e, r) => (u(), h(se, {
3552
+ const s = c(() => os(A.settings, "priority", "desc"));
3553
+ return (e, r) => (o(), m(ne, {
3531
3554
  title: e.$td("settings.title", "Settings")
3532
3555
  }, {
3533
3556
  default: f(() => [
3534
- (u(!0), b(D, null, F(s.value, (n, a) => (u(), h(W(n.component), { key: a }))), 128))
3557
+ (o(!0), b(D, null, U(s.value, (n, a) => (o(), m(ee(n.component), { key: a }))), 128))
3535
3558
  ]),
3536
3559
  _: 1
3537
3560
  }, 8, ["title"]));
3538
3561
  }
3539
- }), Qa = {
3562
+ }), il = {
3540
3563
  key: 0,
3541
3564
  class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
3542
- }, Fl = /* @__PURE__ */ g({
3565
+ }, ao = /* @__PURE__ */ g({
3543
3566
  inheritAttrs: !1,
3544
3567
  __name: "TextArea",
3545
3568
  props: {
@@ -3552,70 +3575,70 @@ const Oa = E({ name: "zondicons-view-show", render: Ua }), Na = { class: "font-m
3552
3575
  },
3553
3576
  emits: ["update:modelValue"],
3554
3577
  setup(t) {
3555
- const s = N(t, ["label", "inputClass", "wrapperClass"]), e = G("$inputRef"), [r, n] = Ie(), a = c(() => M("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), i = c(() => {
3556
- var l, d, v;
3557
- return M(
3578
+ const s = K(t, ["label", "inputClass", "wrapperClass"]), e = te("$inputRef"), [r, n] = Pe(), a = c(() => T("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), u = c(() => {
3579
+ var i, p, v;
3580
+ return T(
3558
3581
  // eslint-disable-next-line vue/max-len
3559
3582
  "block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
3560
3583
  {
3561
- "focus:ring-primary-600": !((l = e.value) != null && l.errors),
3562
- "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((d = e.value) != null && d.errors),
3584
+ "focus:ring-primary-600": !((i = e.value) != null && i.errors),
3585
+ "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((p = e.value) != null && p.errors),
3563
3586
  "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (v = e.value) == null ? void 0 : v.errors
3564
3587
  },
3565
3588
  t.inputClass
3566
3589
  );
3567
3590
  });
3568
- return (l, d) => (u(), h(ze, H({
3591
+ return (i, p) => (o(), m(Be, H({
3569
3592
  ref: "$inputRef",
3570
- label: l.label,
3571
- class: o(n)
3593
+ label: i.label,
3594
+ class: l(n)
3572
3595
  }, s, {
3573
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
3596
+ "onUpdate:modelValue": p[0] || (p[0] = (v) => i.$emit("update:modelValue", v))
3574
3597
  }), {
3575
3598
  default: f(() => {
3576
3599
  var v;
3577
3600
  return [
3578
- p(fe, { class: "block text-sm leading-6 font-medium text-gray-900" }),
3601
+ d(ye, { class: "block text-sm leading-6 font-medium text-gray-900" }),
3579
3602
  y("div", {
3580
- class: k(a.value)
3603
+ class: _(a.value)
3581
3604
  }, [
3582
- p(Ea, H(o(r), { class: i.value }), null, 16, ["class"]),
3583
- (v = e.value) != null && v.errors ? (u(), b("div", Qa, [
3584
- p(o(qe), { class: "size-5 text-red-500" })
3585
- ])) : T("", !0)
3605
+ d(Oa, H(l(r), { class: u.value }), null, 16, ["class"]),
3606
+ (v = e.value) != null && v.errors ? (o(), b("div", il, [
3607
+ d(l(De), { class: "size-5 text-red-500" })
3608
+ ])) : E("", !0)
3586
3609
  ], 2),
3587
- p(Ct, { class: "mt-2 text-sm text-gray-600" }),
3588
- p(he, { class: "mt-2 text-sm text-red-600" })
3610
+ d(Rt, { class: "mt-2 text-sm text-gray-600" }),
3611
+ d(we, { class: "mt-2 text-sm text-red-600" })
3589
3612
  ];
3590
3613
  }),
3591
3614
  _: 1
3592
3615
  }, 16, ["label", "class"]));
3593
3616
  }
3594
3617
  });
3595
- class Ul {
3618
+ class lo {
3596
3619
  constructor() {
3597
- _(this, "status");
3598
- _(this, "_listeners");
3599
- _(this, "_progress");
3600
- _(this, "_cancelled");
3601
- _(this, "_started");
3602
- _(this, "_completed");
3603
- this.status = this.getInitialStatus(), this._listeners = new Xt(), this._started = new K(), this._completed = new K();
3620
+ C(this, "status");
3621
+ C(this, "_listeners");
3622
+ C(this, "_progress");
3623
+ C(this, "_cancelled");
3624
+ C(this, "_started");
3625
+ C(this, "_completed");
3626
+ this.status = this.getInitialStatus(), this._listeners = new is(), this._started = new J(), this._completed = new J();
3604
3627
  }
3605
3628
  async start() {
3606
3629
  this.beforeStart(), this._started.resolve();
3607
3630
  try {
3608
3631
  await this.updateProgress(), await this.run(), await this.updateProgress(), this._completed.resolve();
3609
3632
  } catch (s) {
3610
- if (s instanceof Ue)
3633
+ if (s instanceof tt)
3611
3634
  return;
3612
- throw ee(Yt(s), (e) => {
3635
+ throw se(us(s), (e) => {
3613
3636
  this._completed.reject(e);
3614
3637
  });
3615
3638
  }
3616
3639
  }
3617
3640
  async cancel() {
3618
- this._cancelled = new K(), await this._cancelled;
3641
+ this._cancelled = new J(), await this._cancelled;
3619
3642
  }
3620
3643
  serialize() {
3621
3644
  return this.serializeStatus(this.status);
@@ -3650,10 +3673,10 @@ class Ul {
3650
3673
  }
3651
3674
  assertNotCancelled() {
3652
3675
  if (this._cancelled)
3653
- throw this._cancelled.resolve(), new Ue();
3676
+ throw this._cancelled.resolve(), new tt();
3654
3677
  }
3655
3678
  calculateCurrentProgress(s) {
3656
- return s ?? (s = this.status), s.completed ? 1 : s.children ? Gt(
3679
+ return s ?? (s = this.status), s.completed ? 1 : s.children ? cs(
3657
3680
  s.children.reduce((e, r) => e + this.calculateCurrentProgress(r), 0) / s.children.length,
3658
3681
  2
3659
3682
  ) : 0;
@@ -3667,147 +3690,158 @@ class Ul {
3667
3690
  return { ...s };
3668
3691
  }
3669
3692
  }
3670
- async function Ol(t) {
3693
+ async function oo(t) {
3671
3694
  await t.start();
3672
3695
  }
3673
3696
  export {
3674
- ql as AdvancedOptions,
3675
- tn as AlertModal,
3697
+ Xl as AdvancedOptions,
3698
+ bn as AlertModal,
3676
3699
  A as App,
3677
- Il as AppLayout,
3678
- ka as AppModals,
3679
- Ta as AppOverlays,
3680
- Bs as AppService,
3681
- Sa as AppToasts,
3682
- q as Button,
3683
- bl as Cache,
3684
- lr as CacheService,
3685
- zl as Checkbox,
3686
- un as ConfirmModal,
3687
- Rl as DropdownMenu,
3688
- za as DropdownMenuOption,
3689
- Ra as DropdownMenuOptions,
3690
- Pl as EditableContent,
3691
- Al as ErrorLogs,
3692
- Ka as ErrorLogsModal,
3693
- Dl as ErrorMessage,
3694
- Pn as ErrorReportModal,
3695
- Mn as ErrorReportModalButtons,
3696
- Hn as ErrorReportModalTitle,
3697
- ut as Errors,
3698
- ol as EventListenerPriorities,
3699
- R as Events,
3700
- Ds as EventsService,
3701
- $t as Form,
3702
- Xs as FormController,
3703
- ct as HeadlessButton,
3704
- ze as HeadlessInput,
3705
- Ct as HeadlessInputDescription,
3706
- he as HeadlessInputError,
3707
- xt as HeadlessInputInput,
3708
- fe as HeadlessInputLabel,
3709
- Ea as HeadlessInputTextArea,
3710
- Wr as HeadlessModal,
3711
- Kr as HeadlessModalContent,
3712
- Qr as HeadlessModalDescription,
3713
- Jr as HeadlessModalOverlay,
3714
- Zr as HeadlessModalTitle,
3715
- br as HeadlessSelect,
3716
- Be as HeadlessSelectLabel,
3717
- mt as HeadlessSelectOption,
3718
- ft as HeadlessSelectOptions,
3719
- pt as HeadlessSelectTrigger,
3720
- dt as HeadlessSelectValue,
3721
- qr as HeadlessSwitch,
3722
- ya as HeadlessToast,
3723
- Zn as Input,
3724
- Ul as Job,
3725
- Ue as JobCancelledError,
3726
- Z as Lang,
3727
- me as Layouts,
3728
- jl as Link,
3729
- Nn as LoadingModal,
3730
- lt as MOBILE_BREAKPOINT,
3731
- P as Markdown,
3732
- se as Modal,
3733
- wt as ModalContext,
3734
- Un as ProgressBar,
3735
- ea as PromptModal,
3736
- _r as Select,
3737
- ht as SelectLabel,
3738
- Fe as SelectOption,
3739
- gt as SelectOptions,
3740
- vt as SelectTrigger,
3741
- we as Service,
3742
- Te as ServiceBootError,
3743
- Lr as Setting,
3744
- Bl as SettingsModal,
3745
- va as StartupCrash,
3746
- at as Storage,
3747
- zr as Switch,
3748
- Fl as TextArea,
3749
- wa as Toast,
3750
- z as UI,
3751
- dr as UIService,
3752
- pl as __valueType,
3753
- zs as appNamespace,
3754
- $l as booleanInput,
3755
- $e as bootServices,
3756
- Ll as bootstrap,
3757
- xa as bootstrapApplication,
3758
- M as classes,
3759
- hl as computedAsync,
3760
- gl as computedDebounce,
3761
- _l as dateInput,
3762
- cl as defineDirective,
3763
- dl as defineFormValidationRule,
3764
- ul as definePlugin,
3765
- ye as defineServiceState,
3766
- As as defineServiceStore,
3767
- il as defineSettings,
3768
- Ol as dispatch,
3769
- xl as enumInput,
3770
- ot as getCurrentLayout,
3771
- yt as getErrorMessage,
3772
- tr as getMarkdownRouter,
3773
- Ps as getPiniaStore,
3774
- vr as hasSelectOptionLabel,
3775
- Ns as injectOrFail,
3776
- Os as injectReactive,
3777
- V as injectReactiveOrFail,
3778
- Fs as installPlugins,
3779
- Hl as numberInput,
3780
- El as objectInput,
3781
- ml as onCleanMounted,
3782
- st as onFormFocus,
3783
- fl as persistent,
3784
- wl as registerErrorHandler,
3785
- sr as renderMarkdown,
3786
- Ge as renderVNode,
3787
- yl as replaceExisting,
3788
- Cl as requiredBooleanInput,
3789
- kl as requiredDateInput,
3790
- Sl as requiredEnumInput,
3791
- Tl as requiredNumberInput,
3792
- Ml as requiredObjectInput,
3793
- Xn as requiredStringInput,
3794
- Rs as resetPiniaStore,
3795
- nt as safeHtml,
3796
- vl as setMarkdownRouter,
3797
- Vl as stringInput,
3798
- it as translate,
3700
+ Zl as AppLayout,
3701
+ ja as AppOverlays,
3702
+ sr as AppService,
3703
+ Ba as AppToasts,
3704
+ I as Button,
3705
+ Rl as Cache,
3706
+ Cr as CacheService,
3707
+ Yl as Checkbox,
3708
+ Sn as ConfirmModal,
3709
+ Ka as Details,
3710
+ Gl as DropdownMenu,
3711
+ Ja as DropdownMenuOption,
3712
+ Za as DropdownMenuOptions,
3713
+ eo as EditableContent,
3714
+ to as ErrorLogs,
3715
+ ol as ErrorLogsModal,
3716
+ so as ErrorMessage,
3717
+ Gn as ErrorReportModal,
3718
+ On as ErrorReportModalButtons,
3719
+ Nn as ErrorReportModalTitle,
3720
+ $t as Errors,
3721
+ Cl as EventListenerPriorities,
3722
+ F as Events,
3723
+ er as EventsService,
3724
+ Lt as Form,
3725
+ pr as FormController,
3726
+ _t as HeadlessButton,
3727
+ Be as HeadlessInput,
3728
+ Rt as HeadlessInputDescription,
3729
+ we as HeadlessInputError,
3730
+ zt as HeadlessInputInput,
3731
+ ye as HeadlessInputLabel,
3732
+ Oa as HeadlessInputTextArea,
3733
+ cn as HeadlessModal,
3734
+ dn as HeadlessModalContent,
3735
+ pn as HeadlessModalDescription,
3736
+ fn as HeadlessModalOverlay,
3737
+ mn as HeadlessModalTitle,
3738
+ Rr as HeadlessSelect,
3739
+ Ge as HeadlessSelectLabel,
3740
+ St as HeadlessSelectOption,
3741
+ kt as HeadlessSelectOptions,
3742
+ xt as HeadlessSelectTrigger,
3743
+ Ct as HeadlessSelectValue,
3744
+ Xr as HeadlessSwitch,
3745
+ Ra as HeadlessToast,
3746
+ pa as Input,
3747
+ lo as Job,
3748
+ tt as JobCancelledError,
3749
+ Xe as LOCAL_TIMEZONE_OFFSET,
3750
+ X as Lang,
3751
+ be as Layouts,
3752
+ ro as Link,
3753
+ oa as LoadingModal,
3754
+ yr as MINUTE_MILLISECONDS,
3755
+ bt as MOBILE_BREAKPOINT,
3756
+ z as Markdown,
3757
+ ne as Modal,
3758
+ co as ModalComponent,
3759
+ po as ModalsPortal,
3760
+ aa as ProgressBar,
3761
+ ga as PromptModal,
3762
+ Dr as Select,
3763
+ Tt as SelectLabel,
3764
+ et as SelectOption,
3765
+ Mt as SelectOptions,
3766
+ Et as SelectTrigger,
3767
+ Se as Service,
3768
+ Ve as ServiceBootError,
3769
+ Jr as Setting,
3770
+ no as SettingsModal,
3771
+ Ia as StartupCrash,
3772
+ vt as Storage,
3773
+ Yr as Switch,
3774
+ ao as TextArea,
3775
+ qa as Toast,
3776
+ P as UI,
3777
+ Mr as UIService,
3778
+ El as __valueType,
3779
+ $r as aerogelDirectives,
3780
+ Zs as appNamespace,
3781
+ Al as booleanInput,
3782
+ ke as bootServices,
3783
+ Jl as bootstrap,
3784
+ Da as bootstrapApplication,
3785
+ T as classes,
3786
+ fo as closeModal,
3787
+ Ll as computedAsync,
3788
+ Il as computedDebounce,
3789
+ mo as createModal,
3790
+ Dl as dateInput,
3791
+ kl as defineDirective,
3792
+ Ml as defineFormValidationRule,
3793
+ Sl as definePlugin,
3794
+ xe as defineServiceState,
3795
+ Gs as defineServiceStore,
3796
+ xl as defineSettings,
3797
+ oo as dispatch,
3798
+ Bl as enumInput,
3799
+ yt as getCurrentLayout,
3800
+ Vt as getErrorMessage,
3801
+ vr as getMarkdownRouter,
3802
+ Ys as getPiniaStore,
3803
+ zr as hasSelectOptionLabel,
3804
+ ho as injectModal,
3805
+ lr as injectOrFail,
3806
+ ar as injectReactive,
3807
+ R as injectReactiveOrFail,
3808
+ rr as installPlugins,
3809
+ go as modals,
3810
+ Wl as numberInput,
3811
+ Kl as objectInput,
3812
+ Hl as onCleanMounted,
3813
+ mt as onFormFocus,
3814
+ Vl as persistent,
3815
+ fr as reactiveSet,
3816
+ Pl as registerErrorHandler,
3817
+ br as renderMarkdown,
3818
+ pt as renderVNode,
3819
+ ql as replaceExisting,
3820
+ jl as requiredBooleanInput,
3821
+ Fl as requiredDateInput,
3822
+ Ul as requiredEnumInput,
3823
+ Ol as requiredNumberInput,
3824
+ Nl as requiredObjectInput,
3825
+ fa as requiredStringInput,
3826
+ Xs as resetPiniaStore,
3827
+ gt as safeHtml,
3828
+ zl as setMarkdownRouter,
3829
+ vo as showModal,
3830
+ Ql as stringInput,
3831
+ wt as translate,
3799
3832
  S as translateWithDefault,
3800
- en as useAlertModal,
3801
- sn as useConfirmModal,
3802
- En as useErrorReportModal,
3803
- tt as useEvent,
3804
- rt as useForm,
3805
- Ie as useInputAttrs,
3806
- On as useLoadingModal,
3807
- Yn as usePromptModal,
3808
- Zs as validate,
3809
- Js as validateType,
3810
- de as validators,
3811
- et as variantClasses
3833
+ vn as useAlertModal,
3834
+ yn as useConfirmModal,
3835
+ Wn as useErrorReportModal,
3836
+ Tl as useEvent,
3837
+ ht as useForm,
3838
+ Pe as useInputAttrs,
3839
+ la as useLoadingModal,
3840
+ Ae as useModal,
3841
+ ma as usePromptModal,
3842
+ dr as validate,
3843
+ cr as validateType,
3844
+ ge as validators,
3845
+ ft as variantClasses
3812
3846
  };
3813
3847
  //# sourceMappingURL=aerogel-core.js.map