@aerogel/core 0.0.0-next.c4825c5cbe0fe3257e478c2a7ec8df27d5a72305 → 0.0.0-next.d197d66a9d339318d752a1d8a96b2919faba3003

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