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

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