@aerogel/core 0.0.0-next.7035064d9ec6a82a936ee8dfcc4b58ed2e25a399 → 0.0.0-next.73a6df428477c011a1aebe0a932ebef0aa5e1b16

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