mgv-backoffice 1.36.2 → 1.37.0
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/README.md +32 -0
- package/dist/components/BaseDateTimePicker.vue.d.ts +49 -0
- package/dist/index.d.ts +2 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +864 -818
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +17 -13
- package/src/components/BaseDateTimePicker.test.ts +49 -0
- package/src/components/BaseDateTimePicker.vue +91 -0
- package/src/components/BaseSidebar.vue +1 -1
- package/src/index.ts +4 -0
- package/src/style.css +58 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,125 +1,126 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, effectScope as m,
|
|
2
|
-
import { ArrowDownIcon as
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, effectScope as m, guardReactiveProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, onScopeDispose as S, onUnmounted as C, openBlock as w, reactive as T, readonly as ee, ref as E, renderList as D, renderSlot as O, resolveComponent as k, resolveDynamicComponent as A, toDisplayString as j, unref as M, useSlots as te, vModelCheckbox as ne, vModelDynamic as re, vModelText as ie, vShow as ae, watch as N, withCtx as P, withDirectives as F, withKeys as oe, withModifiers as I } from "vue";
|
|
2
|
+
import { ArrowDownIcon as se, ArrowUpIcon as ce, Bars3Icon as le, BellIcon as ue, CheckCircleIcon as de, ChevronDoubleLeftIcon as fe, ChevronDoubleRightIcon as pe, ChevronDownIcon as me, ChevronRightIcon as he, ClipboardDocumentCheckIcon as ge, ClipboardDocumentIcon as _e, DocumentDuplicateIcon as ve, ExclamationCircleIcon as ye, ExclamationTriangleIcon as be, FolderIcon as xe, InformationCircleIcon as Se, MagnifyingGlassIcon as Ce, MinusIcon as we, MoonIcon as Te, SunIcon as Ee, XMarkIcon as De } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as Oe } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as ke, useRouter as Ae } from "vue-router";
|
|
5
|
+
import { VueDatePicker as je } from "@vuepic/vue-datepicker";
|
|
5
6
|
//#region src/enums/AlertEnum.ts
|
|
6
|
-
var
|
|
7
|
+
var L = /* @__PURE__ */ function(e) {
|
|
7
8
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}),
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
e !==
|
|
9
|
+
}({}), R = E(!1), Me = !1, z = "mgv-theme";
|
|
10
|
+
function Ne(e) {
|
|
11
|
+
if (Me) {
|
|
12
|
+
e !== z && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${z}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
|
-
if (
|
|
15
|
-
let e = window.localStorage?.getItem(
|
|
16
|
-
e ?
|
|
15
|
+
if (Me = !0, z = e, typeof window < "u") {
|
|
16
|
+
let e = window.localStorage?.getItem(z);
|
|
17
|
+
e ? R.value = e === "dark" : typeof window.matchMedia == "function" && (R.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
17
18
|
}
|
|
18
19
|
typeof document < "u" && m(!0).run(() => {
|
|
19
|
-
|
|
20
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(
|
|
20
|
+
N(R, (e) => {
|
|
21
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(z, e ? "dark" : "light");
|
|
21
22
|
}, { immediate: !0 });
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
25
|
+
function Pe(e) {
|
|
26
|
+
Ne(e?.storageKey ?? z);
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
28
|
+
function B(e) {
|
|
29
|
+
Ne(e?.storageKey ?? z);
|
|
29
30
|
function t() {
|
|
30
|
-
|
|
31
|
+
R.value = !R.value;
|
|
31
32
|
}
|
|
32
33
|
return {
|
|
33
|
-
isDark:
|
|
34
|
+
isDark: R,
|
|
34
35
|
toggleTheme: t
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
//#endregion
|
|
38
39
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
-
var
|
|
40
|
+
var Fe = { class: "min-w-0 flex-1" }, Ie = {
|
|
40
41
|
key: 0,
|
|
41
42
|
class: "font-medium"
|
|
42
|
-
},
|
|
43
|
+
}, Le = /* @__PURE__ */ p({
|
|
43
44
|
__name: "BaseAlert",
|
|
44
45
|
props: {
|
|
45
46
|
title: { default: "" },
|
|
46
|
-
color: { default:
|
|
47
|
+
color: { default: L.ERROR },
|
|
47
48
|
compact: {
|
|
48
49
|
type: Boolean,
|
|
49
50
|
default: !1
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
setup(e) {
|
|
53
|
-
let t = e, { isDark: n } =
|
|
54
|
-
[
|
|
54
|
+
let t = e, { isDark: n } = B(), r = {
|
|
55
|
+
[L.ERROR]: {
|
|
55
56
|
light: "bg-red-50 border-red-200 text-red-700",
|
|
56
57
|
dark: "bg-red-500/10 border-red-500/30 text-red-300"
|
|
57
58
|
},
|
|
58
|
-
[
|
|
59
|
+
[L.WARNING]: {
|
|
59
60
|
light: "bg-amber-50 border-amber-200 text-amber-700",
|
|
60
61
|
dark: "bg-amber-500/10 border-amber-500/30 text-amber-300"
|
|
61
62
|
},
|
|
62
|
-
[
|
|
63
|
+
[L.SUCCESS]: {
|
|
63
64
|
light: "bg-emerald-50 border-emerald-200 text-emerald-700",
|
|
64
65
|
dark: "bg-emerald-500/10 border-emerald-500/30 text-emerald-300"
|
|
65
66
|
},
|
|
66
|
-
[
|
|
67
|
+
[L.INFO]: {
|
|
67
68
|
light: "bg-sky-50 border-sky-200 text-sky-700",
|
|
68
69
|
dark: "bg-sky-500/10 border-sky-500/30 text-sky-300"
|
|
69
70
|
}
|
|
70
71
|
}, l = i(() => n.value ? r[t.color].dark : r[t.color].light), u = i(() => {
|
|
71
72
|
switch (t.color) {
|
|
72
|
-
case
|
|
73
|
-
case
|
|
74
|
-
case
|
|
75
|
-
default: return
|
|
73
|
+
case L.SUCCESS: return de;
|
|
74
|
+
case L.WARNING: return be;
|
|
75
|
+
case L.INFO: return Se;
|
|
76
|
+
default: return ye;
|
|
76
77
|
}
|
|
77
78
|
}), d = i(() => {
|
|
78
79
|
switch (t.color) {
|
|
79
|
-
case
|
|
80
|
-
case
|
|
81
|
-
case
|
|
80
|
+
case L.SUCCESS: return "text-emerald-500";
|
|
81
|
+
case L.WARNING: return "text-amber-500";
|
|
82
|
+
case L.INFO: return "text-sky-500";
|
|
82
83
|
default: return "text-red-500";
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
|
-
return (t, n) => (
|
|
86
|
+
return (t, n) => (w(), s("div", {
|
|
86
87
|
role: "alert",
|
|
87
|
-
class:
|
|
88
|
-
}, [(
|
|
89
|
-
class:
|
|
88
|
+
class: _(["flex gap-3 mb-4 rounded-lg border text-sm transition-colors", [e.compact ? "items-start px-3 py-2 text-xs" : "items-start p-4", l.value]])
|
|
89
|
+
}, [(w(), a(A(u.value), {
|
|
90
|
+
class: _(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
90
91
|
"aria-hidden": "true"
|
|
91
|
-
}, null, 8, ["class"])), c("div",
|
|
92
|
+
}, null, 8, ["class"])), c("div", Fe, [e.title ? (w(), s("p", Ie, j(e.title), 1)) : o("", !0), O(t.$slots, "default")])], 2));
|
|
92
93
|
}
|
|
93
|
-
}),
|
|
94
|
+
}), V = /* @__PURE__ */ function(e) {
|
|
94
95
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
95
|
-
}({}),
|
|
96
|
+
}({}), Re = "bg-red-100 text-red-700 border-red-200", ze = /* @__PURE__ */ p({
|
|
96
97
|
__name: "BaseBadge",
|
|
97
98
|
props: { color: {
|
|
98
99
|
type: String,
|
|
99
100
|
required: !1
|
|
100
101
|
} },
|
|
101
102
|
setup(e) {
|
|
102
|
-
let t =
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
}, u = i(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${c.color && l[c.color] ||
|
|
111
|
-
return (e, t) => r.value ? (
|
|
103
|
+
let t = te(), r = i(() => !!t.default), a = () => (t.default?.() ?? []).map((e) => e.type === n && typeof e.children == "string" ? d(e.children.replace(/_/g, " ")) : e), c = e, l = {
|
|
104
|
+
[V.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
105
|
+
[V.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
106
|
+
[V.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
107
|
+
[V.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
108
|
+
[V.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
109
|
+
[V.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
110
|
+
[V.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
111
|
+
}, u = i(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${c.color && l[c.color] || Re}`);
|
|
112
|
+
return (e, t) => r.value ? (w(), s("span", {
|
|
112
113
|
key: 0,
|
|
113
|
-
class:
|
|
114
|
+
class: _(u.value)
|
|
114
115
|
}, [f(a)], 2)) : o("", !0);
|
|
115
116
|
}
|
|
116
|
-
}),
|
|
117
|
+
}), Be = {
|
|
117
118
|
class: "flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700",
|
|
118
119
|
"aria-label": "Breadcrumb"
|
|
119
|
-
},
|
|
120
|
+
}, Ve = { class: "inline-flex items-center space-x-1 md:space-x-3" }, He = {
|
|
120
121
|
class: "inline-flex items-center",
|
|
121
122
|
style: { "margin-left": "0" }
|
|
122
|
-
},
|
|
123
|
+
}, Ue = /* @__PURE__ */ p({
|
|
123
124
|
__name: "BaseBreadcrumb",
|
|
124
125
|
props: {
|
|
125
126
|
items: {
|
|
@@ -143,41 +144,41 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
143
144
|
}));
|
|
144
145
|
});
|
|
145
146
|
return (t, n) => {
|
|
146
|
-
let i =
|
|
147
|
-
return
|
|
147
|
+
let i = k("router-link");
|
|
148
|
+
return w(), s("nav", Be, [c("ol", Ve, [c("li", He, [f(i, {
|
|
148
149
|
to: "/",
|
|
149
150
|
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
150
151
|
}, {
|
|
151
|
-
default:
|
|
152
|
+
default: P(() => [f(M(Oe), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= d(" Home ", -1)]),
|
|
152
153
|
_: 1
|
|
153
|
-
})]), (
|
|
154
|
+
})]), (w(!0), s(e, null, D(r.value, (e, t) => (w(), s("li", {
|
|
154
155
|
key: t,
|
|
155
156
|
class: "inline-flex items-center",
|
|
156
157
|
style: { "margin-left": "0" }
|
|
157
|
-
}, [f(
|
|
158
|
+
}, [f(M(he), { class: "h-4 w-4 text-gray-500" }), f(i, {
|
|
158
159
|
to: e.url,
|
|
159
160
|
class: "ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
160
161
|
}, {
|
|
161
|
-
default:
|
|
162
|
+
default: P(() => [d(j(e.name), 1)]),
|
|
162
163
|
_: 2
|
|
163
164
|
}, 1032, ["to"])]))), 128))])]);
|
|
164
165
|
};
|
|
165
166
|
}
|
|
166
|
-
}),
|
|
167
|
+
}), H = /* @__PURE__ */ function(e) {
|
|
167
168
|
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.EMERALD = "EMERALD", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e.SKY = "SKY", e.GRAY = "GRAY", e.AMBER = "AMBER", e;
|
|
168
|
-
}({}),
|
|
169
|
+
}({}), U = /* @__PURE__ */ function(e) {
|
|
169
170
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
170
|
-
}({}),
|
|
171
|
+
}({}), We = [
|
|
171
172
|
"type",
|
|
172
173
|
"disabled",
|
|
173
174
|
"onClick"
|
|
174
|
-
],
|
|
175
|
+
], Ge = {
|
|
175
176
|
key: 0,
|
|
176
177
|
class: "inline-flex items-center"
|
|
177
|
-
},
|
|
178
|
+
}, Ke = { key: 1 }, qe = { key: 2 }, Je = ["type", "disabled"], Ye = {
|
|
178
179
|
key: 0,
|
|
179
180
|
class: "inline-flex items-center"
|
|
180
|
-
},
|
|
181
|
+
}, Xe = { key: 1 }, Ze = { key: 2 }, W = /* @__PURE__ */ p({
|
|
181
182
|
__name: "BaseButton",
|
|
182
183
|
props: {
|
|
183
184
|
description: {
|
|
@@ -187,7 +188,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
187
188
|
color: {
|
|
188
189
|
type: String,
|
|
189
190
|
required: !1,
|
|
190
|
-
default:
|
|
191
|
+
default: H.BLUE
|
|
191
192
|
},
|
|
192
193
|
to: {
|
|
193
194
|
type: String,
|
|
@@ -231,103 +232,103 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
231
232
|
}
|
|
232
233
|
},
|
|
233
234
|
setup(e) {
|
|
234
|
-
let { isDark: t } =
|
|
235
|
+
let { isDark: t } = B(), n = e;
|
|
235
236
|
function r() {
|
|
236
237
|
let e = {
|
|
237
|
-
[
|
|
238
|
+
[H.BLUE]: {
|
|
238
239
|
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
239
240
|
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
240
241
|
},
|
|
241
|
-
[
|
|
242
|
+
[H.GREEN]: {
|
|
242
243
|
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
243
244
|
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
244
245
|
},
|
|
245
|
-
[
|
|
246
|
+
[H.EMERALD]: {
|
|
246
247
|
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
247
248
|
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
248
249
|
},
|
|
249
|
-
[
|
|
250
|
+
[H.RED]: {
|
|
250
251
|
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
251
252
|
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
252
253
|
},
|
|
253
|
-
[
|
|
254
|
+
[H.YELLOW]: {
|
|
254
255
|
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
255
256
|
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
256
257
|
},
|
|
257
|
-
[
|
|
258
|
+
[H.PURPLE]: {
|
|
258
259
|
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
259
260
|
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
260
261
|
},
|
|
261
|
-
[
|
|
262
|
+
[H.SKY]: {
|
|
262
263
|
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
263
264
|
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
264
265
|
},
|
|
265
|
-
[
|
|
266
|
+
[H.AMBER]: {
|
|
266
267
|
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
267
268
|
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
268
269
|
},
|
|
269
|
-
[
|
|
270
|
+
[H.GRAY]: {
|
|
270
271
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
271
272
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
272
273
|
},
|
|
273
|
-
[
|
|
274
|
+
[H.DARK]: {
|
|
274
275
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
275
276
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
276
277
|
},
|
|
277
|
-
[
|
|
278
|
+
[H.WHITE]: {
|
|
278
279
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
279
280
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
280
281
|
}
|
|
281
|
-
}, r = e[n.color] ?? e[
|
|
282
|
+
}, r = e[n.color] ?? e[H.BLUE], i = t.value ? r.dark : r.light;
|
|
282
283
|
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current border bg-transparent ${i}`;
|
|
283
284
|
}
|
|
284
285
|
function i() {
|
|
285
286
|
let e = {
|
|
286
|
-
[
|
|
287
|
+
[H.BLUE]: {
|
|
287
288
|
light: "text-blue-600 hover:bg-blue-50",
|
|
288
289
|
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
289
290
|
},
|
|
290
|
-
[
|
|
291
|
+
[H.GREEN]: {
|
|
291
292
|
light: "text-green-600 hover:bg-green-50",
|
|
292
293
|
dark: "text-green-400 hover:bg-green-500/10"
|
|
293
294
|
},
|
|
294
|
-
[
|
|
295
|
+
[H.EMERALD]: {
|
|
295
296
|
light: "text-emerald-600 hover:bg-emerald-50",
|
|
296
297
|
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
297
298
|
},
|
|
298
|
-
[
|
|
299
|
+
[H.SKY]: {
|
|
299
300
|
light: "text-sky-600 hover:bg-sky-50",
|
|
300
301
|
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
301
302
|
},
|
|
302
|
-
[
|
|
303
|
+
[H.RED]: {
|
|
303
304
|
light: "text-red-500 hover:bg-red-50",
|
|
304
305
|
dark: "text-red-400 hover:bg-red-500/10"
|
|
305
306
|
},
|
|
306
|
-
[
|
|
307
|
+
[H.AMBER]: {
|
|
307
308
|
light: "text-amber-700 hover:bg-amber-50",
|
|
308
309
|
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
309
310
|
},
|
|
310
|
-
[
|
|
311
|
+
[H.YELLOW]: {
|
|
311
312
|
light: "text-yellow-600 hover:bg-yellow-50",
|
|
312
313
|
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
313
314
|
},
|
|
314
|
-
[
|
|
315
|
+
[H.PURPLE]: {
|
|
315
316
|
light: "text-purple-600 hover:bg-purple-50",
|
|
316
317
|
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
317
318
|
},
|
|
318
|
-
[
|
|
319
|
+
[H.GRAY]: {
|
|
319
320
|
light: "text-gray-500 hover:bg-gray-100",
|
|
320
321
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
321
322
|
},
|
|
322
|
-
[
|
|
323
|
+
[H.DARK]: {
|
|
323
324
|
light: "text-gray-500 hover:bg-gray-100",
|
|
324
325
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
325
326
|
},
|
|
326
|
-
[
|
|
327
|
+
[H.WHITE]: {
|
|
327
328
|
light: "text-gray-500 hover:bg-gray-100",
|
|
328
329
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
329
330
|
}
|
|
330
|
-
}, r = e[n.color] ?? e[
|
|
331
|
+
}, r = e[n.color] ?? e[H.GRAY], i = t.value ? r.dark : r.light;
|
|
331
332
|
return n.isDisable || n.isLoading ? `bg-transparent ${i} opacity-60 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current bg-transparent ${i} cursor-pointer`;
|
|
332
333
|
}
|
|
333
334
|
function l() {
|
|
@@ -335,79 +336,75 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
335
336
|
e || (t += " cursor-pointer");
|
|
336
337
|
let a;
|
|
337
338
|
switch (n.color) {
|
|
338
|
-
case
|
|
339
|
+
case H.BLUE:
|
|
339
340
|
a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
340
341
|
break;
|
|
341
|
-
case
|
|
342
|
+
case H.WHITE:
|
|
342
343
|
a = e ? "text-gray-900 bg-gray-200 border border-gray-200 cursor-not-allowed" : "focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200";
|
|
343
344
|
break;
|
|
344
|
-
case
|
|
345
|
+
case H.DARK:
|
|
345
346
|
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300";
|
|
346
347
|
break;
|
|
347
|
-
case
|
|
348
|
+
case H.GREEN:
|
|
348
349
|
a = e ? "text-white bg-green-400 cursor-not-allowed" : "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300";
|
|
349
350
|
break;
|
|
350
|
-
case
|
|
351
|
+
case H.EMERALD:
|
|
351
352
|
a = e ? "text-white bg-emerald-400 cursor-not-allowed" : "focus:outline-none text-white bg-emerald-600 hover:bg-emerald-700 focus:ring-4 focus:ring-emerald-300";
|
|
352
353
|
break;
|
|
353
|
-
case
|
|
354
|
+
case H.RED:
|
|
354
355
|
a = e ? "text-white bg-red-400 cursor-not-allowed" : "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300";
|
|
355
356
|
break;
|
|
356
|
-
case
|
|
357
|
+
case H.YELLOW:
|
|
357
358
|
a = e ? "text-white bg-yellow-300 cursor-not-allowed" : "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300";
|
|
358
359
|
break;
|
|
359
|
-
case
|
|
360
|
+
case H.PURPLE:
|
|
360
361
|
a = e ? "text-white bg-purple-400 cursor-not-allowed" : "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300";
|
|
361
362
|
break;
|
|
362
|
-
case
|
|
363
|
+
case H.SKY:
|
|
363
364
|
a = e ? "text-white bg-sky-400 cursor-not-allowed" : "focus:outline-none text-white bg-sky-600 hover:bg-sky-700 focus:ring-4 focus:ring-sky-300";
|
|
364
365
|
break;
|
|
365
|
-
case
|
|
366
|
+
case H.AMBER:
|
|
366
367
|
a = e ? "text-white bg-amber-300 cursor-not-allowed" : "focus:outline-none text-white bg-amber-500 hover:bg-amber-600 focus:ring-4 focus:ring-amber-300";
|
|
367
368
|
break;
|
|
368
|
-
case
|
|
369
|
+
case H.GRAY:
|
|
369
370
|
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-600 hover:bg-gray-700 focus:ring-4 focus:ring-gray-300";
|
|
370
371
|
break;
|
|
371
|
-
default:
|
|
372
|
-
a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
373
|
-
break;
|
|
372
|
+
default: a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
374
373
|
}
|
|
375
374
|
n.outline && (a = r()), n.ghost && (a = i());
|
|
376
375
|
let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
377
376
|
switch (n.size) {
|
|
378
|
-
case
|
|
377
|
+
case U.EXTRA_SMALL:
|
|
379
378
|
o = "px-3 py-2 text-xs";
|
|
380
379
|
break;
|
|
381
|
-
case
|
|
380
|
+
case U.SMALL:
|
|
382
381
|
o = "px-3 py-2 text-sm";
|
|
383
382
|
break;
|
|
384
|
-
case
|
|
383
|
+
case U.BASE:
|
|
385
384
|
o = "px-5 py-2.5 text-sm";
|
|
386
385
|
break;
|
|
387
|
-
case
|
|
386
|
+
case U.LARGE:
|
|
388
387
|
o = "px-5 py-3 text-base";
|
|
389
388
|
break;
|
|
390
|
-
case
|
|
391
|
-
o = "px-6 py-3.5 text-base";
|
|
392
|
-
break;
|
|
389
|
+
case U.EXTRA_LARGE: o = "px-6 py-3.5 text-base";
|
|
393
390
|
}
|
|
394
391
|
let s = "rounded-lg";
|
|
395
392
|
return n.isRounded && (s = "rounded-full"), t + " " + o + " " + a + " font-medium " + s;
|
|
396
393
|
}
|
|
397
394
|
return (t, r) => {
|
|
398
|
-
let i =
|
|
399
|
-
return e.to ? (
|
|
395
|
+
let i = k("router-link");
|
|
396
|
+
return e.to ? (w(), a(i, {
|
|
400
397
|
key: 0,
|
|
401
398
|
to: e.to,
|
|
402
399
|
custom: ""
|
|
403
400
|
}, {
|
|
404
|
-
default:
|
|
401
|
+
default: P(({ navigate: i }) => [c("button", {
|
|
405
402
|
type: n.type,
|
|
406
|
-
class:
|
|
403
|
+
class: _(l()),
|
|
407
404
|
disabled: e.isDisable || e.isLoading,
|
|
408
405
|
onClick: i
|
|
409
406
|
}, [
|
|
410
|
-
e.isLoading ? (
|
|
407
|
+
e.isLoading ? (w(), s("div", Ge, [...r[0] ||= [c("svg", {
|
|
411
408
|
"aria-hidden": "true",
|
|
412
409
|
role: "status",
|
|
413
410
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -421,18 +418,18 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
421
418
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
422
419
|
fill: "currentColor"
|
|
423
420
|
})], -1)]])) : o("", !0),
|
|
424
|
-
e.iconLeft ? o("", !0) : (
|
|
425
|
-
|
|
426
|
-
e.iconLeft ? (
|
|
427
|
-
], 10,
|
|
421
|
+
e.iconLeft ? o("", !0) : (w(), s("span", Ke, j(e.description), 1)),
|
|
422
|
+
O(t.$slots, "default"),
|
|
423
|
+
e.iconLeft ? (w(), s("span", qe, j(e.description), 1)) : o("", !0)
|
|
424
|
+
], 10, We)]),
|
|
428
425
|
_: 3
|
|
429
|
-
}, 8, ["to"])) : (
|
|
426
|
+
}, 8, ["to"])) : (w(), s("button", {
|
|
430
427
|
key: 1,
|
|
431
428
|
type: n.type,
|
|
432
|
-
class:
|
|
429
|
+
class: _(l()),
|
|
433
430
|
disabled: e.isDisable || e.isLoading
|
|
434
431
|
}, [
|
|
435
|
-
e.isLoading ? (
|
|
432
|
+
e.isLoading ? (w(), s("div", Ye, [...r[1] ||= [c("svg", {
|
|
436
433
|
"aria-hidden": "true",
|
|
437
434
|
role: "status",
|
|
438
435
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -446,40 +443,40 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
446
443
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
447
444
|
fill: "currentColor"
|
|
448
445
|
})], -1)]])) : o("", !0),
|
|
449
|
-
e.iconLeft ? o("", !0) : (
|
|
450
|
-
|
|
451
|
-
e.iconLeft ? (
|
|
452
|
-
], 10,
|
|
446
|
+
e.iconLeft ? o("", !0) : (w(), s("span", Xe, j(e.description), 1)),
|
|
447
|
+
O(t.$slots, "default"),
|
|
448
|
+
e.iconLeft ? (w(), s("span", Ze, j(e.description), 1)) : o("", !0)
|
|
449
|
+
], 10, Je));
|
|
453
450
|
};
|
|
454
451
|
}
|
|
455
|
-
}),
|
|
452
|
+
}), Qe = /* @__PURE__ */ function(e) {
|
|
456
453
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
457
|
-
}({}),
|
|
454
|
+
}({}), $e = {
|
|
458
455
|
key: 0,
|
|
459
456
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
460
|
-
},
|
|
457
|
+
}, et = {
|
|
461
458
|
key: 1,
|
|
462
459
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
463
|
-
},
|
|
460
|
+
}, tt = {
|
|
464
461
|
key: 2,
|
|
465
462
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
466
|
-
},
|
|
463
|
+
}, nt = /* @__PURE__ */ p({
|
|
467
464
|
__name: "BaseLine",
|
|
468
465
|
props: { mode: {
|
|
469
466
|
type: String,
|
|
470
467
|
required: !1,
|
|
471
|
-
default:
|
|
468
|
+
default: Qe.BASE
|
|
472
469
|
} },
|
|
473
470
|
setup(t) {
|
|
474
|
-
return (n, r) => (
|
|
475
|
-
t.mode ===
|
|
476
|
-
t.mode ===
|
|
477
|
-
t.mode ===
|
|
471
|
+
return (n, r) => (w(), s(e, null, [
|
|
472
|
+
t.mode === M(Qe).BASE ? (w(), s("hr", $e)) : o("", !0),
|
|
473
|
+
t.mode === M(Qe).BASE_SHORTER ? (w(), s("hr", et)) : o("", !0),
|
|
474
|
+
t.mode === M(Qe).SQUARE ? (w(), s("hr", tt)) : o("", !0)
|
|
478
475
|
], 64));
|
|
479
476
|
}
|
|
480
477
|
}), G = /* @__PURE__ */ function(e) {
|
|
481
478
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
482
|
-
}({}),
|
|
479
|
+
}({}), rt = G, it = ["height", "width"], at = /* @__PURE__ */ p({
|
|
483
480
|
__name: "BaseLogo",
|
|
484
481
|
props: { size: {
|
|
485
482
|
type: String,
|
|
@@ -497,19 +494,17 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
497
494
|
case G.MEDIUM:
|
|
498
495
|
e = "100px";
|
|
499
496
|
break;
|
|
500
|
-
case G.LARGE:
|
|
501
|
-
e = "150px";
|
|
502
|
-
break;
|
|
497
|
+
case G.LARGE: e = "150px";
|
|
503
498
|
}
|
|
504
499
|
return e;
|
|
505
500
|
}
|
|
506
501
|
return (e, t) => {
|
|
507
|
-
let r =
|
|
508
|
-
return
|
|
502
|
+
let r = k("router-link");
|
|
503
|
+
return w(), a(r, {
|
|
509
504
|
to: "/",
|
|
510
505
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
511
506
|
}, {
|
|
512
|
-
default:
|
|
507
|
+
default: P(() => [(w(), s("svg", {
|
|
513
508
|
height: n(),
|
|
514
509
|
width: n(),
|
|
515
510
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
@@ -659,23 +654,23 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
659
654
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
660
655
|
fill: "url(#k)"
|
|
661
656
|
}, null, -1)
|
|
662
|
-
]], 8,
|
|
657
|
+
]], 8, it))]),
|
|
663
658
|
_: 1
|
|
664
659
|
});
|
|
665
660
|
};
|
|
666
661
|
}
|
|
667
|
-
}),
|
|
662
|
+
}), ot = /* @__PURE__ */ function(e) {
|
|
668
663
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
669
|
-
}({}),
|
|
664
|
+
}({}), st = {
|
|
670
665
|
key: 0,
|
|
671
666
|
class: "p-6 text-center"
|
|
672
|
-
},
|
|
667
|
+
}, ct = { class: "flex justify-center" }, lt = {
|
|
673
668
|
key: 1,
|
|
674
669
|
class: "p-6 text-center"
|
|
675
|
-
},
|
|
670
|
+
}, ut = {
|
|
676
671
|
key: 0,
|
|
677
672
|
class: "mb-5 text-sm text-gray-500"
|
|
678
|
-
},
|
|
673
|
+
}, dt = { class: "flex justify-center" }, ft = /* @__PURE__ */ p({
|
|
679
674
|
__name: "BaseModal",
|
|
680
675
|
props: {
|
|
681
676
|
title: {
|
|
@@ -694,7 +689,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
694
689
|
mode: {
|
|
695
690
|
type: String,
|
|
696
691
|
required: !1,
|
|
697
|
-
default:
|
|
692
|
+
default: ot.SUCCESS
|
|
698
693
|
}
|
|
699
694
|
},
|
|
700
695
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -703,11 +698,11 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
703
698
|
function a(e) {
|
|
704
699
|
e.key === "Escape" && r("closeModal");
|
|
705
700
|
}
|
|
706
|
-
return
|
|
701
|
+
return x(() => {
|
|
707
702
|
document.addEventListener("keydown", a);
|
|
708
|
-
}),
|
|
703
|
+
}), C(() => {
|
|
709
704
|
document.removeEventListener("keydown", a);
|
|
710
|
-
}), (n, r) => (
|
|
705
|
+
}), (n, r) => (w(), s(e, null, [c("div", {
|
|
711
706
|
class: "fixed inset-0 w-full h-screen bg-black/75 z-40",
|
|
712
707
|
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
713
708
|
}), c("div", {
|
|
@@ -715,37 +710,37 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
715
710
|
role: "dialog",
|
|
716
711
|
"aria-modal": "true",
|
|
717
712
|
"aria-labelledby": i
|
|
718
|
-
}, [t.mode ===
|
|
719
|
-
f(
|
|
713
|
+
}, [t.mode === M(ot).DELETE ? (w(), s("div", st, [
|
|
714
|
+
f(M(ye), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
720
715
|
c("h3", {
|
|
721
716
|
id: i,
|
|
722
717
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
723
|
-
}, " Are you sure you want to delete this " +
|
|
724
|
-
c("div",
|
|
725
|
-
color:
|
|
718
|
+
}, " Are you sure you want to delete this " + j(t.title) + "? ", 1),
|
|
719
|
+
c("div", ct, [f(W, {
|
|
720
|
+
color: M(H).RED,
|
|
726
721
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
727
722
|
description: "Yes, I'm sure"
|
|
728
|
-
}, null, 8, ["color"]), f(
|
|
729
|
-
color:
|
|
723
|
+
}, null, 8, ["color"]), f(W, {
|
|
724
|
+
color: M(H).WHITE,
|
|
730
725
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
731
726
|
description: "No, cancel"
|
|
732
727
|
}, null, 8, ["color"])])
|
|
733
|
-
])) : (
|
|
734
|
-
f(
|
|
728
|
+
])) : (w(), s("div", lt, [
|
|
729
|
+
f(M(de), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
735
730
|
c("h3", {
|
|
736
731
|
id: i,
|
|
737
732
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
738
|
-
},
|
|
739
|
-
t.description ? (
|
|
740
|
-
|
|
741
|
-
c("div",
|
|
742
|
-
color:
|
|
733
|
+
}, j(t.title), 1),
|
|
734
|
+
t.description ? (w(), s("p", ut, j(t.description), 1)) : o("", !0),
|
|
735
|
+
O(n.$slots, "default"),
|
|
736
|
+
c("div", dt, [f(W, {
|
|
737
|
+
color: M(H).BLUE,
|
|
743
738
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
744
739
|
description: "OK"
|
|
745
740
|
}, null, 8, ["color"])])
|
|
746
741
|
]))])], 64));
|
|
747
742
|
}
|
|
748
|
-
}),
|
|
743
|
+
}), pt = /* @__PURE__ */ p({
|
|
749
744
|
__name: "BaseRow",
|
|
750
745
|
props: { bgColor: {
|
|
751
746
|
type: String,
|
|
@@ -757,9 +752,9 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
757
752
|
function n() {
|
|
758
753
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
759
754
|
}
|
|
760
|
-
return (e, t) => (
|
|
755
|
+
return (e, t) => (w(), s("div", { class: _(n()) }, [O(e.$slots, "default")], 2));
|
|
761
756
|
}
|
|
762
|
-
}),
|
|
757
|
+
}), mt = /* @__PURE__ */ p({
|
|
763
758
|
__name: "BaseSpinner",
|
|
764
759
|
props: {
|
|
765
760
|
size: { default: "sm" },
|
|
@@ -781,8 +776,8 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
781
776
|
red: "border-t-red-500",
|
|
782
777
|
amber: "border-t-amber-500"
|
|
783
778
|
})[t.color]);
|
|
784
|
-
return (e, t) => (
|
|
785
|
-
class:
|
|
779
|
+
return (e, t) => (w(), s("div", {
|
|
780
|
+
class: _(["border-gray-200 rounded-full animate-spin", [n.value, r.value]]),
|
|
786
781
|
role: "status",
|
|
787
782
|
"aria-label": "Loading"
|
|
788
783
|
}, null, 2));
|
|
@@ -791,7 +786,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
791
786
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
792
787
|
}({}), q = /* @__PURE__ */ function(e) {
|
|
793
788
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
794
|
-
}({}),
|
|
789
|
+
}({}), ht = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, gt = { class: "ml-3 text-sm font-normal" }, _t = /* @__PURE__ */ p({
|
|
795
790
|
__name: "BaseToast",
|
|
796
791
|
props: {
|
|
797
792
|
mode: {
|
|
@@ -819,13 +814,13 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
819
814
|
}
|
|
820
815
|
},
|
|
821
816
|
setup(e) {
|
|
822
|
-
let t = e, n =
|
|
817
|
+
let t = e, n = E(!0), r = null;
|
|
823
818
|
function i() {
|
|
824
819
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
825
820
|
}
|
|
826
|
-
|
|
821
|
+
x(() => {
|
|
827
822
|
r = setTimeout(() => n.value = !1, t.duration);
|
|
828
|
-
}),
|
|
823
|
+
}), C(() => {
|
|
829
824
|
r && clearTimeout(r);
|
|
830
825
|
});
|
|
831
826
|
function a() {
|
|
@@ -840,9 +835,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
840
835
|
case K.WARNING:
|
|
841
836
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
842
837
|
break;
|
|
843
|
-
default:
|
|
844
|
-
e = "text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200";
|
|
845
|
-
break;
|
|
838
|
+
default: e = "text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200";
|
|
846
839
|
}
|
|
847
840
|
return "inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg " + e;
|
|
848
841
|
}
|
|
@@ -858,39 +851,37 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
858
851
|
case q.TOP_RIGHT:
|
|
859
852
|
e = "top-5 right-5";
|
|
860
853
|
break;
|
|
861
|
-
case q.BOTTOM_RIGHT:
|
|
862
|
-
e = "bottom-5 right-5";
|
|
863
|
-
break;
|
|
854
|
+
case q.BOTTOM_RIGHT: e = "bottom-5 right-5";
|
|
864
855
|
}
|
|
865
856
|
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
866
857
|
}
|
|
867
|
-
return (t, r) => n.value ? (
|
|
858
|
+
return (t, r) => n.value ? (w(), s("div", {
|
|
868
859
|
key: 0,
|
|
869
860
|
id: "toast-top-right",
|
|
870
|
-
class:
|
|
861
|
+
class: _(l()),
|
|
871
862
|
role: "alert"
|
|
872
|
-
}, [c("div",
|
|
873
|
-
e.mode ==
|
|
863
|
+
}, [c("div", ht, [
|
|
864
|
+
e.mode == M(K).ERROR ? (w(), s("div", {
|
|
874
865
|
key: 0,
|
|
875
|
-
class:
|
|
876
|
-
}, [f(
|
|
866
|
+
class: _(a())
|
|
867
|
+
}, [f(M(ye), { class: "h-6 w-6 text-red-500" }), r[0] ||= c("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == M(K).SUCCESS ? (w(), s("div", {
|
|
877
868
|
key: 1,
|
|
878
|
-
class:
|
|
879
|
-
}, [f(
|
|
869
|
+
class: _(a())
|
|
870
|
+
}, [f(M(de), { class: "h-6 w-6 text-green-500" }), r[1] ||= c("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == M(K).WARNING ? (w(), s("div", {
|
|
880
871
|
key: 2,
|
|
881
|
-
class:
|
|
882
|
-
}, [f(
|
|
883
|
-
c("div",
|
|
884
|
-
e.hasCloseIcon ? (
|
|
872
|
+
class: _(a())
|
|
873
|
+
}, [f(M(be), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= c("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : o("", !0),
|
|
874
|
+
c("div", gt, j(e.description), 1),
|
|
875
|
+
e.hasCloseIcon ? (w(), s("button", {
|
|
885
876
|
key: 3,
|
|
886
877
|
type: "button",
|
|
887
878
|
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700 cursor-pointer",
|
|
888
879
|
"aria-label": "Close",
|
|
889
880
|
onClick: i
|
|
890
|
-
}, [r[3] ||= c("span", { class: "sr-only" }, "Close", -1), f(
|
|
881
|
+
}, [r[3] ||= c("span", { class: "sr-only" }, "Close", -1), f(M(De), { class: "h-6 w-6 text-gray-500" })])) : o("", !0)
|
|
891
882
|
])], 2)) : o("", !0);
|
|
892
883
|
}
|
|
893
|
-
}),
|
|
884
|
+
}), vt = { class: "w-13" }, yt = /* @__PURE__ */ p({
|
|
894
885
|
__name: "ColoredSquares",
|
|
895
886
|
props: { color: {
|
|
896
887
|
type: String,
|
|
@@ -907,29 +898,29 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
907
898
|
"bg-yellow-300",
|
|
908
899
|
"bg-purple-300",
|
|
909
900
|
"bg-pink-300"
|
|
910
|
-
], r =
|
|
901
|
+
], r = E(n[Math.floor(Math.random() * n.length)]);
|
|
911
902
|
function i() {
|
|
912
|
-
let e = "gray";
|
|
903
|
+
let e = "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full", n = "gray";
|
|
913
904
|
switch (t.color) {
|
|
914
|
-
case
|
|
915
|
-
|
|
905
|
+
case V.GREEN:
|
|
906
|
+
n = "green";
|
|
916
907
|
break;
|
|
917
|
-
case
|
|
918
|
-
|
|
908
|
+
case V.RED:
|
|
909
|
+
n = "red";
|
|
919
910
|
break;
|
|
920
|
-
case
|
|
921
|
-
|
|
911
|
+
case V.BLUE:
|
|
912
|
+
n = "blue";
|
|
922
913
|
break;
|
|
923
|
-
case
|
|
924
|
-
|
|
914
|
+
case V.YELLOW:
|
|
915
|
+
n = "yellow";
|
|
925
916
|
break;
|
|
926
|
-
case
|
|
917
|
+
case V.NONE: return e;
|
|
927
918
|
}
|
|
928
|
-
return
|
|
919
|
+
return e + " bg-" + n + "-100 text-" + n + "-800";
|
|
929
920
|
}
|
|
930
|
-
return (e, t) => (
|
|
921
|
+
return (e, t) => (w(), s("div", vt, [c("div", { class: _(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [O(e.$slots, "default"), c("div", { class: _(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
931
922
|
}
|
|
932
|
-
}),
|
|
923
|
+
}), bt = { class: "flex items-start justify-between" }, xt = { class: "min-w-0" }, St = /* @__PURE__ */ p({
|
|
933
924
|
__name: "EarningsCard",
|
|
934
925
|
props: {
|
|
935
926
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -981,27 +972,27 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
981
972
|
minimumFractionDigits: n.decimals,
|
|
982
973
|
maximumFractionDigits: n.decimals
|
|
983
974
|
}));
|
|
984
|
-
return (n, r) => (
|
|
975
|
+
return (n, r) => (w(), s("div", { class: _(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (w(), s("div", {
|
|
985
976
|
key: 0,
|
|
986
|
-
class:
|
|
987
|
-
},
|
|
988
|
-
c("p", { class:
|
|
989
|
-
c("p", { class:
|
|
990
|
-
c("p", { class:
|
|
991
|
-
]), c("div", { class:
|
|
992
|
-
class:
|
|
977
|
+
class: _(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
978
|
+
}, j(t.badge), 3)) : o("", !0), c("div", bt, [c("div", xt, [
|
|
979
|
+
c("p", { class: _(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, j(t.title), 3),
|
|
980
|
+
c("p", { class: _(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, j(f.value), 3),
|
|
981
|
+
c("p", { class: _(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, j(t.subtitle), 3)
|
|
982
|
+
]), c("div", { class: _(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(w(), s("svg", {
|
|
983
|
+
class: _([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
993
984
|
viewBox: "0 0 24 24",
|
|
994
985
|
fill: "none",
|
|
995
986
|
stroke: "currentColor",
|
|
996
987
|
"stroke-width": "2.5",
|
|
997
988
|
"stroke-linecap": "round",
|
|
998
989
|
"stroke-linejoin": "round"
|
|
999
|
-
}, [l.value ? (
|
|
990
|
+
}, [l.value ? (w(), s(e, { key: 0 }, [r[0] ||= c("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= c("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (w(), s(e, { key: 1 }, [r[2] ||= c("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= c("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
1000
991
|
}
|
|
1001
|
-
}),
|
|
992
|
+
}), Ct = {
|
|
1002
993
|
key: 0,
|
|
1003
994
|
class: "font-bold text-green-800 dark:text-green-400"
|
|
1004
|
-
},
|
|
995
|
+
}, wt = { key: 0 }, Tt = { key: 0 }, Et = "font-bold", Dt = /* @__PURE__ */ p({
|
|
1005
996
|
__name: "EuroAmount",
|
|
1006
997
|
props: {
|
|
1007
998
|
amount: {
|
|
@@ -1020,21 +1011,21 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1020
1011
|
}
|
|
1021
1012
|
},
|
|
1022
1013
|
setup(t) {
|
|
1023
|
-
let n = t, r = i(() => n.amount !== null && n.amount !== void 0), a = i(() => r.value && n.amount < 0), c = i(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = i(() => a.value || c.value), u = i(() => !a.value && !c.value &&
|
|
1024
|
-
return (n, i) => (
|
|
1014
|
+
let n = t, r = i(() => n.amount !== null && n.amount !== void 0), a = i(() => r.value && n.amount < 0), c = i(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = i(() => a.value || c.value), u = i(() => !a.value && !c.value && n.beforeAmount !== null && n.beforeAmount !== void 0);
|
|
1015
|
+
return (n, i) => (w(), s(e, null, [r.value && u.value ? (w(), s("span", Ct, [d(j(t.amount) + " ", 1), t.showCurrency ? (w(), s("span", wt, "€")) : o("", !0)])) : o("", !0), r.value && !u.value ? (w(), s("span", {
|
|
1025
1016
|
key: 1,
|
|
1026
|
-
class:
|
|
1027
|
-
}, [d(
|
|
1017
|
+
class: _([Et, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1018
|
+
}, [d(j(t.amount) + " ", 1), t.showCurrency ? (w(), s("span", Tt, "€")) : o("", !0)], 2)) : o("", !0)], 64));
|
|
1028
1019
|
}
|
|
1029
|
-
}),
|
|
1020
|
+
}), Ot = { "aria-label": "Pagination" }, kt = { class: "flex list-none p-0 m-0" }, At = [
|
|
1030
1021
|
"aria-current",
|
|
1031
1022
|
"aria-label",
|
|
1032
1023
|
"onClick"
|
|
1033
|
-
],
|
|
1024
|
+
], jt = {
|
|
1034
1025
|
key: 1,
|
|
1035
1026
|
"aria-hidden": "true",
|
|
1036
1027
|
class: "inline-block border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-not-allowed"
|
|
1037
|
-
},
|
|
1028
|
+
}, Mt = /* @__PURE__ */ p({
|
|
1038
1029
|
__name: "Pagination",
|
|
1039
1030
|
props: {
|
|
1040
1031
|
totalItems: {
|
|
@@ -1048,7 +1039,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1048
1039
|
},
|
|
1049
1040
|
emits: ["page-changed"],
|
|
1050
1041
|
setup(t, { emit: n }) {
|
|
1051
|
-
let r = t, i =
|
|
1042
|
+
let r = t, i = E(1), a = E(0), o = E([]), l = n;
|
|
1052
1043
|
function u(e) {
|
|
1053
1044
|
if (a.value <= 5) {
|
|
1054
1045
|
o.value = Array.from({ length: a.value }, (e, t) => t + 1);
|
|
@@ -1062,30 +1053,30 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1062
1053
|
function d(e) {
|
|
1063
1054
|
e === i.value || e < 1 || e > a.value || (i.value = e, u(e), l("page-changed", e));
|
|
1064
1055
|
}
|
|
1065
|
-
return
|
|
1056
|
+
return N(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1066
1057
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1067
|
-
}, { immediate: !0 }), (t, n) => (
|
|
1058
|
+
}, { immediate: !0 }), (t, n) => (w(), s("nav", Ot, [c("ul", kt, [(w(!0), s(e, null, D(o.value, (e, t) => (w(), s("li", {
|
|
1068
1059
|
key: t,
|
|
1069
1060
|
class: "mr-1"
|
|
1070
|
-
}, [e === 0 ? (
|
|
1061
|
+
}, [e === 0 ? (w(), s("span", jt, "...")) : (w(), s("button", {
|
|
1071
1062
|
key: 0,
|
|
1072
1063
|
type: "button",
|
|
1073
1064
|
"aria-current": e === i.value ? "page" : void 0,
|
|
1074
1065
|
"aria-label": `Go to page ${e}`,
|
|
1075
1066
|
onClick: (t) => d(e),
|
|
1076
|
-
class:
|
|
1077
|
-
},
|
|
1067
|
+
class: _(["inline-block min-w-[44px] border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-pointer transition-colors hover:bg-gray-300 dark:hover:bg-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", { "active font-bold bg-gray-200 dark:bg-gray-700": e === i.value }])
|
|
1068
|
+
}, j(e), 11, At))]))), 128))])]));
|
|
1078
1069
|
}
|
|
1079
|
-
}),
|
|
1070
|
+
}), Nt = { key: 0 }, Pt = {
|
|
1080
1071
|
key: 0,
|
|
1081
1072
|
class: "flex items-center space-x-2"
|
|
1082
|
-
},
|
|
1073
|
+
}, Ft = {
|
|
1083
1074
|
key: 1,
|
|
1084
1075
|
class: "flex items-center space-x-2"
|
|
1085
|
-
},
|
|
1076
|
+
}, It = {
|
|
1086
1077
|
key: 2,
|
|
1087
1078
|
class: "flex items-center space-x-2"
|
|
1088
|
-
},
|
|
1079
|
+
}, Lt = /* @__PURE__ */ p({
|
|
1089
1080
|
__name: "TrendArrow",
|
|
1090
1081
|
props: {
|
|
1091
1082
|
number: {
|
|
@@ -1099,23 +1090,23 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1099
1090
|
},
|
|
1100
1091
|
setup(e) {
|
|
1101
1092
|
let t = e, n = i(() => t.number !== null && t.number !== void 0 && t.number < 0), r = i(() => t.number === 0);
|
|
1102
|
-
return (i, a) => e.number !== null && e.number !== void 0 ? (
|
|
1103
|
-
default:
|
|
1093
|
+
return (i, a) => e.number !== null && e.number !== void 0 ? (w(), s("div", Nt, [n.value ? (w(), s("span", Pt, [f(ze, { color: M(V).RED }, {
|
|
1094
|
+
default: P(() => [d(j(e.number) + j(t.icon), 1)]),
|
|
1104
1095
|
_: 1
|
|
1105
|
-
}, 8, ["color"]), f(
|
|
1106
|
-
default:
|
|
1096
|
+
}, 8, ["color"]), f(M(se), { class: "h-5 w-5 text-red-500" })])) : r.value ? (w(), s("span", Ft, [f(ze, { color: M(V).GRAY }, {
|
|
1097
|
+
default: P(() => [d(j(e.number) + j(t.icon), 1)]),
|
|
1107
1098
|
_: 1
|
|
1108
|
-
}, 8, ["color"]), f(
|
|
1109
|
-
default:
|
|
1099
|
+
}, 8, ["color"]), f(M(we), { class: "h-5 w-5 text-gray-400" })])) : (w(), s("span", It, [f(ze, { color: M(V).GREEN }, {
|
|
1100
|
+
default: P(() => [d(j(e.number) + j(t.icon), 1)]),
|
|
1110
1101
|
_: 1
|
|
1111
|
-
}, 8, ["color"]), f(
|
|
1102
|
+
}, 8, ["color"]), f(M(ce), { class: "h-5 w-5 text-green-500" })]))])) : o("", !0);
|
|
1112
1103
|
}
|
|
1113
1104
|
});
|
|
1114
1105
|
//#endregion
|
|
1115
1106
|
//#region src/composables/useThemeClasses.ts
|
|
1116
1107
|
function J() {
|
|
1117
|
-
let { isDark: e } =
|
|
1118
|
-
return
|
|
1108
|
+
let { isDark: e } = B();
|
|
1109
|
+
return T({
|
|
1119
1110
|
card: i(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1120
1111
|
cardAlt: i(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1121
1112
|
pageBg: i(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
@@ -1141,15 +1132,15 @@ function J() {
|
|
|
1141
1132
|
}
|
|
1142
1133
|
//#endregion
|
|
1143
1134
|
//#region src/composables/useEscapeKey.ts
|
|
1144
|
-
function
|
|
1135
|
+
function Rt(e) {
|
|
1145
1136
|
function t(t) {
|
|
1146
1137
|
t.key === "Escape" && e();
|
|
1147
1138
|
}
|
|
1148
|
-
|
|
1139
|
+
x(() => document.addEventListener("keydown", t)), b(() => document.removeEventListener("keydown", t));
|
|
1149
1140
|
}
|
|
1150
1141
|
//#endregion
|
|
1151
1142
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1152
|
-
var
|
|
1143
|
+
var zt = { class: "flex items-start gap-4 min-w-0" }, Bt = { class: "flex-1 min-w-0" }, Vt = { class: "p-6 overflow-y-auto flex-1" }, Ht = { class: "p-6" }, Ut = { class: "flex items-start gap-4" }, Wt = { class: "flex-1" }, Gt = { class: "mt-4" }, Kt = { class: "mt-6 flex gap-3 justify-end" }, qt = /* @__PURE__ */ p({
|
|
1153
1144
|
__name: "BaseModalShell",
|
|
1154
1145
|
props: {
|
|
1155
1146
|
title: {},
|
|
@@ -1169,55 +1160,55 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1169
1160
|
},
|
|
1170
1161
|
emits: ["cancel", "backdrop"],
|
|
1171
1162
|
setup(e, { emit: n }) {
|
|
1172
|
-
let r = e, l = n, { isDark: u } =
|
|
1163
|
+
let r = e, l = n, { isDark: u } = B(), d = J(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = i(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200"), m = i(() => r.iconBgClass || (u.value ? "bg-emerald-900/30" : "bg-emerald-50"));
|
|
1173
1164
|
function h() {
|
|
1174
1165
|
l("backdrop"), r.manualClose || l("cancel");
|
|
1175
1166
|
}
|
|
1176
|
-
return
|
|
1167
|
+
return Rt(() => {
|
|
1177
1168
|
r.manualClose || l("cancel");
|
|
1178
|
-
}), (n, r) => (
|
|
1169
|
+
}), (n, r) => (w(), a(t, { to: "body" }, [c("div", {
|
|
1179
1170
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1180
1171
|
role: "dialog",
|
|
1181
1172
|
"aria-modal": "true",
|
|
1182
1173
|
"aria-labelledby": f,
|
|
1183
1174
|
onClick: h
|
|
1184
|
-
}, [e.scrollable ? (
|
|
1175
|
+
}, [e.scrollable ? (w(), s("div", {
|
|
1185
1176
|
key: 0,
|
|
1186
|
-
class:
|
|
1187
|
-
onClick: r[0] ||=
|
|
1177
|
+
class: _(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1178
|
+
onClick: r[0] ||= I(() => {}, ["stop"])
|
|
1188
1179
|
}, [
|
|
1189
|
-
c("div", { class:
|
|
1190
|
-
class:
|
|
1180
|
+
c("div", { class: _(["flex items-start justify-between gap-4 p-6 border-b shrink-0", M(d).border]) }, [c("div", zt, [O(n.$slots, "icon", {}, () => [c("div", { class: _(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(w(), a(A(e.icon), {
|
|
1181
|
+
class: _(["h-6 w-6", e.iconClass]),
|
|
1191
1182
|
"aria-hidden": "true"
|
|
1192
|
-
}, null, 8, ["class"]))], 2)]), c("div",
|
|
1183
|
+
}, null, 8, ["class"]))], 2)]), c("div", Bt, [c("h3", {
|
|
1193
1184
|
id: f,
|
|
1194
|
-
class:
|
|
1195
|
-
},
|
|
1185
|
+
class: _(["text-lg font-medium", M(d).primaryText])
|
|
1186
|
+
}, j(e.title), 3), e.subtitle ? (w(), s("p", {
|
|
1196
1187
|
key: 0,
|
|
1197
|
-
class:
|
|
1198
|
-
},
|
|
1199
|
-
c("div",
|
|
1200
|
-
n.$slots.footer ? (
|
|
1188
|
+
class: _(["text-sm mt-1 break-all", M(d).mutedText])
|
|
1189
|
+
}, j(e.subtitle), 3)) : o("", !0)])]), O(n.$slots, "header-actions")], 2),
|
|
1190
|
+
c("div", Vt, [O(n.$slots, "default")]),
|
|
1191
|
+
n.$slots.footer ? (w(), s("div", {
|
|
1201
1192
|
key: 0,
|
|
1202
|
-
class:
|
|
1203
|
-
}, [
|
|
1204
|
-
], 2)) : (
|
|
1193
|
+
class: _(["flex gap-3 justify-end p-6 border-t shrink-0", M(d).border])
|
|
1194
|
+
}, [O(n.$slots, "footer")], 2)) : o("", !0)
|
|
1195
|
+
], 2)) : (w(), s("div", {
|
|
1205
1196
|
key: 1,
|
|
1206
|
-
class:
|
|
1207
|
-
onClick: r[1] ||=
|
|
1208
|
-
}, [c("div",
|
|
1209
|
-
c("div",
|
|
1210
|
-
class:
|
|
1197
|
+
class: _(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1198
|
+
onClick: r[1] ||= I(() => {}, ["stop"])
|
|
1199
|
+
}, [c("div", Ht, [
|
|
1200
|
+
c("div", Ut, [O(n.$slots, "icon", {}, () => [c("div", { class: _(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(w(), a(A(e.icon), {
|
|
1201
|
+
class: _(["h-6 w-6", e.iconClass]),
|
|
1211
1202
|
"aria-hidden": "true"
|
|
1212
|
-
}, null, 8, ["class"]))], 2)]), c("div",
|
|
1203
|
+
}, null, 8, ["class"]))], 2)]), c("div", Wt, [c("h3", {
|
|
1213
1204
|
id: f,
|
|
1214
|
-
class:
|
|
1215
|
-
},
|
|
1216
|
-
c("div",
|
|
1217
|
-
c("div",
|
|
1205
|
+
class: _(["text-lg font-medium", M(d).primaryText])
|
|
1206
|
+
}, j(e.title), 3)])]),
|
|
1207
|
+
c("div", Gt, [O(n.$slots, "default")]),
|
|
1208
|
+
c("div", Kt, [O(n.$slots, "footer")])
|
|
1218
1209
|
])], 2))])]));
|
|
1219
1210
|
}
|
|
1220
|
-
}),
|
|
1211
|
+
}), Jt = ["aria-expanded"], Yt = { class: "flex items-center gap-3" }, Xt = /* @__PURE__ */ p({
|
|
1221
1212
|
__name: "BaseCollapsibleSection",
|
|
1222
1213
|
props: {
|
|
1223
1214
|
title: {},
|
|
@@ -1227,17 +1218,17 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1227
1218
|
},
|
|
1228
1219
|
emits: ["toggle"],
|
|
1229
1220
|
setup(e, { emit: t }) {
|
|
1230
|
-
let n = e, r = t, { isDark: a } =
|
|
1231
|
-
return (t, n) => (
|
|
1221
|
+
let n = e, r = t, { isDark: a } = B(), l = J(), u = i(() => a.value ? "text-gray-100" : "text-gray-700"), d = i(() => a.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = i(() => a.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = i(() => n.bodyClass === void 0 ? a.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1222
|
+
return (t, n) => (w(), s("section", { class: _(["rounded-xl border transition-colors", M(l).cardAlt]) }, [c("button", {
|
|
1232
1223
|
type: "button",
|
|
1233
|
-
class:
|
|
1224
|
+
class: _(["w-full flex items-center justify-between p-4 text-left transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [d.value, e.collapsed ? "rounded-xl" : "rounded-t-xl"]]),
|
|
1234
1225
|
"aria-expanded": !e.collapsed,
|
|
1235
1226
|
onClick: n[0] ||= (e) => r("toggle")
|
|
1236
|
-
}, [c("div",
|
|
1227
|
+
}, [c("div", Yt, [c("h2", { class: _(["text-base font-semibold", u.value]) }, j(e.title), 3), e.badge ? (w(), s("span", {
|
|
1237
1228
|
key: 0,
|
|
1238
|
-
class:
|
|
1239
|
-
},
|
|
1240
|
-
class:
|
|
1229
|
+
class: _(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1230
|
+
}, j(e.badge), 3)) : o("", !0)]), (w(), s("svg", {
|
|
1231
|
+
class: _(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", M(l).dimTextAlt]]),
|
|
1241
1232
|
fill: "none",
|
|
1242
1233
|
viewBox: "0 0 24 24",
|
|
1243
1234
|
stroke: "currentColor",
|
|
@@ -1247,15 +1238,15 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1247
1238
|
"stroke-linecap": "round",
|
|
1248
1239
|
"stroke-linejoin": "round",
|
|
1249
1240
|
d: "M19 9l-7 7-7-7"
|
|
1250
|
-
}, null, -1)]], 2))], 10,
|
|
1241
|
+
}, null, -1)]], 2))], 10, Jt), F(c("div", { class: _(["p-6 border-t rounded-b-xl", [M(l).border, p.value]]) }, [O(t.$slots, "default")], 2), [[ae, !e.collapsed]])], 2));
|
|
1251
1242
|
}
|
|
1252
|
-
}),
|
|
1243
|
+
}), Zt = ["disabled"], Qt = ["disabled"], $t = {
|
|
1253
1244
|
key: 0,
|
|
1254
1245
|
class: "w-4 h-4 animate-spin",
|
|
1255
1246
|
fill: "none",
|
|
1256
1247
|
viewBox: "0 0 24 24",
|
|
1257
1248
|
"aria-hidden": "true"
|
|
1258
|
-
},
|
|
1249
|
+
}, en = /* @__PURE__ */ p({
|
|
1259
1250
|
__name: "BaseConfirmModal",
|
|
1260
1251
|
props: {
|
|
1261
1252
|
title: {},
|
|
@@ -1271,32 +1262,32 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1271
1262
|
},
|
|
1272
1263
|
emits: ["confirm", "cancel"],
|
|
1273
1264
|
setup(e, { emit: t }) {
|
|
1274
|
-
let n = e, r = t, { isDark: i } =
|
|
1265
|
+
let n = e, r = t, { isDark: i } = B(), l = J();
|
|
1275
1266
|
function u() {
|
|
1276
1267
|
n.submitting || r("confirm");
|
|
1277
1268
|
}
|
|
1278
1269
|
function f() {
|
|
1279
1270
|
n.submitting || r("cancel");
|
|
1280
1271
|
}
|
|
1281
|
-
return (t, n) => (
|
|
1272
|
+
return (t, n) => (w(), a(qt, {
|
|
1282
1273
|
title: e.title,
|
|
1283
|
-
icon:
|
|
1284
|
-
"icon-bg-class": e.variant === "danger" ?
|
|
1274
|
+
icon: M(be),
|
|
1275
|
+
"icon-bg-class": e.variant === "danger" ? M(i) ? "bg-red-900/30" : "bg-red-50" : M(i) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1285
1276
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1286
1277
|
"manual-close": e.submitting,
|
|
1287
1278
|
onCancel: f
|
|
1288
1279
|
}, {
|
|
1289
|
-
footer:
|
|
1280
|
+
footer: P(() => [c("button", {
|
|
1290
1281
|
type: "button",
|
|
1291
1282
|
disabled: e.submitting,
|
|
1292
|
-
class:
|
|
1283
|
+
class: _(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [M(l).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1293
1284
|
onClick: f
|
|
1294
|
-
},
|
|
1285
|
+
}, j(e.cancelText), 11, Zt), c("button", {
|
|
1295
1286
|
type: "button",
|
|
1296
1287
|
disabled: e.submitting,
|
|
1297
|
-
class:
|
|
1288
|
+
class: _(["inline-flex items-center justify-center gap-2 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", [e.variant === "danger" ? "focus-visible:ring-red-500" : "focus-visible:ring-emerald-500", e.variant === "danger" ? e.submitting ? "bg-red-400 cursor-not-allowed" : "bg-red-600 hover:bg-red-700 cursor-pointer" : e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1298
1289
|
onClick: u
|
|
1299
|
-
}, [e.submitting ? (
|
|
1290
|
+
}, [e.submitting ? (w(), s("svg", $t, [...n[0] ||= [c("circle", {
|
|
1300
1291
|
class: "opacity-25",
|
|
1301
1292
|
cx: "12",
|
|
1302
1293
|
cy: "12",
|
|
@@ -1307,8 +1298,8 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1307
1298
|
class: "opacity-75",
|
|
1308
1299
|
fill: "currentColor",
|
|
1309
1300
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1310
|
-
}, null, -1)]])) : o("", !0), d(" " +
|
|
1311
|
-
default:
|
|
1301
|
+
}, null, -1)]])) : o("", !0), d(" " + j(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Qt)]),
|
|
1302
|
+
default: P(() => [O(t.$slots, "message", {}, () => [c("p", { class: _(["text-sm", M(i) ? "text-gray-300" : "text-gray-600"]) }, j(e.message), 3)]), O(t.$slots, "default")]),
|
|
1312
1303
|
_: 3
|
|
1313
1304
|
}, 8, [
|
|
1314
1305
|
"title",
|
|
@@ -1318,7 +1309,7 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1318
1309
|
"manual-close"
|
|
1319
1310
|
]));
|
|
1320
1311
|
}
|
|
1321
|
-
}),
|
|
1312
|
+
}), tn = { class: "mt-4" }, nn = ["placeholder"], rn = ["disabled"], an = /* @__PURE__ */ p({
|
|
1322
1313
|
__name: "BaseTextInputModal",
|
|
1323
1314
|
props: {
|
|
1324
1315
|
title: {},
|
|
@@ -1336,12 +1327,12 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1336
1327
|
},
|
|
1337
1328
|
emits: ["confirm", "cancel"],
|
|
1338
1329
|
setup(e, { emit: t }) {
|
|
1339
|
-
let n = e, r = t, { isDark: i } =
|
|
1340
|
-
|
|
1341
|
-
await
|
|
1330
|
+
let n = e, r = t, { isDark: i } = B(), o = J(), s = E(n.initialValue), u = E(null);
|
|
1331
|
+
x(async () => {
|
|
1332
|
+
await g(), u.value?.focus();
|
|
1342
1333
|
});
|
|
1343
1334
|
function d() {
|
|
1344
|
-
|
|
1335
|
+
s.value.trim() && !n.submitting && r("confirm", s.value.trim());
|
|
1345
1336
|
}
|
|
1346
1337
|
function f() {
|
|
1347
1338
|
r("cancel");
|
|
@@ -1349,39 +1340,39 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1349
1340
|
function p() {
|
|
1350
1341
|
s.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1351
1342
|
}
|
|
1352
|
-
return
|
|
1343
|
+
return Rt(f), (t, n) => (w(), a(qt, {
|
|
1353
1344
|
title: e.title,
|
|
1354
|
-
icon:
|
|
1345
|
+
icon: M(ve),
|
|
1355
1346
|
"manual-close": "",
|
|
1356
1347
|
onBackdrop: p
|
|
1357
1348
|
}, l({
|
|
1358
|
-
footer:
|
|
1349
|
+
footer: P(() => [c("button", {
|
|
1359
1350
|
type: "button",
|
|
1360
|
-
class:
|
|
1351
|
+
class: _(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", M(o).ghostButton]),
|
|
1361
1352
|
onClick: f
|
|
1362
|
-
},
|
|
1353
|
+
}, j(e.cancelText), 3), c("button", {
|
|
1363
1354
|
type: "button",
|
|
1364
1355
|
disabled: !s.value.trim() || e.submitting,
|
|
1365
|
-
class:
|
|
1356
|
+
class: _(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", [!s.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1366
1357
|
onClick: d
|
|
1367
|
-
},
|
|
1368
|
-
default:
|
|
1358
|
+
}, j(e.submitting ? e.submittingText : e.confirmText), 11, rn)]),
|
|
1359
|
+
default: P(() => [c("p", { class: _(["text-sm", M(i) ? "text-gray-300" : "text-gray-600"]) }, j(e.message), 3), c("div", tn, [c("label", { class: _(["block text-sm font-medium mb-1", M(o).label]) }, j(e.inputLabel), 3), F(c("input", {
|
|
1369
1360
|
ref_key: "nameInput",
|
|
1370
1361
|
ref: u,
|
|
1371
1362
|
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
1372
1363
|
type: "text",
|
|
1373
1364
|
placeholder: e.placeholder,
|
|
1374
|
-
class:
|
|
1375
|
-
onKeyup:
|
|
1376
|
-
}, null, 42,
|
|
1365
|
+
class: _(["w-full px-3 py-2 rounded-md border text-sm transition-colors", M(i) ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:outline-none focus:border-emerald-500" : "bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-emerald-500"]),
|
|
1366
|
+
onKeyup: oe(d, ["enter"])
|
|
1367
|
+
}, null, 42, nn), [[ie, s.value]])])]),
|
|
1377
1368
|
_: 2
|
|
1378
1369
|
}, [t.$slots.icon ? {
|
|
1379
1370
|
name: "icon",
|
|
1380
|
-
fn:
|
|
1371
|
+
fn: P(() => [O(t.$slots, "icon")]),
|
|
1381
1372
|
key: "0"
|
|
1382
1373
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1383
1374
|
}
|
|
1384
|
-
}),
|
|
1375
|
+
}), on = { class: "flex items-center justify-center min-h-[60vh]" }, sn = { class: "text-center px-6" }, cn = /* @__PURE__ */ p({
|
|
1385
1376
|
__name: "BaseNotFoundPage",
|
|
1386
1377
|
props: {
|
|
1387
1378
|
code: { default: "404" },
|
|
@@ -1390,33 +1381,33 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1390
1381
|
homeLabel: { default: "Go home" }
|
|
1391
1382
|
},
|
|
1392
1383
|
setup(e) {
|
|
1393
|
-
let t = e, n =
|
|
1384
|
+
let t = e, n = Ae(), { isDark: r } = B(), i = J();
|
|
1394
1385
|
function a() {
|
|
1395
1386
|
n.push({ name: t.homeRouteName });
|
|
1396
1387
|
}
|
|
1397
|
-
return (t, n) => (
|
|
1398
|
-
f(
|
|
1399
|
-
c("h1", { class:
|
|
1400
|
-
c("p", { class:
|
|
1388
|
+
return (t, n) => (w(), s("div", on, [c("div", sn, [
|
|
1389
|
+
f(M(be), { class: _(["w-16 h-16 mx-auto mb-4", M(i).illustration]) }, null, 8, ["class"]),
|
|
1390
|
+
c("h1", { class: _(["text-4xl font-bold mb-2", M(r) ? "text-gray-200" : "text-gray-800"]) }, j(e.code), 3),
|
|
1391
|
+
c("p", { class: _(["text-lg mb-6", M(i).dimTextAlt]) }, j(e.message), 3),
|
|
1401
1392
|
c("button", {
|
|
1402
1393
|
onClick: a,
|
|
1403
|
-
class:
|
|
1404
|
-
},
|
|
1394
|
+
class: _(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", M(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1395
|
+
}, j(e.homeLabel), 3)
|
|
1405
1396
|
])]));
|
|
1406
1397
|
}
|
|
1407
|
-
}),
|
|
1408
|
-
function
|
|
1398
|
+
}), ln = E(!1);
|
|
1399
|
+
function un() {
|
|
1409
1400
|
function e() {
|
|
1410
|
-
|
|
1401
|
+
ln.value = !0;
|
|
1411
1402
|
}
|
|
1412
1403
|
function t() {
|
|
1413
|
-
|
|
1404
|
+
ln.value = !1;
|
|
1414
1405
|
}
|
|
1415
1406
|
function n() {
|
|
1416
|
-
|
|
1407
|
+
ln.value = !ln.value;
|
|
1417
1408
|
}
|
|
1418
1409
|
return {
|
|
1419
|
-
mobileOpen:
|
|
1410
|
+
mobileOpen: ln,
|
|
1420
1411
|
open: e,
|
|
1421
1412
|
close: t,
|
|
1422
1413
|
toggle: n
|
|
@@ -1424,19 +1415,19 @@ function sn() {
|
|
|
1424
1415
|
}
|
|
1425
1416
|
//#endregion
|
|
1426
1417
|
//#region src/composables/useSidebarCollapse.ts
|
|
1427
|
-
var Y =
|
|
1428
|
-
function
|
|
1429
|
-
if (!
|
|
1430
|
-
let e = window.localStorage?.getItem(
|
|
1418
|
+
var Y = E(!1), dn = !1, fn = "mgv-sidebar-collapsed";
|
|
1419
|
+
function pn(e) {
|
|
1420
|
+
if (!dn && (dn = !0, fn = e, typeof window < "u")) {
|
|
1421
|
+
let e = window.localStorage?.getItem(fn);
|
|
1431
1422
|
e && (Y.value = e === "true"), m(!0).run(() => {
|
|
1432
|
-
|
|
1433
|
-
window.localStorage?.setItem(
|
|
1423
|
+
N(Y, (e) => {
|
|
1424
|
+
window.localStorage?.setItem(fn, String(e));
|
|
1434
1425
|
});
|
|
1435
1426
|
});
|
|
1436
1427
|
}
|
|
1437
1428
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1429
|
+
function mn(e) {
|
|
1430
|
+
pn(e?.storageKey ?? fn);
|
|
1440
1431
|
function t() {
|
|
1441
1432
|
Y.value = !0;
|
|
1442
1433
|
}
|
|
@@ -1455,8 +1446,8 @@ function dn(e) {
|
|
|
1455
1446
|
}
|
|
1456
1447
|
//#endregion
|
|
1457
1448
|
//#region src/composables/useNotifications.ts
|
|
1458
|
-
var X =
|
|
1459
|
-
function
|
|
1449
|
+
var X = E([]), Z = E(!1), hn = i(() => X.value.filter((e) => !e.read).length);
|
|
1450
|
+
function gn() {
|
|
1460
1451
|
function e() {
|
|
1461
1452
|
Z.value = !0;
|
|
1462
1453
|
}
|
|
@@ -1492,7 +1483,7 @@ function pn() {
|
|
|
1492
1483
|
}
|
|
1493
1484
|
return {
|
|
1494
1485
|
notifications: X,
|
|
1495
|
-
unreadCount:
|
|
1486
|
+
unreadCount: hn,
|
|
1496
1487
|
open: Z,
|
|
1497
1488
|
openPanel: e,
|
|
1498
1489
|
closePanel: t,
|
|
@@ -1507,22 +1498,22 @@ function pn() {
|
|
|
1507
1498
|
}
|
|
1508
1499
|
//#endregion
|
|
1509
1500
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1510
|
-
var
|
|
1501
|
+
var _n = ["aria-label", "aria-expanded"], vn = { class: "flex flex-col h-full" }, yn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, bn = { class: "space-y-0.5" }, xn = [
|
|
1511
1502
|
"aria-current",
|
|
1512
1503
|
"title",
|
|
1513
1504
|
"onClick"
|
|
1514
|
-
],
|
|
1505
|
+
], Sn = ["aria-label"], Cn = { class: "relative shrink-0" }, wn = {
|
|
1515
1506
|
key: 0,
|
|
1516
1507
|
class: "absolute -top-1.5 -right-1.5 min-w-4 h-4 px-1 rounded-full bg-red-500 text-white text-[10px] font-semibold leading-4 text-center"
|
|
1517
|
-
},
|
|
1508
|
+
}, Tn = [
|
|
1518
1509
|
"title",
|
|
1519
1510
|
"aria-label",
|
|
1520
1511
|
"aria-pressed"
|
|
1521
|
-
],
|
|
1512
|
+
], En = [
|
|
1522
1513
|
"title",
|
|
1523
1514
|
"aria-label",
|
|
1524
1515
|
"aria-pressed"
|
|
1525
|
-
],
|
|
1516
|
+
], Dn = /*#__PURE__*/ ((e, t) => {
|
|
1526
1517
|
let n = e.__vccOpts || e;
|
|
1527
1518
|
for (let [e, r] of t) n[e] = r;
|
|
1528
1519
|
return n;
|
|
@@ -1547,151 +1538,151 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1547
1538
|
}
|
|
1548
1539
|
},
|
|
1549
1540
|
setup(t) {
|
|
1550
|
-
let n = t, r =
|
|
1551
|
-
|
|
1552
|
-
e ? (ee = document.activeElement instanceof HTMLElement ? document.activeElement : null, await
|
|
1541
|
+
let n = t, r = Ae(), l = ke(), { isDark: u, toggleTheme: p } = B(), { mobileOpen: m, close: h, toggle: v } = un(), { collapsed: y, toggle: b } = mn(), { unreadCount: x, togglePanel: S } = gn(), C = i(() => n.collapsible && y.value), T = E(null), ee = null;
|
|
1542
|
+
N(m, async (e) => {
|
|
1543
|
+
e ? (ee = document.activeElement instanceof HTMLElement ? document.activeElement : null, await g(), T.value?.focus()) : (ee?.focus(), ee = null);
|
|
1553
1544
|
});
|
|
1554
|
-
function
|
|
1555
|
-
r.push({ name: n.homeRouteName }),
|
|
1545
|
+
function k() {
|
|
1546
|
+
r.push({ name: n.homeRouteName }), h();
|
|
1556
1547
|
}
|
|
1557
1548
|
function te(e) {
|
|
1558
1549
|
return l.name === e;
|
|
1559
1550
|
}
|
|
1560
|
-
function
|
|
1561
|
-
r.push({ name: e }),
|
|
1551
|
+
function ne(e) {
|
|
1552
|
+
r.push({ name: e }), h();
|
|
1562
1553
|
}
|
|
1563
|
-
return (n, r) => (
|
|
1564
|
-
c("div", { class:
|
|
1554
|
+
return (n, r) => (w(), s("div", null, [
|
|
1555
|
+
c("div", { class: _(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", M(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [c("button", {
|
|
1565
1556
|
type: "button",
|
|
1566
|
-
onClick:
|
|
1557
|
+
onClick: k,
|
|
1567
1558
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1568
1559
|
"aria-label": "Go to home"
|
|
1569
|
-
}, [
|
|
1560
|
+
}, [O(n.$slots, "logo", { size: 28 }, void 0, !0)]), c("button", {
|
|
1570
1561
|
type: "button",
|
|
1571
|
-
onClick: r[0] ||= (...e) =>
|
|
1572
|
-
class:
|
|
1573
|
-
"aria-label":
|
|
1574
|
-
"aria-expanded":
|
|
1575
|
-
}, [
|
|
1562
|
+
onClick: r[0] ||= (...e) => M(v) && M(v)(...e),
|
|
1563
|
+
class: _(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", M(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1564
|
+
"aria-label": M(m) ? "Close navigation menu" : "Open navigation menu",
|
|
1565
|
+
"aria-expanded": M(m)
|
|
1566
|
+
}, [M(m) ? (w(), a(M(De), {
|
|
1576
1567
|
key: 1,
|
|
1577
1568
|
class: "w-6 h-6",
|
|
1578
1569
|
"aria-hidden": "true"
|
|
1579
|
-
})) : (
|
|
1570
|
+
})) : (w(), a(M(le), {
|
|
1580
1571
|
key: 0,
|
|
1581
1572
|
class: "w-6 h-6",
|
|
1582
1573
|
"aria-hidden": "true"
|
|
1583
|
-
}))], 10,
|
|
1584
|
-
|
|
1574
|
+
}))], 10, _n)], 2),
|
|
1575
|
+
M(m) ? (w(), s("div", {
|
|
1585
1576
|
key: 0,
|
|
1586
1577
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1587
1578
|
"aria-hidden": "true",
|
|
1588
|
-
onClick: r[1] ||= (...e) =>
|
|
1579
|
+
onClick: r[1] ||= (...e) => M(h) && M(h)(...e)
|
|
1589
1580
|
})) : o("", !0),
|
|
1590
1581
|
c("aside", {
|
|
1591
1582
|
role: "navigation",
|
|
1592
1583
|
"aria-label": "Main navigation",
|
|
1593
|
-
class:
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
t.collapsible &&
|
|
1584
|
+
class: _(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1585
|
+
M(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1586
|
+
M(m) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1587
|
+
t.collapsible && M(y) ? "lg:w-16" : "lg:w-60"
|
|
1597
1588
|
]])
|
|
1598
|
-
}, [c("div",
|
|
1599
|
-
c("div", { class:
|
|
1589
|
+
}, [c("div", vn, [
|
|
1590
|
+
c("div", { class: _(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": C.value }]) }, [c("button", {
|
|
1600
1591
|
type: "button",
|
|
1601
|
-
onClick:
|
|
1592
|
+
onClick: k,
|
|
1602
1593
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1603
1594
|
"aria-label": "Go to home"
|
|
1604
|
-
}, [
|
|
1595
|
+
}, [O(n.$slots, "logo", { size: C.value ? 36 : 52 }, void 0, !0)]), c("button", {
|
|
1605
1596
|
ref_key: "closeMobileButton",
|
|
1606
|
-
ref:
|
|
1597
|
+
ref: T,
|
|
1607
1598
|
type: "button",
|
|
1608
|
-
onClick: r[2] ||= (...e) =>
|
|
1609
|
-
class:
|
|
1599
|
+
onClick: r[2] ||= (...e) => M(h) && M(h)(...e),
|
|
1600
|
+
class: _(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", M(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1610
1601
|
"aria-label": "Close navigation menu"
|
|
1611
|
-
}, [f(
|
|
1602
|
+
}, [f(M(De), {
|
|
1612
1603
|
class: "w-5 h-5",
|
|
1613
1604
|
"aria-hidden": "true"
|
|
1614
1605
|
})], 2)], 2),
|
|
1615
|
-
c("nav",
|
|
1606
|
+
c("nav", yn, [(w(!0), s(e, null, D(t.sections, (t) => (w(), s("div", { key: t.title }, [c("p", { class: _(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": C.value }]) }, j(t.title), 3), c("ul", bn, [(w(!0), s(e, null, D(t.items, (e) => (w(), s("li", { key: e.name }, [c("button", {
|
|
1616
1607
|
type: "button",
|
|
1617
1608
|
"aria-current": te(e.name) ? "page" : void 0,
|
|
1618
|
-
title:
|
|
1619
|
-
onClick: (t) =>
|
|
1620
|
-
class:
|
|
1621
|
-
}, [(
|
|
1622
|
-
c("div", { class:
|
|
1623
|
-
t.showNotifications ? (
|
|
1609
|
+
title: C.value ? e.label : void 0,
|
|
1610
|
+
onClick: (t) => ne(e.name),
|
|
1611
|
+
class: _(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [te(e.name) ? M(u) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : M(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1612
|
+
}, [(w(), a(A(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), c("span", { class: _({ "lg:hidden": C.value }) }, j(e.label), 3)], 10, xn)]))), 128))])]))), 128))]),
|
|
1613
|
+
c("div", { class: _(["px-4 py-4 border-t transition-colors space-y-3", M(u) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1614
|
+
t.showNotifications ? (w(), s("button", {
|
|
1624
1615
|
key: 0,
|
|
1625
1616
|
type: "button",
|
|
1626
|
-
onClick: r[3] ||= (...e) =>
|
|
1617
|
+
onClick: r[3] ||= (...e) => M(S) && M(S)(...e),
|
|
1627
1618
|
title: "Notifications",
|
|
1628
|
-
"aria-label":
|
|
1629
|
-
class:
|
|
1630
|
-
}, [c("span",
|
|
1619
|
+
"aria-label": M(x) > 0 ? `Notifications, ${M(x)} unread` : "Notifications",
|
|
1620
|
+
class: _(["relative flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [M(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1621
|
+
}, [c("span", Cn, [f(M(ue), {
|
|
1631
1622
|
class: "w-[18px] h-[18px]",
|
|
1632
1623
|
"aria-hidden": "true"
|
|
1633
|
-
}),
|
|
1634
|
-
t.showThemeToggle ? (
|
|
1624
|
+
}), M(x) > 0 ? (w(), s("span", wn, j(M(x) > 99 ? "99+" : M(x)), 1)) : o("", !0)]), c("span", { class: _({ "lg:hidden": C.value }) }, "Notifications", 2)], 10, Sn)) : o("", !0),
|
|
1625
|
+
t.showThemeToggle ? (w(), s("button", {
|
|
1635
1626
|
key: 1,
|
|
1636
1627
|
type: "button",
|
|
1637
|
-
onClick: r[4] ||= (...e) =>
|
|
1638
|
-
title:
|
|
1639
|
-
"aria-label":
|
|
1640
|
-
"aria-pressed":
|
|
1641
|
-
class:
|
|
1628
|
+
onClick: r[4] ||= (...e) => M(p) && M(p)(...e),
|
|
1629
|
+
title: M(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1630
|
+
"aria-label": M(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1631
|
+
"aria-pressed": M(u),
|
|
1632
|
+
class: _(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [M(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1642
1633
|
}, [
|
|
1643
|
-
(
|
|
1644
|
-
class:
|
|
1634
|
+
(w(), a(A(M(u) ? M(Ee) : M(Te)), {
|
|
1635
|
+
class: _(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": C.value }]),
|
|
1645
1636
|
"aria-hidden": "true"
|
|
1646
1637
|
}, null, 8, ["class"])),
|
|
1647
|
-
c("span", { class:
|
|
1648
|
-
c("span", { class:
|
|
1649
|
-
], 10,
|
|
1650
|
-
t.collapsible ? (
|
|
1638
|
+
c("span", { class: _({ "lg:hidden": C.value }) }, j(M(u) ? "Switch to light" : "Switch to dark"), 3),
|
|
1639
|
+
c("span", { class: _(["ml-auto relative w-9 h-5 rounded-full transition-colors", [M(u) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": C.value }]]) }, [c("span", { class: _(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", M(u) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1640
|
+
], 10, Tn)) : o("", !0),
|
|
1641
|
+
t.collapsible ? (w(), s("button", {
|
|
1651
1642
|
key: 2,
|
|
1652
1643
|
type: "button",
|
|
1653
|
-
onClick: r[5] ||= (...e) =>
|
|
1654
|
-
title:
|
|
1655
|
-
"aria-label":
|
|
1656
|
-
"aria-pressed":
|
|
1657
|
-
class:
|
|
1658
|
-
}, [(
|
|
1644
|
+
onClick: r[5] ||= (...e) => M(b) && M(b)(...e),
|
|
1645
|
+
title: M(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1646
|
+
"aria-label": M(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1647
|
+
"aria-pressed": M(y),
|
|
1648
|
+
class: _(["hidden lg:flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [M(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1649
|
+
}, [(w(), a(A(M(y) ? M(pe) : M(fe)), {
|
|
1659
1650
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1660
1651
|
"aria-hidden": "true"
|
|
1661
|
-
})), c("span", { class:
|
|
1662
|
-
c("div", { class:
|
|
1663
|
-
c("div", { class:
|
|
1652
|
+
})), c("span", { class: _({ "lg:hidden": C.value }) }, "Collapse", 2)], 10, En)) : o("", !0),
|
|
1653
|
+
c("div", { class: _({ "lg:hidden": C.value }) }, [O(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1654
|
+
c("div", { class: _({ "lg:hidden": C.value }) }, [O(n.$slots, "footer", {}, () => [t.appName || t.version ? (w(), s("div", {
|
|
1664
1655
|
key: 0,
|
|
1665
|
-
class:
|
|
1656
|
+
class: _(["flex items-center justify-center gap-2 text-xs", (M(u), "text-gray-500")])
|
|
1666
1657
|
}, [c("span", null, [
|
|
1667
|
-
d(
|
|
1668
|
-
t.appName && t.version ? (
|
|
1669
|
-
t.version ? (
|
|
1658
|
+
d(j(t.appName), 1),
|
|
1659
|
+
t.appName && t.version ? (w(), s(e, { key: 0 }, [d(j(" "))], 64)) : o("", !0),
|
|
1660
|
+
t.version ? (w(), s(e, { key: 1 }, [d("v" + j(t.version), 1)], 64)) : o("", !0)
|
|
1670
1661
|
])], 2)) : o("", !0)], !0)], 2)
|
|
1671
1662
|
], 2)
|
|
1672
1663
|
])], 2)
|
|
1673
1664
|
]));
|
|
1674
1665
|
}
|
|
1675
|
-
}), [["__scopeId", "data-v-
|
|
1666
|
+
}), [["__scopeId", "data-v-bfce9dd7"]]), On = {
|
|
1676
1667
|
key: 1,
|
|
1677
1668
|
class: "mt-4 flex justify-center py-6"
|
|
1678
|
-
},
|
|
1669
|
+
}, kn = {
|
|
1679
1670
|
key: 2,
|
|
1680
1671
|
class: "mt-4 text-sm text-red-500",
|
|
1681
1672
|
role: "alert"
|
|
1682
|
-
},
|
|
1673
|
+
}, An = {
|
|
1683
1674
|
key: 3,
|
|
1684
1675
|
class: "mt-4"
|
|
1685
|
-
},
|
|
1676
|
+
}, jn = { class: "relative" }, Mn = ["placeholder"], Nn = {
|
|
1686
1677
|
key: 4,
|
|
1687
1678
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1688
|
-
},
|
|
1679
|
+
}, Pn = ["aria-pressed", "onClick"], Fn = { class: "flex-1 min-w-0" }, In = {
|
|
1689
1680
|
key: 0,
|
|
1690
1681
|
class: "text-center py-6"
|
|
1691
|
-
},
|
|
1682
|
+
}, Ln = {
|
|
1692
1683
|
key: 1,
|
|
1693
1684
|
class: "text-center py-6"
|
|
1694
|
-
},
|
|
1685
|
+
}, Rn = ["disabled"], zn = ["disabled"], Bn = /* @__PURE__ */ p({
|
|
1695
1686
|
__name: "BaseEntityPickerModal",
|
|
1696
1687
|
props: {
|
|
1697
1688
|
title: {},
|
|
@@ -1713,10 +1704,10 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1713
1704
|
},
|
|
1714
1705
|
emits: ["confirm", "cancel"],
|
|
1715
1706
|
setup(t, { emit: n }) {
|
|
1716
|
-
let r = t, u = n, { isDark: d } =
|
|
1707
|
+
let r = t, u = n, { isDark: d } = B(), p = J(), m = E([]), h = E(!1), v = E(""), y = E(null), b = E(""), S = E(null), C = i(() => {
|
|
1717
1708
|
let e = r.loader ? m.value : r.items;
|
|
1718
1709
|
return r.excludeId ? e.filter((e) => e.id !== r.excludeId) : e;
|
|
1719
|
-
}),
|
|
1710
|
+
}), T = i(() => C.value.filter((e) => e.label.toLowerCase().includes(b.value.toLowerCase()))), ee = {
|
|
1720
1711
|
emerald: {
|
|
1721
1712
|
iconBg: "bg-emerald-50",
|
|
1722
1713
|
iconText: "text-emerald-600",
|
|
@@ -1762,7 +1753,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1762
1753
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1763
1754
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1764
1755
|
}
|
|
1765
|
-
},
|
|
1756
|
+
}, k = {
|
|
1766
1757
|
emerald: {
|
|
1767
1758
|
iconBg: "bg-emerald-900/30",
|
|
1768
1759
|
iconText: "text-emerald-400",
|
|
@@ -1808,74 +1799,74 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1808
1799
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1809
1800
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1810
1801
|
}
|
|
1811
|
-
},
|
|
1812
|
-
|
|
1802
|
+
}, A = i(() => (d.value ? k : ee)[r.variant]);
|
|
1803
|
+
x(async () => {
|
|
1813
1804
|
if (r.loader) {
|
|
1814
|
-
|
|
1805
|
+
h.value = !0;
|
|
1815
1806
|
try {
|
|
1816
1807
|
m.value = await r.loader();
|
|
1817
1808
|
} catch {
|
|
1818
1809
|
v.value = "Failed to load items";
|
|
1819
1810
|
} finally {
|
|
1820
|
-
|
|
1811
|
+
h.value = !1;
|
|
1821
1812
|
}
|
|
1822
1813
|
}
|
|
1823
|
-
await
|
|
1814
|
+
await g(), S.value?.focus();
|
|
1824
1815
|
});
|
|
1825
1816
|
function te() {
|
|
1826
|
-
|
|
1817
|
+
y.value && !r.submitting && u("confirm", y.value);
|
|
1827
1818
|
}
|
|
1828
1819
|
function ne() {
|
|
1829
1820
|
r.submitting || u("cancel");
|
|
1830
1821
|
}
|
|
1831
|
-
return (n, r) => (
|
|
1822
|
+
return (n, r) => (w(), a(qt, {
|
|
1832
1823
|
title: t.title,
|
|
1833
|
-
icon:
|
|
1834
|
-
"icon-bg-class":
|
|
1835
|
-
"icon-class":
|
|
1824
|
+
icon: M(xe),
|
|
1825
|
+
"icon-bg-class": A.value.iconBg,
|
|
1826
|
+
"icon-class": A.value.iconText,
|
|
1836
1827
|
"manual-close": t.submitting,
|
|
1837
1828
|
onCancel: ne
|
|
1838
1829
|
}, l({
|
|
1839
|
-
footer:
|
|
1830
|
+
footer: P(() => [c("button", {
|
|
1840
1831
|
type: "button",
|
|
1841
1832
|
disabled: t.submitting,
|
|
1842
|
-
class:
|
|
1833
|
+
class: _(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", M(p).ghostButton]),
|
|
1843
1834
|
onClick: ne
|
|
1844
|
-
},
|
|
1835
|
+
}, j(t.cancelText), 11, Rn), c("button", {
|
|
1845
1836
|
type: "button",
|
|
1846
|
-
disabled: !
|
|
1847
|
-
class:
|
|
1837
|
+
disabled: !y.value || t.submitting,
|
|
1838
|
+
class: _(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", !y.value || t.submitting ? A.value.confirmDisabled : A.value.confirmActive]),
|
|
1848
1839
|
onClick: te
|
|
1849
|
-
},
|
|
1850
|
-
default:
|
|
1851
|
-
t.message ? (
|
|
1840
|
+
}, j(t.submitting ? t.submittingText : t.confirmText), 11, zn)]),
|
|
1841
|
+
default: P(() => [
|
|
1842
|
+
t.message ? (w(), s("p", {
|
|
1852
1843
|
key: 0,
|
|
1853
|
-
class:
|
|
1854
|
-
},
|
|
1855
|
-
|
|
1856
|
-
!
|
|
1857
|
-
class:
|
|
1844
|
+
class: _(["text-sm", M(d) ? "text-gray-300" : "text-gray-600"])
|
|
1845
|
+
}, j(t.message), 3)) : o("", !0),
|
|
1846
|
+
h.value ? (w(), s("div", On, [f(mt, { color: "emerald" })])) : v.value ? (w(), s("div", kn, j(v.value), 1)) : o("", !0),
|
|
1847
|
+
!h.value && !v.value && C.value.length > 0 ? (w(), s("div", An, [c("div", jn, [f(M(Ce), {
|
|
1848
|
+
class: _(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", M(p).dimText]),
|
|
1858
1849
|
"aria-hidden": "true"
|
|
1859
|
-
}, null, 8, ["class"]),
|
|
1850
|
+
}, null, 8, ["class"]), F(c("input", {
|
|
1860
1851
|
ref_key: "searchInputRef",
|
|
1861
|
-
ref:
|
|
1862
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1852
|
+
ref: S,
|
|
1853
|
+
"onUpdate:modelValue": r[0] ||= (e) => b.value = e,
|
|
1863
1854
|
type: "text",
|
|
1864
1855
|
placeholder: t.searchPlaceholder,
|
|
1865
|
-
class:
|
|
1866
|
-
}, null, 10,
|
|
1867
|
-
!
|
|
1856
|
+
class: _(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [M(d) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", A.value.inputFocus]])
|
|
1857
|
+
}, null, 10, Mn), [[ie, b.value]])])])) : o("", !0),
|
|
1858
|
+
!h.value && !v.value ? (w(), s("div", Nn, [(w(!0), s(e, null, D(T.value, (e) => (w(), s("button", {
|
|
1868
1859
|
key: e.id,
|
|
1869
1860
|
type: "button",
|
|
1870
|
-
"aria-pressed":
|
|
1871
|
-
class:
|
|
1872
|
-
onClick: (t) =>
|
|
1861
|
+
"aria-pressed": y.value === e.id,
|
|
1862
|
+
class: _(["w-full text-left flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [y.value === e.id ? A.value.selectedRow : M(d) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1863
|
+
onClick: (t) => y.value = e.id
|
|
1873
1864
|
}, [
|
|
1874
|
-
f(
|
|
1875
|
-
c("div",
|
|
1876
|
-
|
|
1865
|
+
f(M(xe), { class: _(["w-5 h-5 flex-shrink-0", M(p).dimText]) }, null, 8, ["class"]),
|
|
1866
|
+
c("div", Fn, [c("p", { class: _(["text-sm font-medium truncate", M(p).bodyText]) }, j(e.label), 3)]),
|
|
1867
|
+
y.value === e.id ? (w(), s("div", {
|
|
1877
1868
|
key: 0,
|
|
1878
|
-
class:
|
|
1869
|
+
class: _(["w-5 h-5 rounded-full flex items-center justify-center", A.value.checkBg])
|
|
1879
1870
|
}, [...r[1] ||= [c("svg", {
|
|
1880
1871
|
class: "w-3 h-3 text-white",
|
|
1881
1872
|
fill: "none",
|
|
@@ -1888,12 +1879,12 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1888
1879
|
"stroke-linejoin": "round",
|
|
1889
1880
|
d: "M5 13l4 4L19 7"
|
|
1890
1881
|
})], -1)]], 2)) : o("", !0)
|
|
1891
|
-
], 10,
|
|
1882
|
+
], 10, Pn))), 128)), C.value.length === 0 ? (w(), s("div", In, [c("p", { class: _(["text-sm", M(p).dimText]) }, j(t.emptyMessage), 3)])) : T.value.length === 0 ? (w(), s("div", Ln, [c("p", { class: _(["text-sm", M(p).dimText]) }, j(t.noMatchMessage), 3)])) : o("", !0)])) : o("", !0)
|
|
1892
1883
|
]),
|
|
1893
1884
|
_: 2
|
|
1894
1885
|
}, [n.$slots.icon ? {
|
|
1895
1886
|
name: "icon",
|
|
1896
|
-
fn:
|
|
1887
|
+
fn: P(() => [O(n.$slots, "icon")]),
|
|
1897
1888
|
key: "0"
|
|
1898
1889
|
} : void 0]), 1032, [
|
|
1899
1890
|
"title",
|
|
@@ -1903,10 +1894,10 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1903
1894
|
"manual-close"
|
|
1904
1895
|
]));
|
|
1905
1896
|
}
|
|
1906
|
-
}),
|
|
1897
|
+
}), Vn = {
|
|
1907
1898
|
href: "#main-content",
|
|
1908
1899
|
class: "sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:rounded-md focus:bg-emerald-600 focus:text-white focus:shadow-lg"
|
|
1909
|
-
},
|
|
1900
|
+
}, Hn = ["inert"], Un = /* @__PURE__ */ p({
|
|
1910
1901
|
__name: "BaseAppLayout",
|
|
1911
1902
|
props: {
|
|
1912
1903
|
showSidebar: {
|
|
@@ -1916,19 +1907,19 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1916
1907
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1917
1908
|
},
|
|
1918
1909
|
setup(e) {
|
|
1919
|
-
let t = e, { isDark: n } =
|
|
1920
|
-
return (t, i) => (
|
|
1921
|
-
c("a",
|
|
1922
|
-
l.value ?
|
|
1910
|
+
let t = e, { isDark: n } = B(), { mobileOpen: r } = un(), { collapsed: a } = mn(), l = i(() => t.showSidebar);
|
|
1911
|
+
return (t, i) => (w(), s("div", { class: _(["min-h-screen transition-colors duration-300", M(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1912
|
+
c("a", Vn, j(e.skipLinkLabel), 1),
|
|
1913
|
+
l.value ? O(t.$slots, "sidebar", {}, void 0, void 0, 0) : o("", !0),
|
|
1923
1914
|
c("main", {
|
|
1924
1915
|
id: "main-content",
|
|
1925
1916
|
tabindex: "-1",
|
|
1926
|
-
inert: l.value &&
|
|
1927
|
-
class:
|
|
1928
|
-
}, [
|
|
1917
|
+
inert: l.value && M(r) ? !0 : void 0,
|
|
1918
|
+
class: _(["transition-all duration-300", l.value ? M(a) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1919
|
+
}, [O(t.$slots, "default")], 10, Hn)
|
|
1929
1920
|
], 2));
|
|
1930
1921
|
}
|
|
1931
|
-
}),
|
|
1922
|
+
}), Wn = { class: "flex items-center gap-3 min-w-0" }, Gn = { class: "flex items-center gap-2" }, Kn = /* @__PURE__ */ p({
|
|
1932
1923
|
__name: "BasePageHeader",
|
|
1933
1924
|
props: {
|
|
1934
1925
|
title: {},
|
|
@@ -1939,7 +1930,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1939
1930
|
marginClass: { default: "mb-8" }
|
|
1940
1931
|
},
|
|
1941
1932
|
setup(e) {
|
|
1942
|
-
let t = e, { isDark: n } =
|
|
1933
|
+
let t = e, { isDark: n } = B(), r = J(), a = i(() => {
|
|
1943
1934
|
let e = {
|
|
1944
1935
|
emerald: {
|
|
1945
1936
|
dark: "bg-emerald-500/10",
|
|
@@ -1980,19 +1971,19 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1980
1971
|
}[t.iconColor];
|
|
1981
1972
|
return n.value ? e.dark : e.light;
|
|
1982
1973
|
});
|
|
1983
|
-
return (t, n) => (
|
|
1974
|
+
return (t, n) => (w(), s("header", { class: _(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [c("div", { class: _(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [c("div", Wn, [t.$slots.icon ? (w(), s("div", {
|
|
1984
1975
|
key: 0,
|
|
1985
|
-
class:
|
|
1986
|
-
}, [
|
|
1976
|
+
class: _(["w-10 h-10 rounded-lg flex items-center justify-center", a.value])
|
|
1977
|
+
}, [O(t.$slots, "icon", { iconClass: l.value })], 2)) : o("", !0), c("div", null, [c("h1", { class: _(["text-2xl font-bold", M(r).primaryTextSoft]) }, j(e.title), 3), e.subtitle || t.$slots.subtitle ? (w(), s("p", {
|
|
1987
1978
|
key: 0,
|
|
1988
|
-
class:
|
|
1989
|
-
}, [
|
|
1979
|
+
class: _(["text-sm", M(r).dimTextAlt])
|
|
1980
|
+
}, [O(t.$slots, "subtitle", {}, () => [d(j(e.subtitle), 1)])], 2)) : o("", !0)])]), c("div", Gn, [O(t.$slots, "actions")])], 2)], 2));
|
|
1990
1981
|
}
|
|
1991
|
-
}),
|
|
1982
|
+
}), qn = [
|
|
1992
1983
|
"type",
|
|
1993
1984
|
"disabled",
|
|
1994
1985
|
"title"
|
|
1995
|
-
],
|
|
1986
|
+
], Jn = { key: 0 }, Yn = /* @__PURE__ */ p({
|
|
1996
1987
|
__name: "BaseToolbarButton",
|
|
1997
1988
|
props: {
|
|
1998
1989
|
label: { default: "" },
|
|
@@ -2006,7 +1997,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2006
1997
|
},
|
|
2007
1998
|
emits: ["click"],
|
|
2008
1999
|
setup(e) {
|
|
2009
|
-
let t = e, { isDark: n } =
|
|
2000
|
+
let t = e, { isDark: n } = B(), r = {
|
|
2010
2001
|
neutral: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2011
2002
|
danger: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2012
2003
|
ghost: "h-9 px-4 rounded-md font-semibold disabled:opacity-40 disabled:hover:bg-slate-50 dark:disabled:hover:bg-slate-900"
|
|
@@ -2027,20 +2018,20 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2027
2018
|
}[t.variant];
|
|
2028
2019
|
return [r[t.variant], n.value ? e.dark : e.light];
|
|
2029
2020
|
});
|
|
2030
|
-
return (t, n) => (
|
|
2021
|
+
return (t, n) => (w(), s("button", {
|
|
2031
2022
|
type: e.type,
|
|
2032
2023
|
disabled: e.disabled,
|
|
2033
2024
|
title: e.title,
|
|
2034
|
-
class:
|
|
2025
|
+
class: _(["inline-flex shrink-0 items-center gap-2 text-sm border transition-colors cursor-pointer disabled:cursor-not-allowed whitespace-nowrap focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", a.value]),
|
|
2035
2026
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2036
|
-
}, [
|
|
2027
|
+
}, [O(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (w(), s("span", Jn, j(e.label), 1)) : o("", !0)], 10, qn));
|
|
2037
2028
|
}
|
|
2038
|
-
}),
|
|
2029
|
+
}), Xn = [
|
|
2039
2030
|
"type",
|
|
2040
2031
|
"disabled",
|
|
2041
2032
|
"title",
|
|
2042
2033
|
"aria-label"
|
|
2043
|
-
],
|
|
2034
|
+
], Zn = { key: 0 }, Qn = /* @__PURE__ */ p({
|
|
2044
2035
|
__name: "BaseActionButton",
|
|
2045
2036
|
props: {
|
|
2046
2037
|
label: { default: "" },
|
|
@@ -2059,7 +2050,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2059
2050
|
},
|
|
2060
2051
|
emits: ["click"],
|
|
2061
2052
|
setup(e) {
|
|
2062
|
-
let t = e, { isDark: n } =
|
|
2053
|
+
let t = e, { isDark: n } = B(), r = i(() => {
|
|
2063
2054
|
let e = {
|
|
2064
2055
|
emerald: {
|
|
2065
2056
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2132,16 +2123,16 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2132
2123
|
}[t.color];
|
|
2133
2124
|
return n.value ? e.dark : e.light;
|
|
2134
2125
|
}), c = i(() => t.disabled ? `${a.value} opacity-50 cursor-not-allowed` : `${r.value} cursor-pointer`);
|
|
2135
|
-
return (t, n) => (
|
|
2126
|
+
return (t, n) => (w(), s("button", {
|
|
2136
2127
|
type: e.type,
|
|
2137
2128
|
disabled: e.disabled,
|
|
2138
2129
|
title: e.title,
|
|
2139
2130
|
"aria-label": e.ariaLabel,
|
|
2140
|
-
class:
|
|
2131
|
+
class: _(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current", [e.fullWidth ? "flex-1" : "", c.value]]),
|
|
2141
2132
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2142
|
-
}, [
|
|
2133
|
+
}, [O(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (w(), s("span", Zn, j(e.label), 1)) : o("", !0)], 10, Xn));
|
|
2143
2134
|
}
|
|
2144
|
-
}),
|
|
2135
|
+
}), $n = ["title", "aria-label"], er = /* @__PURE__ */ p({
|
|
2145
2136
|
__name: "BaseCopyButton",
|
|
2146
2137
|
props: {
|
|
2147
2138
|
text: {},
|
|
@@ -2152,7 +2143,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2152
2143
|
},
|
|
2153
2144
|
emits: ["copied", "error"],
|
|
2154
2145
|
setup(e, { emit: t }) {
|
|
2155
|
-
let n = e, r = t, { isDark: o } =
|
|
2146
|
+
let n = e, r = t, { isDark: o } = B(), c = E(!1), l = null, u = i(() => c.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = i(() => n.label ? `Copy ${n.label}` : "Copy"), f = i(() => n.variant === "bordered" ? `inline-flex items-center justify-center w-9 h-9 rounded-lg border transition-colors cursor-pointer shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${c.value ? o.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : o.value ? "border-gray-600 text-gray-400 hover:text-gray-200 hover:bg-gray-800" : "border-gray-300 text-gray-400 hover:text-gray-600 hover:bg-gray-50"}` : `p-1 rounded transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${o.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2156
2147
|
async function p(e) {
|
|
2157
2148
|
try {
|
|
2158
2149
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2174,36 +2165,36 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2174
2165
|
r("error", e);
|
|
2175
2166
|
}
|
|
2176
2167
|
}
|
|
2177
|
-
return
|
|
2168
|
+
return C(() => {
|
|
2178
2169
|
l && clearTimeout(l);
|
|
2179
|
-
}), (t, n) => (
|
|
2170
|
+
}), (t, n) => (w(), s("button", {
|
|
2180
2171
|
type: "button",
|
|
2181
2172
|
title: u.value,
|
|
2182
2173
|
"aria-label": d.value,
|
|
2183
|
-
class:
|
|
2174
|
+
class: _(f.value),
|
|
2184
2175
|
onClick: m
|
|
2185
|
-
}, [c.value ? (
|
|
2176
|
+
}, [c.value ? (w(), a(M(ge), {
|
|
2186
2177
|
key: 0,
|
|
2187
|
-
class:
|
|
2178
|
+
class: _(e.iconClass),
|
|
2188
2179
|
"aria-hidden": "true"
|
|
2189
|
-
}, null, 8, ["class"])) : (
|
|
2180
|
+
}, null, 8, ["class"])) : (w(), a(M(_e), {
|
|
2190
2181
|
key: 1,
|
|
2191
|
-
class:
|
|
2182
|
+
class: _(e.iconClass),
|
|
2192
2183
|
"aria-hidden": "true"
|
|
2193
|
-
}, null, 8, ["class"]))], 10,
|
|
2184
|
+
}, null, 8, ["class"]))], 10, $n));
|
|
2194
2185
|
}
|
|
2195
|
-
}),
|
|
2186
|
+
}), tr = ["disabled", "aria-busy"], nr = {
|
|
2196
2187
|
key: 0,
|
|
2197
2188
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2198
2189
|
viewBox: "0 0 24 24",
|
|
2199
2190
|
fill: "none",
|
|
2200
2191
|
"aria-hidden": "true"
|
|
2201
|
-
},
|
|
2192
|
+
}, rr = {
|
|
2202
2193
|
key: 1,
|
|
2203
2194
|
class: "w-5 h-5 shrink-0",
|
|
2204
2195
|
viewBox: "0 0 48 48",
|
|
2205
2196
|
"aria-hidden": "true"
|
|
2206
|
-
},
|
|
2197
|
+
}, ir = /* @__PURE__ */ p({
|
|
2207
2198
|
__name: "BaseGoogleSignInButton",
|
|
2208
2199
|
props: {
|
|
2209
2200
|
label: { default: "Sign in with Google" },
|
|
@@ -2222,17 +2213,17 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2222
2213
|
},
|
|
2223
2214
|
emits: ["click"],
|
|
2224
2215
|
setup(e, { emit: t }) {
|
|
2225
|
-
let n = e, r = t, { isDark: a } =
|
|
2216
|
+
let n = e, r = t, { isDark: a } = B(), o = i(() => n.disabled || n.loading);
|
|
2226
2217
|
function l() {
|
|
2227
2218
|
o.value || r("click");
|
|
2228
2219
|
}
|
|
2229
|
-
return (t, n) => (
|
|
2220
|
+
return (t, n) => (w(), s("button", {
|
|
2230
2221
|
type: "button",
|
|
2231
2222
|
disabled: o.value,
|
|
2232
2223
|
"aria-busy": e.loading,
|
|
2233
2224
|
onClick: l,
|
|
2234
|
-
class:
|
|
2235
|
-
}, [e.loading ? (
|
|
2225
|
+
class: _(["inline-flex items-center justify-center gap-3 h-11 px-4 rounded-lg border text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", M(a) ? "bg-gray-900 border-gray-700 text-gray-100 hover:bg-gray-800" : "bg-white border-gray-300 text-gray-700 hover:bg-gray-50"]])
|
|
2226
|
+
}, [e.loading ? (w(), s("svg", nr, [...n[0] ||= [c("circle", {
|
|
2236
2227
|
class: "opacity-25",
|
|
2237
2228
|
cx: "12",
|
|
2238
2229
|
cy: "12",
|
|
@@ -2243,18 +2234,18 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2243
2234
|
class: "opacity-75",
|
|
2244
2235
|
fill: "currentColor",
|
|
2245
2236
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2246
|
-
}, null, -1)]])) : (
|
|
2237
|
+
}, null, -1)]])) : (w(), s("svg", rr, [...n[1] ||= [u("<path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path><path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path><path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path><path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path><path fill=\"none\" d=\"M0 0h48v48H0z\"></path>", 5)]])), c("span", null, j(e.label), 1)], 10, tr));
|
|
2247
2238
|
}
|
|
2248
|
-
}),
|
|
2239
|
+
}), ar = {
|
|
2249
2240
|
key: 0,
|
|
2250
2241
|
class: "flex justify-center mb-6"
|
|
2251
|
-
},
|
|
2242
|
+
}, or = { class: "mb-6 text-center" }, sr = { class: "flex items-center gap-3 my-5" }, cr = ["disabled"], lr = { class: "flex items-center justify-between mb-1.5" }, ur = { class: "relative" }, dr = ["type", "disabled"], fr = ["aria-label", "aria-pressed"], pr = ["disabled"], mr = ["disabled", "aria-busy"], hr = {
|
|
2252
2243
|
key: 0,
|
|
2253
2244
|
class: "w-4 h-4 animate-spin",
|
|
2254
2245
|
viewBox: "0 0 24 24",
|
|
2255
2246
|
fill: "none",
|
|
2256
2247
|
"aria-hidden": "true"
|
|
2257
|
-
},
|
|
2248
|
+
}, gr = /* @__PURE__ */ p({
|
|
2258
2249
|
__name: "BaseLoginForm",
|
|
2259
2250
|
props: {
|
|
2260
2251
|
title: { default: "Sign in" },
|
|
@@ -2280,7 +2271,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2280
2271
|
},
|
|
2281
2272
|
emits: ["submit", "google-sign-in"],
|
|
2282
2273
|
setup(t, { emit: n }) {
|
|
2283
|
-
let r = t, a = n, { isDark: l } =
|
|
2274
|
+
let r = t, a = n, { isDark: l } = B(), u = J(), p = E(""), m = E(""), h = E(!1), g = E(!1), v = i(() => r.loading || r.googleLoading);
|
|
2284
2275
|
function y() {
|
|
2285
2276
|
v.value || a("submit", {
|
|
2286
2277
|
email: p.value,
|
|
@@ -2288,34 +2279,34 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2288
2279
|
...r.showRemember ? { remember: h.value } : {}
|
|
2289
2280
|
});
|
|
2290
2281
|
}
|
|
2291
|
-
return (n, r) => (
|
|
2292
|
-
n.$slots.logo ? (
|
|
2293
|
-
c("div",
|
|
2282
|
+
return (n, r) => (w(), s("div", { class: _(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", M(u).card]) }, [
|
|
2283
|
+
n.$slots.logo ? (w(), s("div", ar, [O(n.$slots, "logo")])) : o("", !0),
|
|
2284
|
+
c("div", or, [c("h1", { class: _(["text-xl font-semibold", M(u).primaryText]) }, j(t.title), 3), t.subtitle ? (w(), s("p", {
|
|
2294
2285
|
key: 0,
|
|
2295
|
-
class:
|
|
2296
|
-
},
|
|
2297
|
-
t.error ? (
|
|
2286
|
+
class: _(["mt-1 text-sm", M(u).mutedText])
|
|
2287
|
+
}, j(t.subtitle), 3)) : o("", !0)]),
|
|
2288
|
+
t.error ? (w(), s("div", {
|
|
2298
2289
|
key: 1,
|
|
2299
2290
|
role: "alert",
|
|
2300
|
-
class:
|
|
2301
|
-
},
|
|
2302
|
-
t.showGoogle ? (
|
|
2291
|
+
class: _(["mb-4 rounded-lg border px-3 py-2 text-sm", M(l) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2292
|
+
}, j(t.error), 3)) : o("", !0),
|
|
2293
|
+
t.showGoogle ? (w(), s(e, { key: 2 }, [f(ir, {
|
|
2303
2294
|
loading: t.googleLoading,
|
|
2304
2295
|
disabled: t.loading,
|
|
2305
2296
|
onClick: r[0] ||= (e) => a("google-sign-in")
|
|
2306
|
-
}, null, 8, ["loading", "disabled"]), c("div",
|
|
2307
|
-
c("span", { class:
|
|
2308
|
-
c("span", { class:
|
|
2309
|
-
c("span", { class:
|
|
2297
|
+
}, null, 8, ["loading", "disabled"]), c("div", sr, [
|
|
2298
|
+
c("span", { class: _(["h-px flex-1", M(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2299
|
+
c("span", { class: _(["text-xs uppercase tracking-wider", M(u).dimTextAlt]) }, "or", 2),
|
|
2300
|
+
c("span", { class: _(["h-px flex-1", M(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2310
2301
|
])], 64)) : o("", !0),
|
|
2311
2302
|
c("form", {
|
|
2312
2303
|
class: "space-y-4",
|
|
2313
|
-
onSubmit:
|
|
2304
|
+
onSubmit: I(y, ["prevent"])
|
|
2314
2305
|
}, [
|
|
2315
2306
|
c("div", null, [c("label", {
|
|
2316
2307
|
for: "login-email",
|
|
2317
|
-
class:
|
|
2318
|
-
}, " Email ", 2),
|
|
2308
|
+
class: _(["block mb-1.5 text-sm font-medium", M(u).label])
|
|
2309
|
+
}, " Email ", 2), F(c("input", {
|
|
2319
2310
|
id: "login-email",
|
|
2320
2311
|
"onUpdate:modelValue": r[1] ||= (e) => p.value = e,
|
|
2321
2312
|
type: "email",
|
|
@@ -2324,43 +2315,43 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2324
2315
|
required: "",
|
|
2325
2316
|
disabled: v.value,
|
|
2326
2317
|
placeholder: "you@example.com",
|
|
2327
|
-
class:
|
|
2328
|
-
}, null, 10,
|
|
2329
|
-
c("div", null, [c("div",
|
|
2318
|
+
class: _(["w-full h-11 px-3 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", M(u).inputWithPlaceholder])
|
|
2319
|
+
}, null, 10, cr), [[ie, p.value]])]),
|
|
2320
|
+
c("div", null, [c("div", lr, [c("label", {
|
|
2330
2321
|
for: "login-password",
|
|
2331
|
-
class:
|
|
2332
|
-
}, " Password ", 2),
|
|
2322
|
+
class: _(["block text-sm font-medium", M(u).label])
|
|
2323
|
+
}, " Password ", 2), O(n.$slots, "forgot")]), c("div", ur, [F(c("input", {
|
|
2333
2324
|
id: "login-password",
|
|
2334
2325
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2335
|
-
type:
|
|
2326
|
+
type: g.value ? "text" : "password",
|
|
2336
2327
|
name: "password",
|
|
2337
2328
|
autocomplete: "current-password",
|
|
2338
2329
|
required: "",
|
|
2339
2330
|
disabled: v.value,
|
|
2340
2331
|
placeholder: "••••••••",
|
|
2341
|
-
class:
|
|
2342
|
-
}, null, 10,
|
|
2332
|
+
class: _(["w-full h-11 pl-3 pr-16 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", M(u).inputWithPlaceholder])
|
|
2333
|
+
}, null, 10, dr), [[re, m.value]]), c("button", {
|
|
2343
2334
|
type: "button",
|
|
2344
|
-
onClick: r[3] ||= (e) =>
|
|
2345
|
-
"aria-label":
|
|
2346
|
-
"aria-pressed":
|
|
2347
|
-
class:
|
|
2348
|
-
},
|
|
2349
|
-
t.showRemember ? (
|
|
2335
|
+
onClick: r[3] ||= (e) => g.value = !g.value,
|
|
2336
|
+
"aria-label": g.value ? "Hide password" : "Show password",
|
|
2337
|
+
"aria-pressed": g.value,
|
|
2338
|
+
class: _(["absolute inset-y-0 right-0 px-3 text-xs font-medium cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 rounded-r-lg", M(u).mutedText])
|
|
2339
|
+
}, j(g.value ? "Hide" : "Show"), 11, fr)])]),
|
|
2340
|
+
t.showRemember ? (w(), s("label", {
|
|
2350
2341
|
key: 0,
|
|
2351
|
-
class:
|
|
2352
|
-
}, [
|
|
2342
|
+
class: _(["flex items-center gap-2 text-sm cursor-pointer select-none", M(u).bodyText])
|
|
2343
|
+
}, [F(c("input", {
|
|
2353
2344
|
"onUpdate:modelValue": r[4] ||= (e) => h.value = e,
|
|
2354
2345
|
type: "checkbox",
|
|
2355
2346
|
disabled: v.value,
|
|
2356
2347
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2357
|
-
}, null, 8,
|
|
2348
|
+
}, null, 8, pr), [[ne, h.value]]), r[5] ||= d(" Remember me ", -1)], 2)) : o("", !0),
|
|
2358
2349
|
c("button", {
|
|
2359
2350
|
type: "submit",
|
|
2360
2351
|
disabled: v.value,
|
|
2361
2352
|
"aria-busy": t.loading,
|
|
2362
2353
|
class: "inline-flex items-center justify-center gap-2 w-full h-11 px-4 rounded-lg text-sm font-semibold text-white bg-emerald-600 hover:bg-emerald-700 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed"
|
|
2363
|
-
}, [t.loading ? (
|
|
2354
|
+
}, [t.loading ? (w(), s("svg", hr, [...r[6] ||= [c("circle", {
|
|
2364
2355
|
class: "opacity-25",
|
|
2365
2356
|
cx: "12",
|
|
2366
2357
|
cy: "12",
|
|
@@ -2371,18 +2362,18 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2371
2362
|
class: "opacity-75",
|
|
2372
2363
|
fill: "currentColor",
|
|
2373
2364
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2374
|
-
}, null, -1)]])) : o("", !0), d(" " +
|
|
2365
|
+
}, null, -1)]])) : o("", !0), d(" " + j(t.submitLabel), 1)], 8, mr)
|
|
2375
2366
|
], 32),
|
|
2376
|
-
n.$slots.footer ? (
|
|
2367
|
+
n.$slots.footer ? (w(), s("div", {
|
|
2377
2368
|
key: 3,
|
|
2378
|
-
class:
|
|
2379
|
-
}, [
|
|
2369
|
+
class: _(["mt-6 text-center text-sm", M(u).mutedText])
|
|
2370
|
+
}, [O(n.$slots, "footer")], 2)) : o("", !0)
|
|
2380
2371
|
], 2));
|
|
2381
2372
|
}
|
|
2382
|
-
}),
|
|
2373
|
+
}), _r = ["aria-label"], vr = { class: "flex-1 overflow-y-auto" }, yr = {
|
|
2383
2374
|
key: 0,
|
|
2384
2375
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2385
|
-
},
|
|
2376
|
+
}, br = ["onClick"], xr = { class: "min-w-0 flex-1" }, Sr = { class: "flex items-baseline justify-between gap-2" }, Cr = /* @__PURE__ */ p({
|
|
2386
2377
|
__name: "BaseNotificationPanel",
|
|
2387
2378
|
props: {
|
|
2388
2379
|
title: { default: "Notifications" },
|
|
@@ -2394,28 +2385,28 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2394
2385
|
},
|
|
2395
2386
|
emits: ["select"],
|
|
2396
2387
|
setup(n, { emit: l }) {
|
|
2397
|
-
let u = l, { isDark: p } =
|
|
2388
|
+
let u = l, { isDark: p } = B(), m = J(), { notifications: h, unreadCount: g, open: v, closePanel: y, markAllRead: b, markRead: x } = gn(), S = {
|
|
2398
2389
|
info: "bg-sky-500",
|
|
2399
2390
|
success: "bg-emerald-500",
|
|
2400
2391
|
warning: "bg-amber-500",
|
|
2401
2392
|
error: "bg-red-500"
|
|
2402
|
-
},
|
|
2393
|
+
}, C = i(() => h.value.length);
|
|
2403
2394
|
function T(e) {
|
|
2404
2395
|
x(e), u("select", e);
|
|
2405
2396
|
}
|
|
2406
|
-
return
|
|
2397
|
+
return Rt(() => {
|
|
2407
2398
|
v.value && y();
|
|
2408
|
-
}), (i, l) => (
|
|
2399
|
+
}), (i, l) => (w(), a(t, { to: "body" }, [f(r, {
|
|
2409
2400
|
"enter-active-class": "transition-opacity duration-200",
|
|
2410
2401
|
"enter-from-class": "opacity-0",
|
|
2411
2402
|
"leave-active-class": "transition-opacity duration-200",
|
|
2412
2403
|
"leave-to-class": "opacity-0"
|
|
2413
2404
|
}, {
|
|
2414
|
-
default:
|
|
2405
|
+
default: P(() => [M(v) ? (w(), s("div", {
|
|
2415
2406
|
key: 0,
|
|
2416
2407
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2417
2408
|
"aria-hidden": "true",
|
|
2418
|
-
onClick: l[0] ||= (...e) =>
|
|
2409
|
+
onClick: l[0] ||= (...e) => M(y) && M(y)(...e)
|
|
2419
2410
|
})) : o("", !0)]),
|
|
2420
2411
|
_: 1
|
|
2421
2412
|
}), f(r, {
|
|
@@ -2424,55 +2415,55 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2424
2415
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2425
2416
|
"leave-to-class": "-translate-x-full"
|
|
2426
2417
|
}, {
|
|
2427
|
-
default:
|
|
2418
|
+
default: P(() => [M(v) ? (w(), s("aside", {
|
|
2428
2419
|
key: 0,
|
|
2429
2420
|
role: "dialog",
|
|
2430
2421
|
"aria-modal": "true",
|
|
2431
2422
|
"aria-label": n.title,
|
|
2432
|
-
class:
|
|
2423
|
+
class: _(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", M(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2433
2424
|
}, [
|
|
2434
|
-
c("div", { class:
|
|
2425
|
+
c("div", { class: _(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", M(m).border]) }, [c("h2", { class: _(["text-lg font-semibold flex items-center gap-2", M(m).primaryText]) }, [d(j(n.title) + " ", 1), c("span", { class: _(["text-sm font-normal", M(m).dimTextAlt]) }, "— " + j(C.value), 3)], 2), c("button", {
|
|
2435
2426
|
type: "button",
|
|
2436
|
-
onClick: l[1] ||= (...e) =>
|
|
2427
|
+
onClick: l[1] ||= (...e) => M(y) && M(y)(...e),
|
|
2437
2428
|
"aria-label": "Close notifications",
|
|
2438
|
-
class:
|
|
2439
|
-
}, [f(
|
|
2429
|
+
class: _(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", M(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2430
|
+
}, [f(M(De), {
|
|
2440
2431
|
class: "w-5 h-5",
|
|
2441
2432
|
"aria-hidden": "true"
|
|
2442
2433
|
})], 2)], 2),
|
|
2443
|
-
n.showMarkAllRead &&
|
|
2434
|
+
n.showMarkAllRead && M(g) > 0 ? (w(), s("div", {
|
|
2444
2435
|
key: 0,
|
|
2445
|
-
class:
|
|
2436
|
+
class: _(["px-5 py-2 border-b shrink-0 flex justify-end", M(m).border])
|
|
2446
2437
|
}, [c("button", {
|
|
2447
2438
|
type: "button",
|
|
2448
|
-
onClick: l[2] ||= (...e) =>
|
|
2449
|
-
class:
|
|
2439
|
+
onClick: l[2] ||= (...e) => M(b) && M(b)(...e),
|
|
2440
|
+
class: _(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", M(m).emeraldText])
|
|
2450
2441
|
}, " Mark all as read ", 2)], 2)) : o("", !0),
|
|
2451
|
-
c("div",
|
|
2452
|
-
class:
|
|
2442
|
+
c("div", vr, [C.value === 0 ? (w(), s("div", yr, [f(M(ue), {
|
|
2443
|
+
class: _(["w-10 h-10", M(m).illustration]),
|
|
2453
2444
|
"aria-hidden": "true"
|
|
2454
|
-
}, null, 8, ["class"]), c("p", { class:
|
|
2445
|
+
}, null, 8, ["class"]), c("p", { class: _(["text-sm", M(m).mutedText]) }, j(n.emptyText), 3)])) : (w(), s("ul", {
|
|
2455
2446
|
key: 1,
|
|
2456
|
-
class:
|
|
2457
|
-
}, [(
|
|
2447
|
+
class: _(["divide-y", M(p) ? "divide-gray-800" : "divide-gray-100"])
|
|
2448
|
+
}, [(w(!0), s(e, null, D(M(h), (e) => (w(), s("li", { key: e.id }, [c("button", {
|
|
2458
2449
|
type: "button",
|
|
2459
2450
|
onClick: (t) => T(e.id),
|
|
2460
|
-
class:
|
|
2451
|
+
class: _(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" : M(p) ? "bg-emerald-500/5" : "bg-emerald-50/60", M(p) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2461
2452
|
}, [c("span", {
|
|
2462
|
-
class:
|
|
2453
|
+
class: _(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? M(p) ? "bg-gray-700" : "bg-gray-300" : S[e.type ?? "info"]]),
|
|
2463
2454
|
"aria-hidden": "true"
|
|
2464
|
-
}, null, 2), c("span",
|
|
2455
|
+
}, null, 2), c("span", xr, [c("span", Sr, [c("span", { class: _(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", M(m).primaryTextSoft]]) }, j(e.title), 3), e.time ? (w(), s("span", {
|
|
2465
2456
|
key: 0,
|
|
2466
|
-
class:
|
|
2467
|
-
},
|
|
2457
|
+
class: _(["text-xs shrink-0", M(m).dimText])
|
|
2458
|
+
}, j(e.time), 3)) : o("", !0)]), e.message ? (w(), s("span", {
|
|
2468
2459
|
key: 0,
|
|
2469
|
-
class:
|
|
2470
|
-
},
|
|
2471
|
-
], 10,
|
|
2460
|
+
class: _(["mt-0.5 block text-sm", M(m).mutedText])
|
|
2461
|
+
}, j(e.message), 3)) : o("", !0)])], 10, br)]))), 128))], 2))])
|
|
2462
|
+
], 10, _r)) : o("", !0)]),
|
|
2472
2463
|
_: 1
|
|
2473
2464
|
})]));
|
|
2474
2465
|
}
|
|
2475
|
-
}),
|
|
2466
|
+
}), wr = ["disabled"], Tr = /* @__PURE__ */ p({
|
|
2476
2467
|
__name: "BaseChipButton",
|
|
2477
2468
|
props: {
|
|
2478
2469
|
size: { default: "sm" },
|
|
@@ -2483,37 +2474,37 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2483
2474
|
},
|
|
2484
2475
|
emits: ["click"],
|
|
2485
2476
|
setup(e, { emit: t }) {
|
|
2486
|
-
let n = t, { isDark: r } =
|
|
2487
|
-
return (t, i) => (
|
|
2477
|
+
let n = t, { isDark: r } = B();
|
|
2478
|
+
return (t, i) => (w(), s("button", {
|
|
2488
2479
|
type: "button",
|
|
2489
2480
|
disabled: e.disabled,
|
|
2490
|
-
class:
|
|
2481
|
+
class: _(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1", M(r) ? "text-emerald-300 border-emerald-700 bg-emerald-900/30 hover:bg-emerald-800/50" : "text-emerald-700 border-emerald-200 bg-emerald-50 hover:bg-emerald-100"]]),
|
|
2491
2482
|
onClick: i[0] ||= (e) => n("click")
|
|
2492
|
-
}, [
|
|
2483
|
+
}, [O(t.$slots, "default")], 10, wr));
|
|
2493
2484
|
}
|
|
2494
|
-
}),
|
|
2485
|
+
}), Er = /* @__PURE__ */ p({
|
|
2495
2486
|
__name: "BaseRemoveButton",
|
|
2496
2487
|
emits: ["click"],
|
|
2497
2488
|
setup(e, { emit: t }) {
|
|
2498
2489
|
let n = t;
|
|
2499
|
-
return (e, t) => (
|
|
2490
|
+
return (e, t) => (w(), s("button", {
|
|
2500
2491
|
type: "button",
|
|
2501
2492
|
class: "px-2 text-lg leading-none text-red-400 hover:text-red-600 transition-colors cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400 disabled:cursor-not-allowed disabled:text-gray-400 disabled:hover:text-gray-400",
|
|
2502
2493
|
onClick: t[0] ||= (e) => n("click")
|
|
2503
2494
|
}, " × "));
|
|
2504
2495
|
}
|
|
2505
|
-
}),
|
|
2496
|
+
}), Dr = { class: "relative flex h-2 w-2" }, Or = {
|
|
2506
2497
|
key: 0,
|
|
2507
2498
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2508
2499
|
"aria-hidden": "true"
|
|
2509
|
-
},
|
|
2500
|
+
}, kr = /* @__PURE__ */ p({
|
|
2510
2501
|
__name: "BaseStatusPill",
|
|
2511
2502
|
props: {
|
|
2512
2503
|
status: {},
|
|
2513
2504
|
label: {}
|
|
2514
2505
|
},
|
|
2515
2506
|
setup(e) {
|
|
2516
|
-
let t = e, { isDark: n } =
|
|
2507
|
+
let t = e, { isDark: n } = B(), r = i(() => {
|
|
2517
2508
|
switch (t.status) {
|
|
2518
2509
|
case "ok": return n.value ? "bg-emerald-500/10 text-emerald-400" : "bg-emerald-50 text-emerald-700";
|
|
2519
2510
|
case "error": return n.value ? "bg-red-500/10 text-red-400" : "bg-red-50 text-red-700";
|
|
@@ -2526,13 +2517,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2526
2517
|
default: return "bg-gray-400";
|
|
2527
2518
|
}
|
|
2528
2519
|
});
|
|
2529
|
-
return (t, n) => (
|
|
2520
|
+
return (t, n) => (w(), s("div", { class: _(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [c("span", Dr, [e.status === "ok" ? (w(), s("span", Or)) : o("", !0), c("span", { class: _(["relative inline-flex rounded-full h-2 w-2", a.value]) }, null, 2)]), d(" " + j(e.label), 1)], 2));
|
|
2530
2521
|
}
|
|
2531
|
-
}),
|
|
2522
|
+
}), Ar = { class: "text-sm font-medium" }, jr = [
|
|
2532
2523
|
"accept",
|
|
2533
2524
|
"multiple",
|
|
2534
2525
|
"disabled"
|
|
2535
|
-
],
|
|
2526
|
+
], Mr = /* @__PURE__ */ p({
|
|
2536
2527
|
__name: "BaseFileDropzone",
|
|
2537
2528
|
props: {
|
|
2538
2529
|
label: {},
|
|
@@ -2549,7 +2540,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2549
2540
|
},
|
|
2550
2541
|
emits: ["files"],
|
|
2551
2542
|
setup(e, { emit: t }) {
|
|
2552
|
-
let n = e, r = t, { isDark: i } =
|
|
2543
|
+
let n = e, r = t, { isDark: i } = B(), a = E(!1);
|
|
2553
2544
|
function l(e) {
|
|
2554
2545
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2555
2546
|
t.value = "", n.length && r("files", n);
|
|
@@ -2562,13 +2553,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2562
2553
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
2563
2554
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2564
2555
|
}
|
|
2565
|
-
return (t, n) => (
|
|
2566
|
-
class:
|
|
2567
|
-
onDragover:
|
|
2568
|
-
onDragleave: n[0] ||=
|
|
2569
|
-
onDrop:
|
|
2556
|
+
return (t, n) => (w(), s("label", {
|
|
2557
|
+
class: _(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", a.value ? M(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : M(i) ? "border-gray-700 hover:border-emerald-500 text-gray-400 hover:text-emerald-400" : "border-gray-300 hover:border-emerald-500 text-gray-500 hover:text-emerald-600"]]),
|
|
2558
|
+
onDragover: I(u, ["prevent"]),
|
|
2559
|
+
onDragleave: n[0] ||= I((e) => a.value = !1, ["prevent"]),
|
|
2560
|
+
onDrop: I(d, ["prevent"])
|
|
2570
2561
|
}, [
|
|
2571
|
-
|
|
2562
|
+
O(t.$slots, "icon", {}, () => [n[1] ||= c("svg", {
|
|
2572
2563
|
class: "w-10 h-10",
|
|
2573
2564
|
fill: "none",
|
|
2574
2565
|
viewBox: "0 0 24 24",
|
|
@@ -2580,11 +2571,11 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2580
2571
|
"stroke-linejoin": "round",
|
|
2581
2572
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
2582
2573
|
})], -1)]),
|
|
2583
|
-
c("p",
|
|
2584
|
-
e.hint ? (
|
|
2574
|
+
c("p", Ar, j(e.label), 1),
|
|
2575
|
+
e.hint ? (w(), s("p", {
|
|
2585
2576
|
key: 0,
|
|
2586
|
-
class:
|
|
2587
|
-
},
|
|
2577
|
+
class: _(["text-xs", M(i) ? "text-gray-500" : "text-gray-400"])
|
|
2578
|
+
}, j(e.hint), 3)) : o("", !0),
|
|
2588
2579
|
c("input", {
|
|
2589
2580
|
type: "file",
|
|
2590
2581
|
class: "hidden",
|
|
@@ -2592,10 +2583,10 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2592
2583
|
multiple: e.multiple,
|
|
2593
2584
|
disabled: e.disabled,
|
|
2594
2585
|
onChange: l
|
|
2595
|
-
}, null, 40,
|
|
2586
|
+
}, null, 40, jr)
|
|
2596
2587
|
], 34));
|
|
2597
2588
|
}
|
|
2598
|
-
}),
|
|
2589
|
+
}), Nr = /* @__PURE__ */ p({
|
|
2599
2590
|
__name: "BaseCodeBlock",
|
|
2600
2591
|
props: {
|
|
2601
2592
|
code: {},
|
|
@@ -2604,7 +2595,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2604
2595
|
maxHeightClass: { default: "" }
|
|
2605
2596
|
},
|
|
2606
2597
|
setup(e) {
|
|
2607
|
-
let t = e, { isDark: n } =
|
|
2598
|
+
let t = e, { isDark: n } = B(), r = {
|
|
2608
2599
|
soft: {
|
|
2609
2600
|
dark: "bg-gray-800/70 text-gray-300",
|
|
2610
2601
|
light: "bg-gray-100 text-gray-700"
|
|
@@ -2620,13 +2611,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2620
2611
|
let e = r[t.variant];
|
|
2621
2612
|
return n.value ? e.dark : e.light;
|
|
2622
2613
|
}), c = i(() => a[t.size]);
|
|
2623
|
-
return (t, n) => (
|
|
2614
|
+
return (t, n) => (w(), s("pre", { class: _(["font-mono overflow-auto", [
|
|
2624
2615
|
c.value,
|
|
2625
2616
|
o.value,
|
|
2626
2617
|
e.maxHeightClass
|
|
2627
|
-
]]) },
|
|
2618
|
+
]]) }, j(e.code), 3));
|
|
2628
2619
|
}
|
|
2629
|
-
}),
|
|
2620
|
+
}), Pr = ["value", "type"], Q = /* @__PURE__ */ p({
|
|
2630
2621
|
__name: "BaseInput",
|
|
2631
2622
|
props: {
|
|
2632
2623
|
modelValue: { default: "" },
|
|
@@ -2643,14 +2634,14 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2643
2634
|
function r(e) {
|
|
2644
2635
|
n("update:modelValue", e.target.value);
|
|
2645
2636
|
}
|
|
2646
|
-
return (t, n) => (
|
|
2637
|
+
return (t, n) => (w(), s("input", {
|
|
2647
2638
|
value: e.modelValue,
|
|
2648
2639
|
type: e.type,
|
|
2649
|
-
class:
|
|
2640
|
+
class: _(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm placeholder:text-slate-400 dark:placeholder:text-slate-500 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", e.size === "sm" ? "px-2 py-1.5" : "px-3 py-2"]]),
|
|
2650
2641
|
onInput: r
|
|
2651
|
-
}, null, 42,
|
|
2642
|
+
}, null, 42, Pr));
|
|
2652
2643
|
}
|
|
2653
|
-
}),
|
|
2644
|
+
}), Fr = ["value"], Ir = /* @__PURE__ */ p({
|
|
2654
2645
|
__name: "BaseSelect",
|
|
2655
2646
|
props: {
|
|
2656
2647
|
modelValue: { default: void 0 },
|
|
@@ -2666,17 +2657,17 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2666
2657
|
function r(e) {
|
|
2667
2658
|
n("update:modelValue", e.target.value);
|
|
2668
2659
|
}
|
|
2669
|
-
return (t, n) => (
|
|
2660
|
+
return (t, n) => (w(), s("select", {
|
|
2670
2661
|
value: e.modelValue,
|
|
2671
|
-
class:
|
|
2662
|
+
class: _(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", e.size === "md" ? "px-3 py-2" : "px-2 py-1.5"]]),
|
|
2672
2663
|
onChange: r
|
|
2673
|
-
}, [
|
|
2664
|
+
}, [O(t.$slots, "default")], 42, Fr));
|
|
2674
2665
|
}
|
|
2675
|
-
}),
|
|
2666
|
+
}), Lr = [
|
|
2676
2667
|
"disabled",
|
|
2677
2668
|
"aria-label",
|
|
2678
2669
|
"aria-expanded"
|
|
2679
|
-
],
|
|
2670
|
+
], Rr = ["aria-label"], zr = ["aria-selected", "title"], Br = ["disabled", "onClick"], Vr = /* @__PURE__ */ p({
|
|
2680
2671
|
__name: "BaseDropdown",
|
|
2681
2672
|
props: {
|
|
2682
2673
|
options: {},
|
|
@@ -2697,43 +2688,48 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2697
2688
|
},
|
|
2698
2689
|
emits: ["update:modelValue"],
|
|
2699
2690
|
setup(t, { emit: n }) {
|
|
2700
|
-
let r = t, a = n, l =
|
|
2691
|
+
let r = t, a = n, l = E(!1), u = E(null), d = i(() => r.options.find((e) => e.value === r.modelValue) ?? null), p = i(() => {
|
|
2692
|
+
let e = "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ";
|
|
2693
|
+
if (r.triggerClass) return e + r.triggerClass;
|
|
2694
|
+
let t = r.size === "sm" ? "px-3 py-2" : "px-4 py-2.5";
|
|
2695
|
+
return e + "rounded-lg border text-sm " + "border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-700 dark:text-slate-100 " + "hover:bg-slate-50 dark:hover:bg-slate-800 " + t;
|
|
2696
|
+
});
|
|
2701
2697
|
function m(e) {
|
|
2702
2698
|
return `block w-full px-4 py-2 text-left text-sm transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500 disabled:opacity-50 disabled:cursor-not-allowed ${e.value === r.modelValue ? "bg-emerald-500 text-white" : "text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"}`;
|
|
2703
2699
|
}
|
|
2704
2700
|
function h() {
|
|
2705
2701
|
r.disabled || (l.value = !l.value);
|
|
2706
2702
|
}
|
|
2707
|
-
function
|
|
2703
|
+
function g(e) {
|
|
2708
2704
|
e.disabled || (a("update:modelValue", e.value), l.value = !1);
|
|
2709
2705
|
}
|
|
2710
|
-
|
|
2706
|
+
Rt(() => {
|
|
2711
2707
|
l.value = !1;
|
|
2712
2708
|
});
|
|
2713
|
-
function
|
|
2709
|
+
function v(e) {
|
|
2714
2710
|
l.value && u.value && !u.value.contains(e.target) && (l.value = !1);
|
|
2715
2711
|
}
|
|
2716
|
-
return
|
|
2712
|
+
return x(() => document.addEventListener("click", v)), b(() => document.removeEventListener("click", v)), (n, r) => (w(), s("div", {
|
|
2717
2713
|
ref_key: "rootEl",
|
|
2718
2714
|
ref: u,
|
|
2719
|
-
class:
|
|
2715
|
+
class: _(t.block ? "relative w-full" : "relative inline-block")
|
|
2720
2716
|
}, [c("button", {
|
|
2721
2717
|
type: "button",
|
|
2722
|
-
class:
|
|
2718
|
+
class: _([p.value, t.block ? "w-full" : ""]),
|
|
2723
2719
|
disabled: t.disabled,
|
|
2724
2720
|
"aria-label": t.ariaLabel || void 0,
|
|
2725
2721
|
"aria-haspopup": "listbox",
|
|
2726
2722
|
"aria-expanded": l.value,
|
|
2727
2723
|
onClick: h
|
|
2728
|
-
}, [c("span", { class:
|
|
2729
|
-
class:
|
|
2724
|
+
}, [c("span", { class: _(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, j(d.value ? d.value.label : t.placeholder), 3), f(M(me), {
|
|
2725
|
+
class: _(["shrink-0 transition-transform", [t.chevronClass, l.value ? "rotate-180" : ""]]),
|
|
2730
2726
|
"aria-hidden": "true"
|
|
2731
|
-
}, null, 8, ["class"])], 10,
|
|
2727
|
+
}, null, 8, ["class"])], 10, Lr), l.value ? (w(), s("ul", {
|
|
2732
2728
|
key: 0,
|
|
2733
2729
|
role: "listbox",
|
|
2734
2730
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2735
2731
|
class: "absolute z-20 mt-1 w-full min-w-max max-w-xs max-h-60 overflow-auto rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 py-1 shadow-lg focus:outline-none"
|
|
2736
|
-
}, [(
|
|
2732
|
+
}, [(w(!0), s(e, null, D(t.options, (e) => (w(), s("li", {
|
|
2737
2733
|
key: String(e.value),
|
|
2738
2734
|
role: "option",
|
|
2739
2735
|
"aria-selected": e.value === t.modelValue,
|
|
@@ -2741,15 +2737,15 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2741
2737
|
}, [c("button", {
|
|
2742
2738
|
type: "button",
|
|
2743
2739
|
disabled: e.disabled,
|
|
2744
|
-
class:
|
|
2745
|
-
onClick: (t) =>
|
|
2746
|
-
},
|
|
2740
|
+
class: _(m(e)),
|
|
2741
|
+
onClick: (t) => g(e)
|
|
2742
|
+
}, j(e.label), 11, Br)], 8, zr))), 128))], 8, Rr)) : o("", !0)], 2));
|
|
2747
2743
|
}
|
|
2748
|
-
}),
|
|
2744
|
+
}), Hr = ["role", "aria-label"], Ur = [
|
|
2749
2745
|
"aria-pressed",
|
|
2750
2746
|
"title",
|
|
2751
2747
|
"onClick"
|
|
2752
|
-
],
|
|
2748
|
+
], Wr = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", Gr = /* @__PURE__ */ p({
|
|
2753
2749
|
__name: "BaseSegmentedControl",
|
|
2754
2750
|
props: {
|
|
2755
2751
|
options: {},
|
|
@@ -2766,22 +2762,22 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2766
2762
|
let r = t, a = n, o = i(() => r.variant === "toolbar" ? "inline-flex h-9 divide-x divide-slate-300 dark:divide-slate-600 rounded-md border border-slate-300 dark:border-slate-600 overflow-hidden" : "inline-flex rounded border border-slate-300 dark:border-slate-600 overflow-hidden"), c = i(() => r.variant === "toolbar" ? "flex items-center px-3.5 text-xs font-semibold uppercase tracking-wide transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500" : `${r.variant === "wide" ? "px-4 py-2" : "px-3 py-2"} text-sm font-medium transition-colors cursor-pointer border-l first:border-l-0 border-slate-300 dark:border-slate-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500`), l = i(() => r.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2767
2763
|
function u(e) {
|
|
2768
2764
|
let t = e.value === r.modelValue;
|
|
2769
|
-
return r.optionClass ? r.optionClass(e, t) : t ? l.value :
|
|
2765
|
+
return r.optionClass ? r.optionClass(e, t) : t ? l.value : Wr;
|
|
2770
2766
|
}
|
|
2771
|
-
return (n, r) => (
|
|
2767
|
+
return (n, r) => (w(), s("div", {
|
|
2772
2768
|
role: t.ariaLabel ? "group" : void 0,
|
|
2773
2769
|
"aria-label": t.ariaLabel || void 0,
|
|
2774
|
-
class:
|
|
2775
|
-
}, [(
|
|
2770
|
+
class: _(o.value)
|
|
2771
|
+
}, [(w(!0), s(e, null, D(t.options, (e) => (w(), s("button", {
|
|
2776
2772
|
key: String(e.value),
|
|
2777
2773
|
type: "button",
|
|
2778
|
-
class:
|
|
2774
|
+
class: _([c.value, u(e)]),
|
|
2779
2775
|
"aria-pressed": e.value === t.modelValue,
|
|
2780
2776
|
title: e.title,
|
|
2781
2777
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2782
|
-
},
|
|
2778
|
+
}, j(e.label), 11, Ur))), 128))], 10, Hr));
|
|
2783
2779
|
}
|
|
2784
|
-
}),
|
|
2780
|
+
}), Kr = { class: "w-full text-sm" }, qr = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Jr = { class: "text-left" }, Yr = { key: 0 }, Xr = ["colspan"], Zr = /* @__PURE__ */ p({
|
|
2785
2781
|
__name: "BaseTable",
|
|
2786
2782
|
props: {
|
|
2787
2783
|
columns: {},
|
|
@@ -2792,24 +2788,24 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2792
2788
|
emptyText: { default: "No rows." }
|
|
2793
2789
|
},
|
|
2794
2790
|
setup(t) {
|
|
2795
|
-
return (n, r) => (
|
|
2791
|
+
return (n, r) => (w(), s("table", Kr, [c("thead", qr, [c("tr", Jr, [(w(!0), s(e, null, D(t.columns, (e, t) => (w(), s("th", {
|
|
2796
2792
|
key: t,
|
|
2797
|
-
class:
|
|
2798
|
-
},
|
|
2793
|
+
class: _(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2794
|
+
}, j(e.label), 3))), 128))])]), c("tbody", null, [t.empty ? (w(), s("tr", Yr, [c("td", {
|
|
2799
2795
|
colspan: t.columns.length,
|
|
2800
2796
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2801
|
-
}, [
|
|
2797
|
+
}, [O(n.$slots, "empty", {}, () => [d(j(t.emptyText), 1)])], 8, Xr)])) : o("", !0), O(n.$slots, "default")])]));
|
|
2802
2798
|
}
|
|
2803
|
-
}),
|
|
2799
|
+
}), Qr = { class: "grid gap-3 md:grid-cols-2" }, $r = {
|
|
2804
2800
|
key: 0,
|
|
2805
2801
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2806
|
-
},
|
|
2802
|
+
}, ei = ["value"], ti = {
|
|
2807
2803
|
key: 2,
|
|
2808
2804
|
class: "flex items-center gap-2 mt-4"
|
|
2809
|
-
},
|
|
2805
|
+
}, ni = ["checked", "onChange"], ri = { class: "text-sm text-slate-900 dark:text-slate-100" }, ii = {
|
|
2810
2806
|
key: 4,
|
|
2811
2807
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2812
|
-
},
|
|
2808
|
+
}, ai = /* @__PURE__ */ p({
|
|
2813
2809
|
__name: "BaseSpecFields",
|
|
2814
2810
|
props: {
|
|
2815
2811
|
specs: {},
|
|
@@ -2836,24 +2832,24 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2836
2832
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
2837
2833
|
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2838
2834
|
}
|
|
2839
|
-
return (n, f) => (
|
|
2840
|
-
f.type === "boolean" ? o("", !0) : (
|
|
2841
|
-
f.type === "select" ? (
|
|
2835
|
+
return (n, f) => (w(), s("div", Qr, [(w(!0), s(e, null, D(t.specs, (f) => (w(), s("div", { key: f.key }, [
|
|
2836
|
+
f.type === "boolean" ? o("", !0) : (w(), s("label", $r, j(f.label), 1)),
|
|
2837
|
+
f.type === "select" ? (w(), a(Ir, {
|
|
2842
2838
|
key: 1,
|
|
2843
2839
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2844
2840
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2845
2841
|
}, {
|
|
2846
|
-
default:
|
|
2842
|
+
default: P(() => [(w(!0), s(e, null, D(f.options ?? [], (e) => (w(), s("option", {
|
|
2847
2843
|
key: e,
|
|
2848
2844
|
value: e
|
|
2849
|
-
},
|
|
2845
|
+
}, j(e), 9, ei))), 128))]),
|
|
2850
2846
|
_: 2
|
|
2851
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (
|
|
2847
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (w(), s("label", ti, [c("input", {
|
|
2852
2848
|
checked: !!t.params[f.key],
|
|
2853
2849
|
type: "checkbox",
|
|
2854
2850
|
class: "h-4 w-4",
|
|
2855
2851
|
onChange: (e) => i(f.key, e)
|
|
2856
|
-
}, null, 40,
|
|
2852
|
+
}, null, 40, ni), c("span", ri, j(f.label), 1)])) : (w(), a(Q, {
|
|
2857
2853
|
key: 3,
|
|
2858
2854
|
modelValue: t.params[f.key],
|
|
2859
2855
|
type: "number",
|
|
@@ -2872,11 +2868,11 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2872
2868
|
"onPaste",
|
|
2873
2869
|
"onUpdate:modelValue"
|
|
2874
2870
|
])),
|
|
2875
|
-
f.help ? (
|
|
2876
|
-
|
|
2871
|
+
f.help ? (w(), s("p", ii, j(f.help), 1)) : o("", !0),
|
|
2872
|
+
O(n.$slots, "after", { spec: f })
|
|
2877
2873
|
]))), 128))]));
|
|
2878
2874
|
}
|
|
2879
|
-
}),
|
|
2875
|
+
}), oi = { class: "mt-1.5 space-y-0.5 px-1" }, si = { class: "text-slate-400 dark:text-slate-500" }, ci = /* @__PURE__ */ p({
|
|
2880
2876
|
__name: "BaseStatBreakdown",
|
|
2881
2877
|
props: {
|
|
2882
2878
|
items: {},
|
|
@@ -2895,16 +2891,16 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2895
2891
|
function i(e) {
|
|
2896
2892
|
return !n.signed || e == null ? "text-slate-500 dark:text-slate-400" : e >= 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400";
|
|
2897
2893
|
}
|
|
2898
|
-
return (n, a) => (
|
|
2894
|
+
return (n, a) => (w(), s("div", oi, [(w(!0), s(e, null, D(t.items, (e) => (w(), s("div", {
|
|
2899
2895
|
key: e.label,
|
|
2900
2896
|
class: "flex items-center justify-between text-[11px]"
|
|
2901
|
-
}, [c("span",
|
|
2897
|
+
}, [c("span", si, j(e.label), 1), c("span", { class: _(["font-mono tabular-nums font-medium", i(e.value)]) }, j(r(e.value)), 3)]))), 128))]));
|
|
2902
2898
|
}
|
|
2903
|
-
}),
|
|
2899
|
+
}), li = [
|
|
2904
2900
|
"disabled",
|
|
2905
2901
|
"title",
|
|
2906
2902
|
"aria-pressed"
|
|
2907
|
-
],
|
|
2903
|
+
], ui = /* @__PURE__ */ p({
|
|
2908
2904
|
__name: "BaseFilterChip",
|
|
2909
2905
|
props: {
|
|
2910
2906
|
label: { default: "" },
|
|
@@ -2933,21 +2929,21 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2933
2929
|
red: "border-red-500 bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-500",
|
|
2934
2930
|
slate: "border-slate-600 bg-slate-600 text-white hover:bg-slate-700 focus-visible:ring-emerald-500"
|
|
2935
2931
|
};
|
|
2936
|
-
return (r, i) => (
|
|
2932
|
+
return (r, i) => (w(), s("button", {
|
|
2937
2933
|
type: "button",
|
|
2938
2934
|
disabled: e.disabled,
|
|
2939
2935
|
title: e.title,
|
|
2940
2936
|
"aria-pressed": e.active,
|
|
2941
|
-
class:
|
|
2942
|
-
}, [
|
|
2937
|
+
class: _(["whitespace-nowrap rounded-md border px-3 text-sm font-semibold text-center transition-colors focus:outline-none focus-visible:ring-2 disabled:opacity-50 disabled:cursor-not-allowed", e.active ? n[e.color] : t[e.color]])
|
|
2938
|
+
}, [O(r.$slots, "default", {}, () => [d(j(e.label), 1)])], 10, li));
|
|
2943
2939
|
}
|
|
2944
|
-
}),
|
|
2940
|
+
}), di = { class: "flex items-center justify-between mb-4" }, fi = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, pi = {
|
|
2945
2941
|
key: 0,
|
|
2946
2942
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
2947
|
-
},
|
|
2943
|
+
}, mi = {
|
|
2948
2944
|
key: 0,
|
|
2949
2945
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
2950
|
-
},
|
|
2946
|
+
}, hi = { class: "grid gap-4 md:grid-cols-2" }, gi = { class: "md:col-span-2" }, _i = ["for"], vi = { class: "md:col-span-2" }, yi = ["for"], bi = { class: "text-[11px] text-slate-500 mt-1" }, xi = { class: "md:col-span-2" }, Si = ["for"], Ci = { class: "md:col-span-2" }, wi = ["for"], Ti = { class: "md:col-span-2" }, Ei = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", Di = /* @__PURE__ */ p({
|
|
2951
2947
|
__name: "BaseCredentialsForm",
|
|
2952
2948
|
props: {
|
|
2953
2949
|
title: {},
|
|
@@ -2973,7 +2969,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2973
2969
|
"load-error"
|
|
2974
2970
|
],
|
|
2975
2971
|
setup(t, { expose: n, emit: r }) {
|
|
2976
|
-
let i = t, l = r, u =
|
|
2972
|
+
let i = t, l = r, u = E(!1), p = E(!1), m = T({
|
|
2977
2973
|
keyId: "",
|
|
2978
2974
|
secretKey: "",
|
|
2979
2975
|
baseUrl: i.defaults.baseUrl,
|
|
@@ -2987,31 +2983,32 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2987
2983
|
l("load-error", e instanceof Error ? e.message : "");
|
|
2988
2984
|
}
|
|
2989
2985
|
}
|
|
2990
|
-
function
|
|
2986
|
+
function g(e) {
|
|
2991
2987
|
return !e || !e.trim();
|
|
2992
2988
|
}
|
|
2993
2989
|
async function v() {
|
|
2994
2990
|
if (!u.value) {
|
|
2995
|
-
if (
|
|
2991
|
+
if (g(m.keyId)) {
|
|
2996
2992
|
l("error", i.requiredKeyMessage);
|
|
2997
2993
|
return;
|
|
2998
2994
|
}
|
|
2999
|
-
if (!p.value &&
|
|
2995
|
+
if (!p.value && g(m.secretKey)) {
|
|
3000
2996
|
l("error", i.requiredSecretMessage);
|
|
3001
2997
|
return;
|
|
3002
2998
|
}
|
|
3003
|
-
if (
|
|
2999
|
+
if (g(m.baseUrl) || g(m.dataUrl)) {
|
|
3004
3000
|
l("error", "Base URL and Data URL are required.");
|
|
3005
3001
|
return;
|
|
3006
3002
|
}
|
|
3007
3003
|
u.value = !0;
|
|
3008
3004
|
try {
|
|
3009
|
-
|
|
3005
|
+
let e = await i.updateFn({
|
|
3010
3006
|
keyId: m.keyId.trim(),
|
|
3011
|
-
secretKey:
|
|
3007
|
+
secretKey: g(m.secretKey) ? void 0 : m.secretKey.trim(),
|
|
3012
3008
|
baseUrl: m.baseUrl.trim(),
|
|
3013
3009
|
dataUrl: m.dataUrl.trim()
|
|
3014
|
-
})
|
|
3010
|
+
});
|
|
3011
|
+
p.value = e.hasSecret, m.secretKey = "", l("saved", i.savedMessage);
|
|
3015
3012
|
} catch (e) {
|
|
3016
3013
|
l("error", e instanceof Error ? e.message : "Failed to save");
|
|
3017
3014
|
} finally {
|
|
@@ -3019,31 +3016,31 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3019
3016
|
}
|
|
3020
3017
|
}
|
|
3021
3018
|
}
|
|
3022
|
-
return
|
|
3023
|
-
default:
|
|
3024
|
-
c("div",
|
|
3025
|
-
c("div",
|
|
3026
|
-
c("div",
|
|
3019
|
+
return x(h), n({ load: h }), (n, r) => (w(), a(pt, { class: "!p-6" }, {
|
|
3020
|
+
default: P(() => [
|
|
3021
|
+
c("div", di, [c("div", null, [c("h2", fi, j(t.title), 1), t.subtitle ? (w(), s("p", pi, j(t.subtitle), 1)) : o("", !0)]), u.value ? (w(), s("span", mi, [f(mt, { class: "!h-4 !w-4" }), r[4] ||= d(" Saving… ", -1)])) : o("", !0)]),
|
|
3022
|
+
c("div", hi, [
|
|
3023
|
+
c("div", gi, [c("label", {
|
|
3027
3024
|
for: `${t.idPrefix}-key-id`,
|
|
3028
3025
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3029
|
-
},
|
|
3026
|
+
}, j(t.keyLabel), 9, _i), f(Q, {
|
|
3030
3027
|
id: `${t.idPrefix}-key-id`,
|
|
3031
3028
|
modelValue: m.keyId,
|
|
3032
3029
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
3033
3030
|
type: "text",
|
|
3034
3031
|
autocomplete: "off",
|
|
3035
3032
|
placeholder: t.keyPlaceholder,
|
|
3036
|
-
class:
|
|
3033
|
+
class: _(Ei)
|
|
3037
3034
|
}, null, 8, [
|
|
3038
3035
|
"id",
|
|
3039
3036
|
"modelValue",
|
|
3040
3037
|
"placeholder"
|
|
3041
3038
|
])]),
|
|
3042
|
-
c("div",
|
|
3039
|
+
c("div", vi, [
|
|
3043
3040
|
c("label", {
|
|
3044
3041
|
for: `${t.idPrefix}-secret`,
|
|
3045
3042
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3046
|
-
},
|
|
3043
|
+
}, j(t.secretLabel), 9, yi),
|
|
3047
3044
|
f(Q, {
|
|
3048
3045
|
id: `${t.idPrefix}-secret`,
|
|
3049
3046
|
modelValue: m.secretKey,
|
|
@@ -3051,40 +3048,40 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3051
3048
|
type: "password",
|
|
3052
3049
|
autocomplete: "new-password",
|
|
3053
3050
|
placeholder: p.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
3054
|
-
class:
|
|
3051
|
+
class: _(Ei)
|
|
3055
3052
|
}, null, 8, [
|
|
3056
3053
|
"id",
|
|
3057
3054
|
"modelValue",
|
|
3058
3055
|
"placeholder"
|
|
3059
3056
|
]),
|
|
3060
|
-
c("p",
|
|
3057
|
+
c("p", bi, [p.value ? (w(), s(e, { key: 0 }, [d(j(t.secretSetHint), 1)], 64)) : O(n.$slots, "no-secret-hint", {}, () => [d(j(t.permissionsHint), 1)], void 0, 1)])
|
|
3061
3058
|
]),
|
|
3062
|
-
c("div",
|
|
3059
|
+
c("div", xi, [
|
|
3063
3060
|
c("label", {
|
|
3064
3061
|
for: `${t.idPrefix}-base-url`,
|
|
3065
3062
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3066
|
-
}, "Base URL (trading)", 8,
|
|
3063
|
+
}, "Base URL (trading)", 8, Si),
|
|
3067
3064
|
f(Q, {
|
|
3068
3065
|
id: `${t.idPrefix}-base-url`,
|
|
3069
3066
|
modelValue: m.baseUrl,
|
|
3070
3067
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3071
3068
|
type: "text",
|
|
3072
|
-
class:
|
|
3069
|
+
class: _(Ei)
|
|
3073
3070
|
}, null, 8, ["id", "modelValue"]),
|
|
3074
|
-
|
|
3071
|
+
O(n.$slots, "base-url-extra", { form: m })
|
|
3075
3072
|
]),
|
|
3076
|
-
c("div",
|
|
3073
|
+
c("div", Ci, [c("label", {
|
|
3077
3074
|
for: `${t.idPrefix}-data-url`,
|
|
3078
3075
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3079
|
-
}, "Data URL (market data)", 8,
|
|
3076
|
+
}, "Data URL (market data)", 8, wi), f(Q, {
|
|
3080
3077
|
id: `${t.idPrefix}-data-url`,
|
|
3081
3078
|
modelValue: m.dataUrl,
|
|
3082
3079
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3083
3080
|
type: "text",
|
|
3084
|
-
class:
|
|
3081
|
+
class: _(Ei)
|
|
3085
3082
|
}, null, 8, ["id", "modelValue"])]),
|
|
3086
|
-
c("div",
|
|
3087
|
-
color:
|
|
3083
|
+
c("div", Ti, [f(W, {
|
|
3084
|
+
color: M(H).GREEN,
|
|
3088
3085
|
description: t.saveLabel,
|
|
3089
3086
|
isDisable: u.value,
|
|
3090
3087
|
isLoading: u.value,
|
|
@@ -3096,21 +3093,21 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3096
3093
|
"isLoading"
|
|
3097
3094
|
])])
|
|
3098
3095
|
]),
|
|
3099
|
-
|
|
3096
|
+
O(n.$slots, "footer")
|
|
3100
3097
|
]),
|
|
3101
3098
|
_: 3
|
|
3102
3099
|
}));
|
|
3103
3100
|
}
|
|
3104
|
-
}),
|
|
3101
|
+
}), Oi = {
|
|
3105
3102
|
key: 0,
|
|
3106
3103
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3107
|
-
},
|
|
3104
|
+
}, ki = { class: "mb-3 flex flex-wrap items-center gap-2" }, Ai = { class: "relative min-w-[200px] flex-1" }, ji = ["placeholder"], Mi = {
|
|
3108
3105
|
key: 0,
|
|
3109
3106
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3110
|
-
},
|
|
3107
|
+
}, Ni = {
|
|
3111
3108
|
key: 1,
|
|
3112
3109
|
class: "flex flex-wrap gap-2"
|
|
3113
|
-
},
|
|
3110
|
+
}, Pi = ["title", "onClick"], Fi = "h-9 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", Ii = "\0all", Li = /* @__PURE__ */ p({
|
|
3114
3111
|
__name: "BasePillPickerModal",
|
|
3115
3112
|
props: {
|
|
3116
3113
|
title: {},
|
|
@@ -3132,11 +3129,11 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3132
3129
|
},
|
|
3133
3130
|
emits: ["pick", "close"],
|
|
3134
3131
|
setup(t, { emit: n }) {
|
|
3135
|
-
let r = t, l = n, u = i(() => r.icon ??
|
|
3136
|
-
value:
|
|
3132
|
+
let r = t, l = n, u = i(() => r.icon ?? Ce), d = E(""), p = E(Ii), m = i(() => r.groups && r.groups.length > 0 ? [{
|
|
3133
|
+
value: Ii,
|
|
3137
3134
|
label: r.allLabel
|
|
3138
|
-
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value ===
|
|
3139
|
-
return (n, r) => (
|
|
3135
|
+
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value === Ii || e.group === p.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
3136
|
+
return (n, r) => (w(), a(qt, {
|
|
3140
3137
|
title: t.title,
|
|
3141
3138
|
icon: u.value,
|
|
3142
3139
|
subtitle: t.subtitle,
|
|
@@ -3144,32 +3141,32 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3144
3141
|
"max-width-class": t.maxWidthClass,
|
|
3145
3142
|
onCancel: r[4] ||= (e) => l("close")
|
|
3146
3143
|
}, {
|
|
3147
|
-
footer:
|
|
3144
|
+
footer: P(() => [f(Yn, {
|
|
3148
3145
|
variant: "ghost",
|
|
3149
3146
|
label: t.closeText,
|
|
3150
3147
|
onClick: r[3] ||= (e) => l("close")
|
|
3151
3148
|
}, null, 8, ["label"])]),
|
|
3152
|
-
default:
|
|
3153
|
-
f(
|
|
3154
|
-
|
|
3149
|
+
default: P(() => [t.items.length === 0 ? (w(), s("p", Oi, j(t.emptyMessage), 1)) : (w(), s(e, { key: 1 }, [c("div", ki, [c("div", Ai, [
|
|
3150
|
+
f(M(Ce), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3151
|
+
F(c("input", {
|
|
3155
3152
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
3156
3153
|
type: "text",
|
|
3157
3154
|
placeholder: t.searchPlaceholder,
|
|
3158
3155
|
autocomplete: "off",
|
|
3159
|
-
class:
|
|
3160
|
-
|
|
3156
|
+
class: _([
|
|
3157
|
+
Fi,
|
|
3161
3158
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3162
3159
|
t.mono ? "font-mono" : ""
|
|
3163
3160
|
])
|
|
3164
|
-
}, null, 10,
|
|
3165
|
-
d.value ? (
|
|
3161
|
+
}, null, 10, ji), [[ie, d.value]]),
|
|
3162
|
+
d.value ? (w(), s("button", {
|
|
3166
3163
|
key: 0,
|
|
3167
3164
|
type: "button",
|
|
3168
3165
|
"aria-label": "Clear the filter",
|
|
3169
3166
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3170
3167
|
onClick: r[1] ||= (e) => d.value = ""
|
|
3171
3168
|
}, " ✕ ")) : o("", !0)
|
|
3172
|
-
]), m.value.length > 0 ? (
|
|
3169
|
+
]), m.value.length > 0 ? (w(), a(Gr, {
|
|
3173
3170
|
key: 0,
|
|
3174
3171
|
modelValue: p.value,
|
|
3175
3172
|
"onUpdate:modelValue": r[2] ||= (e) => p.value = e,
|
|
@@ -3179,13 +3176,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3179
3176
|
"modelValue",
|
|
3180
3177
|
"options",
|
|
3181
3178
|
"aria-label"
|
|
3182
|
-
])) : o("", !0)]), h.value.length === 0 ? (
|
|
3179
|
+
])) : o("", !0)]), h.value.length === 0 ? (w(), s("p", Mi, j(t.noMatchMessage), 1)) : (w(), s("div", Ni, [(w(!0), s(e, null, D(h.value, (e) => (w(), s("button", {
|
|
3183
3180
|
key: e.id,
|
|
3184
3181
|
type: "button",
|
|
3185
3182
|
title: e.title,
|
|
3186
|
-
class:
|
|
3183
|
+
class: _(["h-8 shrink-0 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 px-3 text-sm text-slate-700 dark:text-slate-200 transition-colors hover:border-emerald-500 hover:bg-emerald-50 hover:text-emerald-700 dark:hover:bg-emerald-500/10 dark:hover:text-emerald-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", t.mono ? "font-mono" : ""]),
|
|
3187
3184
|
onClick: (t) => l("pick", e)
|
|
3188
|
-
},
|
|
3185
|
+
}, j(e.label), 11, Pi))), 128))]))], 64))]),
|
|
3189
3186
|
_: 1
|
|
3190
3187
|
}, 8, [
|
|
3191
3188
|
"title",
|
|
@@ -3194,7 +3191,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3194
3191
|
"max-width-class"
|
|
3195
3192
|
]));
|
|
3196
3193
|
}
|
|
3197
|
-
}),
|
|
3194
|
+
}), Ri = ["aria-label"], zi = ["title"], Bi = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, Vi = ["title"], Hi = /* @__PURE__ */ p({
|
|
3198
3195
|
__name: "BaseBarDistribution",
|
|
3199
3196
|
props: {
|
|
3200
3197
|
bars: {},
|
|
@@ -3206,43 +3203,96 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3206
3203
|
},
|
|
3207
3204
|
setup(t) {
|
|
3208
3205
|
let n = t, r = i(() => Math.max(1, ...n.bars.map((e) => e.count))), a = (e) => Math.max(3, Math.round(e.count / r.value * n.maxBarHeight)), o = (e) => `${n.titlePrefix ? `${n.titlePrefix} ` : ""}${e.label}: ${e.count} ${n.countNoun}${e.count === 1 ? "" : "s"}`;
|
|
3209
|
-
return (n, r) => (
|
|
3206
|
+
return (n, r) => (w(), s("div", {
|
|
3210
3207
|
class: "flex items-end gap-1.5 overflow-x-auto pb-1",
|
|
3211
3208
|
role: "img",
|
|
3212
3209
|
"aria-label": t.ariaLabel
|
|
3213
|
-
}, [(
|
|
3210
|
+
}, [(w(!0), s(e, null, D(t.bars, (e) => (w(), s("div", {
|
|
3214
3211
|
key: e.label,
|
|
3215
3212
|
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3216
3213
|
title: o(e)
|
|
3217
3214
|
}, [
|
|
3218
|
-
c("span",
|
|
3215
|
+
c("span", Bi, j(e.count), 1),
|
|
3219
3216
|
c("div", {
|
|
3220
|
-
class:
|
|
3221
|
-
style:
|
|
3217
|
+
class: _(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3218
|
+
style: y({ height: `${a(e)}px` })
|
|
3222
3219
|
}, null, 6),
|
|
3223
3220
|
c("span", {
|
|
3224
3221
|
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3225
3222
|
title: e.label
|
|
3226
|
-
},
|
|
3227
|
-
], 8,
|
|
3223
|
+
}, j(e.label), 9, Vi)
|
|
3224
|
+
], 8, zi))), 128))], 8, Ri));
|
|
3225
|
+
}
|
|
3226
|
+
}), Ui = /* @__PURE__ */ p({
|
|
3227
|
+
__name: "BaseDateTimePicker",
|
|
3228
|
+
props: {
|
|
3229
|
+
modelValue: { default: null },
|
|
3230
|
+
mode: { default: "datetime" },
|
|
3231
|
+
format: { default: void 0 },
|
|
3232
|
+
is24: {
|
|
3233
|
+
type: Boolean,
|
|
3234
|
+
default: !0
|
|
3235
|
+
},
|
|
3236
|
+
autoApply: {
|
|
3237
|
+
type: Boolean,
|
|
3238
|
+
default: !1
|
|
3239
|
+
},
|
|
3240
|
+
teleport: {
|
|
3241
|
+
type: [Boolean, String],
|
|
3242
|
+
default: !0
|
|
3243
|
+
},
|
|
3244
|
+
timeConfig: { default: void 0 }
|
|
3245
|
+
},
|
|
3246
|
+
emits: ["update:modelValue"],
|
|
3247
|
+
setup(e, { emit: t }) {
|
|
3248
|
+
let n = e, r = t, { isDark: o } = B(), s = i(() => ({
|
|
3249
|
+
enableTimePicker: n.mode !== "date",
|
|
3250
|
+
is24: n.is24,
|
|
3251
|
+
...n.timeConfig
|
|
3252
|
+
})), c = i(() => {
|
|
3253
|
+
if (n.format) return { input: n.format };
|
|
3254
|
+
let e = n.is24 ? "HH:mm" : "hh:mm a";
|
|
3255
|
+
return n.mode === "date" ? { input: "dd/MM/yyyy" } : n.mode === "time" ? { input: e } : { input: `dd/MM/yyyy ${e}` };
|
|
3256
|
+
});
|
|
3257
|
+
return (t, n) => (w(), a(M(je), {
|
|
3258
|
+
"model-value": e.modelValue,
|
|
3259
|
+
dark: M(o),
|
|
3260
|
+
"time-picker": e.mode === "time",
|
|
3261
|
+
"time-config": s.value,
|
|
3262
|
+
formats: c.value,
|
|
3263
|
+
"auto-apply": e.autoApply,
|
|
3264
|
+
teleport: e.teleport,
|
|
3265
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
3266
|
+
}, l({ _: 2 }, [D(t.$slots, (e, n) => ({
|
|
3267
|
+
name: n,
|
|
3268
|
+
fn: P((e) => [O(t.$slots, n, v(h(e ?? {})))])
|
|
3269
|
+
}))]), 1032, [
|
|
3270
|
+
"model-value",
|
|
3271
|
+
"dark",
|
|
3272
|
+
"time-picker",
|
|
3273
|
+
"time-config",
|
|
3274
|
+
"formats",
|
|
3275
|
+
"auto-apply",
|
|
3276
|
+
"teleport"
|
|
3277
|
+
]));
|
|
3228
3278
|
}
|
|
3229
3279
|
});
|
|
3230
3280
|
//#endregion
|
|
3231
3281
|
//#region src/composables/useDebounce.ts
|
|
3232
|
-
function
|
|
3233
|
-
let n =
|
|
3234
|
-
return
|
|
3282
|
+
function Wi(e, t = 300) {
|
|
3283
|
+
let n = E(e.value), r = null;
|
|
3284
|
+
return N(e, (e) => {
|
|
3235
3285
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3236
3286
|
n.value = e, r = null;
|
|
3237
3287
|
}, t);
|
|
3238
|
-
}),
|
|
3288
|
+
}), S(() => {
|
|
3239
3289
|
r &&= (clearTimeout(r), null);
|
|
3240
3290
|
}), n;
|
|
3241
3291
|
}
|
|
3242
3292
|
//#endregion
|
|
3243
3293
|
//#region src/composables/useToast.ts
|
|
3244
|
-
function
|
|
3245
|
-
let t =
|
|
3294
|
+
function Gi(e = 3e3) {
|
|
3295
|
+
let t = E(!1), n = E(""), r = E(K.SUCCESS), i = null;
|
|
3246
3296
|
function a() {
|
|
3247
3297
|
i &&= (clearTimeout(i), null);
|
|
3248
3298
|
}
|
|
@@ -3251,7 +3301,7 @@ function Vi(e = 3e3) {
|
|
|
3251
3301
|
t.value = !1, i = null;
|
|
3252
3302
|
}, c);
|
|
3253
3303
|
}
|
|
3254
|
-
return
|
|
3304
|
+
return S(() => {
|
|
3255
3305
|
a();
|
|
3256
3306
|
}), {
|
|
3257
3307
|
showToast: t,
|
|
@@ -3262,8 +3312,8 @@ function Vi(e = 3e3) {
|
|
|
3262
3312
|
}
|
|
3263
3313
|
//#endregion
|
|
3264
3314
|
//#region src/composables/useQueryParamSync.ts
|
|
3265
|
-
function
|
|
3266
|
-
let e =
|
|
3315
|
+
function Ki() {
|
|
3316
|
+
let e = ke(), t = Ae();
|
|
3267
3317
|
function n(t) {
|
|
3268
3318
|
let n = e.query[t];
|
|
3269
3319
|
return typeof n == "string" ? n : "";
|
|
@@ -3284,8 +3334,8 @@ function Hi() {
|
|
|
3284
3334
|
}
|
|
3285
3335
|
//#endregion
|
|
3286
3336
|
//#region src/composables/useFieldClasses.ts
|
|
3287
|
-
function
|
|
3288
|
-
let { isDark: e } =
|
|
3337
|
+
function qi() {
|
|
3338
|
+
let { isDark: e } = B(), t = i(() => e.value ? "text-gray-300" : "text-gray-600"), n = i(() => e.value ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:ring-emerald-500 focus:border-emerald-500" : "bg-white border-gray-300 text-gray-800 focus:ring-emerald-500 focus:border-emerald-500");
|
|
3289
3339
|
function r(t) {
|
|
3290
3340
|
return t == null || String(t).trim() === "" ? e.value ? "bg-gray-800 border-red-500 text-gray-100 placeholder-gray-500 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-500/30" : "bg-white border-red-400 text-gray-800 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-400/30" : n.value;
|
|
3291
3341
|
}
|
|
@@ -3297,10 +3347,10 @@ function Ui() {
|
|
|
3297
3347
|
}
|
|
3298
3348
|
//#endregion
|
|
3299
3349
|
//#region src/composables/usePolling.ts
|
|
3300
|
-
function
|
|
3301
|
-
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o =
|
|
3350
|
+
function Ji(e, t, n = {}) {
|
|
3351
|
+
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = E(!1), s = !1;
|
|
3302
3352
|
function c() {
|
|
3303
|
-
a
|
|
3353
|
+
a === null && t !== null && (a = setInterval(() => void e(), t));
|
|
3304
3354
|
}
|
|
3305
3355
|
function l() {
|
|
3306
3356
|
a !== null && (clearInterval(a), a = null);
|
|
@@ -3320,78 +3370,74 @@ function Wi(e, t, n = {}) {
|
|
|
3320
3370
|
o.value = !1, l(), s = !0;
|
|
3321
3371
|
}
|
|
3322
3372
|
}
|
|
3323
|
-
return
|
|
3373
|
+
return x(() => {
|
|
3324
3374
|
u(), i && document.addEventListener("visibilitychange", f);
|
|
3325
|
-
}),
|
|
3375
|
+
}), C(() => {
|
|
3326
3376
|
d(), i && document.removeEventListener("visibilitychange", f);
|
|
3327
3377
|
}), {
|
|
3328
3378
|
start: u,
|
|
3329
3379
|
stop: d,
|
|
3330
|
-
active:
|
|
3380
|
+
active: ee(o)
|
|
3331
3381
|
};
|
|
3332
3382
|
}
|
|
3333
3383
|
//#endregion
|
|
3334
3384
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3335
|
-
var
|
|
3385
|
+
var Yi = /* @__PURE__ */ function(e) {
|
|
3336
3386
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3337
3387
|
}({});
|
|
3338
3388
|
//#endregion
|
|
3339
3389
|
//#region src/utils/util.ts
|
|
3340
|
-
function
|
|
3390
|
+
function Xi(e) {
|
|
3341
3391
|
let t = "red";
|
|
3342
3392
|
switch (e) {
|
|
3343
|
-
case
|
|
3393
|
+
case L.ERROR:
|
|
3344
3394
|
t = "red";
|
|
3345
3395
|
break;
|
|
3346
|
-
case
|
|
3396
|
+
case L.SUCCESS:
|
|
3347
3397
|
t = "green";
|
|
3348
3398
|
break;
|
|
3349
|
-
case
|
|
3399
|
+
case L.INFO:
|
|
3350
3400
|
t = "gray";
|
|
3351
3401
|
break;
|
|
3352
|
-
case
|
|
3353
|
-
t = "yellow";
|
|
3354
|
-
break;
|
|
3402
|
+
case L.WARNING: t = "yellow";
|
|
3355
3403
|
}
|
|
3356
3404
|
return t;
|
|
3357
3405
|
}
|
|
3358
|
-
function
|
|
3406
|
+
function Zi(e) {
|
|
3359
3407
|
let t = "red";
|
|
3360
3408
|
switch (e) {
|
|
3361
|
-
case
|
|
3409
|
+
case V.GREEN:
|
|
3362
3410
|
t = "green";
|
|
3363
3411
|
break;
|
|
3364
|
-
case
|
|
3412
|
+
case V.RED:
|
|
3365
3413
|
t = "red";
|
|
3366
3414
|
break;
|
|
3367
|
-
case
|
|
3415
|
+
case V.BLUE:
|
|
3368
3416
|
t = "blue";
|
|
3369
3417
|
break;
|
|
3370
|
-
case
|
|
3418
|
+
case V.YELLOW:
|
|
3371
3419
|
t = "yellow";
|
|
3372
3420
|
break;
|
|
3373
|
-
case
|
|
3421
|
+
case V.BLACK:
|
|
3374
3422
|
t = "black";
|
|
3375
3423
|
break;
|
|
3376
|
-
case
|
|
3424
|
+
case V.GRAY:
|
|
3377
3425
|
t = "gray";
|
|
3378
3426
|
break;
|
|
3379
|
-
case
|
|
3380
|
-
t = "";
|
|
3381
|
-
break;
|
|
3427
|
+
case V.NONE: t = "";
|
|
3382
3428
|
}
|
|
3383
3429
|
return t;
|
|
3384
3430
|
}
|
|
3385
3431
|
//#endregion
|
|
3386
3432
|
//#region src/utils/httpColors.ts
|
|
3387
|
-
var
|
|
3433
|
+
var Qi = {
|
|
3388
3434
|
GET: "bg-blue-600",
|
|
3389
3435
|
POST: "bg-emerald-600",
|
|
3390
3436
|
PUT: "bg-amber-600",
|
|
3391
3437
|
DELETE: "bg-red-600",
|
|
3392
3438
|
PATCH: "bg-purple-600",
|
|
3393
3439
|
HEAD: "bg-gray-600"
|
|
3394
|
-
},
|
|
3440
|
+
}, $i = {
|
|
3395
3441
|
GET: "bg-blue-500",
|
|
3396
3442
|
POST: "bg-green-500",
|
|
3397
3443
|
PUT: "bg-yellow-500",
|
|
@@ -3399,39 +3445,39 @@ var Ji = {
|
|
|
3399
3445
|
PATCH: "bg-purple-500",
|
|
3400
3446
|
HEAD: "bg-gray-500"
|
|
3401
3447
|
};
|
|
3402
|
-
function
|
|
3403
|
-
return e ?
|
|
3448
|
+
function ea(e) {
|
|
3449
|
+
return e ? Qi[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3404
3450
|
}
|
|
3405
|
-
function
|
|
3406
|
-
return e ?
|
|
3451
|
+
function ta(e) {
|
|
3452
|
+
return e ? $i[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
3407
3453
|
}
|
|
3408
|
-
function
|
|
3454
|
+
function na(e) {
|
|
3409
3455
|
let t = e ?? 0;
|
|
3410
3456
|
return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
|
|
3411
3457
|
}
|
|
3412
|
-
function
|
|
3458
|
+
function ra(e, t) {
|
|
3413
3459
|
let n = (e || "ANY").toUpperCase();
|
|
3414
3460
|
return n === "GET" ? t ? "bg-blue-500/15 text-blue-400" : "bg-blue-100 text-blue-700" : n === "POST" ? t ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-100 text-emerald-700" : n === "PUT" ? t ? "bg-amber-500/15 text-amber-400" : "bg-amber-100 text-amber-700" : n === "DELETE" ? t ? "bg-red-500/15 text-red-400" : "bg-red-100 text-red-700" : n === "PATCH" ? t ? "bg-purple-500/15 text-purple-400" : "bg-purple-100 text-purple-700" : n === "HEAD" ? t ? "bg-sky-500/15 text-sky-400" : "bg-sky-100 text-sky-700" : t ? "bg-gray-500/15 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3415
3461
|
}
|
|
3416
|
-
function
|
|
3462
|
+
function ia(e, t) {
|
|
3417
3463
|
let n = e ?? 200;
|
|
3418
3464
|
return n >= 200 && n < 300 ? t ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-100 text-emerald-700" : n >= 300 && n < 400 ? t ? "bg-sky-500/15 text-sky-300" : "bg-sky-100 text-sky-700" : n >= 400 && n < 500 ? t ? "bg-amber-500/15 text-amber-300" : "bg-amber-100 text-amber-700" : n >= 500 && n < 600 ? t ? "bg-red-500/15 text-red-300" : "bg-red-100 text-red-700" : t ? "bg-gray-800 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3419
3465
|
}
|
|
3420
|
-
function
|
|
3466
|
+
function aa(e, t) {
|
|
3421
3467
|
let n = e ?? 200;
|
|
3422
3468
|
return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
|
|
3423
3469
|
}
|
|
3424
3470
|
//#endregion
|
|
3425
3471
|
//#region src/utils/kvRows.ts
|
|
3426
|
-
function
|
|
3472
|
+
function oa(e) {
|
|
3427
3473
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
3428
3474
|
}
|
|
3429
|
-
function
|
|
3475
|
+
function sa(e) {
|
|
3430
3476
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
3431
3477
|
}
|
|
3432
3478
|
//#endregion
|
|
3433
3479
|
//#region src/utils/sanitizeHtml.ts
|
|
3434
|
-
var
|
|
3480
|
+
var ca = /* @__PURE__ */ new Set([
|
|
3435
3481
|
"A",
|
|
3436
3482
|
"B",
|
|
3437
3483
|
"STRONG",
|
|
@@ -3446,7 +3492,7 @@ var ia = /* @__PURE__ */ new Set([
|
|
|
3446
3492
|
"LI",
|
|
3447
3493
|
"SPAN",
|
|
3448
3494
|
"DIV"
|
|
3449
|
-
]),
|
|
3495
|
+
]), la = /* @__PURE__ */ new Set([
|
|
3450
3496
|
"SCRIPT",
|
|
3451
3497
|
"STYLE",
|
|
3452
3498
|
"IFRAME",
|
|
@@ -3454,40 +3500,40 @@ var ia = /* @__PURE__ */ new Set([
|
|
|
3454
3500
|
"EMBED",
|
|
3455
3501
|
"NOSCRIPT",
|
|
3456
3502
|
"TEMPLATE"
|
|
3457
|
-
]),
|
|
3458
|
-
function
|
|
3503
|
+
]), ua = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
3504
|
+
function da(e) {
|
|
3459
3505
|
let t = e.trim().toLowerCase();
|
|
3460
3506
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
3461
3507
|
}
|
|
3462
|
-
function
|
|
3508
|
+
function fa(e) {
|
|
3463
3509
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
3464
3510
|
let t = e, n = t.tagName.toUpperCase();
|
|
3465
|
-
if (!
|
|
3466
|
-
|
|
3511
|
+
if (!ca.has(n)) {
|
|
3512
|
+
la.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
3467
3513
|
return;
|
|
3468
3514
|
}
|
|
3469
|
-
let r =
|
|
3515
|
+
let r = ua[n] ?? /* @__PURE__ */ new Set();
|
|
3470
3516
|
for (let e of Array.from(t.attributes)) {
|
|
3471
3517
|
if (!r.has(e.name.toLowerCase())) {
|
|
3472
3518
|
t.removeAttribute(e.name);
|
|
3473
3519
|
continue;
|
|
3474
3520
|
}
|
|
3475
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
3521
|
+
n === "A" && e.name.toLowerCase() === "href" && !da(e.value) && t.removeAttribute(e.name);
|
|
3476
3522
|
}
|
|
3477
3523
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
3478
|
-
for (let e of Array.from(t.childNodes))
|
|
3524
|
+
for (let e of Array.from(t.childNodes)) fa(e);
|
|
3479
3525
|
}
|
|
3480
|
-
function
|
|
3526
|
+
function pa(e) {
|
|
3481
3527
|
if (!e) return "";
|
|
3482
3528
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
3483
3529
|
if (!t) return "";
|
|
3484
|
-
for (let e of Array.from(t.childNodes))
|
|
3530
|
+
for (let e of Array.from(t.childNodes)) fa(e);
|
|
3485
3531
|
return t.innerHTML;
|
|
3486
3532
|
}
|
|
3487
3533
|
//#endregion
|
|
3488
3534
|
//#region src/utils/format.ts
|
|
3489
3535
|
var $ = "—";
|
|
3490
|
-
function
|
|
3536
|
+
function ma(e, t = 4) {
|
|
3491
3537
|
if (e == null || typeof e == "string" && e.trim() === "") return $;
|
|
3492
3538
|
let n = typeof e == "string" ? Number(e) : e;
|
|
3493
3539
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
@@ -3495,12 +3541,12 @@ function ua(e, t = 4) {
|
|
|
3495
3541
|
maximumFractionDigits: t
|
|
3496
3542
|
}) : $;
|
|
3497
3543
|
}
|
|
3498
|
-
function
|
|
3544
|
+
function ha(e) {
|
|
3499
3545
|
if (e == null || e === "") return $;
|
|
3500
3546
|
let t = new Date(e);
|
|
3501
3547
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
3502
3548
|
}
|
|
3503
|
-
function
|
|
3549
|
+
function ga(e) {
|
|
3504
3550
|
return new Date(e).toLocaleString(void 0, {
|
|
3505
3551
|
month: "short",
|
|
3506
3552
|
day: "numeric",
|
|
@@ -3508,13 +3554,13 @@ function fa(e) {
|
|
|
3508
3554
|
minute: "2-digit"
|
|
3509
3555
|
});
|
|
3510
3556
|
}
|
|
3511
|
-
function
|
|
3557
|
+
function _a(e) {
|
|
3512
3558
|
return new Date(e).toLocaleDateString(void 0, {
|
|
3513
3559
|
month: "short",
|
|
3514
3560
|
day: "numeric"
|
|
3515
3561
|
});
|
|
3516
3562
|
}
|
|
3517
|
-
function
|
|
3563
|
+
function va(e) {
|
|
3518
3564
|
try {
|
|
3519
3565
|
return new Date(e).toLocaleString(void 0, {
|
|
3520
3566
|
year: "numeric",
|
|
@@ -3530,7 +3576,7 @@ function ma(e) {
|
|
|
3530
3576
|
return String(e);
|
|
3531
3577
|
}
|
|
3532
3578
|
}
|
|
3533
|
-
function
|
|
3579
|
+
function ya(e) {
|
|
3534
3580
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
3535
3581
|
let t = Math.abs(e), n = 2;
|
|
3536
3582
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -3538,13 +3584,13 @@ function ha(e) {
|
|
|
3538
3584
|
maximumFractionDigits: n
|
|
3539
3585
|
});
|
|
3540
3586
|
}
|
|
3541
|
-
function
|
|
3587
|
+
function ba(e, t = 2) {
|
|
3542
3588
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
3543
3589
|
}
|
|
3544
|
-
function
|
|
3590
|
+
function xa(e) {
|
|
3545
3591
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
3546
3592
|
}
|
|
3547
|
-
function
|
|
3593
|
+
function Sa(e) {
|
|
3548
3594
|
if (e == null || e === "") return $;
|
|
3549
3595
|
let t = new Date(e);
|
|
3550
3596
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3553,7 +3599,7 @@ function va(e) {
|
|
|
3553
3599
|
day: "numeric"
|
|
3554
3600
|
});
|
|
3555
3601
|
}
|
|
3556
|
-
function
|
|
3602
|
+
function Ca(e) {
|
|
3557
3603
|
if (e == null || e === "") return $;
|
|
3558
3604
|
let t = new Date(e);
|
|
3559
3605
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3564,22 +3610,22 @@ function ya(e) {
|
|
|
3564
3610
|
minute: "2-digit"
|
|
3565
3611
|
});
|
|
3566
3612
|
}
|
|
3567
|
-
function
|
|
3613
|
+
function wa(e) {
|
|
3568
3614
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
3569
3615
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
3570
3616
|
return `= ${t.toFixed(n)} s`;
|
|
3571
3617
|
}
|
|
3572
|
-
function
|
|
3573
|
-
return e ? e < 1024 ? `${e} B` : e <
|
|
3618
|
+
function Ta(e) {
|
|
3619
|
+
return e ? e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB` : "";
|
|
3574
3620
|
}
|
|
3575
|
-
function
|
|
3621
|
+
function Ea(e) {
|
|
3576
3622
|
try {
|
|
3577
3623
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
3578
3624
|
} catch {
|
|
3579
3625
|
return e;
|
|
3580
3626
|
}
|
|
3581
3627
|
}
|
|
3582
|
-
function
|
|
3628
|
+
function Da(e) {
|
|
3583
3629
|
if (e == null) return "";
|
|
3584
3630
|
if (typeof e == "string") return e;
|
|
3585
3631
|
try {
|
|
@@ -3588,14 +3634,14 @@ function Ca(e) {
|
|
|
3588
3634
|
return String(e);
|
|
3589
3635
|
}
|
|
3590
3636
|
}
|
|
3591
|
-
function
|
|
3637
|
+
function Oa(e, t = 2) {
|
|
3592
3638
|
if (e == null || !isFinite(e)) return $;
|
|
3593
3639
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
3594
3640
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
3595
3641
|
}
|
|
3596
3642
|
//#endregion
|
|
3597
3643
|
//#region src/utils/validate.ts
|
|
3598
|
-
function
|
|
3644
|
+
function ka(e) {
|
|
3599
3645
|
let t = (e ?? "").trim();
|
|
3600
3646
|
if (!t) return !1;
|
|
3601
3647
|
try {
|
|
@@ -3605,7 +3651,7 @@ function Ta(e) {
|
|
|
3605
3651
|
return !1;
|
|
3606
3652
|
}
|
|
3607
3653
|
}
|
|
3608
|
-
function
|
|
3654
|
+
function Aa(e) {
|
|
3609
3655
|
if (!e.trim()) return !0;
|
|
3610
3656
|
try {
|
|
3611
3657
|
return JSON.parse(e), !0;
|
|
@@ -3613,7 +3659,7 @@ function Ea(e) {
|
|
|
3613
3659
|
return !1;
|
|
3614
3660
|
}
|
|
3615
3661
|
}
|
|
3616
|
-
function
|
|
3662
|
+
function ja(e) {
|
|
3617
3663
|
if (!e.trim()) return !0;
|
|
3618
3664
|
try {
|
|
3619
3665
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -3621,7 +3667,7 @@ function Da(e) {
|
|
|
3621
3667
|
return !1;
|
|
3622
3668
|
}
|
|
3623
3669
|
}
|
|
3624
|
-
function
|
|
3670
|
+
function Ma(e) {
|
|
3625
3671
|
if (!e.trim()) return !0;
|
|
3626
3672
|
let t = e.replace(/\s+/g, "");
|
|
3627
3673
|
if (!t) return !0;
|
|
@@ -3634,7 +3680,7 @@ function Oa(e) {
|
|
|
3634
3680
|
}
|
|
3635
3681
|
//#endregion
|
|
3636
3682
|
//#region src/utils/specForm.ts
|
|
3637
|
-
function
|
|
3683
|
+
function Na(e, t) {
|
|
3638
3684
|
let n = {};
|
|
3639
3685
|
if (!e) return n;
|
|
3640
3686
|
for (let r of e) {
|
|
@@ -3643,7 +3689,7 @@ function ka(e, t) {
|
|
|
3643
3689
|
}
|
|
3644
3690
|
return n;
|
|
3645
3691
|
}
|
|
3646
|
-
function
|
|
3692
|
+
function Pa(e, t) {
|
|
3647
3693
|
if (!e) return null;
|
|
3648
3694
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
3649
3695
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -3654,7 +3700,7 @@ function Aa(e, t) {
|
|
|
3654
3700
|
}
|
|
3655
3701
|
//#endregion
|
|
3656
3702
|
//#region src/utils/pnl.ts
|
|
3657
|
-
function
|
|
3703
|
+
function Fa(e) {
|
|
3658
3704
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
3659
3705
|
pnlUsd: null,
|
|
3660
3706
|
pnlPct: null
|
|
@@ -3669,4 +3715,4 @@ function ja(e) {
|
|
|
3669
3715
|
};
|
|
3670
3716
|
}
|
|
3671
3717
|
//#endregion
|
|
3672
|
-
export {
|
|
3718
|
+
export { L as AlertEnum, Qn as BaseActionButton, Le as BaseAlert, Un as BaseAppLayout, ze as BaseBadge, Yi as BaseBadgeEnum, Hi as BaseBarDistribution, Ue as BaseBreadcrumb, W as BaseButton, H as BaseButtonEnum, U as BaseButtonSizeEnum, Tr as BaseChipButton, Nr as BaseCodeBlock, Xt as BaseCollapsibleSection, en as BaseConfirmModal, er as BaseCopyButton, Di as BaseCredentialsForm, Ui as BaseDateTimePicker, Vr as BaseDropdown, Bn as BaseEntityPickerModal, Mr as BaseFileDropzone, ui as BaseFilterChip, ir as BaseGoogleSignInButton, Q as BaseInput, nt as BaseLine, rt as BaseLoginEnum, gr as BaseLoginForm, at as BaseLogo, G as BaseLogoEnum, ft as BaseModal, ot as BaseModalEnum, qt as BaseModalShell, cn as BaseNotFoundPage, Cr as BaseNotificationPanel, Kn as BasePageHeader, Li as BasePillPickerModal, Er as BaseRemoveButton, pt as BaseRow, Gr as BaseSegmentedControl, Ir as BaseSelect, Dn as BaseSidebar, ai as BaseSpecFields, mt as BaseSpinner, ci as BaseStatBreakdown, kr as BaseStatusPill, Zr as BaseTable, an as BaseTextInputModal, _t as BaseToast, K as BaseToastEnum, Yn as BaseToolbarButton, yt as ColoredSquares, V as ColorsEnums, St as EarningsCard, Dt as EuroAmount, Qe as LineEnum, Mt as Pagination, q as PositioningEnum, Lt as TrendArrow, Na as buildSpecParams, Fa as computePnL, Pa as firstInvalidNumericSpec, Ta as fmtBytes, Sa as fmtCalendarDate, Ca as fmtCalendarDateTime, ha as fmtDate, _a as fmtDateShort, ga as fmtDateTime, va as fmtDateTimeMs, Oa as fmtDuration, wa as fmtMsAsSeconds, ma as fmtNumber, ba as fmtPct, ya as fmtPrice, xa as fmtUsd, Ea as formatJson, Xi as getBaseColor, Zi as getBaseColorOf, Pe as initTheme, da as isSafeHref, ka as isValidAbsoluteUrl, Ma as isValidBase64, Aa as isValidJson, ja as isValidXml, ta as methodBadgeBright, ea as methodBadgeSolid, ra as methodBadgeTinted, sa as rowKeyMissing, oa as rowValueMissing, pa as sanitizeHtml, ia as statusBadgeSoft, na as statusBadgeSolid, aa as statusBadgeTinted, Da as stringifyValue, Wi as useDebouncedRef, Rt as useEscapeKey, qi as useFieldClasses, un as useMobileSidebar, gn as useNotifications, Ji as usePolling, Ki as useQueryParamSync, mn as useSidebarCollapse, B as useTheme, J as useThemeClasses, Gi as useToast };
|