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