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