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

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