@aerogel/core 0.0.0-next.d34923f3b144e8f6720e6a9cdadb2cd4fb4ab289 → 0.0.0-next.d4f3ae130b52cace673d7c95681c19256ee1acb4

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