@aerogel/core 0.0.0-next.9aa7c279868edbedbcee075aef52212597d803fb → 0.0.0-next.9d1e54cc195274e9dd7d57a73fcb8a9a51927dcb

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.
@@ -1,39 +1,39 @@
1
- var bt = Object.defineProperty;
2
- var yt = (t, s, e) => s in t ? bt(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
- var w = (t, s, e) => yt(t, typeof s != "symbol" ? s + "" : s, e);
4
- import { markRaw as j, Comment as _t, Text as wt, Static as $t, inject as oe, reactive as ce, nextTick as Be, defineComponent as v, useAttrs as De, useSlots as ke, computed as d, createBlock as m, openBlock as i, h as xt, unref as l, mergeProps as T, withCtx as p, renderSlot as _, createPropsRestProxy as X, onUnmounted as de, ref as q, readonly as Me, onMounted as Ct, watch as Ee, toRaw as St, watchEffect as le, createVNode as f, normalizeProps as Y, guardReactiveProps as ee, createTextVNode as V, toDisplayString as C, normalizeClass as k, createElementBlock as b, Fragment as D, renderList as F, provide as te, resolveDynamicComponent as N, createCommentVNode as M, createElementVNode as y, toRef as Re, useTemplateRef as se, withModifiers as qe, withDirectives as Fe, vModelCheckbox as kt, normalizeStyle as Mt, createApp as Et, vModelText as Ht } from "vue";
5
- import { JSError as pe, tap as J, MagicObject as Ue, PromisedValue as W, Storage as U, objectOnly as ne, arrayFrom as Oe, isEmpty as ve, objectDeepClone as It, fail as K, facade as Z, arrayRemove as _e, getEnv as Lt, updateLocationQueryParameters as Rt, forever as Tt, toString as B, isDevelopment as G, isTesting as He, after as we, uuid as ae, required as Vt, isObject as $e, objectWithoutEmpty as Ne, stringMatchAll as Pt, isInstanceOf as jt, objectWithout as At, noop as zt, debounce as Bt, value as Dt, stringExcerpt as qt, arraySorted as Ft, ListenersManager as Ut, toError as Ot, round as Nt } from "@noeldemartin/utils";
1
+ var _t = Object.defineProperty;
2
+ var $t = (t, s, e) => s in t ? _t(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
+ var $ = (t, s, e) => $t(t, typeof s != "symbol" ? s + "" : s, e);
4
+ import { markRaw as P, Comment as wt, Text as xt, Static as Ct, inject as le, reactive as ue, nextTick as Be, defineComponent as g, useAttrs as De, useSlots as ke, computed as u, createBlock as f, openBlock as i, h as St, unref as l, mergeProps as I, withCtx as m, renderSlot as _, createPropsRestProxy as J, onUnmounted as pe, ref as F, readonly as Me, onMounted as kt, watch as Ee, toRaw as Mt, watchEffect as oe, createVNode as p, normalizeProps as ee, guardReactiveProps as te, createTextVNode as R, toDisplayString as C, normalizeClass as k, createElementBlock as b, Fragment as B, renderList as q, provide as se, resolveDynamicComponent as N, createCommentVNode as M, createElementVNode as y, toRef as Te, useTemplateRef as re, withModifiers as qe, withDirectives as Fe, vModelCheckbox as Et, normalizeStyle as Ht, createApp as Lt, vModelText as It } from "vue";
5
+ import { JSError as me, tap as Z, MagicObject as Ue, PromisedValue as W, Storage as U, objectOnly as ne, arrayFrom as Oe, isEmpty as be, objectDeepClone as Tt, fail as K, facade as G, arrayRemove as $e, getEnv as Vt, updateLocationQueryParameters as Pt, forever as Rt, toString as D, isDevelopment as Y, isTesting as He, after as we, uuid as ae, required as At, isObject as ie, objectWithoutEmpty as Ne, stringMatchAll as zt, isInstanceOf as jt, objectWithout as Bt, noop as Dt, debounce as qt, value as Ft, stringExcerpt as Ut, arraySorted as Ot, ListenersManager as Nt, toError as Wt, round as Kt } from "@noeldemartin/utils";
6
6
  import O from "virtual:aerogel";
7
- import { createPinia as Wt, setActivePinia as Kt, defineStore as Qt } from "pinia";
8
- import Jt from "dompurify";
9
- import { marked as Zt, Renderer as Te } from "marked";
10
- import { Primitive as Gt, SelectValue as Ve, SelectTrigger as Xt, SelectIcon as Yt, SelectItem as es, SelectItemText as ts, SelectPortal as ss, SelectContent as rs, SelectViewport as ns, SelectRoot as as, Label as os, useForwardExpose as Ie, DialogRoot as ls, DialogPortal as is, DialogContent as cs, DialogDescription as us, DialogOverlay as ds, DialogTitle as ps, ToastClose as ms, ToastRoot as fs, ToastProvider as hs, ToastViewport as gs, DropdownMenuItem as vs, DropdownMenuContent as bs, DropdownMenuRoot as ys, DropdownMenuTrigger as _s, DropdownMenuPortal as ws } from "reka-ui";
11
- import $s from "clsx";
12
- import { cva as xs } from "class-variance-authority";
13
- import { twMerge as Cs } from "tailwind-merge";
14
- class xe extends pe {
7
+ import { createPinia as Qt, setActivePinia as Jt, defineStore as Zt } from "pinia";
8
+ import Gt from "dompurify";
9
+ import { marked as Xt, Renderer as Ve } from "marked";
10
+ import { Primitive as Yt, SelectValue as Pe, SelectTrigger as es, SelectIcon as ts, SelectItem as ss, SelectItemText as rs, SelectPortal as ns, SelectContent as as, SelectViewport as ls, SelectRoot as os, Label as is, useForwardExpose as Le, DialogRoot as cs, DialogPortal as us, DialogContent as ds, DialogDescription as ps, DialogOverlay as ms, DialogTitle as fs, ToastClose as hs, ToastRoot as gs, ToastProvider as vs, ToastViewport as bs, DropdownMenuItem as ys, DropdownMenuContent as _s, DropdownMenuRoot as $s, DropdownMenuTrigger as ws, DropdownMenuPortal as xs } from "reka-ui";
11
+ import Cs from "clsx";
12
+ import { cva as Ss } from "class-variance-authority";
13
+ import { twMerge as ks } from "tailwind-merge";
14
+ class xe extends me {
15
15
  constructor(s, e) {
16
16
  super(`Service '${s}' failed booting`, { cause: e });
17
17
  }
18
18
  }
19
- let Le = null;
19
+ let Ie = null;
20
20
  function We() {
21
- return Le ?? Ss();
21
+ return Ie ?? Ms();
22
22
  }
23
- function Ss() {
24
- return J(Wt(), (t) => {
25
- Le = t, Kt(t);
23
+ function Ms() {
24
+ return Z(Qt(), (t) => {
25
+ Ie = t, Jt(t);
26
26
  });
27
27
  }
28
- function ks() {
29
- return Le ?? We();
28
+ function Es() {
29
+ return Ie ?? We();
30
30
  }
31
- function Ms(t, s) {
32
- return We(), Qt(t, s)();
31
+ function Hs(t, s) {
32
+ return We(), Zt(t, s)();
33
33
  }
34
- function me(t) {
34
+ function fe(t) {
35
35
  var s;
36
- return s = class extends fe {
36
+ return s = class extends he {
37
37
  usesStore() {
38
38
  return !0;
39
39
  }
@@ -67,19 +67,19 @@ To fix this problem, declare your initialState as a function instead.`
67
67
  var r;
68
68
  return ((r = t.restore) == null ? void 0 : r.call(t, e)) ?? e;
69
69
  }
70
- }, w(s, "persist", t.persist ?? []), s;
70
+ }, $(s, "persist", t.persist ?? []), s;
71
71
  }
72
- var ye;
73
- let fe = (ye = class extends Ue {
72
+ var _e;
73
+ let he = (_e = class extends Ue {
74
74
  constructor() {
75
75
  super();
76
- w(this, "_name");
77
- w(this, "_booted");
78
- w(this, "_computedStateKeys");
79
- w(this, "_watchers");
80
- w(this, "_store");
76
+ $(this, "_name");
77
+ $(this, "_booted");
78
+ $(this, "_computedStateKeys");
79
+ $(this, "_watchers");
80
+ $(this, "_store");
81
81
  const e = this.getComputedStateDefinition();
82
- this._name = this.getName() ?? new.target.name, this._booted = new W(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && Ms(this._name, {
82
+ this._name = this.getName() ?? new.target.name, this._booted = new W(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && Hs(this._name, {
83
83
  state: () => this.getInitialState(),
84
84
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
85
  getters: e
@@ -120,7 +120,7 @@ let fe = (ye = class extends Ue {
120
120
  if (!this._store)
121
121
  return;
122
122
  const r = Oe(e), n = ne(this._store.$state, r);
123
- ve(n) || this.onPersistentStateUpdated(n);
123
+ be(n) || this.onPersistentStateUpdated(n);
124
124
  }
125
125
  __get(e) {
126
126
  return this.hasState(e) ? this.getState(e) : super.__get(e);
@@ -130,7 +130,7 @@ let fe = (ye = class extends Ue {
130
130
  }
131
131
  onStateUpdated(e, r) {
132
132
  const n = ne(e, this.static("persist"));
133
- ve(n) || this.onPersistentStateUpdated(n);
133
+ be(n) || this.onPersistentStateUpdated(n);
134
134
  for (const a in e) {
135
135
  const o = this._watchers[a];
136
136
  !o || e[a] === r[a] || o.call(this, e[a], r[a]);
@@ -140,7 +140,7 @@ let fe = (ye = class extends Ue {
140
140
  const r = U.get(this._name);
141
141
  r && U.set(this._name, {
142
142
  ...r,
143
- ...this.serializePersistedState(It(e))
143
+ ...this.serializePersistedState(Tt(e))
144
144
  });
145
145
  }
146
146
  usesStore() {
@@ -170,7 +170,7 @@ let fe = (ye = class extends Ue {
170
170
  async boot() {
171
171
  }
172
172
  restorePersistedState() {
173
- if (!(!this.usesStore() || ve(this.static("persist")))) {
173
+ if (!(!this.usesStore() || be(this.static("persist")))) {
174
174
  if (U.has(this._name)) {
175
175
  const e = U.require(this._name);
176
176
  this.setState(this.deserializePersistedState(e));
@@ -182,16 +182,16 @@ let fe = (ye = class extends Ue {
182
182
  requireStore() {
183
183
  return this._store ? this._store : K(`Failed getting '${this._name}' store`);
184
184
  }
185
- }, w(ye, "persist", []), ye);
186
- const ga = {
185
+ }, $(_e, "persist", []), _e);
186
+ const Ea = {
187
187
  Low: -256,
188
188
  Default: 0,
189
189
  High: 256
190
190
  };
191
- class Es extends fe {
191
+ class Ls extends he {
192
192
  constructor() {
193
193
  super(...arguments);
194
- w(this, "listeners", {});
194
+ $(this, "listeners", {});
195
195
  }
196
196
  async boot() {
197
197
  Object.entries(globalThis.__aerogelEvents__ ?? {}).forEach(([e, r]) => (
@@ -216,10 +216,10 @@ class Es extends fe {
216
216
  once(e, r, n) {
217
217
  let a = null;
218
218
  const o = typeof r == "function" ? {} : r, c = typeof r == "function" ? r : n;
219
- return J(
219
+ return Z(
220
220
  () => a && this.off(e, a),
221
- (u) => {
222
- a = (...g) => (u(), c(...g)), this.registerListener(e, o, c);
221
+ (d) => {
222
+ a = (...v) => (d(), c(...v)), this.registerListener(e, o, c);
223
223
  }
224
224
  );
225
225
  }
@@ -230,27 +230,27 @@ class Es extends fe {
230
230
  return;
231
231
  const a = [...n.priorities];
232
232
  for (const c of a)
233
- _e(n.handlers[c] ?? [], r), ((o = n.handlers[c]) == null ? void 0 : o.length) === 0 && (delete n.handlers[c], _e(n.priorities, c));
233
+ $e(n.handlers[c] ?? [], r), ((o = n.handlers[c]) == null ? void 0 : o.length) === 0 && (delete n.handlers[c], $e(n.priorities, c));
234
234
  n.priorities.length === 0 && delete this.listeners[e];
235
235
  }
236
236
  registerListener(e, r, n) {
237
- var u, g, $;
237
+ var d, v, x;
238
238
  const a = r.priority ?? 0;
239
239
  e in this.listeners || (this.listeners[e] = { priorities: [], handlers: {} });
240
- const o = ((u = this.listeners[e]) == null ? void 0 : u.priorities) ?? K(`priorities missing for event '${e}'`), c = ((g = this.listeners[e]) == null ? void 0 : g.handlers) ?? K(`handlers missing for event '${e}'`);
241
- o.includes(a) || (o.push(a), o.sort((h, x) => x - h), c[a] = []), ($ = c[a]) == null || $.push(n);
240
+ const o = ((d = this.listeners[e]) == null ? void 0 : d.priorities) ?? K(`priorities missing for event '${e}'`), c = ((v = this.listeners[e]) == null ? void 0 : v.handlers) ?? K(`handlers missing for event '${e}'`);
241
+ o.includes(a) || (o.push(a), o.sort((h, w) => w - h), c[a] = []), (x = c[a]) == null || x.push(n);
242
242
  }
243
243
  }
244
- const L = Z(Es);
245
- function va(t) {
244
+ const T = G(Ls);
245
+ function Ha(t) {
246
246
  return t;
247
247
  }
248
- const Hs = me({
248
+ const Is = fe({
249
249
  name: "app",
250
250
  initialState: {
251
251
  plugins: {},
252
252
  instance: null,
253
- environment: Lt() ?? "development",
253
+ environment: Vt() ?? "development",
254
254
  version: O.version,
255
255
  sourceUrl: O.sourceUrl,
256
256
  settings: []
@@ -267,12 +267,12 @@ const Hs = me({
267
267
  }
268
268
  }
269
269
  });
270
- class Is extends Hs {
270
+ class Ts extends Is {
271
271
  constructor() {
272
272
  super(...arguments);
273
- w(this, "name", O.name);
274
- w(this, "ready", new W());
275
- w(this, "mounted", new W());
273
+ $(this, "name", O.name);
274
+ $(this, "ready", new W());
275
+ $(this, "mounted", new W());
276
276
  }
277
277
  isReady() {
278
278
  return this.ready.isResolved();
@@ -281,13 +281,13 @@ class Is extends Hs {
281
281
  return this.mounted.isResolved();
282
282
  }
283
283
  addSetting(e) {
284
- this.settings.push(j(e));
284
+ this.settings.push(P(e));
285
285
  }
286
286
  async whenReady(e) {
287
287
  return await this.ready.then(e);
288
288
  }
289
289
  async reload(e) {
290
- e && Rt(e), location.reload(), await Tt();
290
+ e && Pt(e), location.reload(), await Rt();
291
291
  }
292
292
  plugin(e) {
293
293
  return this.plugins[e] ?? null;
@@ -297,15 +297,15 @@ class Is extends Hs {
297
297
  return ((r = this.instance) == null ? void 0 : r.config.globalProperties[e]) ?? null;
298
298
  }
299
299
  async boot() {
300
- L.once("application-ready", () => this.ready.resolve()), L.once("application-mounted", () => this.mounted.resolve());
300
+ T.once("application-ready", () => this.ready.resolve()), T.once("application-mounted", () => this.mounted.resolve());
301
301
  }
302
302
  }
303
- const z = Z(Is);
304
- function ba(t) {
303
+ const j = G(Ts);
304
+ function La(t) {
305
305
  return t;
306
306
  }
307
- async function Ls(t, ...s) {
308
- z.setState(
307
+ async function Vs(t, ...s) {
308
+ j.setState(
309
309
  "plugins",
310
310
  t.reduce(
311
311
  (e, r) => (r.name && (e[r.name] = r), e),
@@ -313,42 +313,42 @@ async function Ls(t, ...s) {
313
313
  )
314
314
  ), await Promise.all(t.map((e) => e.install(...s)) ?? []);
315
315
  }
316
- function Rs(t) {
317
- return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${B(r)}"`, "");
316
+ function Ps(t) {
317
+ return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${D(r)}"`, "");
318
318
  }
319
- function ya(t) {
319
+ function Ia(t) {
320
320
  return t;
321
321
  }
322
- function Ts(t) {
323
- const s = oe(t);
324
- return s ? ce(s) : void 0;
322
+ function Rs(t) {
323
+ const s = le(t);
324
+ return s ? ue(s) : void 0;
325
325
  }
326
326
  function H(t, s) {
327
- return Ts(t) ?? K(s ?? `Could not resolve '${B(t)}' injection key`);
327
+ return Rs(t) ?? K(s ?? `Could not resolve '${D(t)}' injection key`);
328
328
  }
329
- function Vs(t, s) {
330
- return oe(t) ?? K(s ?? `Could not resolve '${B(t)}' injection key`);
329
+ function As(t, s) {
330
+ return le(t) ?? K(s ?? `Could not resolve '${D(t)}' injection key`);
331
331
  }
332
332
  function Ke(t) {
333
- return typeof t == "string" ? t : t.type === _t ? "" : t.type === wt || t.type === $t ? t.children : t.type === "br" ? `
333
+ return typeof t == "string" ? t : t.type === wt ? "" : t.type === xt || t.type === Ct ? t.children : t.type === "br" ? `
334
334
 
335
- ` : `<${t.type} ${Rs(t)}>${Array.from(t.children).map(Ke).join("")}</${t.type}>`;
335
+ ` : `<${t.type} ${Ps(t)}>${Array.from(t.children).map(Ke).join("")}</${t.type}>`;
336
336
  }
337
- const be = /* @__PURE__ */ new WeakMap(), Ps = {
338
- mounted(t, { value: s }) {
339
- const e = typeof s == "function" ? s : null, r = () => {
340
- const n = t.getBoundingClientRect();
341
- t.style.setProperty("--width", `${n.width}px`), t.style.setProperty("--height", `${n.height}px`), e == null || e({ width: n.width, height: n.height });
337
+ const ye = /* @__PURE__ */ new WeakMap(), zs = {
338
+ mounted(t, { value: s, modifiers: e }) {
339
+ const r = typeof s == "function" ? s : null, n = () => {
340
+ const a = t.getBoundingClientRect();
341
+ 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 });
342
342
  };
343
- be.set(t, J(new ResizeObserver(r)).observe(t)), r();
343
+ e.watch && ye.set(t, Z(new ResizeObserver(n)).observe(t)), n();
344
344
  },
345
345
  unmounted(t) {
346
346
  var s;
347
- (s = be.get(t)) == null || s.unobserve(t), be.delete(t);
347
+ (s = ye.get(t)) == null || s.unobserve(t), ye.delete(t);
348
348
  }
349
349
  }, js = {
350
- measure: Ps
351
- }, As = {
350
+ measure: zs
351
+ }, Bs = {
352
352
  install(t, s) {
353
353
  const e = {
354
354
  ...js,
@@ -358,10 +358,10 @@ const be = /* @__PURE__ */ new WeakMap(), Ps = {
358
358
  t.directive(r, n);
359
359
  }
360
360
  };
361
- class zs extends fe {
361
+ class Ds extends he {
362
362
  constructor() {
363
363
  super(...arguments);
364
- w(this, "cache");
364
+ $(this, "cache");
365
365
  }
366
366
  async get(e) {
367
367
  return await (await this.open()).match(e) ?? null;
@@ -374,30 +374,30 @@ class zs extends fe {
374
374
  (await n.keys(e)).length !== 0 && await n.put(e, r);
375
375
  }
376
376
  async open() {
377
- return this.cache = this.cache ?? J(new W(), (e) => {
377
+ return this.cache = this.cache ?? Z(new W(), (e) => {
378
378
  caches.open("app").then((r) => e.resolve(r));
379
379
  });
380
380
  }
381
381
  }
382
- const _a = Z(zs);
383
- class Bs extends fe {
382
+ const Ta = G(Ds);
383
+ class qs extends he {
384
384
  async purge() {
385
- await L.emit("purge-storage");
385
+ await T.emit("purge-storage");
386
386
  }
387
387
  }
388
- const Ds = Z(Bs);
389
- function wa(t, s) {
388
+ const Fs = G(qs);
389
+ function Va(t, s) {
390
390
  return {
391
391
  ...t,
392
392
  ...ne(s, Object.keys(t))
393
393
  };
394
394
  }
395
- const qs = {
396
- $app: z,
397
- $events: L,
398
- $storage: Ds
395
+ const Us = {
396
+ $app: j,
397
+ $events: T,
398
+ $storage: Fs
399
399
  };
400
- async function he(t, s) {
400
+ async function ge(t, s) {
401
401
  await Promise.all(
402
402
  Object.entries(s).map(async ([e, r]) => {
403
403
  await r.launch().catch((n) => {
@@ -405,25 +405,25 @@ async function he(t, s) {
405
405
  return (o = (a = t.config).errorHandler) == null ? void 0 : o.call(a, n, null, `Failed launching ${e}.`);
406
406
  });
407
407
  })
408
- ), Object.assign(t.config.globalProperties, s), (G() || He()) && Object.assign(globalThis, s);
408
+ ), Object.assign(t.config.globalProperties, s), (Y() || He()) && Object.assign(globalThis, s);
409
409
  }
410
- const Fs = {
410
+ const Os = {
411
411
  async install(t, s) {
412
412
  var r;
413
413
  const e = {
414
- ...qs,
414
+ ...Us,
415
415
  ...s.services
416
416
  };
417
- t.use(ks()), (r = s.settings) == null || r.forEach((n) => z.addSetting(n)), await he(t, e);
417
+ t.use(Es()), (r = s.settings) == null || r.forEach((n) => j.addSetting(n)), await ge(t, e);
418
418
  }
419
- }, Qe = 768, ue = {
419
+ }, Qe = 768, de = {
420
420
  Mobile: "mobile",
421
421
  Desktop: "desktop"
422
422
  };
423
423
  function Je() {
424
- return globalThis.innerWidth > Qe ? ue.Desktop : ue.Mobile;
424
+ return globalThis.innerWidth > Qe ? de.Desktop : de.Mobile;
425
425
  }
426
- const Us = me({
426
+ const Ns = fe({
427
427
  name: "ui",
428
428
  initialState: {
429
429
  modals: [],
@@ -431,16 +431,16 @@ const Us = me({
431
431
  layout: Je()
432
432
  },
433
433
  computed: {
434
- desktop: ({ layout: t }) => t === ue.Desktop,
435
- mobile: ({ layout: t }) => t === ue.Mobile,
434
+ desktop: ({ layout: t }) => t === de.Desktop,
435
+ mobile: ({ layout: t }) => t === de.Mobile,
436
436
  openModals: ({ modals: t }) => t.filter(({ closing: s }) => !s)
437
437
  }
438
438
  });
439
- class Os extends Us {
439
+ class Ws extends Ns {
440
440
  constructor() {
441
441
  super(...arguments);
442
- w(this, "modalCallbacks", {});
443
- w(this, "components", {});
442
+ $(this, "modalCallbacks", {});
443
+ $(this, "components", {});
444
444
  }
445
445
  registerComponent(e, r) {
446
446
  this.components[e] = r;
@@ -456,7 +456,7 @@ class Os extends Us {
456
456
  title: e,
457
457
  message: r
458
458
  };
459
- this.openModal(this.requireComponent("alert-modal"), n());
459
+ this.modal(this.requireComponent("alert-modal"), n());
460
460
  }
461
461
  // prettier-ignore
462
462
  /* eslint-enable max-len */
@@ -470,17 +470,17 @@ class Os extends Us {
470
470
  title: e,
471
471
  message: r,
472
472
  required: !!(n != null && n.required)
473
- }, u = await (await this.openModal(this.requireComponent("confirm-modal"), o)).beforeClose, g = typeof u == "object" ? u[0] : u ?? !1, $ = typeof u == "object" ? u[1] : Object.entries(o.checkboxes ?? {}).reduce(
474
- (h, [x, { default: I }]) => ({
475
- [x]: I ?? !1,
476
- ...h
473
+ }, c = await this.modalForm(this.requireComponent("confirm-modal"), o), d = typeof c == "object" ? c[0] : c ?? !1, v = typeof c == "object" ? c[1] : Object.entries(o.checkboxes ?? {}).reduce(
474
+ (x, [h, { default: w }]) => ({
475
+ [h]: w ?? !1,
476
+ ...x
477
477
  }),
478
478
  {}
479
479
  );
480
- for (const [h, x] of Object.entries(o.checkboxes ?? {}))
481
- if (!(!x.required || $[h]))
482
- return g && G() && console.warn(`Confirmed confirm modal was suppressed because required '${h}' checkbox was missing`), [!1, $];
483
- return "checkboxes" in o ? [g, $] : g;
480
+ for (const [x, h] of Object.entries(o.checkboxes ?? {}))
481
+ if (!(!h.required || v[x]))
482
+ return d && Y() && console.warn(`Confirmed confirm modal was suppressed because required '${x}' checkbox was missing`), [!1, v];
483
+ return "checkboxes" in o ? [d, v] : d;
484
484
  }
485
485
  async prompt(e, r, n) {
486
486
  const a = (n == null ? void 0 : n.trim) ?? !0, o = () => typeof r != "string" ? {
@@ -490,53 +490,56 @@ class Os extends Us {
490
490
  title: e,
491
491
  message: r,
492
492
  ...n ?? {}
493
- }, u = await (await this.openModal(this.requireComponent("prompt-modal"), o())).beforeClose;
494
- return (a && typeof u == "string" ? u == null ? void 0 : u.trim() : u) ?? null;
493
+ }, c = await this.modalForm(this.requireComponent("prompt-modal"), o());
494
+ return (a && typeof c == "string" ? c == null ? void 0 : c.trim() : c) ?? null;
495
495
  }
496
496
  async loading(e, r) {
497
- const n = (g) => typeof g == "function" ? Promise.resolve(g()) : g, a = () => typeof e == "string" ? {
497
+ const n = (v) => typeof v == "function" ? Promise.resolve(v()) : v, a = () => typeof e == "string" ? {
498
498
  props: { message: e },
499
499
  operationPromise: n(r)
500
500
  } : typeof e == "function" || e instanceof Promise ? { operationPromise: n(e) } : {
501
501
  props: e,
502
502
  operationPromise: n(r)
503
- }, { operationPromise: o, props: c } = a(), u = await this.openModal(this.requireComponent("loading-modal"), c);
503
+ }, { operationPromise: o, props: c } = a(), d = await this.modal(this.requireComponent("loading-modal"), c);
504
504
  try {
505
- const g = await o;
506
- return await we({ ms: 500 }), g;
505
+ const v = await o;
506
+ return await we({ ms: 500 }), v;
507
507
  } finally {
508
- await this.closeModal(u.id);
508
+ await this.closeModal(d.id);
509
509
  }
510
510
  }
511
511
  toast(e, r = {}) {
512
512
  const { component: n, ...a } = r, o = {
513
513
  id: ae(),
514
514
  properties: { message: e, ...a },
515
- component: j(n ?? this.requireComponent("toast"))
515
+ component: P(n ?? this.requireComponent("toast"))
516
516
  };
517
517
  this.setState("toasts", this.toasts.concat(o));
518
518
  }
519
- async openModal(e, r) {
519
+ async modal(e, r) {
520
520
  const n = ae(), a = {}, o = {
521
521
  id: n,
522
522
  closing: !1,
523
523
  properties: r ?? {},
524
- component: j(e),
525
- beforeClose: new Promise((u) => a.willClose = u),
526
- afterClose: new Promise((u) => a.hasClosed = u)
524
+ component: P(e),
525
+ beforeClose: new Promise((d) => a.willClose = d),
526
+ afterClose: new Promise((d) => a.hasClosed = d)
527
527
  }, c = this.modals.concat(o);
528
528
  return this.modalCallbacks[o.id] = a, this.setState({ modals: c }), await Be(), o;
529
529
  }
530
+ async modalForm(e, r) {
531
+ return await (await this.modal(e, r)).beforeClose;
532
+ }
530
533
  async closeModal(e, r) {
531
- if (!z.isMounted()) {
534
+ if (!j.isMounted()) {
532
535
  await this.removeModal(e, r);
533
536
  return;
534
537
  }
535
- await L.emit("close-modal", { id: e, result: r });
538
+ await T.emit("close-modal", { id: e, result: r });
536
539
  }
537
540
  async closeAllModals() {
538
541
  for (; this.modals.length > 0; )
539
- await this.closeModal(Vt(this.modals[this.modals.length - 1]).id);
542
+ await this.closeModal(At(this.modals[this.modals.length - 1]).id);
540
543
  }
541
544
  async boot() {
542
545
  this.watchModalEvents(), this.watchMountedEvent(), this.watchViewportBreakpoints();
@@ -549,16 +552,16 @@ class Os extends Us {
549
552
  ), (a = (n = this.modalCallbacks[e]) == null ? void 0 : n.hasClosed) == null || a.call(n, r), delete this.modalCallbacks[e];
550
553
  }
551
554
  watchModalEvents() {
552
- L.on("modal-will-close", ({ modal: { id: e }, result: r }) => {
555
+ T.on("modal-will-close", ({ modal: { id: e }, result: r }) => {
553
556
  var a, o;
554
557
  const n = this.modals.find((c) => e === c.id);
555
558
  n && (n.closing = !0), (o = (a = this.modalCallbacks[e]) == null ? void 0 : a.willClose) == null || o.call(a, r);
556
- }), L.on("modal-has-closed", async ({ modal: { id: e }, result: r }) => {
559
+ }), T.on("modal-has-closed", async ({ modal: { id: e }, result: r }) => {
557
560
  await this.removeModal(e, r);
558
561
  });
559
562
  }
560
563
  watchMountedEvent() {
561
- L.once("application-mounted", async () => {
564
+ T.once("application-mounted", async () => {
562
565
  if (!globalThis.document || !globalThis.getComputedStyle)
563
566
  return;
564
567
  const e = globalThis.document.getElementById("splash");
@@ -571,8 +574,8 @@ class Os extends Us {
571
574
  globalThis.matchMedia(`(min-width: ${Qe}px)`).addEventListener("change", () => this.setState({ layout: Je() }));
572
575
  }
573
576
  }
574
- const R = Z(Os);
575
- class Ns {
577
+ const V = G(Ws);
578
+ class Ks {
576
579
  constructor(s, e) {
577
580
  this.locale = s, this.fallbackLocale = e;
578
581
  }
@@ -592,13 +595,13 @@ class Ns {
592
595
  return ["en"];
593
596
  }
594
597
  translate(s) {
595
- return G() && console.warn("Lang provider is missing"), s;
598
+ return Y() && console.warn("Lang provider is missing"), s;
596
599
  }
597
600
  translateWithDefault(s, e) {
598
- return G() && console.warn("Lang provider is missing"), e;
601
+ return Y() && console.warn("Lang provider is missing"), e;
599
602
  }
600
603
  }
601
- const Ws = me({
604
+ const Qs = fe({
602
605
  name: "lang",
603
606
  persist: ["locale", "fallbackLocale"],
604
607
  initialState: {
@@ -607,11 +610,11 @@ const Ws = me({
607
610
  fallbackLocale: "en"
608
611
  }
609
612
  });
610
- class Ks extends Ws {
613
+ class Js extends Qs {
611
614
  constructor() {
612
615
  super();
613
- w(this, "provider");
614
- this.provider = new Ns(
616
+ $(this, "provider");
617
+ this.provider = new Ks(
615
618
  this.getState("locale") ?? this.getBrowserLocale(),
616
619
  this.getState("fallbackLocale")
617
620
  );
@@ -639,7 +642,7 @@ class Ks extends Ws {
639
642
  );
640
643
  }
641
644
  }
642
- const Q = Z(Ks), Ze = Q.translate.bind(Q), S = Q.translateWithDefault.bind(Q), Qs = me({
645
+ const Q = G(Js), Ze = Q.translate.bind(Q), S = Q.translateWithDefault.bind(Q), Zs = fe({
643
646
  name: "errors",
644
647
  initialState: {
645
648
  logs: [],
@@ -651,11 +654,11 @@ const Q = Z(Ks), Ze = Q.translate.bind(Q), S = Q.translateWithDefault.bind(Q), Q
651
654
  hasStartupErrors: ({ startupErrors: t }) => t.length > 0
652
655
  }
653
656
  });
654
- class Js extends Qs {
657
+ class Gs extends Zs {
655
658
  constructor() {
656
659
  super(...arguments);
657
- w(this, "forceReporting", !1);
658
- w(this, "enabled", !0);
660
+ $(this, "forceReporting", !1);
661
+ $(this, "enabled", !0);
659
662
  }
660
663
  enable() {
661
664
  this.enabled = !0;
@@ -663,18 +666,18 @@ class Js extends Qs {
663
666
  disable() {
664
667
  this.enabled = !1;
665
668
  }
666
- async inspect(e) {
667
- const r = Array.isArray(e) ? e : [await this.createErrorReport(e)];
668
- if (r.length === 0) {
669
- R.alert(S("errors.inspectEmpty", "Nothing to inspect!"));
669
+ async inspect(e, r) {
670
+ if (Array.isArray(e) && e.length === 0) {
671
+ V.alert(S("errors.inspectEmpty", "Nothing to inspect!"));
670
672
  return;
671
673
  }
672
- R.openModal(R.requireComponent("error-report-modal"), { reports: r });
674
+ const n = Array.isArray(e) ? e[0] : this.isErrorReport(e) ? e : await this.createErrorReport(e), a = Array.isArray(e) ? e : r ?? [n];
675
+ V.modal(V.requireComponent("error-report-modal"), { report: n, reports: a });
673
676
  }
674
677
  async report(e, r) {
675
- if (await L.emit("error", { error: e, message: r }), He("unit") || (G() && this.logError(e), !this.enabled))
678
+ if (await T.emit("error", { error: e, message: r }), He("unit") || (Y() && this.logError(e), !this.enabled))
676
679
  throw e;
677
- if (!z.isMounted()) {
680
+ if (!j.isMounted()) {
678
681
  const o = await this.createStartupErrorReport(e);
679
682
  o && this.setState({ startupErrors: this.startupErrors.concat(o) });
680
683
  return;
@@ -684,7 +687,7 @@ class Js extends Qs {
684
687
  seen: !1,
685
688
  date: /* @__PURE__ */ new Date()
686
689
  };
687
- R.toast(
690
+ V.toast(
688
691
  r ?? S("errors.notice", "Something went wrong, but it's not your fault. Try again!"),
689
692
  {
690
693
  variant: "danger",
@@ -692,7 +695,7 @@ class Js extends Qs {
692
695
  {
693
696
  label: S("errors.viewDetails", "View details"),
694
697
  dismiss: !0,
695
- click: () => R.openModal(R.requireComponent("error-report-modal"), { reports: [n] })
698
+ click: () => V.modal(V.requireComponent("error-report-modal"), { report: n, reports: [n] })
696
699
  }
697
700
  ]
698
701
  }
@@ -715,14 +718,17 @@ class Js extends Qs {
715
718
  });
716
719
  }
717
720
  logError(e) {
718
- console.error(e), $e(e) && e.cause && this.logError(e.cause);
721
+ console.error(e), ie(e) && e.cause && this.logError(e.cause);
722
+ }
723
+ isErrorReport(e) {
724
+ return ie(e) && "title" in e;
719
725
  }
720
726
  async createErrorReport(e) {
721
- return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof pe ? this.createErrorReportFromError(e) : $e(e) ? Ne({
722
- title: B(
727
+ return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof me ? this.createErrorReportFromError(e) : ie(e) ? Ne({
728
+ title: D(
723
729
  e.name ?? e.title ?? S("errors.unknown", "Unknown Error")
724
730
  ),
725
- description: B(
731
+ description: D(
726
732
  e.message ?? e.description ?? S("errors.unknownDescription", "Unknown error object")
727
733
  ),
728
734
  error: e
@@ -744,51 +750,51 @@ class Js extends Qs {
744
750
  };
745
751
  }
746
752
  }
747
- const Ge = Z(Js), Xe = [];
748
- function $a(t) {
753
+ const Ge = G(Gs), Xe = [];
754
+ function Pa(t) {
749
755
  Xe.push(t);
750
756
  }
751
- function Zs(t) {
757
+ function Ye(t) {
752
758
  for (const s of Xe) {
753
759
  const e = s(t);
754
760
  if (e)
755
761
  return e;
756
762
  }
757
- return typeof t == "string" ? t : t instanceof Error || t instanceof pe ? t.message : $e(t) ? B(t.message ?? t.description ?? "Unknown error object") : S("errors.unknown", "Unknown Error");
763
+ return typeof t == "string" ? t : t instanceof Error || t instanceof me ? t.message : ie(t) ? D(t.message ?? t.description ?? "Unknown error object") : S("errors.unknown", "Unknown Error");
758
764
  }
759
- class Pe extends pe {
765
+ class Re extends me {
760
766
  }
761
- const Gs = { $errors: Ge }, Xs = (t) => (Ge.report(t), !0);
762
- function Ys(t, s = () => !1) {
763
- const e = (r) => s(r) || Xs(r);
767
+ const Xs = { $errors: Ge }, Ys = (t) => (Ge.report(t), !0);
768
+ function er(t, s = () => !1) {
769
+ const e = (r) => s(r) || Ys(r);
764
770
  t.config.errorHandler = e, globalThis.onerror = (r, n, a, o, c) => e(c ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
765
771
  }
766
- const er = {
772
+ const tr = {
767
773
  async install(t, s) {
768
- Ys(t, s.handleError), await he(t, Gs);
774
+ er(t, s.handleError), await ge(t, Xs);
769
775
  }
770
776
  };
771
- function tr() {
772
- return J(new Te(), (t) => {
777
+ function sr() {
778
+ return Z(new Ve(), (t) => {
773
779
  t.link = function(s) {
774
- return Te.prototype.link.apply(this, [s]).replace("<a", '<a target="_blank"');
780
+ return Ve.prototype.link.apply(this, [s]).replace("<a", '<a target="_blank"');
775
781
  };
776
782
  });
777
783
  }
778
- function sr(t) {
779
- const s = Pt(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
784
+ function rr(t) {
785
+ const s = zt(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
780
786
  for (const [e, r, n] of s)
781
787
  t = t.replace(e, `<button type="button" data-markdown-action="${r}">${n}</button>`);
782
788
  return t;
783
789
  }
784
- function rr(t) {
785
- let s = Zt(t, { renderer: tr(), async: !1 });
786
- return s = nr(s), s = sr(s), s;
787
- }
788
790
  function nr(t) {
789
- return Jt.sanitize(t, { ADD_ATTR: ["target"] });
791
+ let s = Xt(t, { renderer: sr(), async: !1 });
792
+ return s = ar(s), s = rr(s), s;
790
793
  }
791
- const P = /* @__PURE__ */ v({
794
+ function ar(t) {
795
+ return Gt.sanitize(t, { ADD_ATTR: ["target"] });
796
+ }
797
+ const lr = /* @__PURE__ */ g({
792
798
  __name: "Markdown",
793
799
  props: {
794
800
  as: {},
@@ -800,28 +806,33 @@ const P = /* @__PURE__ */ v({
800
806
  actions: {}
801
807
  },
802
808
  setup(t) {
803
- const s = De(), e = ke(), r = d(() => e.default ? e.default().map(Ke).join("") : t.text ?? (t.langKey && (t.langDefault ? S(t.langKey, t.langDefault, t.langParams ?? {}) : Ze(t.langKey, t.langParams ?? {})))), n = d(() => {
809
+ const s = De(), e = ke(), r = u(() => e.default ? e.default().map(Ke).join("") : t.text ?? (t.langKey && (t.langDefault ? S(t.langKey, t.langDefault, t.langParams ?? {}) : Ze(t.langKey, t.langParams ?? {})))), n = u(() => {
804
810
  if (!r.value)
805
811
  return null;
806
- let c = rr(r.value);
812
+ let c = nr(r.value);
807
813
  return t.inline && (c = c.replace("<p>", "<span>").replace("</p>", "</span>")), c;
808
- }), a = () => xt(t.as ?? (t.inline ? "span" : "div"), {
814
+ }), a = () => St(t.as ?? (t.inline ? "span" : "div"), {
809
815
  innerHTML: n.value,
810
816
  onClick: o,
811
817
  ...s,
812
818
  class: `${s.class ?? ""} ${t.inline ? "" : "prose"}`
813
819
  });
814
820
  async function o(c) {
815
- var g, $;
816
- const { target: u } = c;
817
- if (jt(u, HTMLElement) && u.dataset.markdownAction) {
818
- ($ = (g = t.actions) == null ? void 0 : g[u.dataset.markdownAction]) == null || $.call(g);
821
+ var v, x;
822
+ const { target: d } = c;
823
+ if (jt(d, HTMLElement) && d.dataset.markdownAction) {
824
+ (x = (v = t.actions) == null ? void 0 : v[d.dataset.markdownAction]) == null || x.call(v);
819
825
  return;
820
826
  }
821
827
  }
822
- return (c, u) => (i(), m(a));
823
- }
824
- }), ar = /* @__PURE__ */ v({
828
+ return (c, d) => (i(), f(a));
829
+ }
830
+ }), or = (t, s) => {
831
+ const e = t.__vccOpts || t;
832
+ for (const [r, n] of s)
833
+ e[r] = n;
834
+ return e;
835
+ }, A = /* @__PURE__ */ or(lr, [["__scopeId", "data-v-ba56d181"]]), et = /* @__PURE__ */ g({
825
836
  __name: "HeadlessButton",
826
837
  props: {
827
838
  class: {},
@@ -837,8 +848,8 @@ const P = /* @__PURE__ */ v({
837
848
  as: {}
838
849
  },
839
850
  setup(t) {
840
- const s = d(() => t.as ? { as: t.as } : t.route ? {
841
- as: R.resolveComponent("router-link") ?? "a",
851
+ const s = u(() => t.as ? { as: t.as } : t.route ? {
852
+ as: V.resolveComponent("router-link") ?? "a",
842
853
  to: Ne({
843
854
  name: t.route,
844
855
  params: t.routeParams,
@@ -852,28 +863,26 @@ const P = /* @__PURE__ */ v({
852
863
  as: "button",
853
864
  type: t.submit ? "submit" : "button"
854
865
  });
855
- return (e, r) => (i(), m(l(Gt), T({
866
+ return (e, r) => (i(), f(l(Yt), I({
856
867
  class: t.class,
857
868
  "as-child": e.asChild,
858
869
  disabled: e.disabled
859
870
  }, s.value), {
860
- default: p(() => [
871
+ default: m(() => [
861
872
  _(e.$slots, "default")
862
873
  ]),
863
874
  _: 3
864
875
  }, 16, ["class", "as-child", "disabled"]));
865
876
  }
866
877
  });
867
- function Ye(t, s) {
868
- return d(() => {
869
- const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, o = xs(n, a), c = Object.entries(r).reduce((u, [g, $]) => (u[g] = l($), u), {});
870
- return E(o(c), l(e));
871
- });
878
+ function tt(t, s) {
879
+ const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, o = Ss(n, a);
880
+ return E(o(r), l(e));
872
881
  }
873
882
  function E(...t) {
874
- return Cs($s(t));
883
+ return ks(Cs(t));
875
884
  }
876
- const A = /* @__PURE__ */ v({
885
+ const z = /* @__PURE__ */ g({
877
886
  __name: "Button",
878
887
  props: {
879
888
  class: {},
@@ -889,10 +898,10 @@ const A = /* @__PURE__ */ v({
889
898
  as: {}
890
899
  },
891
900
  setup(t) {
892
- const s = X(t, ["class", "size", "variant", "disabled"]), e = Ye(
901
+ const s = J(t, ["class", "size", "variant", "disabled"]), e = u(() => tt(
893
902
  { baseClasses: t.class, variant: t.variant, size: t.size, disabled: t.disabled },
894
903
  {
895
- baseClasses: "flex items-center justify-center gap-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
904
+ baseClasses: "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
896
905
  variants: {
897
906
  variant: {
898
907
  default: "bg-primary-600 text-white focus-visible:outline-primary-600",
@@ -900,12 +909,12 @@ const A = /* @__PURE__ */ v({
900
909
  danger: "bg-red-600 text-white focus-visible:outline-red-600",
901
910
  ghost: "bg-transparent",
902
911
  outline: "bg-transparent text-primary-600 ring-primary-600",
903
- link: "text-primary-600"
912
+ link: "text-links"
904
913
  },
905
914
  size: {
906
- small: "text-xs",
907
- default: "text-sm",
908
- large: "text-base",
915
+ small: "text-xs min-h-6",
916
+ default: "text-sm min-h-8",
917
+ large: "text-base min-h-10",
909
918
  icon: "rounded-full p-2.5"
910
919
  },
911
920
  disabled: {
@@ -916,7 +925,7 @@ const A = /* @__PURE__ */ v({
916
925
  compoundVariants: [
917
926
  {
918
927
  variant: ["default", "secondary", "danger", "ghost", "outline"],
919
- class: "font-medium"
928
+ class: "flex items-center justify-center gap-1 font-medium"
920
929
  },
921
930
  {
922
931
  variant: ["default", "danger"],
@@ -968,61 +977,61 @@ const A = /* @__PURE__ */ v({
968
977
  disabled: !1
969
978
  }
970
979
  }
971
- );
972
- return (r, n) => (i(), m(ar, T({
973
- class: l(e),
980
+ ));
981
+ return (r, n) => (i(), f(et, I({
982
+ class: e.value,
974
983
  disabled: r.disabled
975
984
  }, s), {
976
- default: p(() => [
985
+ default: m(() => [
977
986
  _(r.$slots, "default")
978
987
  ]),
979
988
  _: 3
980
989
  }, 16, ["class", "disabled"]));
981
990
  }
982
991
  });
983
- function or(t) {
992
+ function ir(t) {
984
993
  return typeof t == "object" && t !== null && "label" in t;
985
994
  }
986
- function et(t, s) {
987
- const e = L.on(t, s);
988
- de(() => e());
995
+ function st(t, s) {
996
+ const e = T.on(t, s);
997
+ pe(() => e());
989
998
  }
990
- const lr = {
999
+ const cr = {
991
1000
  required: (t) => t ? void 0 : "required"
992
- }, ie = { ...lr };
993
- function xa(t, s) {
994
- ie[t] = s;
1001
+ }, ce = { ...cr };
1002
+ function Ra(t, s) {
1003
+ ce[t] = s;
995
1004
  }
996
- function ir(t, s) {
1005
+ function ur(t, s) {
997
1006
  var r;
998
- const e = (r = ie[s]) == null ? void 0 : r.call(ie, t);
1007
+ const e = (r = ce[s]) == null ? void 0 : r.call(ce, t);
999
1008
  return e ? Oe(e) : [];
1000
1009
  }
1001
- const Ca = Symbol(), je = /* @__PURE__ */ new WeakMap();
1002
- class cr extends Ue {
1010
+ const Aa = Symbol(), Ae = /* @__PURE__ */ new WeakMap();
1011
+ class dr extends Ue {
1003
1012
  constructor(e) {
1004
1013
  super();
1005
- w(this, "errors");
1006
- w(this, "_fields");
1007
- w(this, "_data");
1008
- w(this, "_submitted");
1009
- w(this, "_errors");
1010
- w(this, "_listeners", {});
1011
- this._fields = e, this._submitted = q(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), je.set(
1014
+ $(this, "errors");
1015
+ $(this, "_fields");
1016
+ $(this, "_data");
1017
+ $(this, "_submitted");
1018
+ $(this, "_errors");
1019
+ $(this, "_listeners", {});
1020
+ this._fields = e, this._submitted = F(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), Ae.set(
1012
1021
  this,
1013
- d(() => !Object.values(this._errors).some((r) => r !== null))
1022
+ u(() => !Object.values(this._errors).some((r) => r !== null))
1014
1023
  ), this.errors = Me(this._errors);
1015
1024
  }
1016
1025
  get valid() {
1017
1026
  var e;
1018
- return !!((e = je.get(this)) != null && e.value);
1027
+ return !!((e = Ae.get(this)) != null && e.value);
1019
1028
  }
1020
1029
  get submitted() {
1021
1030
  return this._submitted.value;
1022
1031
  }
1023
1032
  setFieldValue(e, r) {
1024
- const n = this._fields[e] ?? K(`Trying to set undefined '${B(e)}' field`);
1025
- this._data[e] = n.type === "string" && (n.trim ?? !0) ? B(r).trim() : r, this._submitted.value && this.validate();
1033
+ const n = this._fields[e] ?? K(`Trying to set undefined '${D(e)}' field`);
1034
+ this._data[e] = n.type === "string" && (n.trim ?? !0) ? D(r).trim() : r, this._submitted.value && this.validate();
1026
1035
  }
1027
1036
  getFieldValue(e) {
1028
1037
  return this._data[e];
@@ -1055,7 +1064,7 @@ class cr extends Ue {
1055
1064
  return (n = this._listeners)[e] ?? (n[e] = []), (a = this._listeners[e]) == null || a.push(r), () => this.off(e, r);
1056
1065
  }
1057
1066
  off(e, r) {
1058
- _e(this._listeners[e] ?? [], r);
1067
+ $e(this._listeners[e] ?? [], r);
1059
1068
  }
1060
1069
  async focus(e) {
1061
1070
  var r;
@@ -1074,21 +1083,21 @@ class cr extends Ue {
1074
1083
  getFieldErrors(e, r) {
1075
1084
  var c;
1076
1085
  const n = [], a = this._data[e], o = ((c = r.rules) == null ? void 0 : c.split("|")) ?? [];
1077
- for (const u of o)
1078
- u !== "required" && a == null || n.push(...ir(a, u));
1086
+ for (const d of o)
1087
+ d !== "required" && a == null || n.push(...ur(a, d));
1079
1088
  return n.length > 0 ? n : null;
1080
1089
  }
1081
1090
  getInitialData(e) {
1082
1091
  if (this.static().isConjuring())
1083
1092
  return {};
1084
1093
  const r = Object.entries(e).reduce((n, [a, o]) => (n[a] = o.default ?? null, n), {});
1085
- return ce(r);
1094
+ return ue(r);
1086
1095
  }
1087
1096
  getInitialErrors(e) {
1088
1097
  if (this.static().isConjuring())
1089
1098
  return {};
1090
1099
  const r = Object.keys(e).reduce((n, a) => (n[a] = null, n), {});
1091
- return ce(r);
1100
+ return ue(r);
1092
1101
  }
1093
1102
  resetData() {
1094
1103
  for (const [e, r] of Object.entries(this._fields))
@@ -1098,75 +1107,75 @@ class cr extends Ue {
1098
1107
  Object.keys(this._errors).forEach((r) => delete this._errors[r]), e && Object.assign(this._errors, e);
1099
1108
  }
1100
1109
  }
1101
- function tt(t, s) {
1102
- const e = oe("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
1103
- de(() => r == null ? void 0 : r());
1110
+ function rt(t, s) {
1111
+ const e = le("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
1112
+ pe(() => r == null ? void 0 : r());
1104
1113
  }
1105
- function st(t) {
1106
- return new cr(t);
1114
+ function nt(t) {
1115
+ return new dr(t);
1107
1116
  }
1108
- function rt() {
1109
- const t = De(), s = d(() => t.class);
1110
- return [d(() => At(t, "class")), s];
1117
+ function at() {
1118
+ const t = De(), s = u(() => t.class);
1119
+ return [u(() => Bt(t, "class")), s];
1111
1120
  }
1112
- function Sa(t) {
1113
- let s = zt;
1114
- Ct(() => s = t()), de(() => s());
1121
+ function za(t) {
1122
+ let s = Dt;
1123
+ kt(() => s = t()), pe(() => s());
1115
1124
  }
1116
- function ka(t, s) {
1117
- const e = ce(U.get(t) ?? s);
1118
- return Ee(e, () => U.set(t, St(e))), e;
1125
+ function ja(t, s) {
1126
+ const e = ue(U.get(t) ?? s);
1127
+ return Ee(e, () => U.set(t, Mt(e))), e;
1119
1128
  }
1120
- function Ma(t) {
1121
- const s = q(), e = d(t);
1129
+ function Ba(t) {
1130
+ const s = F(), e = u(t);
1122
1131
  return Ee(e, async () => s.value = await e.value, { immediate: !0 }), s;
1123
1132
  }
1124
- function Ea(t, s) {
1125
- const e = s ? t : {}, r = s ?? t, n = q(e.initial ?? null), a = Bt((o) => n.value = o, e.delay ?? 300);
1126
- return le(() => a(r())), n;
1133
+ function Da(t, s) {
1134
+ const e = s ? t : {}, r = s ?? t, n = F(e.initial ?? null), a = qt((o) => n.value = o, e.delay ?? 300);
1135
+ return oe(() => a(r())), n;
1127
1136
  }
1128
- const nt = /* @__PURE__ */ v({
1137
+ const lt = /* @__PURE__ */ g({
1129
1138
  __name: "HeadlessSelectValue",
1130
1139
  setup(t) {
1131
1140
  const s = H(
1132
1141
  "select",
1133
1142
  "<HeadlessSelectValue> must be a child of a <HeadlessSelect>"
1134
1143
  );
1135
- return (e, r) => e.$slots.default ? (i(), m(l(Ve), {
1144
+ return (e, r) => e.$slots.default ? (i(), f(l(Pe), {
1136
1145
  key: 0,
1137
1146
  placeholder: l(s).placeholder
1138
1147
  }, {
1139
- default: p(() => [
1148
+ default: m(() => [
1140
1149
  _(e.$slots, "default")
1141
1150
  ]),
1142
1151
  _: 3
1143
- }, 8, ["placeholder"])) : (i(), m(l(Ve), {
1152
+ }, 8, ["placeholder"])) : (i(), f(l(Pe), {
1144
1153
  key: 1,
1145
1154
  placeholder: l(s).placeholder
1146
1155
  }, null, 8, ["placeholder"]));
1147
1156
  }
1148
- }), at = /* @__PURE__ */ v({
1157
+ }), ot = /* @__PURE__ */ g({
1149
1158
  __name: "HeadlessSelectTrigger",
1150
1159
  setup(t) {
1151
1160
  const s = H(
1152
1161
  "select",
1153
1162
  "<HeadlessSelectTrigger> must be a child of a <HeadlessSelect>"
1154
1163
  );
1155
- return (e, r) => (i(), m(l(Xt), {
1164
+ return (e, r) => (i(), f(l(es), {
1156
1165
  id: l(s).id
1157
1166
  }, {
1158
- default: p(() => [
1167
+ default: m(() => [
1159
1168
  _(e.$slots, "default", {}, () => [
1160
- f(nt, {
1169
+ p(lt, {
1161
1170
  placeholder: l(s).placeholder
1162
1171
  }, null, 8, ["placeholder"]),
1163
- f(l(Yt))
1172
+ p(l(ts))
1164
1173
  ])
1165
1174
  ]),
1166
1175
  _: 3
1167
1176
  }, 8, ["id"]));
1168
1177
  }
1169
- }), ot = /* @__PURE__ */ v({
1178
+ }), it = /* @__PURE__ */ g({
1170
1179
  __name: "HeadlessSelectOption",
1171
1180
  props: {
1172
1181
  value: {},
@@ -1179,17 +1188,17 @@ const nt = /* @__PURE__ */ v({
1179
1188
  const s = H(
1180
1189
  "select",
1181
1190
  "<HeadlessSelectOption> must be a child of a <HeadlessSelect>"
1182
- ), e = d(() => {
1191
+ ), e = u(() => {
1183
1192
  var n;
1184
1193
  const r = (n = s.options) == null ? void 0 : n.find((a) => a.value === t.value);
1185
- return r ? r.label : B(t.value);
1194
+ return r ? r.label : D(t.value);
1186
1195
  });
1187
- return (r, n) => (i(), m(l(es), Y(ee(r.$props)), {
1188
- default: p(() => [
1189
- f(l(ts), null, {
1190
- default: p(() => [
1196
+ return (r, n) => (i(), f(l(ss), ee(te(r.$props)), {
1197
+ default: m(() => [
1198
+ p(l(rs), null, {
1199
+ default: m(() => [
1191
1200
  _(r.$slots, "default", {}, () => [
1192
- V(C(e.value), 1)
1201
+ R(C(e.value), 1)
1193
1202
  ])
1194
1203
  ]),
1195
1204
  _: 3
@@ -1198,7 +1207,7 @@ const nt = /* @__PURE__ */ v({
1198
1207
  _: 3
1199
1208
  }, 16));
1200
1209
  }
1201
- }), lt = /* @__PURE__ */ v({
1210
+ }), ct = /* @__PURE__ */ g({
1202
1211
  __name: "HeadlessSelectOptions",
1203
1212
  props: {
1204
1213
  class: {},
@@ -1208,23 +1217,23 @@ const nt = /* @__PURE__ */ v({
1208
1217
  const s = H(
1209
1218
  "select",
1210
1219
  "<HeadlessSelectOptions> must be a child of a <HeadlessSelect>"
1211
- ), e = d(() => E("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
1212
- return (r, n) => (i(), m(l(ss), null, {
1213
- default: p(() => [
1214
- f(l(rs), {
1220
+ ), e = u(() => E("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
1221
+ return (r, n) => (i(), f(l(ns), null, {
1222
+ default: m(() => [
1223
+ p(l(as), {
1215
1224
  position: "popper",
1216
1225
  class: k(e.value),
1217
1226
  align: l(s).align,
1218
1227
  side: l(s).side,
1219
1228
  "side-offset": 4
1220
1229
  }, {
1221
- default: p(() => [
1222
- f(l(ns), {
1230
+ default: m(() => [
1231
+ p(l(ls), {
1223
1232
  class: k(r.innerClass)
1224
1233
  }, {
1225
- default: p(() => [
1234
+ default: m(() => [
1226
1235
  _(r.$slots, "default", {}, () => [
1227
- (i(!0), b(D, null, F(l(s).options ?? [], (a) => (i(), m(ot, {
1236
+ (i(!0), b(B, null, q(l(s).options ?? [], (a) => (i(), f(it, {
1228
1237
  key: a.key,
1229
1238
  value: a.value
1230
1239
  }, null, 8, ["value"]))), 128))
@@ -1239,7 +1248,7 @@ const nt = /* @__PURE__ */ v({
1239
1248
  _: 3
1240
1249
  }));
1241
1250
  }
1242
- }), ur = /* @__PURE__ */ v({
1251
+ }), pr = /* @__PURE__ */ g({
1243
1252
  inheritAttrs: !1,
1244
1253
  __name: "HeadlessSelect",
1245
1254
  props: {
@@ -1259,28 +1268,28 @@ const nt = /* @__PURE__ */ v({
1259
1268
  },
1260
1269
  emits: ["update:modelValue"],
1261
1270
  setup(t, { expose: s, emit: e }) {
1262
- const r = e, n = oe("form", null), a = d(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), o = d(() => a.value), c = d(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = d(() => t.options ? t.options.map((h) => ({
1271
+ const r = e, n = le("form", null), a = u(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), o = u(() => a.value), c = u(() => !n || !t.name ? null : n.errors[t.name] ?? null), d = u(() => t.options ? t.options.map((h) => ({
1263
1272
  key: ae(),
1264
- label: t.renderOption ? t.renderOption(h) : or(h) ? Dt(h.label) : B(h),
1273
+ label: t.renderOption ? t.renderOption(h) : ir(h) ? Ft(h.label) : D(h),
1265
1274
  value: h
1266
- })) : null), g = {
1275
+ })) : null), v = {
1267
1276
  labelClass: t.labelClass,
1268
1277
  optionsClass: t.optionsClass,
1269
1278
  align: t.align,
1270
1279
  side: t.side,
1271
1280
  value: a,
1272
1281
  id: `select-${ae()}`,
1273
- name: d(() => t.name),
1274
- label: d(() => t.label),
1275
- description: d(() => t.description),
1276
- placeholder: d(() => t.placeholder ?? S("ui.select", "Select an option")),
1277
- options: u,
1278
- selectedOption: d(() => {
1282
+ name: u(() => t.name),
1283
+ label: u(() => t.label),
1284
+ description: u(() => t.description),
1285
+ placeholder: u(() => t.placeholder ?? S("ui.select", "Select an option")),
1286
+ options: d,
1287
+ selectedOption: u(() => {
1279
1288
  var h;
1280
- return (h = u.value) == null ? void 0 : h.find((x) => x.value === t.modelValue);
1289
+ return (h = d.value) == null ? void 0 : h.find((w) => w.value === t.modelValue);
1281
1290
  }),
1282
1291
  errors: Me(c),
1283
- required: d(() => {
1292
+ required: u(() => {
1284
1293
  if (!(!t.name || !n))
1285
1294
  return n.getFieldRules(t.name).includes("required");
1286
1295
  }),
@@ -1292,23 +1301,23 @@ const nt = /* @__PURE__ */ v({
1292
1301
  r("update:modelValue", h);
1293
1302
  }
1294
1303
  };
1295
- function $(h) {
1296
- g.update(h);
1304
+ function x(h) {
1305
+ v.update(h);
1297
1306
  }
1298
- return te("select", g), s(g), (h, x) => (i(), m(l(as), {
1307
+ return se("select", v), s(v), (h, w) => (i(), f(l(os), {
1299
1308
  "model-value": o.value,
1300
1309
  by: h.compareOptions,
1301
- "onUpdate:modelValue": x[0] || (x[0] = (I) => $(I))
1310
+ "onUpdate:modelValue": w[0] || (w[0] = (L) => x(L))
1302
1311
  }, {
1303
- default: p(({ open: I }) => [
1304
- (i(), m(N(h.as), Y(ee(h.$attrs)), {
1305
- default: p(() => [
1312
+ default: m(({ open: L }) => [
1313
+ (i(), f(N(h.as), ee(te(h.$attrs)), {
1314
+ default: m(() => [
1306
1315
  _(h.$slots, "default", {
1307
1316
  modelValue: h.modelValue,
1308
- open: I
1317
+ open: L
1309
1318
  }, () => [
1310
- f(at),
1311
- f(lt)
1319
+ p(ot),
1320
+ p(ct)
1312
1321
  ])
1313
1322
  ]),
1314
1323
  _: 2
@@ -1317,7 +1326,7 @@ const nt = /* @__PURE__ */ v({
1317
1326
  _: 3
1318
1327
  }, 8, ["model-value", "by"]));
1319
1328
  }
1320
- }), Ae = /* @__PURE__ */ v({
1329
+ }), ze = /* @__PURE__ */ g({
1321
1330
  __name: "HeadlessSelectLabel",
1322
1331
  props: {
1323
1332
  asChild: { type: Boolean },
@@ -1327,37 +1336,37 @@ const nt = /* @__PURE__ */ v({
1327
1336
  const s = H(
1328
1337
  "select",
1329
1338
  "<HeadlessSelectLabel> must be a child of a <HeadlessSelect>"
1330
- ), e = ke(), r = d(() => !!(s.label || e.default));
1331
- return (n, a) => r.value ? (i(), m(l(os), T({
1339
+ ), e = ke(), r = u(() => !!(s.label || e.default));
1340
+ return (n, a) => r.value ? (i(), f(l(is), I({
1332
1341
  key: 0,
1333
1342
  for: l(s).id
1334
1343
  }, n.$props), {
1335
- default: p(() => [
1344
+ default: m(() => [
1336
1345
  _(n.$slots, "default", {}, () => [
1337
- V(C(l(s).label), 1)
1346
+ R(C(l(s).label), 1)
1338
1347
  ])
1339
1348
  ]),
1340
1349
  _: 3
1341
1350
  }, 16, ["for"])) : M("", !0);
1342
1351
  }
1343
- }), it = /* @__PURE__ */ v({
1352
+ }), ut = /* @__PURE__ */ g({
1344
1353
  __name: "SelectLabel",
1345
1354
  setup(t) {
1346
- const s = H("select", "<SelectLabel> must be a child of a <Select>"), e = d(() => E("block text-sm leading-6 font-medium text-gray-900", s.labelClass));
1347
- return (r, n) => r.$slots.default ? (i(), m(Ae, {
1355
+ const s = H("select", "<SelectLabel> must be a child of a <Select>"), e = u(() => E("block text-sm leading-6 font-medium text-gray-900", s.labelClass));
1356
+ return (r, n) => r.$slots.default ? (i(), f(ze, {
1348
1357
  key: 0,
1349
1358
  class: k(e.value)
1350
1359
  }, {
1351
- default: p(() => [
1360
+ default: m(() => [
1352
1361
  _(r.$slots, "default")
1353
1362
  ]),
1354
1363
  _: 3
1355
- }, 8, ["class"])) : (i(), m(Ae, {
1364
+ }, 8, ["class"])) : (i(), f(ze, {
1356
1365
  key: 1,
1357
1366
  class: k(e.value)
1358
1367
  }, null, 8, ["class"]));
1359
1368
  }
1360
- }), ze = /* @__PURE__ */ v({
1369
+ }), je = /* @__PURE__ */ g({
1361
1370
  __name: "SelectOption",
1362
1371
  props: {
1363
1372
  value: {},
@@ -1365,16 +1374,16 @@ const nt = /* @__PURE__ */ v({
1365
1374
  innerClass: {}
1366
1375
  },
1367
1376
  setup(t) {
1368
- const s = d(() => E("group p-1 outline-none", t.class)), e = d(() => E(
1377
+ const s = u(() => E("group p-1 outline-none", t.class)), e = u(() => E(
1369
1378
  // eslint-disable-next-line vue/max-len
1370
1379
  "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",
1371
1380
  t.innerClass
1372
1381
  ));
1373
- return (r, n) => (i(), m(ot, {
1382
+ return (r, n) => (i(), f(it, {
1374
1383
  class: k(s.value),
1375
1384
  value: r.value
1376
1385
  }, {
1377
- default: p(() => [
1386
+ default: m(() => [
1378
1387
  y("div", {
1379
1388
  class: k(e.value)
1380
1389
  }, [
@@ -1384,43 +1393,43 @@ const nt = /* @__PURE__ */ v({
1384
1393
  _: 3
1385
1394
  }, 8, ["class", "value"]));
1386
1395
  }
1387
- }), ct = /* @__PURE__ */ v({
1396
+ }), dt = /* @__PURE__ */ g({
1388
1397
  __name: "SelectOptions",
1389
1398
  props: {
1390
1399
  class: {}
1391
1400
  },
1392
1401
  setup(t) {
1393
- const s = H("select", "<SelectOptions> must be a child of a <Select>"), e = d(() => E(
1402
+ const s = H("select", "<SelectOptions> must be a child of a <Select>"), e = u(() => E(
1394
1403
  "z-50 overflow-auto rounded-lg bg-white text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden",
1395
1404
  s.optionsClass,
1396
1405
  t.class
1397
1406
  ));
1398
- return (r, n) => (i(), m(lt, {
1407
+ return (r, n) => (i(), f(ct, {
1399
1408
  class: k(e.value)
1400
1409
  }, {
1401
- default: p(() => {
1402
- var a, o;
1410
+ default: m(() => {
1411
+ var a;
1403
1412
  return [
1404
- (o = (a = l(s)) == null ? void 0 : a.options) != null && o.length ? _(r.$slots, "default", { key: 0 }, () => {
1405
- var c;
1413
+ (a = l(s).options) != null && a.length ? _(r.$slots, "default", { key: 0 }, () => {
1414
+ var o;
1406
1415
  return [
1407
- (i(!0), b(D, null, F(((c = l(s)) == null ? void 0 : c.options) ?? [], (u) => (i(), m(ze, {
1408
- key: u.key,
1409
- value: u.value
1416
+ (i(!0), b(B, null, q(((o = l(s)) == null ? void 0 : o.options) ?? [], (c) => (i(), f(je, {
1417
+ key: c.key,
1418
+ value: c.value
1410
1419
  }, {
1411
- default: p(() => [
1412
- V(C(u.label), 1)
1420
+ default: m(() => [
1421
+ R(C(c.label), 1)
1413
1422
  ]),
1414
1423
  _: 2
1415
1424
  }, 1032, ["value"]))), 128))
1416
1425
  ];
1417
- }) : _(r.$slots, "empty", { key: 1 }, () => [
1418
- f(ze, {
1426
+ }) : _(r.$slots, "default", { key: 1 }, () => [
1427
+ p(je, {
1419
1428
  disabled: "",
1420
1429
  value: null
1421
1430
  }, {
1422
- default: p(() => [
1423
- V(C(r.$td("ui.selectEmpty", "No options available")), 1)
1431
+ default: m(() => [
1432
+ R(C(r.$td("ui.selectEmpty", "No options available")), 1)
1424
1433
  ]),
1425
1434
  _: 1
1426
1435
  })
@@ -1430,42 +1439,42 @@ const nt = /* @__PURE__ */ v({
1430
1439
  _: 3
1431
1440
  }, 8, ["class"]));
1432
1441
  }
1433
- }), dr = {
1442
+ }), mr = {
1434
1443
  viewBox: "0 0 20 20",
1435
1444
  width: "1.2em",
1436
1445
  height: "1.2em"
1437
1446
  };
1438
- function pr(t, s) {
1439
- return i(), b("svg", dr, s[0] || (s[0] = [
1447
+ function fr(t, s) {
1448
+ return i(), b("svg", mr, s[0] || (s[0] = [
1440
1449
  y("path", {
1441
1450
  fill: "currentColor",
1442
1451
  d: "m9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828L5.757 6.586L4.343 8z"
1443
1452
  }, null, -1)
1444
1453
  ]));
1445
1454
  }
1446
- const mr = j({ name: "zondicons-cheveron-down", render: pr }), ut = /* @__PURE__ */ v({
1455
+ const hr = P({ name: "zondicons-cheveron-down", render: fr }), pt = /* @__PURE__ */ g({
1447
1456
  __name: "SelectTrigger",
1448
1457
  props: {
1449
1458
  class: {}
1450
1459
  },
1451
1460
  setup(t) {
1452
- const s = H("select", "<SelectTrigger> must be a child of a <Select>"), e = d(() => E(
1461
+ const s = H("select", "<SelectTrigger> must be a child of a <Select>"), e = u(() => E(
1453
1462
  // eslint-disable-next-line vue/max-len
1454
1463
  "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",
1455
1464
  { "mt-1": s.label },
1456
1465
  t.class
1457
1466
  ));
1458
- return (r, n) => (i(), m(at, {
1467
+ return (r, n) => (i(), f(ot, {
1459
1468
  class: k(e.value)
1460
1469
  }, {
1461
- default: p(() => [
1462
- f(nt, { class: "col-start-1 row-start-1 truncate pr-6" }),
1463
- f(l(mr), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
1470
+ default: m(() => [
1471
+ p(lt, { class: "col-start-1 row-start-1 truncate pr-6" }),
1472
+ p(l(hr), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
1464
1473
  ]),
1465
1474
  _: 1
1466
1475
  }, 8, ["class"]));
1467
1476
  }
1468
- }), fr = /* @__PURE__ */ v({
1477
+ }), gr = /* @__PURE__ */ g({
1469
1478
  __name: "Select",
1470
1479
  props: {
1471
1480
  as: {},
@@ -1484,30 +1493,30 @@ const mr = j({ name: "zondicons-cheveron-down", render: pr }), ut = /* @__PURE__
1484
1493
  },
1485
1494
  emits: ["update:modelValue"],
1486
1495
  setup(t) {
1487
- const { forwardRef: s } = Ie();
1488
- return (e, r) => (i(), m(ur, T({ ref: l(s) }, e.$props, {
1496
+ const { forwardRef: s } = Le();
1497
+ return (e, r) => (i(), f(pr, I({ ref: l(s) }, e.$props, {
1489
1498
  "onUpdate:modelValue": r[0] || (r[0] = (n) => e.$emit("update:modelValue", n))
1490
1499
  }), {
1491
- default: p(() => [
1492
- f(it),
1500
+ default: m(() => [
1501
+ p(ut),
1493
1502
  _(e.$slots, "default", {}, () => [
1494
- f(ut),
1495
- f(ct)
1503
+ p(pt),
1504
+ p(dt)
1496
1505
  ])
1497
1506
  ]),
1498
1507
  _: 3
1499
1508
  }, 16));
1500
1509
  }
1501
- }), hr = { class: "grow" }, gr = /* @__PURE__ */ v({
1510
+ }), vr = { class: "grow" }, br = /* @__PURE__ */ g({
1502
1511
  __name: "Language",
1503
1512
  setup(t) {
1504
- const s = Q.getBrowserLocale(), e = d(() => [null, ...Q.locales]);
1513
+ const s = Q.getBrowserLocale(), e = u(() => [null, ...Q.locales]);
1505
1514
  function r(n) {
1506
1515
  return (n && O.locales[n]) ?? S("settings.localeDefault", "{locale} (default)", {
1507
1516
  locale: O.locales[s] ?? s
1508
1517
  });
1509
1518
  }
1510
- return (n, a) => (i(), m(fr, {
1519
+ return (n, a) => (i(), f(gr, {
1511
1520
  modelValue: n.$lang.locale,
1512
1521
  "onUpdate:modelValue": a[0] || (a[0] = (o) => n.$lang.locale = o),
1513
1522
  class: "flex flex-col items-start md:flex-row",
@@ -1515,60 +1524,60 @@ const mr = j({ name: "zondicons-cheveron-down", render: pr }), ut = /* @__PURE__
1515
1524
  options: e.value,
1516
1525
  "render-option": r
1517
1526
  }, {
1518
- default: p(() => [
1519
- y("div", hr, [
1520
- f(it, null, {
1521
- default: p(() => [
1522
- V(C(n.$td("settings.locale", "Language")), 1)
1527
+ default: m(() => [
1528
+ y("div", vr, [
1529
+ p(ut, null, {
1530
+ default: m(() => [
1531
+ R(C(n.$td("settings.locale", "Language")), 1)
1523
1532
  ]),
1524
1533
  _: 1
1525
1534
  }),
1526
- f(P, {
1535
+ p(A, {
1527
1536
  "lang-key": "settings.localeDescription",
1528
1537
  "lang-default": "Choose the application's language.",
1529
1538
  class: "mt-1 text-sm text-gray-500"
1530
1539
  })
1531
1540
  ]),
1532
- f(A, {
1541
+ p(z, {
1533
1542
  variant: "ghost",
1534
- as: ut,
1543
+ as: pt,
1535
1544
  class: "grid w-auto outline-none"
1536
1545
  }),
1537
- f(ct)
1546
+ p(dt)
1538
1547
  ]),
1539
1548
  _: 1
1540
1549
  }, 8, ["modelValue", "options"]));
1541
1550
  }
1542
- }), vr = [
1551
+ }), yr = [
1543
1552
  {
1544
1553
  priority: 100,
1545
- component: gr
1554
+ component: br
1546
1555
  }
1547
- ], br = { $lang: Q }, yr = {
1556
+ ], _r = { $lang: Q }, $r = {
1548
1557
  async install(t) {
1549
1558
  var s;
1550
- (s = t.config.globalProperties).$t ?? (s.$t = Ze), t.config.globalProperties.$td = S, vr.forEach((e) => z.addSetting(e)), await he(t, br);
1559
+ (s = t.config.globalProperties).$t ?? (s.$t = Ze), t.config.globalProperties.$td = S, yr.forEach((e) => j.addSetting(e)), await ge(t, _r);
1551
1560
  }
1552
- }, _r = {
1561
+ }, wr = {
1553
1562
  async install() {
1554
1563
  He() && (globalThis.testingRuntime = {
1555
- on: (...t) => L.on(...t)
1564
+ on: (...t) => T.on(...t)
1556
1565
  });
1557
1566
  }
1558
- }, wr = {
1567
+ }, xr = {
1559
1568
  viewBox: "0 0 20 20",
1560
1569
  width: "1.2em",
1561
1570
  height: "1.2em"
1562
1571
  };
1563
- function $r(t, s) {
1564
- return i(), b("svg", wr, s[0] || (s[0] = [
1572
+ function Cr(t, s) {
1573
+ return i(), b("svg", xr, s[0] || (s[0] = [
1565
1574
  y("path", {
1566
1575
  fill: "currentColor",
1567
1576
  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"
1568
1577
  }, null, -1)
1569
1578
  ]));
1570
1579
  }
1571
- const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1580
+ const Sr = P({ name: "zondicons-close", render: Cr }), kr = /* @__PURE__ */ g({
1572
1581
  __name: "HeadlessModal",
1573
1582
  props: {
1574
1583
  persistent: { type: Boolean },
@@ -1578,26 +1587,26 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1578
1587
  descriptionHidden: { type: Boolean }
1579
1588
  },
1580
1589
  setup(t, { expose: s }) {
1581
- const e = q(null), { modal: r } = H(
1590
+ const e = F(null), { modal: r } = H(
1582
1591
  "modal",
1583
- "could not obtain modal reference from <HeadlessModal>, did you render this component manually? Show it using $ui.openModal() instead"
1592
+ "could not obtain modal reference from <HeadlessModal>, did you render this component manually? Show it using $ui.modal() instead"
1584
1593
  );
1585
1594
  s({ close: o, $content: e });
1586
- const { forwardRef: n } = Ie(), a = q(!1);
1587
- te("$modalContentRef", e), et("close-modal", async ({ id: c, result: u }) => {
1588
- c === r.id && await o(u);
1595
+ const { forwardRef: n } = Le(), a = F(!1);
1596
+ se("$modalContentRef", e), st("close-modal", async ({ id: c, result: d }) => {
1597
+ c === r.id && await o(d);
1589
1598
  });
1590
1599
  async function o(c) {
1591
- a.value || (await L.emit("modal-will-close", { modal: r, result: c }), a.value = !0, await L.emit("modal-has-closed", { modal: r, result: c }));
1600
+ a.value || (await T.emit("modal-will-close", { modal: r, result: c }), a.value = !0, await T.emit("modal-has-closed", { modal: r, result: c }));
1592
1601
  }
1593
- return (c, u) => (i(), m(l(ls), {
1602
+ return (c, d) => (i(), f(l(cs), {
1594
1603
  ref: l(n),
1595
1604
  open: "",
1596
- "onUpdate:open": u[0] || (u[0] = (g) => c.persistent || o())
1605
+ "onUpdate:open": d[0] || (d[0] = (v) => c.persistent || o())
1597
1606
  }, {
1598
- default: p(() => [
1599
- f(l(is), null, {
1600
- default: p(() => [
1607
+ default: m(() => [
1608
+ p(l(us), null, {
1609
+ default: m(() => [
1601
1610
  _(c.$slots, "default", { close: o })
1602
1611
  ]),
1603
1612
  _: 3
@@ -1606,35 +1615,35 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1606
1615
  _: 3
1607
1616
  }, 512));
1608
1617
  }
1609
- }), dt = /* @__PURE__ */ v({
1618
+ }), mt = /* @__PURE__ */ g({
1610
1619
  __name: "ModalContext",
1611
1620
  props: {
1612
1621
  modal: {},
1613
1622
  childIndex: {}
1614
1623
  },
1615
1624
  setup(t) {
1616
- const s = t, e = d(() => {
1625
+ const s = t, e = u(() => {
1617
1626
  const r = {};
1618
1627
  for (const n in s.modal.properties)
1619
1628
  r[n] = l(s.modal.properties[n]);
1620
1629
  return r;
1621
1630
  });
1622
- return te("modal", {
1623
- modal: Re(s, "modal"),
1624
- childIndex: Re(s, "childIndex")
1625
- }), (r, n) => (i(), m(N(r.modal.component), Y(ee(e.value)), null, 16));
1631
+ return se("modal", {
1632
+ modal: Te(s, "modal"),
1633
+ childIndex: Te(s, "childIndex")
1634
+ }), (r, n) => (i(), f(N(r.modal.component), ee(te(e.value)), null, 16));
1626
1635
  }
1627
- }), Sr = /* @__PURE__ */ v({
1636
+ }), Mr = /* @__PURE__ */ g({
1628
1637
  __name: "HeadlessModalContent",
1629
1638
  setup(t) {
1630
1639
  const { childIndex: s = 0 } = H(
1631
1640
  "modal",
1632
- "could not obtain modal reference from <HeadlessModalContent>, did you render this component manually? Show it using $ui.openModal() instead"
1633
- ), e = Vs("$modalContentRef"), r = se("$contentRef"), n = d(() => R.modals[s] ?? null);
1634
- return le(() => e.value = r.value), (a, o) => (i(), m(l(cs), { ref: "$contentRef" }, {
1635
- default: p(() => [
1641
+ "could not obtain modal reference from <HeadlessModalContent>, did you render this component manually? Show it using $ui.modal() instead"
1642
+ ), e = As("$modalContentRef"), r = re("$contentRef"), n = u(() => V.modals[s] ?? null);
1643
+ return oe(() => e.value = r.value), (a, o) => (i(), f(l(ds), { ref: "$contentRef" }, {
1644
+ default: m(() => [
1636
1645
  _(a.$slots, "default"),
1637
- n.value ? (i(), m(dt, {
1646
+ n.value ? (i(), f(mt, {
1638
1647
  key: 0,
1639
1648
  "child-index": l(s) + 1,
1640
1649
  modal: n.value
@@ -1643,21 +1652,21 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1643
1652
  _: 3
1644
1653
  }, 512));
1645
1654
  }
1646
- }), kr = /* @__PURE__ */ v({
1655
+ }), Er = /* @__PURE__ */ g({
1647
1656
  __name: "HeadlessModalDescription",
1648
1657
  props: {
1649
1658
  asChild: { type: Boolean },
1650
1659
  as: {}
1651
1660
  },
1652
1661
  setup(t) {
1653
- return (s, e) => (i(), m(l(us), Y(ee(s.$props)), {
1654
- default: p(() => [
1662
+ return (s, e) => (i(), f(l(ps), ee(te(s.$props)), {
1663
+ default: m(() => [
1655
1664
  _(s.$slots, "default")
1656
1665
  ]),
1657
1666
  _: 3
1658
1667
  }, 16));
1659
1668
  }
1660
- }), Mr = /* @__PURE__ */ v({
1669
+ }), Hr = /* @__PURE__ */ g({
1661
1670
  __name: "HeadlessModalOverlay",
1662
1671
  props: {
1663
1672
  forceMount: { type: Boolean },
@@ -1665,31 +1674,31 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1665
1674
  as: {}
1666
1675
  },
1667
1676
  setup(t) {
1668
- return (s, e) => (i(), m(l(ds), Y(ee(s.$props)), {
1669
- default: p(() => [
1677
+ return (s, e) => (i(), f(l(ms), ee(te(s.$props)), {
1678
+ default: m(() => [
1670
1679
  _(s.$slots, "default")
1671
1680
  ]),
1672
1681
  _: 3
1673
1682
  }, 16));
1674
1683
  }
1675
- }), Er = /* @__PURE__ */ v({
1684
+ }), Lr = /* @__PURE__ */ g({
1676
1685
  __name: "HeadlessModalTitle",
1677
1686
  props: {
1678
1687
  asChild: { type: Boolean },
1679
1688
  as: {}
1680
1689
  },
1681
1690
  setup(t) {
1682
- return (s, e) => (i(), m(l(ps), Y(ee(s.$props)), {
1683
- default: p(() => [
1691
+ return (s, e) => (i(), f(l(fs), ee(te(s.$props)), {
1692
+ default: m(() => [
1684
1693
  _(s.$slots, "default")
1685
1694
  ]),
1686
1695
  _: 3
1687
1696
  }, 16));
1688
1697
  }
1689
- }), Hr = {
1698
+ }), Ir = {
1690
1699
  key: 0,
1691
1700
  class: "absolute top-0 right-0 hidden pt-3.5 pr-2.5 sm:block"
1692
- }, Ir = ["onClick"], Lr = { class: "sr-only" }, re = /* @__PURE__ */ v({
1701
+ }, Tr = ["onClick"], Vr = { class: "sr-only" }, X = /* @__PURE__ */ g({
1693
1702
  __name: "Modal",
1694
1703
  props: {
1695
1704
  persistent: { type: Boolean },
@@ -1697,25 +1706,25 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1697
1706
  titleHidden: { type: Boolean },
1698
1707
  description: {},
1699
1708
  descriptionHidden: { type: Boolean },
1700
- dismissable: { type: Boolean, default: !0 },
1701
1709
  wrapperClass: { default: "" },
1702
- class: { default: "" }
1710
+ class: { default: "" },
1711
+ closeHidden: { type: Boolean }
1703
1712
  },
1704
1713
  setup(t, { expose: s }) {
1705
- const e = X(t, ["class", "dismissable", "wrapperClass", "title", "titleHidden", "description", "persistent"]);
1714
+ const e = J(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden"]);
1706
1715
  s({
1707
1716
  close: async (h) => {
1708
- var x;
1709
- return (x = a.value) == null ? void 0 : x.close(h);
1717
+ var w;
1718
+ return (w = a.value) == null ? void 0 : w.close(h);
1710
1719
  },
1711
- $content: d(() => {
1720
+ $content: u(() => {
1712
1721
  var h;
1713
1722
  return (h = a.value) == null ? void 0 : h.$content;
1714
1723
  })
1715
1724
  });
1716
- const { forwardRef: r, currentRef: n } = Ie(), a = n, o = H("modal"), c = d(() => !o.modal.closing && o.childIndex === R.openModals.length), u = d(() => t.description ? {} : { "aria-describedby": void 0 }), g = d(() => E({ "mt-2": t.title && !t.titleHidden }, t.class)), $ = d(() => E(
1725
+ const { forwardRef: r, currentRef: n } = Le(), a = n, o = H("modal"), c = u(() => !o.modal.closing && o.childIndex === V.openModals.length), d = u(() => t.description ? {} : { "aria-describedby": void 0 }), v = u(() => E("max-h-[90vh] overflow-auto px-4 pb-4", { "pt-4": !t.title || t.titleHidden }, t.class)), x = u(() => E(
1717
1726
  "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",
1718
- "overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl sm:max-w-lg",
1727
+ "overflow-hidden rounded-lg bg-white text-left shadow-xl sm:max-w-lg",
1719
1728
  "animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
1720
1729
  "transition-[scale,opacity] will-change-[scale,opacity] duration-300",
1721
1730
  {
@@ -1724,49 +1733,49 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1724
1733
  },
1725
1734
  t.wrapperClass
1726
1735
  ));
1727
- return et("modal-will-close", async ({ modal: { id: h } }) => {
1736
+ return st("modal-will-close", async ({ modal: { id: h } }) => {
1728
1737
  h === o.modal.id && await we({ ms: 300 });
1729
- }), (h, x) => (i(), m(Cr, T(e, {
1730
- ref: (I) => l(r)(I),
1738
+ }), (h, w) => (i(), f(kr, I(e, {
1739
+ ref: (L) => l(r)(L),
1731
1740
  persistent: h.persistent
1732
1741
  }), {
1733
- default: p(({ close: I }) => [
1734
- f(Mr, {
1742
+ default: m(({ close: L }) => [
1743
+ p(Hr, {
1735
1744
  class: k(["fixed inset-0 animate-[fade-in_var(--tw-duration)_ease-in-out] transition-opacity duration-300 will-change-[opacity]", {
1736
1745
  "bg-black/30": l(o).childIndex === 1,
1737
1746
  "opacity-0": l(o).childIndex === 1 && l(o).modal.closing
1738
1747
  }])
1739
1748
  }, null, 8, ["class"]),
1740
- f(Sr, T(u.value, { class: $.value }), {
1741
- default: p(() => [
1742
- !h.persistent && h.dismissable ? (i(), b("div", Hr, [
1749
+ p(Mr, I(d.value, { class: x.value }), {
1750
+ default: m(() => [
1751
+ !h.persistent && !h.closeHidden ? (i(), b("div", Ir, [
1743
1752
  y("button", {
1744
1753
  type: "button",
1745
1754
  class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
1746
- onClick: (ge) => I()
1755
+ onClick: (ve) => L()
1747
1756
  }, [
1748
- y("span", Lr, C(h.$td("ui.close", "Close")), 1),
1749
- f(l(xr), { class: "size-4" })
1750
- ], 8, Ir)
1757
+ y("span", Vr, C(h.$td("ui.close", "Close")), 1),
1758
+ p(l(Sr), { class: "size-4" })
1759
+ ], 8, Tr)
1751
1760
  ])) : M("", !0),
1752
- h.title ? (i(), m(Er, {
1761
+ h.title ? (i(), f(Lr, {
1753
1762
  key: 1,
1754
- class: k(["text-base font-semibold text-gray-900", { "sr-only": h.titleHidden }])
1763
+ class: k(["px-4 pt-5 pb-2 text-base font-semibold text-gray-900", { "sr-only": h.titleHidden }])
1755
1764
  }, {
1756
- default: p(() => [
1757
- f(P, {
1765
+ default: m(() => [
1766
+ p(A, {
1758
1767
  text: h.title,
1759
1768
  inline: ""
1760
1769
  }, null, 8, ["text"])
1761
1770
  ]),
1762
1771
  _: 1
1763
1772
  }, 8, ["class"])) : M("", !0),
1764
- h.description ? (i(), m(kr, {
1773
+ h.description ? (i(), f(Er, {
1765
1774
  key: 2,
1766
1775
  class: k({ "sr-only": h.descriptionHidden })
1767
1776
  }, {
1768
- default: p(() => [
1769
- f(P, {
1777
+ default: m(() => [
1778
+ p(A, {
1770
1779
  text: h.description,
1771
1780
  class: "mt-1 text-sm leading-6 text-gray-500"
1772
1781
  }, null, 8, ["text"])
@@ -1774,9 +1783,9 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1774
1783
  _: 1
1775
1784
  }, 8, ["class"])) : M("", !0),
1776
1785
  y("div", {
1777
- class: k(g.value)
1786
+ class: k(v.value)
1778
1787
  }, [
1779
- _(h.$slots, "default", { close: I })
1788
+ _(h.$slots, "default", { close: L })
1780
1789
  ], 2)
1781
1790
  ]),
1782
1791
  _: 2
@@ -1785,21 +1794,30 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1785
1794
  _: 3
1786
1795
  }, 16, ["persistent"]));
1787
1796
  }
1788
- }), Rr = /* @__PURE__ */ v({
1797
+ });
1798
+ function Pr(t) {
1799
+ const s = u(() => t.title ?? S("ui.alert", "Alert")), e = u(() => !t.title);
1800
+ return { renderedTitle: s, titleHidden: e };
1801
+ }
1802
+ const Rr = /* @__PURE__ */ g({
1789
1803
  __name: "AlertModal",
1790
1804
  props: {
1791
1805
  title: {},
1792
1806
  message: {}
1793
1807
  },
1794
1808
  setup(t, { expose: s }) {
1795
- return s(), (e, r) => (i(), m(re, { title: e.title }, {
1796
- default: p(() => [
1797
- f(P, { text: e.message }, null, 8, ["text"])
1809
+ const e = t, { renderedTitle: r, titleHidden: n } = Pr(e);
1810
+ return s(), (a, o) => (i(), f(X, {
1811
+ title: l(r),
1812
+ "title-hidden": l(n)
1813
+ }, {
1814
+ default: m(() => [
1815
+ p(A, { text: a.message }, null, 8, ["text"])
1798
1816
  ]),
1799
1817
  _: 1
1800
- }, 8, ["title"]));
1818
+ }, 8, ["title", "title-hidden"]));
1801
1819
  }
1802
- }), pt = /* @__PURE__ */ v({
1820
+ }), ft = /* @__PURE__ */ g({
1803
1821
  __name: "Form",
1804
1822
  props: {
1805
1823
  form: {}
@@ -1808,10 +1826,10 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1808
1826
  setup(t, { emit: s }) {
1809
1827
  let e;
1810
1828
  const r = s;
1811
- return le((n) => {
1829
+ return oe((n) => {
1812
1830
  var a;
1813
1831
  e == null || e(), e = (a = t.form) == null ? void 0 : a.on("submit", () => r("submit")), n(() => e == null ? void 0 : e());
1814
- }), te("form", t.form), (n, a) => (i(), b("form", {
1832
+ }), se("form", t.form), (n, a) => (i(), b("form", {
1815
1833
  onSubmit: a[0] || (a[0] = qe((o) => {
1816
1834
  var c;
1817
1835
  return (c = n.form) == null ? void 0 : c.submit();
@@ -1821,26 +1839,26 @@ const xr = j({ name: "zondicons-close", render: $r }), Cr = /* @__PURE__ */ v({
1821
1839
  ], 32));
1822
1840
  }
1823
1841
  });
1824
- function Tr(t) {
1825
- const s = st(
1842
+ function Ar(t) {
1843
+ const s = nt(
1826
1844
  Object.entries(t.checkboxes ?? {}).reduce(
1827
- (n, [a, o]) => ({
1828
- [a]: {
1845
+ (o, [c, d]) => ({
1846
+ [c]: {
1829
1847
  type: "boolean",
1830
- default: o.default,
1831
- required: o.required ? "required" : void 0
1848
+ default: d.default,
1849
+ required: d.required ? "required" : void 0
1832
1850
  },
1833
- ...n
1851
+ ...o
1834
1852
  }),
1835
1853
  {}
1836
1854
  )
1837
- ), e = d(() => t.acceptText ?? S("ui.accept", "Ok")), r = d(() => t.cancelText ?? S("ui.cancel", "Cancel"));
1838
- return { form: s, renderedAcceptText: e, renderedCancelText: r };
1855
+ ), e = u(() => t.title ?? S("ui.confirm", "Confirm")), r = u(() => !t.title), n = u(() => t.acceptText ?? S("ui.accept", "Ok")), a = u(() => t.cancelText ?? S("ui.cancel", "Cancel"));
1856
+ return { form: s, renderedTitle: e, titleHidden: r, renderedAcceptText: n, renderedCancelText: a };
1839
1857
  }
1840
- const Vr = {
1858
+ const zr = {
1841
1859
  key: 0,
1842
1860
  class: "mt-4 flex flex-col text-sm text-gray-600"
1843
- }, Pr = { class: "flex items-center" }, jr = ["onUpdate:modelValue", "required"], Ar = { class: "ml-1.5" }, zr = { class: "mt-4 flex flex-row-reverse gap-2" }, Br = /* @__PURE__ */ v({
1861
+ }, jr = { class: "flex items-center" }, Br = ["onUpdate:modelValue", "required"], Dr = { class: "ml-1.5" }, qr = { class: "mt-4 flex flex-row-reverse gap-2" }, Fr = /* @__PURE__ */ g({
1844
1862
  __name: "ConfirmModal",
1845
1863
  props: {
1846
1864
  title: {},
@@ -1854,53 +1872,54 @@ const Vr = {
1854
1872
  required: { type: Boolean }
1855
1873
  },
1856
1874
  setup(t, { expose: s }) {
1857
- const e = X(t, ["cancelVariant"]), { form: r, renderedAcceptText: n, renderedCancelText: a } = Tr(e);
1858
- return s(), (o, c) => (i(), m(re, {
1859
- title: o.title,
1875
+ const e = J(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: o, renderedCancelText: c } = Ar(e);
1876
+ return s(), (d, v) => (i(), f(X, {
1877
+ title: l(n),
1878
+ "title-hidden": l(a),
1860
1879
  persistent: ""
1861
1880
  }, {
1862
- default: p(({ close: u }) => [
1863
- f(pt, {
1881
+ default: m(({ close: x }) => [
1882
+ p(ft, {
1864
1883
  form: l(r),
1865
- onSubmit: (g) => u([!0, l(r).data()])
1884
+ onSubmit: (h) => x([!0, l(r).data()])
1866
1885
  }, {
1867
- default: p(() => [
1868
- f(P, {
1869
- text: o.message,
1870
- actions: o.actions
1886
+ default: m(() => [
1887
+ p(A, {
1888
+ text: d.message,
1889
+ actions: d.actions
1871
1890
  }, null, 8, ["text", "actions"]),
1872
- o.checkboxes ? (i(), b("ul", Vr, [
1873
- (i(!0), b(D, null, F(o.checkboxes, (g, $) => (i(), b("li", { key: $ }, [
1874
- y("label", Pr, [
1891
+ d.checkboxes ? (i(), b("ul", zr, [
1892
+ (i(!0), b(B, null, q(d.checkboxes, (h, w) => (i(), b("li", { key: w }, [
1893
+ y("label", jr, [
1875
1894
  Fe(y("input", {
1876
- "onUpdate:modelValue": (h) => l(r)[$] = h,
1895
+ "onUpdate:modelValue": (L) => l(r)[w] = L,
1877
1896
  type: "checkbox",
1878
- required: g.required,
1897
+ required: h.required,
1879
1898
  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"
1880
- }, null, 8, jr), [
1881
- [kt, l(r)[$]]
1899
+ }, null, 8, Br), [
1900
+ [Et, l(r)[w]]
1882
1901
  ]),
1883
- y("span", Ar, C(g.label), 1)
1902
+ y("span", Dr, C(h.label), 1)
1884
1903
  ])
1885
1904
  ]))), 128))
1886
1905
  ])) : M("", !0),
1887
- y("div", zr, [
1888
- f(A, {
1889
- variant: o.acceptVariant,
1906
+ y("div", qr, [
1907
+ p(z, {
1908
+ variant: d.acceptVariant,
1890
1909
  submit: ""
1891
1910
  }, {
1892
- default: p(() => [
1893
- V(C(l(n)), 1)
1911
+ default: m(() => [
1912
+ R(C(l(o)), 1)
1894
1913
  ]),
1895
1914
  _: 1
1896
1915
  }, 8, ["variant"]),
1897
- o.required ? M("", !0) : (i(), m(A, {
1916
+ d.required ? M("", !0) : (i(), f(z, {
1898
1917
  key: 0,
1899
- variant: o.cancelVariant,
1900
- onClick: (g) => u(!1)
1918
+ variant: d.cancelVariant,
1919
+ onClick: (h) => x(!1)
1901
1920
  }, {
1902
- default: p(() => [
1903
- V(C(l(a)), 1)
1921
+ default: m(() => [
1922
+ R(C(l(c)), 1)
1904
1923
  ]),
1905
1924
  _: 2
1906
1925
  }, 1032, ["variant", "onClick"]))
@@ -1910,94 +1929,94 @@ const Vr = {
1910
1929
  }, 1032, ["form", "onSubmit"])
1911
1930
  ]),
1912
1931
  _: 1
1913
- }, 8, ["title"]));
1932
+ }, 8, ["title", "title-hidden"]));
1914
1933
  }
1915
- }), Dr = {
1934
+ }), Ur = {
1916
1935
  viewBox: "0 0 20 20",
1917
1936
  width: "1.2em",
1918
1937
  height: "1.2em"
1919
1938
  };
1920
- function qr(t, s) {
1921
- return i(), b("svg", Dr, s[0] || (s[0] = [
1939
+ function Or(t, s) {
1940
+ return i(), b("svg", Ur, s[0] || (s[0] = [
1922
1941
  y("path", {
1923
1942
  fill: "currentColor",
1924
1943
  d: "M7.05 9.293L6.343 10L12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"
1925
1944
  }, null, -1)
1926
1945
  ]));
1927
1946
  }
1928
- const Fr = j({ name: "zondicons-cheveron-left", render: qr }), Ur = {
1947
+ const Nr = P({ name: "zondicons-cheveron-left", render: Or }), Wr = {
1929
1948
  viewBox: "0 0 20 20",
1930
1949
  width: "1.2em",
1931
1950
  height: "1.2em"
1932
1951
  };
1933
- function Or(t, s) {
1934
- return i(), b("svg", Ur, s[0] || (s[0] = [
1952
+ function Kr(t, s) {
1953
+ return i(), b("svg", Wr, s[0] || (s[0] = [
1935
1954
  y("path", {
1936
1955
  fill: "currentColor",
1937
1956
  d: "m12.95 10.707l.707-.707L8 4.343L6.586 5.757L10.828 10l-4.242 4.243L8 15.657z"
1938
1957
  }, null, -1)
1939
1958
  ]));
1940
1959
  }
1941
- const mt = j({ name: "zondicons-cheveron-right", render: Or }), Nr = {
1960
+ const ht = P({ name: "zondicons-cheveron-right", render: Kr }), Qr = {
1942
1961
  viewBox: "0 0 20 20",
1943
1962
  width: "1.2em",
1944
1963
  height: "1.2em"
1945
1964
  };
1946
- function Wr(t, s) {
1947
- return i(), b("svg", Nr, s[0] || (s[0] = [
1965
+ function Jr(t, s) {
1966
+ return i(), b("svg", Qr, s[0] || (s[0] = [
1948
1967
  y("path", {
1949
1968
  fill: "currentColor",
1950
1969
  d: "M2.93 17.07A10 10 0 1 1 17.07 2.93A10 10 0 0 1 2.93 17.07M9 5v6h2V5zm0 8v2h2v-2z"
1951
1970
  }, null, -1)
1952
1971
  ]));
1953
1972
  }
1954
- const ft = j({ name: "zondicons-exclamation-solid", render: Wr }), Kr = {
1973
+ const gt = P({ name: "zondicons-exclamation-solid", render: Jr }), Zr = {
1955
1974
  viewBox: "0 0 24 24",
1956
1975
  width: "1.2em",
1957
1976
  height: "1.2em"
1958
1977
  };
1959
- function Qr(t, s) {
1960
- return i(), b("svg", Kr, s[0] || (s[0] = [
1978
+ function Gr(t, s) {
1979
+ return i(), b("svg", Zr, s[0] || (s[0] = [
1961
1980
  y("path", {
1962
1981
  fill: "currentColor",
1963
1982
  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"
1964
1983
  }, null, -1)
1965
1984
  ]));
1966
1985
  }
1967
- const Jr = j({ name: "mdi-console", render: Qr }), Zr = {
1986
+ const Xr = P({ name: "mdi-console", render: Gr }), Yr = {
1968
1987
  viewBox: "0 0 20 20",
1969
1988
  width: "1.2em",
1970
1989
  height: "1.2em"
1971
1990
  };
1972
- function Gr(t, s) {
1973
- return i(), b("svg", Zr, s[0] || (s[0] = [
1991
+ function en(t, s) {
1992
+ return i(), b("svg", Yr, s[0] || (s[0] = [
1974
1993
  y("path", {
1975
1994
  fill: "currentColor",
1976
1995
  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"
1977
1996
  }, null, -1)
1978
1997
  ]));
1979
1998
  }
1980
- const Xr = j({ name: "zondicons-copy", render: Gr }), Yr = {
1999
+ const tn = P({ name: "zondicons-copy", render: en }), sn = {
1981
2000
  viewBox: "0 0 24 24",
1982
2001
  width: "1.2em",
1983
2002
  height: "1.2em"
1984
2003
  };
1985
- function en(t, s) {
1986
- return i(), b("svg", Yr, s[0] || (s[0] = [
2004
+ function rn(t, s) {
2005
+ return i(), b("svg", sn, s[0] || (s[0] = [
1987
2006
  y("path", {
1988
2007
  fill: "currentColor",
1989
2008
  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"
1990
2009
  }, null, -1)
1991
2010
  ]));
1992
2011
  }
1993
- const tn = j({ name: "mdi-github", render: en }), sn = { class: "flex" }, rn = { class: "sr-only" }, nn = /* @__PURE__ */ v({
2012
+ const nn = P({ name: "mdi-github", render: rn }), an = { class: "flex" }, ln = { class: "sr-only" }, on = /* @__PURE__ */ g({
1994
2013
  __name: "ErrorReportModalButtons",
1995
2014
  props: {
1996
2015
  report: {}
1997
2016
  },
1998
2017
  setup(t) {
1999
- const s = t, e = d(() => s.report.description ? `${s.report.title}: ${s.report.description}` : s.report.title), r = d(() => {
2000
- if (!z.sourceUrl)
2018
+ const s = t, e = u(() => s.report.description ? `${s.report.title}: ${s.report.description}` : s.report.title), r = u(() => {
2019
+ if (!j.sourceUrl)
2001
2020
  return !1;
2002
2021
  const a = encodeURIComponent(e.value), o = encodeURIComponent(
2003
2022
  [
@@ -2005,34 +2024,34 @@ const tn = j({ name: "mdi-github", render: en }), sn = { class: "flex" }, rn = {
2005
2024
  "",
2006
2025
  "Error details:",
2007
2026
  "```",
2008
- qt(
2027
+ Ut(
2009
2028
  s.report.details ?? "Details missing from report",
2010
- 1800 - a.length - z.sourceUrl.length
2029
+ 1800 - a.length - j.sourceUrl.length
2011
2030
  ).trim(),
2012
2031
  "```"
2013
2032
  ].join(`
2014
2033
  `)
2015
2034
  );
2016
- return `${z.sourceUrl}/issues/new?title=${a}&body=${o}`;
2017
- }), n = d(() => J(
2035
+ return `${j.sourceUrl}/issues/new?title=${a}&body=${o}`;
2036
+ }), n = u(() => Z(
2018
2037
  [
2019
2038
  {
2020
2039
  id: "clipboard",
2021
2040
  description: "Copy to clipboard",
2022
- iconComponent: Xr,
2041
+ iconComponent: tn,
2023
2042
  async click() {
2024
2043
  await navigator.clipboard.writeText(`${e.value}
2025
2044
 
2026
- ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information copied to clipboard"));
2045
+ ${s.report.details}`), V.toast(S("errors.copiedToClipboard", "Debug information copied to clipboard"));
2027
2046
  }
2028
2047
  },
2029
2048
  {
2030
2049
  id: "console",
2031
2050
  description: "Log to console",
2032
- iconComponent: Jr,
2051
+ iconComponent: Xr,
2033
2052
  click() {
2034
2053
  const a = s.report.error ?? s.report;
2035
- window.error = a, console.error(a), R.toast(
2054
+ window.error = a, console.error(a), V.toast(
2036
2055
  S(
2037
2056
  "errors.addedToConsole",
2038
2057
  "You can now use the **error** variable in the console"
@@ -2045,14 +2064,14 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
2045
2064
  r.value && a.push({
2046
2065
  id: "github",
2047
2066
  description: "Report in GitHub",
2048
- iconComponent: tn,
2067
+ iconComponent: nn,
2049
2068
  url: r.value
2050
2069
  });
2051
2070
  }
2052
2071
  ));
2053
- return (a, o) => (i(), b("div", sn, [
2054
- (i(!0), b(D, null, F(n.value, (c) => _(a.$slots, "default", T({ ref_for: !0 }, c), () => [
2055
- f(A, {
2072
+ return (a, o) => (i(), b("div", an, [
2073
+ (i(!0), b(B, null, q(n.value, (c) => _(a.$slots, "default", I({ ref_for: !0 }, c), () => [
2074
+ p(z, {
2056
2075
  size: "icon",
2057
2076
  variant: "ghost",
2058
2077
  class: "group whitespace-nowrap",
@@ -2060,9 +2079,9 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
2060
2079
  title: a.$td(`errors.report_${c.id}`, c.description),
2061
2080
  onClick: c.click
2062
2081
  }, {
2063
- default: p(() => [
2064
- y("span", rn, C(a.$td(`errors.report_${c.id}`, c.description)), 1),
2065
- (i(), m(N(c.iconComponent), {
2082
+ default: m(() => [
2083
+ y("span", ln, C(a.$td(`errors.report_${c.id}`, c.description)), 1),
2084
+ (i(), f(N(c.iconComponent), {
2066
2085
  class: "size-4",
2067
2086
  "aria-hidden": "true"
2068
2087
  }))
@@ -2072,7 +2091,7 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
2072
2091
  ])), 256))
2073
2092
  ]));
2074
2093
  }
2075
- }), an = /* @__PURE__ */ v({
2094
+ }), cn = /* @__PURE__ */ g({
2076
2095
  __name: "ErrorReportModalTitle",
2077
2096
  props: {
2078
2097
  report: {},
@@ -2080,15 +2099,15 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
2080
2099
  totalReports: {}
2081
2100
  },
2082
2101
  setup(t) {
2083
- const s = d(() => !t.totalReports || t.totalReports <= 1 ? t.report.title : `${t.report.title} (${t.currentReport}/${t.totalReports})`);
2084
- return (e, r) => (i(), m(P, {
2102
+ const s = u(() => !t.totalReports || t.totalReports <= 1 ? t.report.title : `${t.report.title} (${t.currentReport}/${t.totalReports})`);
2103
+ return (e, r) => (i(), f(A, {
2085
2104
  text: s.value,
2086
2105
  inline: ""
2087
2106
  }, null, 8, ["text"]));
2088
2107
  }
2089
2108
  });
2090
- function on(t) {
2091
- const s = q(0), e = d(() => t.reports[s.value]), r = d(
2109
+ function un(t) {
2110
+ const s = F(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = u(() => t.reports[s.value]), r = u(
2092
2111
  () => {
2093
2112
  var o;
2094
2113
  return ((o = e.value.details) == null ? void 0 : o.trim()) || S("errors.detailsEmpty", "This error is missing a stacktrace.");
@@ -2099,88 +2118,95 @@ function on(t) {
2099
2118
  details: r,
2100
2119
  nextReportText: a,
2101
2120
  previousReportText: n,
2102
- report: e
2121
+ activeReport: e
2103
2122
  };
2104
2123
  }
2105
- const ln = { class: "px-4 pt-5 pb-4" }, cn = { class: "flex justify-between gap-4" }, un = { class: "flex items-center gap-2" }, dn = {
2124
+ const dn = { class: "px-4 pt-5 pb-4" }, pn = { class: "flex justify-between gap-4" }, mn = { class: "flex items-center gap-2" }, fn = {
2106
2125
  key: 0,
2107
2126
  class: "flex gap-0.5"
2108
- }, pn = { class: "-mt-2 max-h-[80vh] overflow-auto bg-red-800/10" }, mn = ["textContent"], fn = /* @__PURE__ */ v({
2127
+ }, hn = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, gn = ["textContent"], vn = /* @__PURE__ */ g({
2109
2128
  __name: "ErrorReportModal",
2110
2129
  props: {
2130
+ report: {},
2111
2131
  reports: {}
2112
2132
  },
2113
2133
  setup(t, { expose: s }) {
2114
- const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: o, report: c } = on(e);
2115
- return s(), (u, g) => (i(), m(re, { "wrapper-class": "p-0 sm:w-auto sm:min-w-lg sm:max-w-[80vw]" }, {
2116
- default: p(() => [
2117
- y("div", ln, [
2118
- y("h2", cn, [
2119
- y("div", un, [
2120
- f(l(ft), { class: "size-5 text-red-600" }),
2121
- f(an, {
2134
+ const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: o, activeReport: c } = un(e);
2135
+ return s(), (d, v) => (i(), f(X, {
2136
+ title: d.$td("errors.report", "Error report"),
2137
+ "title-hidden": "",
2138
+ "close-hidden": "",
2139
+ class: "p-0",
2140
+ "wrapper-class": "sm:w-auto sm:min-w-lg sm:max-w-[80vw]"
2141
+ }, {
2142
+ default: m(() => [
2143
+ y("div", dn, [
2144
+ y("h2", pn, [
2145
+ y("div", mn, [
2146
+ p(l(gt), { class: "size-5 text-red-600" }),
2147
+ p(cn, {
2122
2148
  class: "text-lg leading-6 font-semibold text-gray-900",
2123
2149
  report: l(c),
2124
2150
  "current-report": l(r) + 1,
2125
- "total-reports": u.reports.length
2151
+ "total-reports": d.reports.length
2126
2152
  }, null, 8, ["report", "current-report", "total-reports"]),
2127
- u.reports.length > 1 ? (i(), b("span", dn, [
2128
- f(A, {
2153
+ d.reports.length > 1 ? (i(), b("span", fn, [
2154
+ p(z, {
2129
2155
  size: "icon",
2130
2156
  variant: "ghost",
2131
2157
  disabled: l(r) === 0,
2132
2158
  "aria-label": l(o),
2133
2159
  title: l(o),
2134
- onClick: g[0] || (g[0] = ($) => r.value--)
2160
+ onClick: v[0] || (v[0] = (x) => r.value--)
2135
2161
  }, {
2136
- default: p(() => [
2137
- f(l(Fr), { class: "size-4" })
2162
+ default: m(() => [
2163
+ p(l(Nr), { class: "size-4" })
2138
2164
  ]),
2139
2165
  _: 1
2140
2166
  }, 8, ["disabled", "aria-label", "title"]),
2141
- f(A, {
2167
+ p(z, {
2142
2168
  size: "icon",
2143
2169
  variant: "ghost",
2144
- disabled: l(r) === u.reports.length - 1,
2170
+ disabled: l(r) === d.reports.length - 1,
2145
2171
  "aria-label": l(a),
2146
2172
  title: l(a),
2147
- onClick: g[1] || (g[1] = ($) => r.value++)
2173
+ onClick: v[1] || (v[1] = (x) => r.value++)
2148
2174
  }, {
2149
- default: p(() => [
2150
- f(l(mt), { class: "size-4" })
2175
+ default: m(() => [
2176
+ p(l(ht), { class: "size-4" })
2151
2177
  ]),
2152
2178
  _: 1
2153
2179
  }, 8, ["disabled", "aria-label", "title"])
2154
2180
  ])) : M("", !0)
2155
2181
  ]),
2156
- f(nn, {
2182
+ p(on, {
2157
2183
  report: l(c),
2158
2184
  class: "gap-0.5"
2159
2185
  }, null, 8, ["report"])
2160
2186
  ]),
2161
- l(c).description ? (i(), m(P, {
2187
+ l(c).description ? (i(), f(A, {
2162
2188
  key: 0,
2163
2189
  text: l(c).description,
2164
2190
  class: "text-gray-600"
2165
2191
  }, null, 8, ["text"])) : M("", !0)
2166
2192
  ]),
2167
- y("div", pn, [
2193
+ y("div", hn, [
2168
2194
  y("pre", {
2169
2195
  class: "p-4 text-xs text-red-800",
2170
2196
  textContent: C(l(n))
2171
- }, null, 8, mn)
2197
+ }, null, 8, gn)
2172
2198
  ])
2173
2199
  ]),
2174
2200
  _: 1
2175
- }));
2201
+ }, 8, ["title"]));
2176
2202
  }
2177
- }), hn = {
2203
+ }), bn = {
2178
2204
  viewBox: "0 0 24 24",
2179
2205
  width: "1.2em",
2180
2206
  height: "1.2em"
2181
2207
  };
2182
- function gn(t, s) {
2183
- return i(), b("svg", hn, s[0] || (s[0] = [
2208
+ function yn(t, s) {
2209
+ return i(), b("svg", bn, s[0] || (s[0] = [
2184
2210
  y("path", {
2185
2211
  fill: "currentColor",
2186
2212
  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",
@@ -2200,7 +2226,7 @@ function gn(t, s) {
2200
2226
  ], -1)
2201
2227
  ]));
2202
2228
  }
2203
- const vn = j({ name: "svg-spinners-90-ring-with-bg", render: gn }), bn = { class: "mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, yn = { class: "sr-only" }, _n = /* @__PURE__ */ v({
2229
+ const _n = P({ name: "svg-spinners-90-ring-with-bg", render: yn }), $n = { class: "mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, wn = { class: "sr-only" }, xn = /* @__PURE__ */ g({
2204
2230
  __name: "ProgressBar",
2205
2231
  props: {
2206
2232
  filledClass: {},
@@ -2209,31 +2235,31 @@ const vn = j({ name: "svg-spinners-90-ring-with-bg", render: gn }), bn = { class
2209
2235
  },
2210
2236
  setup(t) {
2211
2237
  let s;
2212
- const e = q(0), r = d(() => E("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = d(() => typeof t.progress == "number" ? t.progress : e.value);
2238
+ const e = F(0), r = u(() => E("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = u(() => typeof t.progress == "number" ? t.progress : e.value);
2213
2239
  return Ee(
2214
2240
  () => t.job,
2215
2241
  () => {
2216
2242
  s && s(), e.value = t.job ? t.job.progress : 0, s = t.job && t.job.listeners.add({ onUpdated: (a) => e.value = a });
2217
2243
  },
2218
2244
  { immediate: !0 }
2219
- ), de(() => s && s()), (a, o) => (i(), b("div", bn, [
2245
+ ), pe(() => s && s()), (a, o) => (i(), b("div", $n, [
2220
2246
  y("div", {
2221
2247
  class: k(r.value),
2222
- style: Mt(`transform:translateX(-${(1 - n.value) * 100}%)`)
2248
+ style: Ht(`transform:translateX(-${(1 - n.value) * 100}%)`)
2223
2249
  }, null, 6),
2224
- y("span", yn, C(a.$td("ui.progress", "{progress}% complete", {
2250
+ y("span", wn, C(a.$td("ui.progress", "{progress}% complete", {
2225
2251
  progress: n.value * 100
2226
2252
  })), 1)
2227
2253
  ]));
2228
2254
  }
2229
2255
  });
2230
- function wn(t) {
2231
- const s = d(() => t.title ?? S("ui.loading", "Loading")), e = d(
2256
+ function Cn(t) {
2257
+ const s = u(() => t.title ?? S("ui.loading", "Loading")), e = u(
2232
2258
  () => t.message ?? S("ui.loadingInProgress", "Loading in progress...")
2233
- ), r = d(() => typeof t.progress == "number" || !!t.job), n = d(() => !t.title);
2259
+ ), r = u(() => typeof t.progress == "number" || !!t.job), n = u(() => !t.title);
2234
2260
  return { renderedTitle: s, renderedMessage: e, titleHidden: n, showProgress: r };
2235
2261
  }
2236
- const $n = /* @__PURE__ */ v({
2262
+ const Sn = /* @__PURE__ */ g({
2237
2263
  __name: "LoadingModal",
2238
2264
  props: {
2239
2265
  title: {},
@@ -2242,30 +2268,30 @@ const $n = /* @__PURE__ */ v({
2242
2268
  job: {}
2243
2269
  },
2244
2270
  setup(t, { expose: s }) {
2245
- const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: o } = wn(e);
2246
- return s(), (c, u) => (i(), m(re, {
2271
+ const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: o } = Cn(e);
2272
+ return s(), (c, d) => (i(), f(X, {
2247
2273
  persistent: "",
2248
2274
  class: k(["flex", { "flex-col-reverse": l(o), "items-center justify-center gap-2": !l(o) }]),
2249
2275
  "wrapper-class": "w-auto",
2250
2276
  title: l(r),
2251
2277
  "title-hidden": l(a)
2252
2278
  }, {
2253
- default: p(() => [
2254
- l(o) ? (i(), m(_n, {
2279
+ default: m(() => [
2280
+ l(o) ? (i(), f(xn, {
2255
2281
  key: 0,
2256
2282
  progress: c.progress,
2257
2283
  job: c.job,
2258
2284
  class: "min-w-[min(400px,80vw)]"
2259
- }, null, 8, ["progress", "job"])) : (i(), m(l(vn), {
2285
+ }, null, 8, ["progress", "job"])) : (i(), f(l(_n), {
2260
2286
  key: 1,
2261
2287
  class: "text-primary-600 mr-1 size-6"
2262
2288
  })),
2263
- f(P, { text: l(n) }, null, 8, ["text"])
2289
+ p(A, { text: l(n) }, null, 8, ["text"])
2264
2290
  ]),
2265
2291
  _: 1
2266
2292
  }, 8, ["title", "title-hidden", "class"]));
2267
2293
  }
2268
- }), ht = /* @__PURE__ */ v({
2294
+ }), vt = /* @__PURE__ */ g({
2269
2295
  __name: "HeadlessInput",
2270
2296
  props: {
2271
2297
  name: {},
@@ -2276,14 +2302,14 @@ const $n = /* @__PURE__ */ v({
2276
2302
  },
2277
2303
  emits: ["update:modelValue"],
2278
2304
  setup(t, { expose: s, emit: e }) {
2279
- const r = e, n = oe("form", null), a = d(() => !n || !t.name ? null : n.errors[t.name] ?? null), o = {
2305
+ const r = e, n = le("form", null), a = u(() => !n || !t.name ? null : n.errors[t.name] ?? null), o = {
2280
2306
  id: `input-${ae()}`,
2281
- name: d(() => t.name),
2282
- label: d(() => t.label),
2283
- description: d(() => t.description),
2284
- value: d(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
2307
+ name: u(() => t.name),
2308
+ label: u(() => t.label),
2309
+ description: u(() => t.description),
2310
+ value: u(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
2285
2311
  errors: Me(a),
2286
- required: d(() => {
2312
+ required: u(() => {
2287
2313
  if (!(!t.name || !n))
2288
2314
  return n.getFieldRules(t.name).includes("required");
2289
2315
  }),
@@ -2295,33 +2321,33 @@ const $n = /* @__PURE__ */ v({
2295
2321
  r("update:modelValue", c);
2296
2322
  }
2297
2323
  };
2298
- return te("input", o), s(o), (c, u) => (i(), m(N(c.as), null, {
2299
- default: p(() => [
2324
+ return se("input", o), s(o), (c, d) => (i(), f(N(c.as), null, {
2325
+ default: m(() => [
2300
2326
  _(c.$slots, "default")
2301
2327
  ]),
2302
2328
  _: 3
2303
2329
  }));
2304
2330
  }
2305
- }), xn = ["for"], Ce = /* @__PURE__ */ v({
2331
+ }), kn = ["for"], Ce = /* @__PURE__ */ g({
2306
2332
  __name: "HeadlessInputLabel",
2307
2333
  setup(t) {
2308
- const s = H("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = ke(), r = d(() => !!(s.label || e.default));
2334
+ const s = H("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = ke(), r = u(() => !!(s.label || e.default));
2309
2335
  return (n, a) => r.value ? (i(), b("label", {
2310
2336
  key: 0,
2311
2337
  for: l(s).id
2312
2338
  }, [
2313
2339
  _(n.$slots, "default", {}, () => [
2314
- V(C(l(s).label), 1)
2340
+ R(C(l(s).label), 1)
2315
2341
  ])
2316
- ], 8, xn)) : M("", !0);
2342
+ ], 8, kn)) : M("", !0);
2317
2343
  }
2318
- }), Cn = ["id", "name", "type", "checked", "required", "aria-invalid", "aria-describedby"], gt = /* @__PURE__ */ v({
2344
+ }), Mn = ["id", "name", "type", "checked", "required", "aria-invalid", "aria-describedby"], bt = /* @__PURE__ */ g({
2319
2345
  __name: "HeadlessInputInput",
2320
2346
  props: {
2321
2347
  type: { default: "text" }
2322
2348
  },
2323
2349
  setup(t) {
2324
- const s = se("$inputRef"), e = H("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = d(() => e.name ?? void 0), n = d(() => e.value), a = d(() => {
2350
+ const s = re("$inputRef"), e = H("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = u(() => e.name ?? void 0), n = u(() => e.value), a = u(() => {
2325
2351
  if (t.type === "checkbox")
2326
2352
  return !!n.value;
2327
2353
  });
@@ -2340,10 +2366,10 @@ const $n = /* @__PURE__ */ v({
2340
2366
  return s.value.value;
2341
2367
  }
2342
2368
  }
2343
- return tt(e, () => {
2344
- var u;
2345
- return (u = s.value) == null ? void 0 : u.focus();
2346
- }), le(() => {
2369
+ return rt(e, () => {
2370
+ var d;
2371
+ return (d = s.value) == null ? void 0 : d.focus();
2372
+ }), oe(() => {
2347
2373
  if (s.value) {
2348
2374
  if (t.type === "date") {
2349
2375
  s.value.valueAsDate = n.value;
@@ -2351,48 +2377,48 @@ const $n = /* @__PURE__ */ v({
2351
2377
  }
2352
2378
  s.value.value = n.value ?? null;
2353
2379
  }
2354
- }), (u, g) => (i(), b("input", {
2380
+ }), (d, v) => (i(), b("input", {
2355
2381
  id: l(e).id,
2356
2382
  ref: "$inputRef",
2357
2383
  name: r.value,
2358
- type: u.type,
2384
+ type: d.type,
2359
2385
  checked: a.value,
2360
2386
  required: l(e).required ?? void 0,
2361
2387
  "aria-invalid": l(e).errors ? "true" : "false",
2362
2388
  "aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
2363
2389
  onInput: o
2364
- }, null, 40, Cn));
2390
+ }, null, 40, Mn));
2365
2391
  }
2366
- }), Sn = /* @__PURE__ */ v({
2392
+ }), En = /* @__PURE__ */ g({
2367
2393
  inheritAttrs: !1,
2368
2394
  __name: "HeadlessInputDescription",
2369
2395
  setup(t) {
2370
2396
  const s = H(
2371
2397
  "input",
2372
2398
  "<HeadlessInputDescription> must be a child of a <HeadlessInput>"
2373
- ), e = d(() => typeof s.description == "string" ? s.description : ""), r = d(() => !!s.description);
2399
+ ), e = u(() => typeof s.description == "string" ? s.description : ""), r = u(() => !!s.description);
2374
2400
  return (n, a) => _(n.$slots, "default", {
2375
2401
  id: `${l(s).id}-description`
2376
2402
  }, () => [
2377
- r.value ? (i(), m(P, T({ key: 0 }, n.$attrs, {
2403
+ r.value ? (i(), f(A, I({ key: 0 }, n.$attrs, {
2378
2404
  id: `${l(s).id}-description`,
2379
2405
  text: e.value
2380
2406
  }), null, 16, ["id", "text"])) : M("", !0)
2381
2407
  ]);
2382
2408
  }
2383
- }), kn = ["id"], Se = /* @__PURE__ */ v({
2409
+ }), Hn = ["id"], Se = /* @__PURE__ */ g({
2384
2410
  __name: "HeadlessInputError",
2385
2411
  setup(t) {
2386
- const s = H("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = d(() => s.errors ? S(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
2412
+ const s = H("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = u(() => s.errors ? S(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
2387
2413
  return (r, n) => e.value ? (i(), b("p", {
2388
2414
  key: 0,
2389
2415
  id: `${l(s).id}-error`
2390
- }, C(e.value), 9, kn)) : M("", !0);
2416
+ }, C(e.value), 9, Hn)) : M("", !0);
2391
2417
  }
2392
- }), Mn = {
2418
+ }), Ln = {
2393
2419
  key: 0,
2394
2420
  class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
2395
- }, En = /* @__PURE__ */ v({
2421
+ }, In = /* @__PURE__ */ g({
2396
2422
  inheritAttrs: !1,
2397
2423
  __name: "Input",
2398
2424
  props: {
@@ -2405,123 +2431,123 @@ const $n = /* @__PURE__ */ v({
2405
2431
  },
2406
2432
  emits: ["update:modelValue"],
2407
2433
  setup(t) {
2408
- const s = X(t, ["label", "inputClass", "wrapperClass"]), e = se("$inputRef"), [r, n] = rt(), a = d(() => E("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), o = d(() => {
2409
- var c, u, g;
2434
+ const s = J(t, ["label", "inputClass", "wrapperClass"]), e = re("$inputRef"), [r, n] = at(), a = u(() => E("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), o = u(() => {
2435
+ var c, d, v;
2410
2436
  return E(
2411
2437
  // eslint-disable-next-line vue/max-len
2412
2438
  "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",
2413
2439
  {
2414
2440
  "focus:ring-primary-600": !((c = e.value) != null && c.errors),
2415
- "text-gray-900 shadow-2xs ring-gray-300 placeholder:text-gray-400": !((u = e.value) != null && u.errors),
2416
- "pr-10 text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500": (g = e.value) == null ? void 0 : g.errors
2441
+ "text-gray-900 shadow-2xs ring-gray-300 placeholder:text-gray-400": !((d = e.value) != null && d.errors),
2442
+ "pr-10 text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500": (v = e.value) == null ? void 0 : v.errors
2417
2443
  },
2418
2444
  t.inputClass
2419
2445
  );
2420
2446
  });
2421
- return (c, u) => (i(), m(ht, T({
2447
+ return (c, d) => (i(), f(vt, I({
2422
2448
  ref: "$inputRef",
2423
2449
  label: c.label,
2424
2450
  class: l(n)
2425
2451
  }, s, {
2426
- "onUpdate:modelValue": u[0] || (u[0] = (g) => c.$emit("update:modelValue", g))
2452
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => c.$emit("update:modelValue", v))
2427
2453
  }), {
2428
- default: p(() => {
2429
- var g;
2454
+ default: m(() => {
2455
+ var v;
2430
2456
  return [
2431
- f(Ce, { class: "block text-sm leading-6 font-medium text-gray-900" }),
2457
+ p(Ce, { class: "block text-sm leading-6 font-medium text-gray-900" }),
2432
2458
  y("div", {
2433
2459
  class: k(a.value)
2434
2460
  }, [
2435
- f(gt, T(l(r), { class: o.value }), null, 16, ["class"]),
2436
- (g = l(e)) != null && g.errors ? (i(), b("div", Mn, [
2437
- f(l(ft), { class: "size-5 text-red-500" })
2461
+ p(bt, I(l(r), { class: o.value }), null, 16, ["class"]),
2462
+ (v = l(e)) != null && v.errors ? (i(), b("div", Ln, [
2463
+ p(l(gt), { class: "size-5 text-red-500" })
2438
2464
  ])) : M("", !0)
2439
2465
  ], 2),
2440
- f(Sn, { class: "mt-2 text-sm text-gray-600" }),
2441
- f(Se, { class: "mt-2 text-sm text-red-600" })
2466
+ p(En, { class: "mt-2 text-sm text-gray-600" }),
2467
+ p(Se, { class: "mt-2 text-sm text-red-600" })
2442
2468
  ];
2443
2469
  }),
2444
2470
  _: 1
2445
2471
  }, 16, ["label", "class"]));
2446
2472
  }
2447
2473
  });
2448
- function Ha(t, s = {}) {
2474
+ function qa(t, s = {}) {
2449
2475
  return {
2450
2476
  default: t,
2451
2477
  type: "boolean",
2452
2478
  rules: s.rules
2453
2479
  };
2454
2480
  }
2455
- function Ia(t, s = {}) {
2481
+ function Fa(t, s = {}) {
2456
2482
  return {
2457
2483
  default: t,
2458
2484
  type: "date",
2459
2485
  rules: s.rules
2460
2486
  };
2461
2487
  }
2462
- function La(t) {
2488
+ function Ua(t) {
2463
2489
  return {
2464
2490
  default: t,
2465
2491
  type: "boolean",
2466
2492
  rules: "required"
2467
2493
  };
2468
2494
  }
2469
- function Ra(t) {
2495
+ function Oa(t) {
2470
2496
  return {
2471
2497
  default: t,
2472
2498
  type: "date",
2473
2499
  rules: "required"
2474
2500
  };
2475
2501
  }
2476
- function Ta(t) {
2502
+ function Na(t) {
2477
2503
  return {
2478
2504
  default: t,
2479
2505
  type: "number",
2480
2506
  rules: "required"
2481
2507
  };
2482
2508
  }
2483
- function Va(t) {
2509
+ function Wa(t) {
2484
2510
  return {
2485
2511
  default: t,
2486
2512
  type: "object",
2487
2513
  rules: "required"
2488
2514
  };
2489
2515
  }
2490
- function Hn(t) {
2516
+ function Tn(t) {
2491
2517
  return {
2492
2518
  default: t,
2493
2519
  type: "string",
2494
2520
  rules: "required"
2495
2521
  };
2496
2522
  }
2497
- function Pa(t, s = {}) {
2523
+ function Ka(t, s = {}) {
2498
2524
  return {
2499
2525
  default: t,
2500
2526
  type: "number",
2501
2527
  rules: s.rules
2502
2528
  };
2503
2529
  }
2504
- function ja(t, s = {}) {
2530
+ function Qa(t, s = {}) {
2505
2531
  return {
2506
2532
  default: t,
2507
2533
  type: "object",
2508
2534
  rules: s.rules
2509
2535
  };
2510
2536
  }
2511
- function Aa(t, s = {}) {
2537
+ function Ja(t, s = {}) {
2512
2538
  return {
2513
2539
  default: t,
2514
2540
  type: "string",
2515
2541
  rules: s.rules
2516
2542
  };
2517
2543
  }
2518
- function In(t) {
2519
- const s = st({
2520
- draft: Hn(t.defaultValue ?? "")
2521
- }), e = d(() => t.title ?? t.message), r = d(() => t.title ? t.message : null), n = d(() => t.acceptText ?? S("ui.accept", "Ok")), a = d(() => t.cancelText ?? S("ui.cancel", "Cancel"));
2544
+ function Vn(t) {
2545
+ const s = nt({
2546
+ draft: Tn(t.defaultValue ?? "")
2547
+ }), e = u(() => t.title ?? t.message), r = u(() => t.title ? t.message : null), n = u(() => t.acceptText ?? S("ui.accept", "Ok")), a = u(() => t.cancelText ?? S("ui.cancel", "Cancel"));
2522
2548
  return { form: s, renderedTitle: e, renderedMessage: r, renderedAcceptText: n, renderedCancelText: a };
2523
2549
  }
2524
- const Ln = { class: "mt-4 flex flex-row-reverse gap-2" }, Rn = /* @__PURE__ */ v({
2550
+ const Pn = { class: "mt-4 flex flex-row-reverse gap-2" }, Rn = /* @__PURE__ */ g({
2525
2551
  __name: "PromptModal",
2526
2552
  props: {
2527
2553
  title: {},
@@ -2535,43 +2561,43 @@ const Ln = { class: "mt-4 flex flex-row-reverse gap-2" }, Rn = /* @__PURE__ */ v
2535
2561
  cancelVariant: { default: "secondary" }
2536
2562
  },
2537
2563
  setup(t, { expose: s }) {
2538
- const e = X(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: o, renderedCancelText: c } = In(e);
2539
- return s(), (u, g) => (i(), m(re, {
2564
+ const e = J(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: o, renderedCancelText: c } = Vn(e);
2565
+ return s(), (d, v) => (i(), f(X, {
2540
2566
  title: l(n),
2541
2567
  persistent: ""
2542
2568
  }, {
2543
- default: p(({ close: $ }) => [
2544
- f(pt, {
2569
+ default: m(({ close: x }) => [
2570
+ p(ft, {
2545
2571
  form: l(r),
2546
- onSubmit: (h) => $(l(r).draft)
2572
+ onSubmit: (h) => x(l(r).draft)
2547
2573
  }, {
2548
- default: p(() => [
2549
- l(a) ? (i(), m(P, {
2574
+ default: m(() => [
2575
+ l(a) ? (i(), f(A, {
2550
2576
  key: 0,
2551
2577
  text: l(a)
2552
2578
  }, null, 8, ["text"])) : M("", !0),
2553
- f(En, {
2579
+ p(In, {
2554
2580
  name: "draft",
2555
2581
  class: "mt-2",
2556
- placeholder: u.placeholder,
2557
- label: u.label
2582
+ placeholder: d.placeholder,
2583
+ label: d.label
2558
2584
  }, null, 8, ["placeholder", "label"]),
2559
- y("div", Ln, [
2560
- f(A, {
2561
- variant: u.acceptVariant,
2585
+ y("div", Pn, [
2586
+ p(z, {
2587
+ variant: d.acceptVariant,
2562
2588
  submit: ""
2563
2589
  }, {
2564
- default: p(() => [
2565
- V(C(l(o)), 1)
2590
+ default: m(() => [
2591
+ R(C(l(o)), 1)
2566
2592
  ]),
2567
2593
  _: 1
2568
2594
  }, 8, ["variant"]),
2569
- f(A, {
2570
- variant: u.cancelVariant,
2571
- onClick: (h) => $()
2595
+ p(z, {
2596
+ variant: d.cancelVariant,
2597
+ onClick: (h) => x()
2572
2598
  }, {
2573
- default: p(() => [
2574
- V(C(l(c)), 1)
2599
+ default: m(() => [
2600
+ R(C(l(c)), 1)
2575
2601
  ]),
2576
2602
  _: 2
2577
2603
  }, 1032, ["variant", "onClick"])
@@ -2583,13 +2609,13 @@ const Ln = { class: "mt-4 flex flex-row-reverse gap-2" }, Rn = /* @__PURE__ */ v
2583
2609
  _: 1
2584
2610
  }, 8, ["title"]));
2585
2611
  }
2586
- }), Tn = { class: "grid grow place-items-center" }, Vn = { class: "flex flex-col items-center space-y-6 p-8" }, Pn = { class: "mt-2 text-center text-4xl font-medium text-red-600" }, jn = { class: "mt-4 flex flex-col space-y-4" }, An = /* @__PURE__ */ v({
2612
+ }), An = { class: "grid grow place-items-center" }, zn = { class: "flex flex-col items-center space-y-6 p-8" }, jn = { class: "mt-2 text-center text-4xl font-medium text-red-600" }, Bn = { class: "mt-4 flex flex-col space-y-4" }, Dn = /* @__PURE__ */ g({
2587
2613
  __name: "StartupCrash",
2588
2614
  setup(t) {
2589
- return (s, e) => (i(), b("div", Tn, [
2590
- y("div", Vn, [
2591
- y("h1", Pn, C(s.$td("startupCrash.title", "Something went wrong!")), 1),
2592
- f(P, {
2615
+ return (s, e) => (i(), b("div", An, [
2616
+ y("div", zn, [
2617
+ y("h1", jn, C(s.$td("startupCrash.title", "Something went wrong!")), 1),
2618
+ p(A, {
2593
2619
  text: s.$td(
2594
2620
  "startupCrash.message",
2595
2621
  `Something failed trying to start the application.
@@ -2598,22 +2624,22 @@ Here's some things you can do:`
2598
2624
  ),
2599
2625
  class: "mt-4 text-center"
2600
2626
  }, null, 8, ["text"]),
2601
- y("div", jn, [
2602
- f(A, {
2627
+ y("div", Bn, [
2628
+ p(z, {
2603
2629
  variant: "danger",
2604
2630
  onClick: e[0] || (e[0] = (r) => s.$app.reload())
2605
2631
  }, {
2606
- default: p(() => [
2607
- V(C(s.$td("startupCrash.reload", "Try again")), 1)
2632
+ default: m(() => [
2633
+ R(C(s.$td("startupCrash.reload", "Try again")), 1)
2608
2634
  ]),
2609
2635
  _: 1
2610
2636
  }),
2611
- f(A, {
2637
+ p(z, {
2612
2638
  variant: "danger",
2613
2639
  onClick: e[1] || (e[1] = (r) => s.$errors.inspect(s.$errors.startupErrors))
2614
2640
  }, {
2615
- default: p(() => [
2616
- V(C(s.$td("startupCrash.inspect", "View error details")), 1)
2641
+ default: m(() => [
2642
+ R(C(s.$td("startupCrash.inspect", "View error details")), 1)
2617
2643
  ]),
2618
2644
  _: 1
2619
2645
  })
@@ -2621,23 +2647,23 @@ Here's some things you can do:`
2621
2647
  ])
2622
2648
  ]));
2623
2649
  }
2624
- }), vt = /* @__PURE__ */ v({
2650
+ }), yt = /* @__PURE__ */ g({
2625
2651
  __name: "HeadlessToastAction",
2626
2652
  props: {
2627
2653
  action: {}
2628
2654
  },
2629
2655
  setup(t) {
2630
- return (s, e) => (i(), m(N(s.action.dismiss ? l(ms) : "button"), {
2656
+ return (s, e) => (i(), f(N(s.action.dismiss ? l(hs) : "button"), {
2631
2657
  type: "button",
2632
2658
  onClick: s.action.click
2633
2659
  }, {
2634
- default: p(() => [
2635
- V(C(s.action.label), 1)
2660
+ default: m(() => [
2661
+ R(C(s.action.label), 1)
2636
2662
  ]),
2637
2663
  _: 1
2638
2664
  }, 8, ["onClick"]));
2639
2665
  }
2640
- }), zn = { key: 0 }, Bn = /* @__PURE__ */ v({
2666
+ }), qn = { key: 0 }, Fn = /* @__PURE__ */ g({
2641
2667
  __name: "HeadlessToast",
2642
2668
  props: {
2643
2669
  message: {},
@@ -2645,11 +2671,11 @@ Here's some things you can do:`
2645
2671
  variant: {}
2646
2672
  },
2647
2673
  setup(t) {
2648
- return (s, e) => (i(), m(l(fs), null, {
2649
- default: p(() => [
2674
+ return (s, e) => (i(), f(l(gs), null, {
2675
+ default: m(() => [
2650
2676
  _(s.$slots, "default", {}, () => [
2651
- s.message ? (i(), b("span", zn, C(s.message), 1)) : M("", !0),
2652
- (i(!0), b(D, null, F(s.actions, (r, n) => (i(), m(vt, {
2677
+ s.message ? (i(), b("span", qn, C(s.message), 1)) : M("", !0),
2678
+ (i(!0), b(B, null, q(s.actions, (r, n) => (i(), f(yt, {
2653
2679
  key: n,
2654
2680
  action: r
2655
2681
  }, null, 8, ["action"]))), 128))
@@ -2658,7 +2684,7 @@ Here's some things you can do:`
2658
2684
  _: 3
2659
2685
  }));
2660
2686
  }
2661
- }), Dn = /* @__PURE__ */ v({
2687
+ }), Un = /* @__PURE__ */ g({
2662
2688
  __name: "Toast",
2663
2689
  props: {
2664
2690
  message: {},
@@ -2667,7 +2693,7 @@ Here's some things you can do:`
2667
2693
  class: {}
2668
2694
  },
2669
2695
  setup(t, { expose: s }) {
2670
- const e = Ye(
2696
+ const e = u(() => tt(
2671
2697
  { baseClasses: t.class, variant: t.variant },
2672
2698
  {
2673
2699
  baseClasses: "flex items-center gap-2 rounded-md p-2 ring-1 shadow-lg border-gray-200",
@@ -2681,108 +2707,108 @@ Here's some things you can do:`
2681
2707
  variant: "secondary"
2682
2708
  }
2683
2709
  }
2684
- );
2685
- return s(), (r, n) => (i(), m(Bn, {
2686
- class: k(l(e))
2710
+ ));
2711
+ return s(), (r, n) => (i(), f(Fn, {
2712
+ class: k(e.value)
2687
2713
  }, {
2688
- default: p(() => [
2689
- r.message ? (i(), m(P, {
2714
+ default: m(() => [
2715
+ r.message ? (i(), f(A, {
2690
2716
  key: 0,
2691
2717
  text: r.message,
2692
2718
  inline: ""
2693
2719
  }, null, 8, ["text"])) : M("", !0),
2694
- (i(!0), b(D, null, F(r.actions, (a, o) => (i(), m(A, {
2720
+ (i(!0), b(B, null, q(r.actions, (a, o) => (i(), f(z, {
2695
2721
  key: o,
2696
2722
  action: a,
2697
2723
  variant: r.variant,
2698
- as: vt
2724
+ as: yt
2699
2725
  }, null, 8, ["action", "variant"]))), 128))
2700
2726
  ]),
2701
2727
  _: 1
2702
2728
  }, 8, ["class"]));
2703
2729
  }
2704
- }), qn = { $ui: R }, Fn = {
2730
+ }), On = { $ui: V }, Nn = {
2705
2731
  async install(t, s) {
2706
2732
  const e = {
2707
2733
  "alert-modal": Rr,
2708
- "confirm-modal": Br,
2709
- "error-report-modal": fn,
2710
- "loading-modal": $n,
2734
+ "confirm-modal": Fr,
2735
+ "error-report-modal": vn,
2736
+ "loading-modal": Sn,
2711
2737
  "prompt-modal": Rn,
2712
- "startup-crash": An,
2713
- toast: Dn,
2738
+ "startup-crash": Dn,
2739
+ toast: Un,
2714
2740
  ...s.components
2715
2741
  };
2716
2742
  for (const [r, n] of Object.entries(e))
2717
- R.registerComponent(r, n);
2718
- await he(t, qn);
2743
+ V.registerComponent(r, n);
2744
+ await ge(t, On);
2719
2745
  }
2720
2746
  };
2721
- async function Un(t, s = {}) {
2747
+ async function Wn(t, s = {}) {
2722
2748
  var r;
2723
- const e = [_r, As, er, yr, Fs, Fn, ...s.plugins ?? []];
2724
- z.instance = t, await Ls(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await L.emit("application-ready");
2749
+ const e = [wr, Bs, tr, $r, Os, Nn, ...s.plugins ?? []];
2750
+ j.instance = t, await Vs(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await T.emit("application-ready");
2725
2751
  }
2726
- async function za(t, s = {}) {
2752
+ async function Za(t, s = {}) {
2727
2753
  var r;
2728
- const e = Et(t);
2729
- G() && (window.$aerogel = e), await Un(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await L.emit("application-mounted");
2754
+ const e = Lt(t);
2755
+ Y() && (window.$aerogel = e), await Wn(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await T.emit("application-mounted");
2730
2756
  }
2731
- const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2757
+ const Kn = { key: 0 }, Qn = /* @__PURE__ */ g({
2732
2758
  __name: "AppModals",
2733
2759
  setup(t) {
2734
- const s = d(() => R.modals[0] ?? null);
2735
- return (e, r) => s.value ? (i(), b("aside", On, [
2736
- f(dt, {
2760
+ const s = u(() => V.modals[0] ?? null);
2761
+ return (e, r) => s.value ? (i(), b("aside", Kn, [
2762
+ p(mt, {
2737
2763
  "child-index": 1,
2738
2764
  modal: s.value
2739
2765
  }, null, 8, ["modal"])
2740
2766
  ])) : M("", !0);
2741
2767
  }
2742
- }), Wn = /* @__PURE__ */ v({
2768
+ }), Jn = /* @__PURE__ */ g({
2743
2769
  __name: "AppToasts",
2744
2770
  setup(t) {
2745
- return (s, e) => (i(), m(l(hs), null, {
2746
- default: p(() => [
2747
- (i(!0), b(D, null, F(s.$ui.toasts, (r) => (i(), m(N(r.component), T({
2771
+ return (s, e) => (i(), f(l(vs), null, {
2772
+ default: m(() => [
2773
+ (i(!0), b(B, null, q(s.$ui.toasts, (r) => (i(), f(N(r.component), I({
2748
2774
  id: r.id,
2749
2775
  key: r.id,
2750
2776
  ref_for: !0
2751
2777
  }, r.properties), null, 16, ["id"]))), 128)),
2752
- f(l(gs), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
2778
+ p(l(bs), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
2753
2779
  ]),
2754
2780
  _: 1
2755
2781
  }));
2756
2782
  }
2757
- }), Kn = /* @__PURE__ */ v({
2783
+ }), Zn = /* @__PURE__ */ g({
2758
2784
  __name: "AppOverlays",
2759
2785
  setup(t) {
2760
- return (s, e) => (i(), b(D, null, [
2761
- f(Nn),
2762
- f(Wn)
2786
+ return (s, e) => (i(), b(B, null, [
2787
+ p(Qn),
2788
+ p(Jn)
2763
2789
  ], 64));
2764
2790
  }
2765
- }), Qn = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, Ba = /* @__PURE__ */ v({
2791
+ }), Gn = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, Ga = /* @__PURE__ */ g({
2766
2792
  __name: "AppLayout",
2767
2793
  setup(t) {
2768
- return (s, e) => (i(), b("div", Qn, [
2794
+ return (s, e) => (i(), b("div", Gn, [
2769
2795
  s.$errors.hasStartupErrors ? _(s.$slots, "startup-crash", { key: 0 }, () => [
2770
- (i(), m(N(s.$ui.requireComponent("startup-crash"))))
2796
+ (i(), f(N(s.$ui.requireComponent("startup-crash"))))
2771
2797
  ]) : _(s.$slots, "default", { key: 1 }),
2772
- f(Kn)
2798
+ p(Zn)
2773
2799
  ]));
2774
2800
  }
2775
- }), Jn = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], Da = /* @__PURE__ */ v({
2801
+ }), Xn = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], Xa = /* @__PURE__ */ g({
2776
2802
  __name: "HeadlessInputTextArea",
2777
2803
  setup(t) {
2778
- const s = se("$textAreaRef"), e = H(
2804
+ const s = re("$textAreaRef"), e = H(
2779
2805
  "input",
2780
2806
  "<HeadlessInputTextArea> must be a child of a <HeadlessInput>"
2781
- ), r = d(() => e.name ?? void 0), n = d(() => e.value);
2807
+ ), r = u(() => e.name ?? void 0), n = u(() => e.value);
2782
2808
  function a() {
2783
2809
  s.value && e.update(s.value.value);
2784
2810
  }
2785
- return tt(e, () => {
2811
+ return rt(e, () => {
2786
2812
  var o;
2787
2813
  return (o = s.value) == null ? void 0 : o.focus();
2788
2814
  }), (o, c) => (i(), b("textarea", {
@@ -2794,22 +2820,22 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2794
2820
  "aria-invalid": l(e).errors ? "true" : "false",
2795
2821
  "aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
2796
2822
  onInput: a
2797
- }, null, 40, Jn));
2823
+ }, null, 40, Xn));
2798
2824
  }
2799
- }), Zn = { class: "group" }, Gn = { class: "-ml-2 flex w-[max-content] cursor-pointer items-center rounded-lg py-2 pr-3 pl-1 hover:bg-gray-100 focus-visible:outline focus-visible:outline-gray-700" }, Xn = { class: "pt-2 pl-4" }, qa = /* @__PURE__ */ v({
2825
+ }), Yn = { class: "group" }, ea = { 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" }, ta = { class: "pt-2 pl-4" }, Ya = /* @__PURE__ */ g({
2800
2826
  __name: "AdvancedOptions",
2801
2827
  setup(t) {
2802
- return (s, e) => (i(), b("details", Zn, [
2803
- y("summary", Gn, [
2804
- f(l(mt), { class: "size-6 transition-transform group-open:rotate-90" }),
2828
+ return (s, e) => (i(), b("details", Yn, [
2829
+ y("summary", ea, [
2830
+ p(l(ht), { class: "size-6 transition-transform group-open:rotate-90" }),
2805
2831
  y("span", null, C(s.$td("ui.advancedOptions", "Advanced options")), 1)
2806
2832
  ]),
2807
- y("div", Xn, [
2833
+ y("div", ta, [
2808
2834
  _(s.$slots, "default")
2809
2835
  ])
2810
2836
  ]));
2811
2837
  }
2812
- }), Yn = { class: "flex h-6 items-center" }, Fa = /* @__PURE__ */ v({
2838
+ }), sa = { class: "flex h-6 items-center" }, el = /* @__PURE__ */ g({
2813
2839
  inheritAttrs: !1,
2814
2840
  __name: "Checkbox",
2815
2841
  props: {
@@ -2822,95 +2848,119 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2822
2848
  },
2823
2849
  emits: ["update:modelValue"],
2824
2850
  setup(t) {
2825
- const s = X(t, ["inputClass", "labelClass"]), e = se("$inputRef"), [r, n] = rt(), a = d(() => E("relative flex items-start", n.value)), o = d(() => {
2826
- var u, g;
2851
+ const s = J(t, ["inputClass", "labelClass"]), e = re("$inputRef"), [r, n] = at(), a = u(() => E("relative flex items-start", n.value)), o = u(() => {
2852
+ var d, v;
2827
2853
  return E(
2828
2854
  "size-4 rounded text-primary-600 not-checked:hover:bg-gray-200 checked:hover:text-primary-500 checked:border-0",
2829
2855
  {
2830
- "border-gray-300 focus:ring-primary-600": !((u = e.value) != null && u.errors),
2831
- "border-red-400 border-2 focus:ring-red-600": (g = e.value) == null ? void 0 : g.errors
2856
+ "border-gray-300 focus:ring-primary-600": !((d = e.value) != null && d.errors),
2857
+ "border-red-400 border-2 focus:ring-red-600": (v = e.value) == null ? void 0 : v.errors
2832
2858
  },
2833
2859
  t.inputClass
2834
2860
  );
2835
- }), c = d(() => E("ml-2 text-sm leading-6", t.labelClass));
2836
- return (u, g) => (i(), m(ht, T({
2861
+ }), c = u(() => E("ml-2 text-sm leading-6", t.labelClass));
2862
+ return (d, v) => (i(), f(vt, I({
2837
2863
  ref: "$inputRef",
2838
2864
  class: a.value
2839
2865
  }, s, {
2840
- "onUpdate:modelValue": g[0] || (g[0] = ($) => u.$emit("update:modelValue", $))
2866
+ "onUpdate:modelValue": v[0] || (v[0] = (x) => d.$emit("update:modelValue", x))
2841
2867
  }), {
2842
- default: p(() => [
2843
- y("div", Yn, [
2844
- f(gt, T(l(r), {
2868
+ default: m(() => [
2869
+ y("div", sa, [
2870
+ p(bt, I(l(r), {
2845
2871
  type: "checkbox",
2846
2872
  class: o.value
2847
2873
  }), null, 16, ["class"])
2848
2874
  ]),
2849
- u.$slots.default ? (i(), b("div", {
2875
+ d.$slots.default ? (i(), b("div", {
2850
2876
  key: 0,
2851
2877
  class: k(c.value)
2852
2878
  }, [
2853
- f(Ce, { class: "text-gray-900" }, {
2854
- default: p(() => [
2855
- _(u.$slots, "default")
2879
+ p(Ce, { class: "text-gray-900" }, {
2880
+ default: m(() => [
2881
+ _(d.$slots, "default")
2856
2882
  ]),
2857
2883
  _: 3
2858
2884
  }),
2859
- f(Se, { class: "text-red-600" })
2860
- ], 2)) : u.label ? (i(), b("div", {
2885
+ p(Se, { class: "text-red-600" })
2886
+ ], 2)) : d.label ? (i(), b("div", {
2861
2887
  key: 1,
2862
2888
  class: k(c.value)
2863
2889
  }, [
2864
- f(Ce, { class: "text-gray-900" }),
2865
- f(Se, { class: "text-red-600" })
2890
+ p(Ce, { class: "text-gray-900" }),
2891
+ p(Se, { class: "text-red-600" })
2866
2892
  ], 2)) : M("", !0)
2867
2893
  ]),
2868
2894
  _: 3
2869
2895
  }, 16, ["class"]));
2870
2896
  }
2871
- }), ea = /* @__PURE__ */ v({
2897
+ }), ra = /* @__PURE__ */ g({
2872
2898
  __name: "DropdownMenuOption",
2899
+ props: {
2900
+ class: {},
2901
+ asChild: { type: Boolean },
2902
+ as: {}
2903
+ },
2873
2904
  emits: ["select"],
2874
2905
  setup(t) {
2875
- return (s, e) => (i(), m(l(vs), {
2876
- class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-gray-900 data-[highlighted]:bg-gray-100",
2877
- onSelect: e[0] || (e[0] = (r) => s.$emit("select"))
2878
- }, {
2879
- default: p(() => [
2880
- _(s.$slots, "default")
2906
+ const s = J(t, ["class"]), e = u(() => E(
2907
+ "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-gray-900 data-[highlighted]:bg-gray-100",
2908
+ t.class
2909
+ ));
2910
+ return (r, n) => (i(), f(l(ys), I({ class: e.value }, s, {
2911
+ onSelect: n[0] || (n[0] = (a) => r.$emit("select"))
2912
+ }), {
2913
+ default: m(() => [
2914
+ _(r.$slots, "default")
2881
2915
  ]),
2882
2916
  _: 3
2883
- }));
2917
+ }, 16, ["class"]));
2884
2918
  }
2885
- }), ta = /* @__PURE__ */ v({
2919
+ }), na = /* @__PURE__ */ g({
2886
2920
  __name: "DropdownMenuOptions",
2887
2921
  setup(t) {
2888
2922
  const s = H(
2889
2923
  "dropdown-menu",
2890
2924
  "<DropdownMenuOptions> must be a child of a <DropdownMenu>"
2891
2925
  );
2892
- return (e, r) => (i(), m(l(bs), {
2926
+ return (e, r) => (i(), f(l(_s), {
2893
2927
  class: "gap-y-0.5 rounded-lg bg-white p-1.5 shadow-lg ring-1 ring-black/5",
2894
2928
  align: l(s).align,
2895
2929
  side: l(s).side
2896
2930
  }, {
2897
- default: p(() => [
2931
+ default: m(() => [
2898
2932
  _(e.$slots, "default", {}, () => [
2899
- (i(!0), b(D, null, F(l(s).options, (n, a) => (i(), m(ea, {
2900
- key: a,
2901
- onSelect: n.click
2902
- }, {
2903
- default: p(() => [
2904
- V(C(n.label), 1)
2933
+ (i(!0), b(B, null, q(l(s).options, (n, a) => (i(), f(ra, I(
2934
+ {
2935
+ key: a,
2936
+ as: n.route || n.href ? et : void 0,
2937
+ class: n.class,
2938
+ ref_for: !0
2939
+ },
2940
+ n.route || n.href ? {
2941
+ href: n.href,
2942
+ route: n.route,
2943
+ routeParams: n.routeParams,
2944
+ routeQuery: n.routeQuery
2945
+ } : {},
2946
+ {
2947
+ onSelect: (o) => {
2948
+ var c;
2949
+ return (c = n.click) == null ? void 0 : c.call(n);
2950
+ }
2951
+ }
2952
+ ), {
2953
+ default: m(() => [
2954
+ R(C(n.label), 1)
2905
2955
  ]),
2906
2956
  _: 2
2907
- }, 1032, ["onSelect"]))), 128))
2957
+ }, 1040, ["as", "class", "onSelect"]))), 128))
2908
2958
  ])
2909
2959
  ]),
2910
2960
  _: 3
2911
2961
  }, 8, ["align", "side"]));
2912
2962
  }
2913
- }), Ua = /* @__PURE__ */ v({
2963
+ }), tl = /* @__PURE__ */ g({
2914
2964
  __name: "DropdownMenu",
2915
2965
  props: {
2916
2966
  align: {},
@@ -2921,23 +2971,23 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2921
2971
  const e = {
2922
2972
  align: t.align,
2923
2973
  side: t.side,
2924
- options: d(() => {
2974
+ options: u(() => {
2925
2975
  var r;
2926
2976
  return (r = t.options) == null ? void 0 : r.filter(Boolean);
2927
2977
  })
2928
2978
  };
2929
- return te("dropdown-menu", e), s(e), (r, n) => (i(), m(l(ys), null, {
2930
- default: p(() => [
2931
- f(l(_s), null, {
2932
- default: p(() => [
2979
+ return se("dropdown-menu", e), s(e), (r, n) => (i(), f(l($s), null, {
2980
+ default: m(() => [
2981
+ p(l(ws), null, {
2982
+ default: m(() => [
2933
2983
  _(r.$slots, "default")
2934
2984
  ]),
2935
2985
  _: 3
2936
2986
  }),
2937
- f(l(ws), null, {
2938
- default: p(() => [
2987
+ p(l(xs), null, {
2988
+ default: m(() => [
2939
2989
  _(r.$slots, "options", {}, () => [
2940
- f(ta)
2990
+ p(na)
2941
2991
  ])
2942
2992
  ]),
2943
2993
  _: 3
@@ -2946,7 +2996,7 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2946
2996
  _: 3
2947
2997
  }));
2948
2998
  }
2949
- }), sa = ["aria-hidden"], ra = ["tabindex", "aria-label", "type"], Oa = /* @__PURE__ */ v({
2999
+ }), aa = ["aria-hidden"], la = ["tabindex", "aria-label", "type"], sl = /* @__PURE__ */ g({
2950
3000
  __name: "EditableContent",
2951
3001
  props: {
2952
3002
  type: { default: "text" },
@@ -2959,14 +3009,14 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2959
3009
  },
2960
3010
  emits: ["update", "save"],
2961
3011
  setup(t, { emit: s }) {
2962
- const e = s, r = se("$inputRef"), n = q(null), a = q(t.text), o = d(() => E("inline whitespace-pre", t.contentClass)), c = d(() => E("invisible whitespace-pre", t.contentClass)), u = d(() => E("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
2963
- function g() {
3012
+ const e = s, r = re("$inputRef"), n = F(null), a = F(t.text), o = u(() => E("inline whitespace-pre", t.contentClass)), c = u(() => E("invisible whitespace-pre", t.contentClass)), d = u(() => E("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
3013
+ function v() {
2964
3014
  n.value = t.text;
2965
3015
  }
2966
- function $() {
3016
+ function x() {
2967
3017
  n.value && (t.type !== "number" && a.value.trim().length === 0 && (a.value = n.value, e("update", a.value)), n.value = null, e("save"));
2968
3018
  }
2969
- return le(() => a.value = t.text), (h, x) => (i(), b("div", {
3019
+ return oe(() => a.value = t.text), (h, w) => (i(), b("div", {
2970
3020
  class: k(["relative", { "pointer-events-none!": h.disabled && !n.value }])
2971
3021
  }, [
2972
3022
  n.value ? (i(), b("span", {
@@ -2985,43 +3035,134 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
2985
3035
  y("form", {
2986
3036
  class: "w-full",
2987
3037
  "aria-hidden": h.formAriaHidden,
2988
- onSubmit: x[4] || (x[4] = qe((I) => {
2989
- var ge;
2990
- return (ge = l(r)) == null ? void 0 : ge.blur();
3038
+ onSubmit: w[4] || (w[4] = qe((L) => {
3039
+ var ve;
3040
+ return (ve = l(r)) == null ? void 0 : ve.blur();
2991
3041
  }, ["prevent"]))
2992
3042
  }, [
2993
3043
  Fe(y("input", {
2994
3044
  ref: "$inputRef",
2995
- "onUpdate:modelValue": x[0] || (x[0] = (I) => a.value = I),
3045
+ "onUpdate:modelValue": w[0] || (w[0] = (L) => a.value = L),
2996
3046
  tabindex: h.tabindex ?? void 0,
2997
3047
  "aria-label": h.ariaLabel ?? void 0,
2998
3048
  type: h.type,
2999
3049
  class: k([
3000
- u.value,
3050
+ d.value,
3001
3051
  { "opacity-0": !n.value, "appearance-textfield": !n.value && h.type === "number" }
3002
3052
  ]),
3003
- onKeyup: x[1] || (x[1] = (I) => h.$emit("update", a.value)),
3004
- onFocus: x[2] || (x[2] = (I) => g()),
3005
- onBlur: x[3] || (x[3] = (I) => $())
3006
- }, null, 42, ra), [
3007
- [Ht, a.value]
3053
+ onKeyup: w[1] || (w[1] = (L) => h.$emit("update", a.value)),
3054
+ onFocus: w[2] || (w[2] = (L) => v()),
3055
+ onBlur: w[3] || (w[3] = (L) => x())
3056
+ }, null, 42, la), [
3057
+ [It, a.value]
3008
3058
  ])
3009
- ], 40, sa)
3059
+ ], 40, aa)
3010
3060
  ], 2));
3011
3061
  }
3012
- }), Na = /* @__PURE__ */ v({
3062
+ }), oa = {
3063
+ viewBox: "0 0 512 512",
3064
+ width: "1.2em",
3065
+ height: "1.2em"
3066
+ };
3067
+ function ia(t, s) {
3068
+ return i(), b("svg", oa, s[0] || (s[0] = [
3069
+ y("path", {
3070
+ fill: "currentColor",
3071
+ 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"
3072
+ }, null, -1)
3073
+ ]));
3074
+ }
3075
+ const ca = P({ name: "ion-warning", render: ia }), ua = {
3076
+ viewBox: "0 0 20 20",
3077
+ width: "1.2em",
3078
+ height: "1.2em"
3079
+ };
3080
+ function da(t, s) {
3081
+ return i(), b("svg", ua, s[0] || (s[0] = [
3082
+ y("path", {
3083
+ fill: "currentColor",
3084
+ 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"
3085
+ }, null, -1)
3086
+ ]));
3087
+ }
3088
+ const pa = P({ name: "zondicons-view-show", render: da }), ma = { class: "font-medium" }, fa = ["datetime"], ha = /* @__PURE__ */ g({
3089
+ __name: "ErrorLogsModal",
3090
+ setup(t) {
3091
+ return (s, e) => (i(), f(X, {
3092
+ title: s.$td("errors.report", "Errors ({count})", { count: s.$errors.logs.length })
3093
+ }, {
3094
+ default: m(() => [
3095
+ y("ol", null, [
3096
+ (i(!0), b(B, null, q(s.$errors.logs, (r, n) => (i(), b("li", {
3097
+ key: n,
3098
+ class: "mb-2 flex max-w-prose min-w-56 justify-between py-2 last:mb-0"
3099
+ }, [
3100
+ y("div", null, [
3101
+ y("h3", ma, C(r.report.title), 1),
3102
+ y("time", {
3103
+ datetime: r.date.toISOString(),
3104
+ class: "text-xs text-gray-700"
3105
+ }, C(r.date.toLocaleTimeString()), 9, fa),
3106
+ p(A, {
3107
+ class: "text-sm text-gray-500",
3108
+ text: r.report.description ?? l(Ye)(r.report)
3109
+ }, null, 8, ["text"])
3110
+ ]),
3111
+ p(z, {
3112
+ size: "icon",
3113
+ variant: "ghost",
3114
+ "aria-label": s.$td("errors.viewDetails", "View details"),
3115
+ title: s.$td("errors.viewDetails", "View details"),
3116
+ class: "self-center",
3117
+ onClick: (a) => s.$errors.inspect(
3118
+ r.report,
3119
+ s.$errors.logs.map(({ report: o }) => o)
3120
+ )
3121
+ }, {
3122
+ default: m(() => [
3123
+ p(l(pa), {
3124
+ class: "size-4",
3125
+ "aria-hidden": "true"
3126
+ })
3127
+ ]),
3128
+ _: 2
3129
+ }, 1032, ["aria-label", "title", "onClick"])
3130
+ ]))), 128))
3131
+ ])
3132
+ ]),
3133
+ _: 1
3134
+ }, 8, ["title"]));
3135
+ }
3136
+ }), rl = /* @__PURE__ */ g({
3137
+ __name: "ErrorLogs",
3138
+ setup(t) {
3139
+ return (s, e) => s.$errors.logs.length > 0 ? (i(), f(z, {
3140
+ key: 0,
3141
+ size: "icon",
3142
+ variant: "ghost",
3143
+ title: s.$td("errors.viewLogs", "View error logs"),
3144
+ "aria-label": s.$td("errors.viewLogs", "View error logs"),
3145
+ onClick: e[0] || (e[0] = (r) => s.$ui.modal(ha))
3146
+ }, {
3147
+ default: m(() => [
3148
+ p(l(ca), { class: "size-6 text-red-500" })
3149
+ ]),
3150
+ _: 1
3151
+ }, 8, ["title", "aria-label"])) : M("", !0);
3152
+ }
3153
+ }), nl = /* @__PURE__ */ g({
3013
3154
  __name: "ErrorMessage",
3014
3155
  props: {
3015
3156
  error: {}
3016
3157
  },
3017
3158
  setup(t) {
3018
- const s = d(() => Zs(t.error));
3019
- return (e, r) => (i(), m(P, {
3159
+ const s = u(() => Ye(t.error));
3160
+ return (e, r) => (i(), f(A, {
3020
3161
  text: s.value,
3021
3162
  inline: ""
3022
3163
  }, null, 8, ["text"]));
3023
3164
  }
3024
- }), Wa = /* @__PURE__ */ v({
3165
+ }), al = /* @__PURE__ */ g({
3025
3166
  __name: "Link",
3026
3167
  props: {
3027
3168
  class: {},
@@ -3036,45 +3177,45 @@ const On = { key: 0 }, Nn = /* @__PURE__ */ v({
3036
3177
  as: {}
3037
3178
  },
3038
3179
  setup(t) {
3039
- return (s, e) => (i(), m(A, T({ variant: "link" }, s.$props), {
3040
- default: p(() => [
3180
+ return (s, e) => (i(), f(z, I({ variant: "link" }, s.$props), {
3181
+ default: m(() => [
3041
3182
  _(s.$slots, "default")
3042
3183
  ]),
3043
3184
  _: 3
3044
3185
  }, 16));
3045
3186
  }
3046
- }), Ka = /* @__PURE__ */ v({
3187
+ }), ll = /* @__PURE__ */ g({
3047
3188
  __name: "SettingsModal",
3048
3189
  setup(t) {
3049
- const s = d(() => Ft(z.settings, "priority", "desc"));
3050
- return (e, r) => (i(), m(re, {
3190
+ const s = u(() => Ot(j.settings, "priority", "desc"));
3191
+ return (e, r) => (i(), f(X, {
3051
3192
  title: e.$td("settings.title", "Settings")
3052
3193
  }, {
3053
- default: p(() => [
3054
- (i(!0), b(D, null, F(s.value, (n, a) => (i(), m(N(n.component), { key: a }))), 128))
3194
+ default: m(() => [
3195
+ (i(!0), b(B, null, q(s.value, (n, a) => (i(), f(N(n.component), { key: a }))), 128))
3055
3196
  ]),
3056
3197
  _: 1
3057
3198
  }, 8, ["title"]));
3058
3199
  }
3059
3200
  });
3060
- class Qa {
3201
+ class ol {
3061
3202
  constructor() {
3062
- w(this, "status");
3063
- w(this, "_listeners");
3064
- w(this, "_progress");
3065
- w(this, "_cancelled");
3066
- w(this, "_started");
3067
- w(this, "_completed");
3068
- this.status = this.getInitialStatus(), this._listeners = new Ut(), this._started = new W(), this._completed = new W();
3203
+ $(this, "status");
3204
+ $(this, "_listeners");
3205
+ $(this, "_progress");
3206
+ $(this, "_cancelled");
3207
+ $(this, "_started");
3208
+ $(this, "_completed");
3209
+ this.status = this.getInitialStatus(), this._listeners = new Nt(), this._started = new W(), this._completed = new W();
3069
3210
  }
3070
3211
  async start() {
3071
3212
  this.beforeStart(), this._started.resolve();
3072
3213
  try {
3073
3214
  await this.updateProgress(), await this.run(), await this.updateProgress(), this._completed.resolve();
3074
3215
  } catch (s) {
3075
- if (s instanceof Pe)
3216
+ if (s instanceof Re)
3076
3217
  return;
3077
- throw J(Ot(s), (e) => {
3218
+ throw Z(Wt(s), (e) => {
3078
3219
  this._completed.reject(e);
3079
3220
  });
3080
3221
  }
@@ -3115,10 +3256,10 @@ class Qa {
3115
3256
  }
3116
3257
  assertNotCancelled() {
3117
3258
  if (this._cancelled)
3118
- throw this._cancelled.resolve(), new Pe();
3259
+ throw this._cancelled.resolve(), new Re();
3119
3260
  }
3120
3261
  calculateCurrentProgress(s) {
3121
- return s ?? (s = this.status), s.completed ? 1 : s.children ? Nt(
3262
+ return s ?? (s = this.status), s.completed ? 1 : s.children ? Kt(
3122
3263
  s.children.reduce((e, r) => e + this.calculateCurrentProgress(r), 0) / s.children.length,
3123
3264
  2
3124
3265
  ) : 0;
@@ -3132,134 +3273,137 @@ class Qa {
3132
3273
  return { ...s };
3133
3274
  }
3134
3275
  }
3135
- async function Ja(t) {
3276
+ async function il(t) {
3136
3277
  await t.start();
3137
3278
  }
3138
3279
  export {
3139
- qa as AdvancedOptions,
3280
+ Ya as AdvancedOptions,
3140
3281
  Rr as AlertModal,
3141
- z as App,
3142
- Ba as AppLayout,
3143
- Nn as AppModals,
3144
- Kn as AppOverlays,
3145
- Is as AppService,
3146
- Wn as AppToasts,
3147
- A as Button,
3148
- _a as Cache,
3149
- zs as CacheService,
3150
- Fa as Checkbox,
3151
- Br as ConfirmModal,
3152
- Ua as DropdownMenu,
3153
- ea as DropdownMenuOption,
3154
- ta as DropdownMenuOptions,
3155
- Oa as EditableContent,
3156
- Na as ErrorMessage,
3157
- fn as ErrorReportModal,
3158
- nn as ErrorReportModalButtons,
3159
- an as ErrorReportModalTitle,
3282
+ j as App,
3283
+ Ga as AppLayout,
3284
+ Qn as AppModals,
3285
+ Zn as AppOverlays,
3286
+ Ts as AppService,
3287
+ Jn as AppToasts,
3288
+ z as Button,
3289
+ Ta as Cache,
3290
+ Ds as CacheService,
3291
+ el as Checkbox,
3292
+ Fr as ConfirmModal,
3293
+ tl as DropdownMenu,
3294
+ ra as DropdownMenuOption,
3295
+ na as DropdownMenuOptions,
3296
+ sl as EditableContent,
3297
+ rl as ErrorLogs,
3298
+ ha as ErrorLogsModal,
3299
+ nl as ErrorMessage,
3300
+ vn as ErrorReportModal,
3301
+ on as ErrorReportModalButtons,
3302
+ cn as ErrorReportModalTitle,
3160
3303
  Ge as Errors,
3161
- ga as EventListenerPriorities,
3162
- L as Events,
3163
- Es as EventsService,
3164
- pt as Form,
3165
- cr as FormController,
3166
- ar as HeadlessButton,
3167
- ht as HeadlessInput,
3168
- Sn as HeadlessInputDescription,
3304
+ Ea as EventListenerPriorities,
3305
+ T as Events,
3306
+ Ls as EventsService,
3307
+ ft as Form,
3308
+ dr as FormController,
3309
+ et as HeadlessButton,
3310
+ vt as HeadlessInput,
3311
+ En as HeadlessInputDescription,
3169
3312
  Se as HeadlessInputError,
3170
- gt as HeadlessInputInput,
3313
+ bt as HeadlessInputInput,
3171
3314
  Ce as HeadlessInputLabel,
3172
- Da as HeadlessInputTextArea,
3173
- Cr as HeadlessModal,
3174
- Sr as HeadlessModalContent,
3175
- kr as HeadlessModalDescription,
3176
- Mr as HeadlessModalOverlay,
3177
- Er as HeadlessModalTitle,
3178
- ur as HeadlessSelect,
3179
- Ae as HeadlessSelectLabel,
3180
- ot as HeadlessSelectOption,
3181
- lt as HeadlessSelectOptions,
3182
- at as HeadlessSelectTrigger,
3183
- nt as HeadlessSelectValue,
3184
- Bn as HeadlessToast,
3185
- En as Input,
3186
- Qa as Job,
3187
- Pe as JobCancelledError,
3315
+ Xa as HeadlessInputTextArea,
3316
+ kr as HeadlessModal,
3317
+ Mr as HeadlessModalContent,
3318
+ Er as HeadlessModalDescription,
3319
+ Hr as HeadlessModalOverlay,
3320
+ Lr as HeadlessModalTitle,
3321
+ pr as HeadlessSelect,
3322
+ ze as HeadlessSelectLabel,
3323
+ it as HeadlessSelectOption,
3324
+ ct as HeadlessSelectOptions,
3325
+ ot as HeadlessSelectTrigger,
3326
+ lt as HeadlessSelectValue,
3327
+ Fn as HeadlessToast,
3328
+ In as Input,
3329
+ ol as Job,
3330
+ Re as JobCancelledError,
3188
3331
  Q as Lang,
3189
- ue as Layouts,
3190
- Wa as Link,
3191
- $n as LoadingModal,
3332
+ de as Layouts,
3333
+ al as Link,
3334
+ Sn as LoadingModal,
3192
3335
  Qe as MOBILE_BREAKPOINT,
3193
- P as Markdown,
3194
- re as Modal,
3195
- dt as ModalContext,
3196
- _n as ProgressBar,
3336
+ A as Markdown,
3337
+ X as Modal,
3338
+ mt as ModalContext,
3339
+ xn as ProgressBar,
3197
3340
  Rn as PromptModal,
3198
- fr as Select,
3199
- it as SelectLabel,
3200
- ze as SelectOption,
3201
- ct as SelectOptions,
3202
- ut as SelectTrigger,
3203
- fe as Service,
3341
+ gr as Select,
3342
+ ut as SelectLabel,
3343
+ je as SelectOption,
3344
+ dt as SelectOptions,
3345
+ pt as SelectTrigger,
3346
+ he as Service,
3204
3347
  xe as ServiceBootError,
3205
- Ka as SettingsModal,
3206
- An as StartupCrash,
3207
- Ds as Storage,
3208
- Dn as Toast,
3209
- R as UI,
3210
- Os as UIService,
3211
- Ca as __objectType,
3212
- Ha as booleanInput,
3213
- he as bootServices,
3214
- za as bootstrap,
3215
- Un as bootstrapApplication,
3348
+ ll as SettingsModal,
3349
+ Dn as StartupCrash,
3350
+ Fs as Storage,
3351
+ Un as Toast,
3352
+ V as UI,
3353
+ Ws as UIService,
3354
+ Aa as __objectType,
3355
+ qa as booleanInput,
3356
+ ge as bootServices,
3357
+ Za as bootstrap,
3358
+ Wn as bootstrapApplication,
3216
3359
  E as classes,
3217
- Ma as computedAsync,
3218
- Ea as computedDebounce,
3219
- Ye as computedVariantClasses,
3220
- Ia as dateInput,
3221
- ya as defineDirective,
3222
- xa as defineFormValidationRule,
3223
- ba as definePlugin,
3224
- me as defineServiceState,
3225
- Ms as defineServiceStore,
3226
- va as defineSettings,
3227
- Ja as dispatch,
3360
+ Ba as computedAsync,
3361
+ Da as computedDebounce,
3362
+ Fa as dateInput,
3363
+ Ia as defineDirective,
3364
+ Ra as defineFormValidationRule,
3365
+ La as definePlugin,
3366
+ fe as defineServiceState,
3367
+ Hs as defineServiceStore,
3368
+ Ha as defineSettings,
3369
+ il as dispatch,
3228
3370
  Je as getCurrentLayout,
3229
- Zs as getErrorMessage,
3230
- ks as getPiniaStore,
3231
- or as hasSelectOptionLabel,
3232
- Vs as injectOrFail,
3233
- Ts as injectReactive,
3371
+ Ye as getErrorMessage,
3372
+ Es as getPiniaStore,
3373
+ ir as hasSelectOptionLabel,
3374
+ As as injectOrFail,
3375
+ Rs as injectReactive,
3234
3376
  H as injectReactiveOrFail,
3235
- Ls as installPlugins,
3236
- Pa as numberInput,
3237
- ja as objectInput,
3238
- Sa as onCleanMounted,
3239
- tt as onFormFocus,
3240
- ka as persistent,
3241
- $a as registerErrorHandler,
3242
- rr as renderMarkdown,
3377
+ Vs as installPlugins,
3378
+ Ka as numberInput,
3379
+ Qa as objectInput,
3380
+ za as onCleanMounted,
3381
+ rt as onFormFocus,
3382
+ ja as persistent,
3383
+ Pa as registerErrorHandler,
3384
+ nr as renderMarkdown,
3243
3385
  Ke as renderVNode,
3244
- wa as replaceExisting,
3245
- La as requiredBooleanInput,
3246
- Ra as requiredDateInput,
3247
- Ta as requiredNumberInput,
3248
- Va as requiredObjectInput,
3249
- Hn as requiredStringInput,
3250
- Ss as resetPiniaStore,
3251
- nr as safeHtml,
3252
- Aa as stringInput,
3386
+ Va as replaceExisting,
3387
+ Ua as requiredBooleanInput,
3388
+ Oa as requiredDateInput,
3389
+ Na as requiredNumberInput,
3390
+ Wa as requiredObjectInput,
3391
+ Tn as requiredStringInput,
3392
+ Ms as resetPiniaStore,
3393
+ ar as safeHtml,
3394
+ Ja as stringInput,
3253
3395
  Ze as translate,
3254
3396
  S as translateWithDefault,
3255
- Tr as useConfirmModal,
3256
- on as useErrorReportModal,
3257
- et as useEvent,
3258
- st as useForm,
3259
- rt as useInputAttrs,
3260
- wn as useLoadingModal,
3261
- In as usePromptModal,
3262
- ir as validate,
3263
- ie as validators
3397
+ Pr as useAlertModal,
3398
+ Ar as useConfirmModal,
3399
+ un as useErrorReportModal,
3400
+ st as useEvent,
3401
+ nt as useForm,
3402
+ at as useInputAttrs,
3403
+ Cn as useLoadingModal,
3404
+ Vn as usePromptModal,
3405
+ ur as validate,
3406
+ ce as validators,
3407
+ tt as variantClasses
3264
3408
  };
3265
3409
  //# sourceMappingURL=aerogel-core.js.map