@wishbone-media/spark 0.9.1 → 0.10.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/dist/index.js +386 -341
- package/package.json +1 -1
- package/src/plugins/axios.js +86 -0
- package/src/plugins/index.js +2 -1
- package/src/plugins/router.js +6 -0
- package/src/stores/auth.js +25 -5
- package/src/utils/cookies.js +21 -7
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as T, resolveComponent as V, createElementBlock as y, openBlock as g, normalizeClass as _, createElementVNode as p, createVNode as v, unref as x, renderSlot as z, Fragment as se, renderList as fe, createCommentVNode as R, toDisplayString as F, reactive as oe, ref as q, inject as tn, provide as nn, markRaw as xt, createBlock as Y, withCtx as O, resolveDynamicComponent as St, mergeProps as vt, toHandlers as Ct, createTextVNode as qe, withModifiers as ce, onMounted as sn, watch as rn } from "vue";
|
|
2
2
|
import { library as _t } from "@fortawesome/fontawesome-svg-core";
|
|
3
3
|
import { FontAwesomeIcon as on } from "@fortawesome/vue-fontawesome";
|
|
4
|
-
import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as
|
|
4
|
+
import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as hn, faSatelliteDish as mn, faLayerPlus as gn, faLaptopMobile as yn, faInfoCircle as wn, faGripDotsVertical as bn, faGearComplex as xn, faFlag as Sn, faFaceSmileWink as vn, faFaceSmileRelaxed as Cn, faExclamationTriangle as _n, faEllipsisVertical as kn, faEllipsis as Rn, faEdit as En, faComments as On, faCircleXmark as An, faCircleUser as Tn, faChevronUp as $n, faChevronRight as Ln, faChevronLeft as Fn, faChevronDown as Bn, faCheckCircle as Nn, faCheck as Pn, faBullhorn as Hn, faBellRing as Un, faBarsSort as Vn, faArrowRightToLine as Dn, faArrowLeftToLine as jn } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { defineStore as Re } from "pinia";
|
|
6
6
|
import { TransitionRoot as kt, Dialog as Rt, TransitionChild as _e, DialogPanel as Et } from "@headlessui/vue";
|
|
7
7
|
import { useRouter as Ee, useRoute as Oe } from "vue-router";
|
|
@@ -16,8 +16,8 @@ const N = {
|
|
|
16
16
|
farChevronDown: Bn,
|
|
17
17
|
farChevronLeft: Fn,
|
|
18
18
|
farChevronRight: Ln,
|
|
19
|
-
farChevronUp:
|
|
20
|
-
farCircleUser:
|
|
19
|
+
farChevronUp: $n,
|
|
20
|
+
farCircleUser: Tn,
|
|
21
21
|
farCircleXmark: An,
|
|
22
22
|
farComments: On,
|
|
23
23
|
farEdit: En,
|
|
@@ -32,8 +32,8 @@ const N = {
|
|
|
32
32
|
farInfoCircle: wn,
|
|
33
33
|
farLaptopMobile: yn,
|
|
34
34
|
farLayerPlus: gn,
|
|
35
|
-
farSatelliteDish:
|
|
36
|
-
farScaleBalanced:
|
|
35
|
+
farSatelliteDish: mn,
|
|
36
|
+
farScaleBalanced: hn,
|
|
37
37
|
farSort: pn,
|
|
38
38
|
farSortDown: fn,
|
|
39
39
|
farSortUp: dn,
|
|
@@ -42,13 +42,13 @@ const N = {
|
|
|
42
42
|
farXmark: ln,
|
|
43
43
|
farSignOut: an
|
|
44
44
|
};
|
|
45
|
-
function
|
|
45
|
+
function Ca(e) {
|
|
46
46
|
Object.assign(N, e), _t.add(...Object.values(e));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function _a(e) {
|
|
49
49
|
_t.add(...Object.values(N)), e.component("FontAwesomeIcon", on);
|
|
50
50
|
}
|
|
51
|
-
const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" },
|
|
51
|
+
const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }, zn = { class: "ml-3" }, qn = { class: "ml-auto pl-3 pt-1 self-start" }, Wn = { class: "-mx-1.5 -my-1.5" }, ka = {
|
|
52
52
|
__name: "SparkAlert",
|
|
53
53
|
props: {
|
|
54
54
|
type: {
|
|
@@ -59,22 +59,22 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
59
59
|
},
|
|
60
60
|
emits: ["close"],
|
|
61
61
|
setup(e) {
|
|
62
|
-
const t = e, n =
|
|
62
|
+
const t = e, n = T(() => ({
|
|
63
63
|
success: "bg-green-50 border-green-200 text-green-700",
|
|
64
64
|
warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
|
|
65
65
|
danger: "bg-red-50 border-red-200 text-red-700",
|
|
66
66
|
info: "bg-blue-50 border-blue-200 text-blue-700"
|
|
67
|
-
})[t.type]), s =
|
|
67
|
+
})[t.type]), s = T(() => ({
|
|
68
68
|
success: "text-green-400",
|
|
69
69
|
warning: "text-yellow-400",
|
|
70
70
|
danger: "text-red-400",
|
|
71
71
|
info: "text-blue-400"
|
|
72
|
-
})[t.type]), r =
|
|
72
|
+
})[t.type]), r = T(() => ({
|
|
73
73
|
success: "farCheckCircle",
|
|
74
74
|
warning: "farExclamationTriangle",
|
|
75
75
|
danger: "farCircleXmark",
|
|
76
76
|
info: "farInfoCircle"
|
|
77
|
-
})[t.type]), a =
|
|
77
|
+
})[t.type]), a = T(() => ({
|
|
78
78
|
success: "text-green-400 hover:bg-green-100",
|
|
79
79
|
warning: "text-yellow-400 hover:bg-yellow-100",
|
|
80
80
|
danger: "text-red-400 hover:bg-red-100",
|
|
@@ -92,11 +92,11 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
92
92
|
class: _(s.value)
|
|
93
93
|
}, null, 8, ["icon", "class"])
|
|
94
94
|
]),
|
|
95
|
-
p("div", qn, [
|
|
96
|
-
q(o.$slots, "default")
|
|
97
|
-
]),
|
|
98
95
|
p("div", zn, [
|
|
99
|
-
|
|
96
|
+
z(o.$slots, "default")
|
|
97
|
+
]),
|
|
98
|
+
p("div", qn, [
|
|
99
|
+
p("div", Wn, [
|
|
100
100
|
p("button", {
|
|
101
101
|
type: "button",
|
|
102
102
|
class: _(["inline-flex rounded-md px-2 py-1.5", a.value]),
|
|
@@ -112,7 +112,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
112
112
|
], 2);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, Jn = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Kn = { class: "flex flex-1 flex-col" }, Gn = { class: "divide-y divide-gray-200" }, Zn = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Xn = { class: "ml-auto flex items-center" }, Qn = ["onClick"], Yn = { class: "gap-y-1" }, es = { class: "text-base text-gray-800 flex items-center" }, ts = { class: "font-medium" }, ns = {
|
|
116
116
|
key: 0,
|
|
117
117
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
|
|
118
118
|
}, ss = { class: "text-sm text-gray-500" }, rs = { class: "ml-auto flex items-center" }, os = {
|
|
@@ -168,7 +168,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
168
168
|
},
|
|
169
169
|
emits: ["close", "select"],
|
|
170
170
|
setup(e, { emit: t }) {
|
|
171
|
-
const n = e, s = t, r =
|
|
171
|
+
const n = e, s = t, r = T(() => n.appItems.map((o) => ({
|
|
172
172
|
...o,
|
|
173
173
|
current: o.name === n.currentApp
|
|
174
174
|
}))), a = (o) => {
|
|
@@ -176,7 +176,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
176
176
|
};
|
|
177
177
|
return (o, c) => {
|
|
178
178
|
const l = V("font-awesome-icon");
|
|
179
|
-
return g(), y("div",
|
|
179
|
+
return g(), y("div", Jn, [
|
|
180
180
|
p("div", Kn, [
|
|
181
181
|
p("div", Gn, [
|
|
182
182
|
p("div", Zn, [
|
|
@@ -189,7 +189,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
189
189
|
}, null, 8, ["icon"])
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
|
-
(g(!0), y(
|
|
192
|
+
(g(!0), y(se, null, fe(r.value, (i) => (g(), y("div", {
|
|
193
193
|
key: i.name,
|
|
194
194
|
class: _([i.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
195
195
|
onClick: (d) => a(i)
|
|
@@ -221,7 +221,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
221
221
|
}, Ot = Re(
|
|
222
222
|
"brandFilter",
|
|
223
223
|
() => {
|
|
224
|
-
const e =
|
|
224
|
+
const e = oe({
|
|
225
225
|
brands: []
|
|
226
226
|
}), t = (a = {}) => {
|
|
227
227
|
if (!a.brands || !Array.isArray(a.brands)) {
|
|
@@ -240,7 +240,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
240
240
|
logo: l.logo,
|
|
241
241
|
current: l.current || !1
|
|
242
242
|
}));
|
|
243
|
-
}, n =
|
|
243
|
+
}, n = T(() => e.brands.find((a) => a.current) || null), s = T(() => e.brands);
|
|
244
244
|
return {
|
|
245
245
|
state: e,
|
|
246
246
|
initialize: t,
|
|
@@ -265,7 +265,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
265
265
|
), as = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, is = { class: "flex flex-1 flex-col" }, ls = { class: "divide-y divide-gray-200" }, cs = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, us = { class: "ml-auto flex items-center" }, ds = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
268
|
-
}, fs = ["onClick"], ps = { class: "gap-y-1 flex" },
|
|
268
|
+
}, fs = ["onClick"], ps = { class: "gap-y-1 flex" }, hs = { class: "flex items-center mr-4" }, ms = ["src", "alt"], gs = { class: "ml-auto flex flex-col" }, ys = { class: "text-base text-gray-800 flex items-center" }, ws = { class: "font-medium" }, bs = {
|
|
269
269
|
key: 0,
|
|
270
270
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
|
|
271
271
|
}, xs = { class: "text-sm text-gray-500" }, Ss = {
|
|
@@ -291,18 +291,18 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
291
291
|
])
|
|
292
292
|
]),
|
|
293
293
|
x(s).allBrands.length === 0 ? (g(), y("div", ds, " No brands configured ")) : R("", !0),
|
|
294
|
-
(g(!0), y(
|
|
294
|
+
(g(!0), y(se, null, fe(x(s).allBrands, (l) => (g(), y("div", {
|
|
295
295
|
key: l.id,
|
|
296
296
|
class: _([l.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
297
297
|
onClick: (i) => r(l)
|
|
298
298
|
}, [
|
|
299
299
|
p("div", ps, [
|
|
300
|
-
p("div",
|
|
300
|
+
p("div", hs, [
|
|
301
301
|
p("img", {
|
|
302
302
|
src: l.logo,
|
|
303
303
|
alt: `${l.name} logo`,
|
|
304
304
|
class: "h-8 w-auto"
|
|
305
|
-
}, null, 8,
|
|
305
|
+
}, null, 8, ms)
|
|
306
306
|
]),
|
|
307
307
|
p("div", gs, [
|
|
308
308
|
p("div", ys, [
|
|
@@ -342,7 +342,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
setup(e) {
|
|
345
|
-
const t = e, n =
|
|
345
|
+
const t = e, n = q(null), s = tn("buttonGroup", null), r = T(() => {
|
|
346
346
|
if (!s?.isInGroup || !n.value) return null;
|
|
347
347
|
const l = s.getButtonIndex(n.value), i = s.getButtonCount();
|
|
348
348
|
return {
|
|
@@ -364,15 +364,15 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
364
364
|
}, o = (l, i) => {
|
|
365
365
|
if (!i) return l;
|
|
366
366
|
const d = l.split(" ").filter(Boolean), f = i.split(" ").filter(Boolean);
|
|
367
|
-
return [...d.filter((E) => !f.some((
|
|
367
|
+
return [...d.filter((E) => !f.some((h) => {
|
|
368
368
|
const w = Object.entries(a).find(
|
|
369
|
-
([k,
|
|
370
|
-
)?.[0],
|
|
371
|
-
([k,
|
|
369
|
+
([k, $]) => $.test(E)
|
|
370
|
+
)?.[0], m = Object.entries(a).find(
|
|
371
|
+
([k, $]) => $.test(h)
|
|
372
372
|
)?.[0];
|
|
373
|
-
return w && w ===
|
|
373
|
+
return w && w === m;
|
|
374
374
|
})), ...f].join(" ");
|
|
375
|
-
}, c =
|
|
375
|
+
}, c = T(() => {
|
|
376
376
|
let l = "", i = "";
|
|
377
377
|
switch (t.size) {
|
|
378
378
|
case "xs":
|
|
@@ -428,13 +428,13 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
428
428
|
disabled: e.disabled,
|
|
429
429
|
onClick: i[0] || (i[0] = (d) => l.$emit("click"))
|
|
430
430
|
}, [
|
|
431
|
-
|
|
431
|
+
z(l.$slots, "default")
|
|
432
432
|
], 10, vs));
|
|
433
433
|
}
|
|
434
|
-
},
|
|
434
|
+
}, Ra = {
|
|
435
435
|
__name: "SparkButtonGroup",
|
|
436
436
|
setup(e) {
|
|
437
|
-
const t =
|
|
437
|
+
const t = q(null);
|
|
438
438
|
return nn("buttonGroup", {
|
|
439
439
|
isInGroup: !0,
|
|
440
440
|
getButtonIndex: (r) => t.value ? Array.from(t.value.children).indexOf(r) : -1,
|
|
@@ -444,7 +444,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
444
444
|
ref_key: "groupRef",
|
|
445
445
|
ref: t
|
|
446
446
|
}, [
|
|
447
|
-
|
|
447
|
+
z(r.$slots, "default")
|
|
448
448
|
], 512));
|
|
449
449
|
}
|
|
450
450
|
}, Cs = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, _s = {
|
|
@@ -453,7 +453,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
453
453
|
}, ks = {
|
|
454
454
|
key: 1,
|
|
455
455
|
class: "p-5"
|
|
456
|
-
},
|
|
456
|
+
}, Ea = {
|
|
457
457
|
__name: "SparkCard",
|
|
458
458
|
props: {
|
|
459
459
|
padded: {
|
|
@@ -469,22 +469,22 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
469
469
|
const t = e;
|
|
470
470
|
return (n, s) => (g(), y("div", Cs, [
|
|
471
471
|
n.$slots.header ? (g(), y("div", _s, [
|
|
472
|
-
|
|
472
|
+
z(n.$slots, "header")
|
|
473
473
|
])) : R("", !0),
|
|
474
474
|
p("div", {
|
|
475
475
|
class: _([t.padded ? t.paddedClass : ""])
|
|
476
476
|
}, [
|
|
477
|
-
|
|
477
|
+
z(n.$slots, "default")
|
|
478
478
|
], 2),
|
|
479
479
|
n.$slots.footer ? (g(), y("div", ks, [
|
|
480
|
-
|
|
480
|
+
z(n.$slots, "footer")
|
|
481
481
|
])) : R("", !0)
|
|
482
482
|
]));
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
class Rs {
|
|
486
486
|
constructor() {
|
|
487
|
-
this.state =
|
|
487
|
+
this.state = oe({
|
|
488
488
|
isVisible: !1,
|
|
489
489
|
content: null,
|
|
490
490
|
props: {},
|
|
@@ -498,17 +498,17 @@ class Rs {
|
|
|
498
498
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
-
const
|
|
501
|
+
const ue = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Os = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, As = {
|
|
502
502
|
__name: "SparkModalContainer",
|
|
503
503
|
setup(e) {
|
|
504
504
|
return (t, n) => (g(), Y(x(kt), {
|
|
505
505
|
as: "template",
|
|
506
|
-
show: x(
|
|
506
|
+
show: x(ue).state.isVisible
|
|
507
507
|
}, {
|
|
508
508
|
default: O(() => [
|
|
509
509
|
v(x(Rt), {
|
|
510
510
|
class: "relative z-200",
|
|
511
|
-
onClose: x(
|
|
511
|
+
onClose: x(ue).hide
|
|
512
512
|
}, {
|
|
513
513
|
default: O(() => [
|
|
514
514
|
v(x(_e), {
|
|
@@ -539,7 +539,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
539
539
|
default: O(() => [
|
|
540
540
|
v(x(Et), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
|
|
541
541
|
default: O(() => [
|
|
542
|
-
(g(), Y(St(x(
|
|
542
|
+
(g(), Y(St(x(ue).state.content), vt(x(ue).state.props, Ct(x(ue).state.eventHandlers)), null, 16))
|
|
543
543
|
]),
|
|
544
544
|
_: 1
|
|
545
545
|
})
|
|
@@ -555,10 +555,10 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
555
555
|
_: 1
|
|
556
556
|
}, 8, ["show"]));
|
|
557
557
|
}
|
|
558
|
-
},
|
|
558
|
+
}, Ts = { class: "px-4 pt-5 pb-4 sm:p-6" }, $s = {
|
|
559
559
|
key: 0,
|
|
560
560
|
class: "text-lg font-medium text-gray-900"
|
|
561
|
-
},
|
|
561
|
+
}, Oa = {
|
|
562
562
|
__name: "SparkModalDialog",
|
|
563
563
|
props: {
|
|
564
564
|
title: {
|
|
@@ -608,7 +608,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
608
608
|
"input"
|
|
609
609
|
],
|
|
610
610
|
setup(e) {
|
|
611
|
-
const t = e, n =
|
|
611
|
+
const t = e, n = T(() => !t.buttons || t.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : t.buttons), s = T(() => {
|
|
612
612
|
switch (n.value.length) {
|
|
613
613
|
case 1:
|
|
614
614
|
return "sm:grid sm:grid-flow-row-dense";
|
|
@@ -624,12 +624,12 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
624
624
|
success: "farCheckCircle",
|
|
625
625
|
warning: "farExclamationTriangle",
|
|
626
626
|
danger: "farCircleXmark"
|
|
627
|
-
}, a =
|
|
627
|
+
}, a = T(() => t.icon || r[t.type]), o = T(() => ({
|
|
628
628
|
info: "bg-blue-100",
|
|
629
629
|
success: "bg-green-100",
|
|
630
630
|
warning: "bg-yellow-100",
|
|
631
631
|
danger: "bg-red-100"
|
|
632
|
-
})[t.type]), c =
|
|
632
|
+
})[t.type]), c = T(() => ({
|
|
633
633
|
info: "text-blue-400",
|
|
634
634
|
success: "text-green-400",
|
|
635
635
|
warning: "text-yellow-400",
|
|
@@ -637,7 +637,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
637
637
|
})[t.type]);
|
|
638
638
|
return (l, i) => {
|
|
639
639
|
const d = V("font-awesome-icon");
|
|
640
|
-
return g(), y("div",
|
|
640
|
+
return g(), y("div", Ts, [
|
|
641
641
|
a.value ? (g(), y("div", {
|
|
642
642
|
key: 0,
|
|
643
643
|
class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
|
|
@@ -650,7 +650,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
650
650
|
p("div", {
|
|
651
651
|
class: _(["text-center", { "mt-3 sm:mt-5": a.value }])
|
|
652
652
|
}, [
|
|
653
|
-
e.title ? (g(), y("h3",
|
|
653
|
+
e.title ? (g(), y("h3", $s, F(e.title), 1)) : R("", !0),
|
|
654
654
|
e.message ? (g(), y("div", {
|
|
655
655
|
key: 1,
|
|
656
656
|
class: _([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
@@ -659,13 +659,13 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
659
659
|
p("div", {
|
|
660
660
|
class: _(["mt-5 sm:mt-6", s.value])
|
|
661
661
|
}, [
|
|
662
|
-
(g(!0), y(
|
|
662
|
+
(g(!0), y(se, null, fe(n.value, (f, b) => (g(), Y(x(Ae), {
|
|
663
663
|
key: b,
|
|
664
664
|
variant: f.variant,
|
|
665
665
|
onClick: (E) => l.$emit(f.event, f)
|
|
666
666
|
}, {
|
|
667
667
|
default: O(() => [
|
|
668
|
-
|
|
668
|
+
qe(F(f.text), 1)
|
|
669
669
|
]),
|
|
670
670
|
_: 2
|
|
671
671
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -687,7 +687,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
setup(e) {
|
|
690
|
-
const t =
|
|
690
|
+
const t = q(null);
|
|
691
691
|
return (n, s) => (g(), Y(x(kt), {
|
|
692
692
|
show: e.overlayInstance.state.isVisible,
|
|
693
693
|
as: "template"
|
|
@@ -750,7 +750,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
750
750
|
}
|
|
751
751
|
};
|
|
752
752
|
function st() {
|
|
753
|
-
const e =
|
|
753
|
+
const e = oe({
|
|
754
754
|
isVisible: !1,
|
|
755
755
|
content: null,
|
|
756
756
|
props: {},
|
|
@@ -807,7 +807,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
807
807
|
}, Ms = ["href", "onClick"], Is = {
|
|
808
808
|
key: 1,
|
|
809
809
|
class: "text-[13px]"
|
|
810
|
-
},
|
|
810
|
+
}, zs = { class: "mt-auto" }, qs = { class: "p-[10px] flex-shrink-0" }, Ws = { class: "flex flex-1 items-center gap-x-6" }, Js = { class: "relative flex flex-1 items-center gap-4" }, Ks = { class: "cursor-pointer" }, Gs = ["src"], Zs = { class: "ml-auto" }, Xs = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Aa = {
|
|
811
811
|
__name: "SparkDefaultContainer",
|
|
812
812
|
props: {
|
|
813
813
|
appStore: {
|
|
@@ -834,10 +834,10 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
);
|
|
837
|
-
}, a =
|
|
837
|
+
}, a = T(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), o = T(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
838
838
|
return (c, l) => {
|
|
839
839
|
const i = V("font-awesome-icon"), d = V("router-view");
|
|
840
|
-
return g(), y(
|
|
840
|
+
return g(), y(se, null, [
|
|
841
841
|
p("div", {
|
|
842
842
|
class: _([a.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
843
843
|
}, [
|
|
@@ -849,7 +849,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
849
849
|
p("li", Us, [
|
|
850
850
|
p("a", {
|
|
851
851
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
852
|
-
onClick: l[0] || (l[0] =
|
|
852
|
+
onClick: l[0] || (l[0] = ce((f) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
853
853
|
}, [
|
|
854
854
|
v(i, {
|
|
855
855
|
icon: x(N)[e.appStore.state.icon],
|
|
@@ -858,11 +858,11 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
858
858
|
]),
|
|
859
859
|
e.mainNavStore.state.collapsed ? R("", !0) : (g(), y("a", {
|
|
860
860
|
key: 0,
|
|
861
|
-
onClick: l[1] || (l[1] =
|
|
861
|
+
onClick: l[1] || (l[1] = ce((f) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
862
862
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
863
863
|
}, F(e.appStore.state.app), 1))
|
|
864
864
|
]),
|
|
865
|
-
(g(!0), y(
|
|
865
|
+
(g(!0), y(se, null, fe(e.mainNavStore.state.menu, (f) => (g(), y("li", {
|
|
866
866
|
key: f.name,
|
|
867
867
|
class: _({
|
|
868
868
|
"mt-[10px]": f.children
|
|
@@ -874,7 +874,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
874
874
|
"hover:bg-gray-100": f?.href
|
|
875
875
|
}, "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
|
|
876
876
|
href: f?.href,
|
|
877
|
-
onClick:
|
|
877
|
+
onClick: ce((b) => e.mainNavStore.goto(f.href), ["prevent"])
|
|
878
878
|
}, [
|
|
879
879
|
f.icon ? (g(), Y(i, {
|
|
880
880
|
key: 0,
|
|
@@ -894,13 +894,13 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
894
894
|
}, F(f.name), 3))
|
|
895
895
|
], 10, Vs),
|
|
896
896
|
f.children ? (g(), y("ul", js, [
|
|
897
|
-
(g(!0), y(
|
|
897
|
+
(g(!0), y(se, null, fe(f.children, (b) => (g(), y("li", {
|
|
898
898
|
key: b.name
|
|
899
899
|
}, [
|
|
900
900
|
p("a", {
|
|
901
901
|
class: _([[b.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
|
|
902
902
|
href: b.href,
|
|
903
|
-
onClick:
|
|
903
|
+
onClick: ce((E) => e.mainNavStore.goto(b.href), ["prevent"])
|
|
904
904
|
}, [
|
|
905
905
|
b.icon ? (g(), Y(i, {
|
|
906
906
|
key: 0,
|
|
@@ -914,12 +914,12 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
914
914
|
], 2))), 128))
|
|
915
915
|
])
|
|
916
916
|
]),
|
|
917
|
-
p("li",
|
|
918
|
-
|
|
917
|
+
p("li", zs, [
|
|
918
|
+
z(c.$slots, "sidebar-footer"),
|
|
919
919
|
p("a", {
|
|
920
920
|
class: "font-medium grid place-content-center gap-x-3 rounded-md h-10 p-2.5 text-gray-800 text-[13px] hover:bg-gray-100 transition-all duration-300 ease-in-out",
|
|
921
921
|
href: "#",
|
|
922
|
-
onClick: l[2] || (l[2] =
|
|
922
|
+
onClick: l[2] || (l[2] = ce((f) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
923
923
|
}, [
|
|
924
924
|
v(i, {
|
|
925
925
|
icon: x(N)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
@@ -934,10 +934,10 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
934
934
|
p("div", {
|
|
935
935
|
class: _([o.value, "h-full transition-all flex flex-col"])
|
|
936
936
|
}, [
|
|
937
|
-
p("div",
|
|
938
|
-
p("div",
|
|
939
|
-
p("div",
|
|
940
|
-
|
|
937
|
+
p("div", qs, [
|
|
938
|
+
p("div", Ws, [
|
|
939
|
+
p("div", Js, [
|
|
940
|
+
z(c.$slots, "header-left", {}, () => [
|
|
941
941
|
p("div", Ks, [
|
|
942
942
|
v(i, {
|
|
943
943
|
icon: x(N).farBarsSort,
|
|
@@ -946,7 +946,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
946
946
|
}, null, 8, ["icon"])
|
|
947
947
|
])
|
|
948
948
|
]),
|
|
949
|
-
|
|
949
|
+
z(c.$slots, "header-center", {}, () => [
|
|
950
950
|
e.appStore.state.showBrandSelector ? (g(), y("div", {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
@@ -961,7 +961,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
961
961
|
])) : R("", !0)
|
|
962
962
|
]),
|
|
963
963
|
p("div", Zs, [
|
|
964
|
-
|
|
964
|
+
z(c.$slots, "header-right", {}, () => [
|
|
965
965
|
e.appStore.state.showAppSelector ? (g(), y("button", {
|
|
966
966
|
key: 0,
|
|
967
967
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
@@ -1008,51 +1008,51 @@ function tr(e, t) {
|
|
|
1008
1008
|
v(n)
|
|
1009
1009
|
]);
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1011
|
+
const Ta = /* @__PURE__ */ Qs(Ys, [["render", tr]]);
|
|
1012
1012
|
function At(e, t) {
|
|
1013
1013
|
return function() {
|
|
1014
1014
|
return e.apply(t, arguments);
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
const { toString: nr } = Object.prototype, { getPrototypeOf:
|
|
1017
|
+
const { toString: nr } = Object.prototype, { getPrototypeOf: We } = Object, { iterator: Te, toStringTag: Tt } = Symbol, $e = /* @__PURE__ */ ((e) => (t) => {
|
|
1018
1018
|
const n = nr.call(t);
|
|
1019
1019
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1020
|
-
})(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) =>
|
|
1021
|
-
function
|
|
1022
|
-
return e !== null && !
|
|
1020
|
+
})(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => $e(t) === e), Le = (e) => (t) => typeof t === e, { isArray: ae } = Array, re = Le("undefined");
|
|
1021
|
+
function pe(e) {
|
|
1022
|
+
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const $t = j("ArrayBuffer");
|
|
1025
1025
|
function sr(e) {
|
|
1026
1026
|
let t;
|
|
1027
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
1027
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && $t(e.buffer), t;
|
|
1028
1028
|
}
|
|
1029
|
-
const rr = Le("string"), P = Le("function"), Lt = Le("number"),
|
|
1030
|
-
if (
|
|
1029
|
+
const rr = Le("string"), P = Le("function"), Lt = Le("number"), he = (e) => e !== null && typeof e == "object", or = (e) => e === !0 || e === !1, Se = (e) => {
|
|
1030
|
+
if ($e(e) !== "object")
|
|
1031
1031
|
return !1;
|
|
1032
|
-
const t =
|
|
1033
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
1032
|
+
const t = We(e);
|
|
1033
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Tt in e) && !(Te in e);
|
|
1034
1034
|
}, ar = (e) => {
|
|
1035
|
-
if (!
|
|
1035
|
+
if (!he(e) || pe(e))
|
|
1036
1036
|
return !1;
|
|
1037
1037
|
try {
|
|
1038
1038
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
1039
1039
|
} catch {
|
|
1040
1040
|
return !1;
|
|
1041
1041
|
}
|
|
1042
|
-
}, ir = j("Date"), lr = j("File"), cr = j("Blob"), ur = j("FileList"), dr = (e) =>
|
|
1042
|
+
}, ir = j("Date"), lr = j("File"), cr = j("Blob"), ur = j("FileList"), dr = (e) => he(e) && P(e.pipe), fr = (e) => {
|
|
1043
1043
|
let t;
|
|
1044
|
-
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t =
|
|
1044
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = $e(e)) === "formdata" || // detect form-data instance
|
|
1045
1045
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
1046
|
-
}, pr = j("URLSearchParams"), [
|
|
1046
|
+
}, pr = j("URLSearchParams"), [hr, mr, gr, yr] = ["ReadableStream", "Request", "Response", "Headers"].map(j), wr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1047
1047
|
function me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1048
1048
|
if (e === null || typeof e > "u")
|
|
1049
1049
|
return;
|
|
1050
1050
|
let s, r;
|
|
1051
|
-
if (typeof e != "object" && (e = [e]),
|
|
1051
|
+
if (typeof e != "object" && (e = [e]), ae(e))
|
|
1052
1052
|
for (s = 0, r = e.length; s < r; s++)
|
|
1053
1053
|
t.call(null, e[s], s, e);
|
|
1054
1054
|
else {
|
|
1055
|
-
if (
|
|
1055
|
+
if (pe(e))
|
|
1056
1056
|
return;
|
|
1057
1057
|
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = a.length;
|
|
1058
1058
|
let c;
|
|
@@ -1061,7 +1061,7 @@ function me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
function Ft(e, t) {
|
|
1064
|
-
if (
|
|
1064
|
+
if (pe(e))
|
|
1065
1065
|
return null;
|
|
1066
1066
|
t = t.toLowerCase();
|
|
1067
1067
|
const n = Object.keys(e);
|
|
@@ -1071,11 +1071,11 @@ function Ft(e, t) {
|
|
|
1071
1071
|
return r;
|
|
1072
1072
|
return null;
|
|
1073
1073
|
}
|
|
1074
|
-
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Bt = (e) => !
|
|
1074
|
+
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Bt = (e) => !re(e) && e !== X;
|
|
1075
1075
|
function je() {
|
|
1076
1076
|
const { caseless: e, skipUndefined: t } = Bt(this) && this || {}, n = {}, s = (r, a) => {
|
|
1077
1077
|
const o = e && Ft(n, a) || a;
|
|
1078
|
-
Se(n[o]) && Se(r) ? n[o] = je(n[o], r) : Se(r) ? n[o] = je({}, r) :
|
|
1078
|
+
Se(n[o]) && Se(r) ? n[o] = je(n[o], r) : Se(r) ? n[o] = je({}, r) : ae(r) ? n[o] = r.slice() : (!t || !re(r)) && (n[o] = r);
|
|
1079
1079
|
};
|
|
1080
1080
|
for (let r = 0, a = arguments.length; r < a; r++)
|
|
1081
1081
|
arguments[r] && me(arguments[r], s);
|
|
@@ -1094,7 +1094,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1094
1094
|
do {
|
|
1095
1095
|
for (r = Object.getOwnPropertyNames(e), a = r.length; a-- > 0; )
|
|
1096
1096
|
o = r[a], (!s || s(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
1097
|
-
e = n !== !1 &&
|
|
1097
|
+
e = n !== !1 && We(e);
|
|
1098
1098
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
1099
1099
|
return t;
|
|
1100
1100
|
}, Cr = (e, t, n) => {
|
|
@@ -1103,15 +1103,15 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1103
1103
|
return s !== -1 && s === n;
|
|
1104
1104
|
}, _r = (e) => {
|
|
1105
1105
|
if (!e) return null;
|
|
1106
|
-
if (
|
|
1106
|
+
if (ae(e)) return e;
|
|
1107
1107
|
let t = e.length;
|
|
1108
1108
|
if (!Lt(t)) return null;
|
|
1109
1109
|
const n = new Array(t);
|
|
1110
1110
|
for (; t-- > 0; )
|
|
1111
1111
|
n[t] = e[t];
|
|
1112
1112
|
return n;
|
|
1113
|
-
}, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
1114
|
-
const s = (e && e[
|
|
1113
|
+
}, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && We(Uint8Array)), Rr = (e, t) => {
|
|
1114
|
+
const s = (e && e[Te]).call(e);
|
|
1115
1115
|
let r;
|
|
1116
1116
|
for (; (r = s.next()) && !r.done; ) {
|
|
1117
1117
|
const a = r.value;
|
|
@@ -1128,13 +1128,13 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1128
1128
|
function(n, s, r) {
|
|
1129
1129
|
return s.toUpperCase() + r;
|
|
1130
1130
|
}
|
|
1131
|
-
), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
1131
|
+
), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tr = j("RegExp"), Nt = (e, t) => {
|
|
1132
1132
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
1133
1133
|
me(n, (r, a) => {
|
|
1134
1134
|
let o;
|
|
1135
1135
|
(o = t(r, a, e)) !== !1 && (s[a] = o || r);
|
|
1136
1136
|
}), Object.defineProperties(e, s);
|
|
1137
|
-
},
|
|
1137
|
+
}, $r = (e) => {
|
|
1138
1138
|
Nt(e, (t, n) => {
|
|
1139
1139
|
if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1140
1140
|
return !1;
|
|
@@ -1155,59 +1155,59 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1155
1155
|
n[a] = !0;
|
|
1156
1156
|
});
|
|
1157
1157
|
};
|
|
1158
|
-
return
|
|
1158
|
+
return ae(e) ? s(e) : s(String(e).split(t)), n;
|
|
1159
1159
|
}, Fr = () => {
|
|
1160
1160
|
}, Br = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1161
1161
|
function Nr(e) {
|
|
1162
|
-
return !!(e && P(e.append) && e[
|
|
1162
|
+
return !!(e && P(e.append) && e[Tt] === "FormData" && e[Te]);
|
|
1163
1163
|
}
|
|
1164
1164
|
const Pr = (e) => {
|
|
1165
1165
|
const t = new Array(10), n = (s, r) => {
|
|
1166
|
-
if (
|
|
1166
|
+
if (he(s)) {
|
|
1167
1167
|
if (t.indexOf(s) >= 0)
|
|
1168
1168
|
return;
|
|
1169
|
-
if (
|
|
1169
|
+
if (pe(s))
|
|
1170
1170
|
return s;
|
|
1171
1171
|
if (!("toJSON" in s)) {
|
|
1172
1172
|
t[r] = s;
|
|
1173
|
-
const a =
|
|
1173
|
+
const a = ae(s) ? [] : {};
|
|
1174
1174
|
return me(s, (o, c) => {
|
|
1175
1175
|
const l = n(o, r + 1);
|
|
1176
|
-
!
|
|
1176
|
+
!re(l) && (a[c] = l);
|
|
1177
1177
|
}), t[r] = void 0, a;
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
return s;
|
|
1181
1181
|
};
|
|
1182
1182
|
return n(e, 0);
|
|
1183
|
-
}, Hr = j("AsyncFunction"), Ur = (e) => e && (
|
|
1183
|
+
}, Hr = j("AsyncFunction"), Ur = (e) => e && (he(e) || P(e)) && P(e.then) && P(e.catch), Pt = ((e, t) => e ? setImmediate : t ? ((n, s) => (X.addEventListener("message", ({ source: r, data: a }) => {
|
|
1184
1184
|
r === X && a === n && s.length && s.shift()();
|
|
1185
1185
|
}, !1), (r) => {
|
|
1186
1186
|
s.push(r), X.postMessage(n, "*");
|
|
1187
1187
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
1188
1188
|
typeof setImmediate == "function",
|
|
1189
1189
|
P(X.postMessage)
|
|
1190
|
-
), Vr = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || Pt, Dr = (e) => e != null && P(e[
|
|
1191
|
-
isArray:
|
|
1192
|
-
isArrayBuffer:
|
|
1193
|
-
isBuffer:
|
|
1190
|
+
), Vr = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || Pt, Dr = (e) => e != null && P(e[Te]), u = {
|
|
1191
|
+
isArray: ae,
|
|
1192
|
+
isArrayBuffer: $t,
|
|
1193
|
+
isBuffer: pe,
|
|
1194
1194
|
isFormData: fr,
|
|
1195
1195
|
isArrayBufferView: sr,
|
|
1196
1196
|
isString: rr,
|
|
1197
1197
|
isNumber: Lt,
|
|
1198
1198
|
isBoolean: or,
|
|
1199
|
-
isObject:
|
|
1199
|
+
isObject: he,
|
|
1200
1200
|
isPlainObject: Se,
|
|
1201
1201
|
isEmptyObject: ar,
|
|
1202
|
-
isReadableStream:
|
|
1203
|
-
isRequest:
|
|
1202
|
+
isReadableStream: hr,
|
|
1203
|
+
isRequest: mr,
|
|
1204
1204
|
isResponse: gr,
|
|
1205
1205
|
isHeaders: yr,
|
|
1206
|
-
isUndefined:
|
|
1206
|
+
isUndefined: re,
|
|
1207
1207
|
isDate: ir,
|
|
1208
1208
|
isFile: lr,
|
|
1209
1209
|
isBlob: cr,
|
|
1210
|
-
isRegExp:
|
|
1210
|
+
isRegExp: Tr,
|
|
1211
1211
|
isFunction: P,
|
|
1212
1212
|
isStream: dr,
|
|
1213
1213
|
isURLSearchParams: pr,
|
|
@@ -1220,7 +1220,7 @@ const Pr = (e) => {
|
|
|
1220
1220
|
stripBOM: xr,
|
|
1221
1221
|
inherits: Sr,
|
|
1222
1222
|
toFlatObject: vr,
|
|
1223
|
-
kindOf:
|
|
1223
|
+
kindOf: $e,
|
|
1224
1224
|
kindOfTest: j,
|
|
1225
1225
|
endsWith: Cr,
|
|
1226
1226
|
toArray: _r,
|
|
@@ -1231,7 +1231,7 @@ const Pr = (e) => {
|
|
|
1231
1231
|
hasOwnProp: rt,
|
|
1232
1232
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1233
1233
|
reduceDescriptors: Nt,
|
|
1234
|
-
freezeMethods:
|
|
1234
|
+
freezeMethods: $r,
|
|
1235
1235
|
toObjectSet: Lr,
|
|
1236
1236
|
toCamelCase: Ar,
|
|
1237
1237
|
noop: Fr,
|
|
@@ -1324,28 +1324,28 @@ function Fe(e, t, n) {
|
|
|
1324
1324
|
metaTokens: !0,
|
|
1325
1325
|
dots: !1,
|
|
1326
1326
|
indexes: !1
|
|
1327
|
-
}, !1, function(w,
|
|
1328
|
-
return !u.isUndefined(
|
|
1327
|
+
}, !1, function(w, m) {
|
|
1328
|
+
return !u.isUndefined(m[w]);
|
|
1329
1329
|
});
|
|
1330
1330
|
const s = n.metaTokens, r = n.visitor || d, a = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
1331
1331
|
if (!u.isFunction(r))
|
|
1332
1332
|
throw new TypeError("visitor must be a function");
|
|
1333
|
-
function i(
|
|
1334
|
-
if (
|
|
1335
|
-
if (u.isDate(
|
|
1336
|
-
return
|
|
1337
|
-
if (u.isBoolean(
|
|
1338
|
-
return
|
|
1339
|
-
if (!l && u.isBlob(
|
|
1333
|
+
function i(h) {
|
|
1334
|
+
if (h === null) return "";
|
|
1335
|
+
if (u.isDate(h))
|
|
1336
|
+
return h.toISOString();
|
|
1337
|
+
if (u.isBoolean(h))
|
|
1338
|
+
return h.toString();
|
|
1339
|
+
if (!l && u.isBlob(h))
|
|
1340
1340
|
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
1341
|
-
return u.isArrayBuffer(
|
|
1341
|
+
return u.isArrayBuffer(h) || u.isTypedArray(h) ? l && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
1342
1342
|
}
|
|
1343
|
-
function d(
|
|
1344
|
-
let k =
|
|
1345
|
-
if (
|
|
1343
|
+
function d(h, w, m) {
|
|
1344
|
+
let k = h;
|
|
1345
|
+
if (h && !m && typeof h == "object") {
|
|
1346
1346
|
if (u.endsWith(w, "{}"))
|
|
1347
|
-
w = s ? w : w.slice(0, -2),
|
|
1348
|
-
else if (u.isArray(
|
|
1347
|
+
w = s ? w : w.slice(0, -2), h = JSON.stringify(h);
|
|
1348
|
+
else if (u.isArray(h) && Mr(h) || (u.isFileList(h) || u.endsWith(w, "[]")) && (k = u.toArray(h)))
|
|
1349
1349
|
return w = Vt(w), k.forEach(function(A, B) {
|
|
1350
1350
|
!(u.isUndefined(A) || A === null) && t.append(
|
|
1351
1351
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -1354,25 +1354,25 @@ function Fe(e, t, n) {
|
|
|
1354
1354
|
);
|
|
1355
1355
|
}), !1;
|
|
1356
1356
|
}
|
|
1357
|
-
return Me(
|
|
1357
|
+
return Me(h) ? !0 : (t.append(ot(m, w, a), i(h)), !1);
|
|
1358
1358
|
}
|
|
1359
1359
|
const f = [], b = Object.assign(Ir, {
|
|
1360
1360
|
defaultVisitor: d,
|
|
1361
1361
|
convertValue: i,
|
|
1362
1362
|
isVisitable: Me
|
|
1363
1363
|
});
|
|
1364
|
-
function E(
|
|
1365
|
-
if (!u.isUndefined(
|
|
1366
|
-
if (f.indexOf(
|
|
1364
|
+
function E(h, w) {
|
|
1365
|
+
if (!u.isUndefined(h)) {
|
|
1366
|
+
if (f.indexOf(h) !== -1)
|
|
1367
1367
|
throw Error("Circular reference detected in " + w.join("."));
|
|
1368
|
-
f.push(
|
|
1368
|
+
f.push(h), u.forEach(h, function(k, $) {
|
|
1369
1369
|
(!(u.isUndefined(k) || k === null) && r.call(
|
|
1370
1370
|
t,
|
|
1371
1371
|
k,
|
|
1372
|
-
u.isString(
|
|
1372
|
+
u.isString($) ? $.trim() : $,
|
|
1373
1373
|
w,
|
|
1374
1374
|
b
|
|
1375
|
-
)) === !0 && E(k, w ? w.concat(
|
|
1375
|
+
)) === !0 && E(k, w ? w.concat($) : [$]);
|
|
1376
1376
|
}), f.pop();
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
@@ -1394,10 +1394,10 @@ function at(e) {
|
|
|
1394
1394
|
return t[s];
|
|
1395
1395
|
});
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Je(e, t) {
|
|
1398
1398
|
this._pairs = [], e && Fe(e, this, t);
|
|
1399
1399
|
}
|
|
1400
|
-
const Dt =
|
|
1400
|
+
const Dt = Je.prototype;
|
|
1401
1401
|
Dt.append = function(t, n) {
|
|
1402
1402
|
this._pairs.push([t, n]);
|
|
1403
1403
|
};
|
|
@@ -1409,19 +1409,19 @@ Dt.toString = function(t) {
|
|
|
1409
1409
|
return n(r[0]) + "=" + n(r[1]);
|
|
1410
1410
|
}, "").join("&");
|
|
1411
1411
|
};
|
|
1412
|
-
function
|
|
1412
|
+
function zr(e) {
|
|
1413
1413
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1414
1414
|
}
|
|
1415
1415
|
function jt(e, t, n) {
|
|
1416
1416
|
if (!t)
|
|
1417
1417
|
return e;
|
|
1418
|
-
const s = n && n.encode ||
|
|
1418
|
+
const s = n && n.encode || zr;
|
|
1419
1419
|
u.isFunction(n) && (n = {
|
|
1420
1420
|
serialize: n
|
|
1421
1421
|
});
|
|
1422
1422
|
const r = n && n.serialize;
|
|
1423
1423
|
let a;
|
|
1424
|
-
if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new
|
|
1424
|
+
if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new Je(t, n).toString(s), a) {
|
|
1425
1425
|
const o = e.indexOf("#");
|
|
1426
1426
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
|
|
1427
1427
|
}
|
|
@@ -1485,12 +1485,12 @@ const Mt = {
|
|
|
1485
1485
|
silentJSONParsing: !0,
|
|
1486
1486
|
forcedJSONParsing: !0,
|
|
1487
1487
|
clarifyTimeoutError: !1
|
|
1488
|
-
},
|
|
1488
|
+
}, qr = typeof URLSearchParams < "u" ? URLSearchParams : Je, Wr = typeof FormData < "u" ? FormData : null, Jr = typeof Blob < "u" ? Blob : null, Kr = {
|
|
1489
1489
|
isBrowser: !0,
|
|
1490
1490
|
classes: {
|
|
1491
|
-
URLSearchParams:
|
|
1492
|
-
FormData:
|
|
1493
|
-
Blob:
|
|
1491
|
+
URLSearchParams: qr,
|
|
1492
|
+
FormData: Wr,
|
|
1493
|
+
Blob: Jr
|
|
1494
1494
|
},
|
|
1495
1495
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1496
1496
|
}, Ke = typeof window < "u" && typeof document < "u", Ie = typeof navigator == "object" && navigator || void 0, Gr = Ke && (!Ie || ["ReactNative", "NativeScript", "NS"].indexOf(Ie.product) < 0), Zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
@@ -1550,7 +1550,7 @@ function no(e, t, n) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
return (n || JSON.stringify)(e);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const ge = {
|
|
1554
1554
|
transitional: Mt,
|
|
1555
1555
|
adapter: ["xhr", "http", "fetch"],
|
|
1556
1556
|
transformRequest: [function(t, n) {
|
|
@@ -1579,7 +1579,7 @@ const he = {
|
|
|
1579
1579
|
return a || r ? (n.setContentType("application/json", !1), no(t)) : t;
|
|
1580
1580
|
}],
|
|
1581
1581
|
transformResponse: [function(t) {
|
|
1582
|
-
const n = this.transitional ||
|
|
1582
|
+
const n = this.transitional || ge.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
1583
1583
|
if (u.isResponse(t) || u.isReadableStream(t))
|
|
1584
1584
|
return t;
|
|
1585
1585
|
if (t && u.isString(t) && (s && !this.responseType || r)) {
|
|
@@ -1617,7 +1617,7 @@ const he = {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
};
|
|
1619
1619
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1620
|
-
|
|
1620
|
+
ge.headers[e] = {};
|
|
1621
1621
|
});
|
|
1622
1622
|
const so = u.toObjectSet([
|
|
1623
1623
|
"age",
|
|
@@ -1645,7 +1645,7 @@ const so = u.toObjectSet([
|
|
|
1645
1645
|
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && so[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
1646
1646
|
}), t;
|
|
1647
1647
|
}, lt = Symbol("internals");
|
|
1648
|
-
function
|
|
1648
|
+
function de(e) {
|
|
1649
1649
|
return e && String(e).trim().toLowerCase();
|
|
1650
1650
|
}
|
|
1651
1651
|
function ve(e) {
|
|
@@ -1690,7 +1690,7 @@ let H = class {
|
|
|
1690
1690
|
set(t, n, s) {
|
|
1691
1691
|
const r = this;
|
|
1692
1692
|
function a(c, l, i) {
|
|
1693
|
-
const d =
|
|
1693
|
+
const d = de(l);
|
|
1694
1694
|
if (!d)
|
|
1695
1695
|
throw new Error("header name must be a non-empty string");
|
|
1696
1696
|
const f = u.findKey(r, d);
|
|
@@ -1714,7 +1714,7 @@ let H = class {
|
|
|
1714
1714
|
return this;
|
|
1715
1715
|
}
|
|
1716
1716
|
get(t, n) {
|
|
1717
|
-
if (t =
|
|
1717
|
+
if (t = de(t), t) {
|
|
1718
1718
|
const s = u.findKey(this, t);
|
|
1719
1719
|
if (s) {
|
|
1720
1720
|
const r = this[s];
|
|
@@ -1731,7 +1731,7 @@ let H = class {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
has(t, n) {
|
|
1734
|
-
if (t =
|
|
1734
|
+
if (t = de(t), t) {
|
|
1735
1735
|
const s = u.findKey(this, t);
|
|
1736
1736
|
return !!(s && this[s] !== void 0 && (!n || He(this, this[s], s, n)));
|
|
1737
1737
|
}
|
|
@@ -1741,7 +1741,7 @@ let H = class {
|
|
|
1741
1741
|
const s = this;
|
|
1742
1742
|
let r = !1;
|
|
1743
1743
|
function a(o) {
|
|
1744
|
-
if (o =
|
|
1744
|
+
if (o = de(o), o) {
|
|
1745
1745
|
const c = u.findKey(s, o);
|
|
1746
1746
|
c && (!n || He(s, s[c], c, n)) && (delete s[c], r = !0);
|
|
1747
1747
|
}
|
|
@@ -1803,7 +1803,7 @@ let H = class {
|
|
|
1803
1803
|
accessors: {}
|
|
1804
1804
|
}).accessors, r = this.prototype;
|
|
1805
1805
|
function a(o) {
|
|
1806
|
-
const c =
|
|
1806
|
+
const c = de(o);
|
|
1807
1807
|
s[c] || (lo(r, o), s[c] = !0);
|
|
1808
1808
|
}
|
|
1809
1809
|
return u.isArray(t) ? t.forEach(a) : a(t), this;
|
|
@@ -1821,22 +1821,22 @@ u.reduceDescriptors(H.prototype, ({ value: e }, t) => {
|
|
|
1821
1821
|
});
|
|
1822
1822
|
u.freezeMethods(H);
|
|
1823
1823
|
function Ue(e, t) {
|
|
1824
|
-
const n = this ||
|
|
1824
|
+
const n = this || ge, s = t || n, r = H.from(s.headers);
|
|
1825
1825
|
let a = s.data;
|
|
1826
1826
|
return u.forEach(e, function(c) {
|
|
1827
1827
|
a = c.call(n, a, r.normalize(), t ? t.status : void 0);
|
|
1828
1828
|
}), r.normalize(), a;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function zt(e) {
|
|
1831
1831
|
return !!(e && e.__CANCEL__);
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function ie(e, t, n) {
|
|
1834
1834
|
S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1835
1835
|
}
|
|
1836
|
-
u.inherits(
|
|
1836
|
+
u.inherits(ie, S, {
|
|
1837
1837
|
__CANCEL__: !0
|
|
1838
1838
|
});
|
|
1839
|
-
function
|
|
1839
|
+
function qt(e, t, n) {
|
|
1840
1840
|
const s = n.config.validateStatus;
|
|
1841
1841
|
!n.status || !s || s(n.status) ? e(n) : t(new S(
|
|
1842
1842
|
"Request failed with status code " + n.status,
|
|
@@ -1907,7 +1907,7 @@ const ke = (e, t, n = 3) => {
|
|
|
1907
1907
|
}, ut = (e) => (...t) => u.asap(() => e(...t)), po = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, L.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1908
1908
|
new URL(L.origin),
|
|
1909
1909
|
L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
|
|
1910
|
-
) : () => !0,
|
|
1910
|
+
) : () => !0, ho = L.hasStandardBrowserEnv ? (
|
|
1911
1911
|
// Standard browser envs support document.cookie
|
|
1912
1912
|
{
|
|
1913
1913
|
write(e, t, n, s, r, a, o) {
|
|
@@ -1936,14 +1936,14 @@ const ke = (e, t, n = 3) => {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
1938
|
);
|
|
1939
|
-
function
|
|
1939
|
+
function mo(e) {
|
|
1940
1940
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1941
1941
|
}
|
|
1942
1942
|
function go(e, t) {
|
|
1943
1943
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1946
|
-
let s = !
|
|
1945
|
+
function Wt(e, t, n) {
|
|
1946
|
+
let s = !mo(t);
|
|
1947
1947
|
return e && (s || n == !1) ? go(e, t) : t;
|
|
1948
1948
|
}
|
|
1949
1949
|
const dt = (e) => e instanceof H ? { ...e } : e;
|
|
@@ -2011,10 +2011,10 @@ function ee(e, t) {
|
|
|
2011
2011
|
u.isUndefined(b) && f !== c || (n[d] = b);
|
|
2012
2012
|
}), n;
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2014
|
+
const Jt = (e) => {
|
|
2015
2015
|
const t = ee({}, e);
|
|
2016
2016
|
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: a, headers: o, auth: c } = t;
|
|
2017
|
-
if (t.headers = o = H.from(o), t.url = jt(
|
|
2017
|
+
if (t.headers = o = H.from(o), t.url = jt(Wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
2018
2018
|
"Authorization",
|
|
2019
2019
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
2020
2020
|
), u.isFormData(n)) {
|
|
@@ -2028,67 +2028,67 @@ const Wt = (e) => {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
if (L.hasStandardBrowserEnv && (s && u.isFunction(s) && (s = s(t)), s || s !== !1 && po(t.url))) {
|
|
2031
|
-
const l = r && a &&
|
|
2031
|
+
const l = r && a && ho.read(a);
|
|
2032
2032
|
l && o.set(r, l);
|
|
2033
2033
|
}
|
|
2034
2034
|
return t;
|
|
2035
2035
|
}, yo = typeof XMLHttpRequest < "u", wo = yo && function(e) {
|
|
2036
2036
|
return new Promise(function(n, s) {
|
|
2037
|
-
const r =
|
|
2037
|
+
const r = Jt(e);
|
|
2038
2038
|
let a = r.data;
|
|
2039
2039
|
const o = H.from(r.headers).normalize();
|
|
2040
|
-
let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E,
|
|
2040
|
+
let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E, h;
|
|
2041
2041
|
function w() {
|
|
2042
|
-
E && E(),
|
|
2042
|
+
E && E(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
|
|
2043
2043
|
}
|
|
2044
|
-
let
|
|
2045
|
-
|
|
2044
|
+
let m = new XMLHttpRequest();
|
|
2045
|
+
m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout;
|
|
2046
2046
|
function k() {
|
|
2047
|
-
if (!
|
|
2047
|
+
if (!m)
|
|
2048
2048
|
return;
|
|
2049
2049
|
const A = H.from(
|
|
2050
|
-
"getAllResponseHeaders" in
|
|
2050
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
2051
2051
|
), D = {
|
|
2052
|
-
data: !c || c === "text" || c === "json" ?
|
|
2053
|
-
status:
|
|
2054
|
-
statusText:
|
|
2052
|
+
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
2053
|
+
status: m.status,
|
|
2054
|
+
statusText: m.statusText,
|
|
2055
2055
|
headers: A,
|
|
2056
2056
|
config: e,
|
|
2057
|
-
request:
|
|
2057
|
+
request: m
|
|
2058
2058
|
};
|
|
2059
|
-
|
|
2059
|
+
qt(function(U) {
|
|
2060
2060
|
n(U), w();
|
|
2061
2061
|
}, function(U) {
|
|
2062
2062
|
s(U), w();
|
|
2063
|
-
}, D),
|
|
2063
|
+
}, D), m = null;
|
|
2064
2064
|
}
|
|
2065
|
-
"onloadend" in
|
|
2066
|
-
!
|
|
2067
|
-
},
|
|
2068
|
-
|
|
2069
|
-
},
|
|
2070
|
-
const D = B && B.message ? B.message : "Network Error", K = new S(D, S.ERR_NETWORK, e,
|
|
2071
|
-
K.event = B || null, s(K),
|
|
2072
|
-
},
|
|
2065
|
+
"onloadend" in m ? m.onloadend = k : m.onreadystatechange = function() {
|
|
2066
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(k);
|
|
2067
|
+
}, m.onabort = function() {
|
|
2068
|
+
m && (s(new S("Request aborted", S.ECONNABORTED, e, m)), m = null);
|
|
2069
|
+
}, m.onerror = function(B) {
|
|
2070
|
+
const D = B && B.message ? B.message : "Network Error", K = new S(D, S.ERR_NETWORK, e, m);
|
|
2071
|
+
K.event = B || null, s(K), m = null;
|
|
2072
|
+
}, m.ontimeout = function() {
|
|
2073
2073
|
let B = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
2074
2074
|
const D = r.transitional || Mt;
|
|
2075
2075
|
r.timeoutErrorMessage && (B = r.timeoutErrorMessage), s(new S(
|
|
2076
2076
|
B,
|
|
2077
2077
|
D.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
2078
2078
|
e,
|
|
2079
|
-
|
|
2080
|
-
)),
|
|
2081
|
-
}, a === void 0 && o.setContentType(null), "setRequestHeader" in
|
|
2082
|
-
|
|
2083
|
-
}), u.isUndefined(r.withCredentials) || (
|
|
2084
|
-
|
|
2079
|
+
m
|
|
2080
|
+
)), m = null;
|
|
2081
|
+
}, a === void 0 && o.setContentType(null), "setRequestHeader" in m && u.forEach(o.toJSON(), function(B, D) {
|
|
2082
|
+
m.setRequestHeader(D, B);
|
|
2083
|
+
}), u.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), c && c !== "json" && (m.responseType = r.responseType), i && ([b, h] = ke(i, !0), m.addEventListener("progress", b)), l && m.upload && ([f, E] = ke(l), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (d = (A) => {
|
|
2084
|
+
m && (s(!A || A.type ? new ie(null, e, m) : A), m.abort(), m = null);
|
|
2085
2085
|
}, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
|
|
2086
|
-
const
|
|
2087
|
-
if (
|
|
2088
|
-
s(new S("Unsupported protocol " +
|
|
2086
|
+
const $ = co(r.url);
|
|
2087
|
+
if ($ && L.protocols.indexOf($) === -1) {
|
|
2088
|
+
s(new S("Unsupported protocol " + $ + ":", S.ERR_BAD_REQUEST, e));
|
|
2089
2089
|
return;
|
|
2090
2090
|
}
|
|
2091
|
-
|
|
2091
|
+
m.send(a || null);
|
|
2092
2092
|
});
|
|
2093
2093
|
}, bo = (e, t) => {
|
|
2094
2094
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
@@ -2098,7 +2098,7 @@ const Wt = (e) => {
|
|
|
2098
2098
|
if (!r) {
|
|
2099
2099
|
r = !0, c();
|
|
2100
2100
|
const d = i instanceof Error ? i : this.reason;
|
|
2101
|
-
s.abort(d instanceof S ? d : new
|
|
2101
|
+
s.abort(d instanceof S ? d : new ie(d instanceof Error ? d.message : d));
|
|
2102
2102
|
}
|
|
2103
2103
|
};
|
|
2104
2104
|
let o = t && setTimeout(() => {
|
|
@@ -2174,8 +2174,8 @@ const Wt = (e) => {
|
|
|
2174
2174
|
Request: e,
|
|
2175
2175
|
Response: t
|
|
2176
2176
|
}))(u.global), {
|
|
2177
|
-
ReadableStream:
|
|
2178
|
-
TextEncoder:
|
|
2177
|
+
ReadableStream: ht,
|
|
2178
|
+
TextEncoder: mt
|
|
2179
2179
|
} = u.global, gt = (e, ...t) => {
|
|
2180
2180
|
try {
|
|
2181
2181
|
return !!e(...t);
|
|
@@ -2189,51 +2189,51 @@ const Wt = (e) => {
|
|
|
2189
2189
|
const { fetch: t, Request: n, Response: s } = e, r = t ? xe(t) : typeof fetch == "function", a = xe(n), o = xe(s);
|
|
2190
2190
|
if (!r)
|
|
2191
2191
|
return !1;
|
|
2192
|
-
const c = r && xe(
|
|
2193
|
-
let
|
|
2192
|
+
const c = r && xe(ht), l = r && (typeof mt == "function" ? /* @__PURE__ */ ((h) => (w) => h.encode(w))(new mt()) : async (h) => new Uint8Array(await new n(h).arrayBuffer())), i = a && c && gt(() => {
|
|
2193
|
+
let h = !1;
|
|
2194
2194
|
const w = new n(L.origin, {
|
|
2195
|
-
body: new
|
|
2195
|
+
body: new ht(),
|
|
2196
2196
|
method: "POST",
|
|
2197
2197
|
get duplex() {
|
|
2198
|
-
return
|
|
2198
|
+
return h = !0, "half";
|
|
2199
2199
|
}
|
|
2200
2200
|
}).headers.has("Content-Type");
|
|
2201
|
-
return
|
|
2201
|
+
return h && !w;
|
|
2202
2202
|
}), d = o && c && gt(() => u.isReadableStream(new s("").body)), f = {
|
|
2203
|
-
stream: d && ((
|
|
2203
|
+
stream: d && ((h) => h.body)
|
|
2204
2204
|
};
|
|
2205
|
-
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
2206
|
-
!f[
|
|
2207
|
-
let k = w && w[
|
|
2205
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((h) => {
|
|
2206
|
+
!f[h] && (f[h] = (w, m) => {
|
|
2207
|
+
let k = w && w[h];
|
|
2208
2208
|
if (k)
|
|
2209
2209
|
return k.call(w);
|
|
2210
|
-
throw new S(`Response type '${
|
|
2210
|
+
throw new S(`Response type '${h}' is not supported`, S.ERR_NOT_SUPPORT, m);
|
|
2211
2211
|
});
|
|
2212
2212
|
});
|
|
2213
|
-
const b = async (
|
|
2214
|
-
if (
|
|
2213
|
+
const b = async (h) => {
|
|
2214
|
+
if (h == null)
|
|
2215
2215
|
return 0;
|
|
2216
|
-
if (u.isBlob(
|
|
2217
|
-
return
|
|
2218
|
-
if (u.isSpecCompliantForm(
|
|
2216
|
+
if (u.isBlob(h))
|
|
2217
|
+
return h.size;
|
|
2218
|
+
if (u.isSpecCompliantForm(h))
|
|
2219
2219
|
return (await new n(L.origin, {
|
|
2220
2220
|
method: "POST",
|
|
2221
|
-
body:
|
|
2221
|
+
body: h
|
|
2222
2222
|
}).arrayBuffer()).byteLength;
|
|
2223
|
-
if (u.isArrayBufferView(
|
|
2224
|
-
return
|
|
2225
|
-
if (u.isURLSearchParams(
|
|
2226
|
-
return (await l(
|
|
2227
|
-
}, E = async (
|
|
2228
|
-
const
|
|
2229
|
-
return
|
|
2223
|
+
if (u.isArrayBufferView(h) || u.isArrayBuffer(h))
|
|
2224
|
+
return h.byteLength;
|
|
2225
|
+
if (u.isURLSearchParams(h) && (h = h + ""), u.isString(h))
|
|
2226
|
+
return (await l(h)).byteLength;
|
|
2227
|
+
}, E = async (h, w) => {
|
|
2228
|
+
const m = u.toFiniteNumber(h.getContentLength());
|
|
2229
|
+
return m ?? b(w);
|
|
2230
2230
|
};
|
|
2231
|
-
return async (
|
|
2231
|
+
return async (h) => {
|
|
2232
2232
|
let {
|
|
2233
2233
|
url: w,
|
|
2234
|
-
method:
|
|
2234
|
+
method: m,
|
|
2235
2235
|
data: k,
|
|
2236
|
-
signal:
|
|
2236
|
+
signal: $,
|
|
2237
2237
|
cancelToken: A,
|
|
2238
2238
|
timeout: B,
|
|
2239
2239
|
onDownloadProgress: D,
|
|
@@ -2242,76 +2242,76 @@ const Wt = (e) => {
|
|
|
2242
2242
|
headers: Ne,
|
|
2243
2243
|
withCredentials: ye = "same-origin",
|
|
2244
2244
|
fetchOptions: Ze
|
|
2245
|
-
} =
|
|
2245
|
+
} = Jt(h), Xe = t || fetch;
|
|
2246
2246
|
U = U ? (U + "").toLowerCase() : "text";
|
|
2247
|
-
let we = bo([
|
|
2247
|
+
let we = bo([$, A && A.toAbortSignal()], B), le = null;
|
|
2248
2248
|
const G = we && we.unsubscribe && (() => {
|
|
2249
2249
|
we.unsubscribe();
|
|
2250
2250
|
});
|
|
2251
2251
|
let Qe;
|
|
2252
2252
|
try {
|
|
2253
|
-
if (K && i &&
|
|
2254
|
-
let
|
|
2253
|
+
if (K && i && m !== "get" && m !== "head" && (Qe = await E(Ne, k)) !== 0) {
|
|
2254
|
+
let J = new n(w, {
|
|
2255
2255
|
method: "POST",
|
|
2256
2256
|
body: k,
|
|
2257
2257
|
duplex: "half"
|
|
2258
|
-
}),
|
|
2259
|
-
if (u.isFormData(k) && (
|
|
2258
|
+
}), ne;
|
|
2259
|
+
if (u.isFormData(k) && (ne = J.headers.get("content-type")) && Ne.setContentType(ne), J.body) {
|
|
2260
2260
|
const [Pe, be] = ct(
|
|
2261
2261
|
Qe,
|
|
2262
2262
|
ke(ut(K))
|
|
2263
2263
|
);
|
|
2264
|
-
k = ft(
|
|
2264
|
+
k = ft(J.body, pt, Pe, be);
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
u.isString(ye) || (ye = ye ? "include" : "omit");
|
|
2268
2268
|
const M = a && "credentials" in n.prototype, Ye = {
|
|
2269
2269
|
...Ze,
|
|
2270
2270
|
signal: we,
|
|
2271
|
-
method:
|
|
2271
|
+
method: m.toUpperCase(),
|
|
2272
2272
|
headers: Ne.normalize().toJSON(),
|
|
2273
2273
|
body: k,
|
|
2274
2274
|
duplex: "half",
|
|
2275
2275
|
credentials: M ? ye : void 0
|
|
2276
2276
|
};
|
|
2277
|
-
|
|
2278
|
-
let
|
|
2277
|
+
le = a && new n(w, Ye);
|
|
2278
|
+
let W = await (a ? Xe(le, Ze) : Xe(w, Ye));
|
|
2279
2279
|
const et = d && (U === "stream" || U === "response");
|
|
2280
2280
|
if (d && (D || et && G)) {
|
|
2281
|
-
const
|
|
2281
|
+
const J = {};
|
|
2282
2282
|
["status", "statusText", "headers"].forEach((tt) => {
|
|
2283
|
-
|
|
2283
|
+
J[tt] = W[tt];
|
|
2284
2284
|
});
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2285
|
+
const ne = u.toFiniteNumber(W.headers.get("content-length")), [Pe, be] = D && ct(
|
|
2286
|
+
ne,
|
|
2287
2287
|
ke(ut(D), !0)
|
|
2288
2288
|
) || [];
|
|
2289
|
-
|
|
2290
|
-
ft(
|
|
2289
|
+
W = new s(
|
|
2290
|
+
ft(W.body, pt, Pe, () => {
|
|
2291
2291
|
be && be(), G && G();
|
|
2292
2292
|
}),
|
|
2293
|
-
|
|
2293
|
+
J
|
|
2294
2294
|
);
|
|
2295
2295
|
}
|
|
2296
2296
|
U = U || "text";
|
|
2297
|
-
let en = await f[u.findKey(f, U) || "text"](
|
|
2298
|
-
return !et && G && G(), await new Promise((
|
|
2299
|
-
|
|
2297
|
+
let en = await f[u.findKey(f, U) || "text"](W, h);
|
|
2298
|
+
return !et && G && G(), await new Promise((J, ne) => {
|
|
2299
|
+
qt(J, ne, {
|
|
2300
2300
|
data: en,
|
|
2301
|
-
headers: H.from(
|
|
2302
|
-
status:
|
|
2303
|
-
statusText:
|
|
2304
|
-
config:
|
|
2305
|
-
request:
|
|
2301
|
+
headers: H.from(W.headers),
|
|
2302
|
+
status: W.status,
|
|
2303
|
+
statusText: W.statusText,
|
|
2304
|
+
config: h,
|
|
2305
|
+
request: le
|
|
2306
2306
|
});
|
|
2307
2307
|
});
|
|
2308
2308
|
} catch (M) {
|
|
2309
2309
|
throw G && G(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
|
|
2310
|
-
new S("Network Error", S.ERR_NETWORK,
|
|
2310
|
+
new S("Network Error", S.ERR_NETWORK, h, le),
|
|
2311
2311
|
{
|
|
2312
2312
|
cause: M.cause || M
|
|
2313
2313
|
}
|
|
2314
|
-
) : S.from(M, M && M.code,
|
|
2314
|
+
) : S.from(M, M && M.code, h, le);
|
|
2315
2315
|
}
|
|
2316
2316
|
};
|
|
2317
2317
|
}, ko = /* @__PURE__ */ new Map(), Kt = (e) => {
|
|
@@ -2386,20 +2386,20 @@ const Gt = {
|
|
|
2386
2386
|
};
|
|
2387
2387
|
function Ve(e) {
|
|
2388
2388
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2389
|
-
throw new
|
|
2389
|
+
throw new ie(null, e);
|
|
2390
2390
|
}
|
|
2391
2391
|
function wt(e) {
|
|
2392
2392
|
return Ve(e), e.headers = H.from(e.headers), e.data = Ue.call(
|
|
2393
2393
|
e,
|
|
2394
2394
|
e.transformRequest
|
|
2395
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter ||
|
|
2395
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter || ge.adapter, e)(e).then(function(s) {
|
|
2396
2396
|
return Ve(e), s.data = Ue.call(
|
|
2397
2397
|
e,
|
|
2398
2398
|
e.transformResponse,
|
|
2399
2399
|
s
|
|
2400
2400
|
), s.headers = H.from(s.headers), s;
|
|
2401
2401
|
}, function(s) {
|
|
2402
|
-
return
|
|
2402
|
+
return zt(s) || (Ve(e), s && s.response && (s.response.data = Ue.call(
|
|
2403
2403
|
e,
|
|
2404
2404
|
e.transformResponse,
|
|
2405
2405
|
s.response
|
|
@@ -2509,8 +2509,8 @@ let Q = class {
|
|
|
2509
2509
|
);
|
|
2510
2510
|
a && u.forEach(
|
|
2511
2511
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2512
|
-
(
|
|
2513
|
-
delete a[
|
|
2512
|
+
(h) => {
|
|
2513
|
+
delete a[h];
|
|
2514
2514
|
}
|
|
2515
2515
|
), n.headers = H.concat(o, a);
|
|
2516
2516
|
const c = [];
|
|
@@ -2524,26 +2524,26 @@ let Q = class {
|
|
|
2524
2524
|
});
|
|
2525
2525
|
let d, f = 0, b;
|
|
2526
2526
|
if (!l) {
|
|
2527
|
-
const
|
|
2528
|
-
for (
|
|
2529
|
-
d = d.then(
|
|
2527
|
+
const h = [wt.bind(this), void 0];
|
|
2528
|
+
for (h.unshift(...c), h.push(...i), b = h.length, d = Promise.resolve(n); f < b; )
|
|
2529
|
+
d = d.then(h[f++], h[f++]);
|
|
2530
2530
|
return d;
|
|
2531
2531
|
}
|
|
2532
2532
|
b = c.length;
|
|
2533
2533
|
let E = n;
|
|
2534
2534
|
for (; f < b; ) {
|
|
2535
|
-
const
|
|
2535
|
+
const h = c[f++], w = c[f++];
|
|
2536
2536
|
try {
|
|
2537
|
-
E =
|
|
2538
|
-
} catch (
|
|
2539
|
-
w.call(this,
|
|
2537
|
+
E = h(E);
|
|
2538
|
+
} catch (m) {
|
|
2539
|
+
w.call(this, m);
|
|
2540
2540
|
break;
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
2543
|
try {
|
|
2544
2544
|
d = wt.call(this, E);
|
|
2545
|
-
} catch (
|
|
2546
|
-
return Promise.reject(
|
|
2545
|
+
} catch (h) {
|
|
2546
|
+
return Promise.reject(h);
|
|
2547
2547
|
}
|
|
2548
2548
|
for (f = 0, b = i.length; f < b; )
|
|
2549
2549
|
d = d.then(i[f++], i[f++]);
|
|
@@ -2551,7 +2551,7 @@ let Q = class {
|
|
|
2551
2551
|
}
|
|
2552
2552
|
getUri(t) {
|
|
2553
2553
|
t = ee(this.defaults, t);
|
|
2554
|
-
const n =
|
|
2554
|
+
const n = Wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2555
2555
|
return jt(n, t.params, t.paramsSerializer);
|
|
2556
2556
|
}
|
|
2557
2557
|
};
|
|
@@ -2603,7 +2603,7 @@ let Ao = class Xt {
|
|
|
2603
2603
|
s.unsubscribe(a);
|
|
2604
2604
|
}, o;
|
|
2605
2605
|
}, t(function(a, o, c) {
|
|
2606
|
-
s.reason || (s.reason = new
|
|
2606
|
+
s.reason || (s.reason = new ie(a, o, c), n(s.reason));
|
|
2607
2607
|
});
|
|
2608
2608
|
}
|
|
2609
2609
|
/**
|
|
@@ -2652,15 +2652,15 @@ let Ao = class Xt {
|
|
|
2652
2652
|
};
|
|
2653
2653
|
}
|
|
2654
2654
|
};
|
|
2655
|
-
function
|
|
2655
|
+
function To(e) {
|
|
2656
2656
|
return function(n) {
|
|
2657
2657
|
return e.apply(null, n);
|
|
2658
2658
|
};
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function $o(e) {
|
|
2661
2661
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
2662
2662
|
}
|
|
2663
|
-
const
|
|
2663
|
+
const ze = {
|
|
2664
2664
|
Continue: 100,
|
|
2665
2665
|
SwitchingProtocols: 101,
|
|
2666
2666
|
Processing: 102,
|
|
@@ -2731,8 +2731,8 @@ const qe = {
|
|
|
2731
2731
|
SslHandshakeFailed: 525,
|
|
2732
2732
|
InvalidSslCertificate: 526
|
|
2733
2733
|
};
|
|
2734
|
-
Object.entries(
|
|
2735
|
-
|
|
2734
|
+
Object.entries(ze).forEach(([e, t]) => {
|
|
2735
|
+
ze[t] = e;
|
|
2736
2736
|
});
|
|
2737
2737
|
function Qt(e) {
|
|
2738
2738
|
const t = new Q(e), n = At(Q.prototype.request, t);
|
|
@@ -2740,11 +2740,11 @@ function Qt(e) {
|
|
|
2740
2740
|
return Qt(ee(e, r));
|
|
2741
2741
|
}, n;
|
|
2742
2742
|
}
|
|
2743
|
-
const C = Qt(
|
|
2743
|
+
const C = Qt(ge);
|
|
2744
2744
|
C.Axios = Q;
|
|
2745
|
-
C.CanceledError =
|
|
2745
|
+
C.CanceledError = ie;
|
|
2746
2746
|
C.CancelToken = Ao;
|
|
2747
|
-
C.isCancel =
|
|
2747
|
+
C.isCancel = zt;
|
|
2748
2748
|
C.VERSION = Zt;
|
|
2749
2749
|
C.toFormData = Fe;
|
|
2750
2750
|
C.AxiosError = S;
|
|
@@ -2752,31 +2752,31 @@ C.Cancel = C.CanceledError;
|
|
|
2752
2752
|
C.all = function(t) {
|
|
2753
2753
|
return Promise.all(t);
|
|
2754
2754
|
};
|
|
2755
|
-
C.spread =
|
|
2756
|
-
C.isAxiosError =
|
|
2755
|
+
C.spread = To;
|
|
2756
|
+
C.isAxiosError = $o;
|
|
2757
2757
|
C.mergeConfig = ee;
|
|
2758
2758
|
C.AxiosHeaders = H;
|
|
2759
2759
|
C.formToJSON = (e) => It(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
2760
2760
|
C.getAdapter = Gt.getAdapter;
|
|
2761
|
-
C.HttpStatusCode =
|
|
2761
|
+
C.HttpStatusCode = ze;
|
|
2762
2762
|
C.default = C;
|
|
2763
2763
|
const {
|
|
2764
|
-
Axios:
|
|
2765
|
-
AxiosError:
|
|
2766
|
-
CanceledError:
|
|
2767
|
-
isCancel:
|
|
2768
|
-
CancelToken:
|
|
2769
|
-
VERSION:
|
|
2770
|
-
all:
|
|
2771
|
-
Cancel:
|
|
2772
|
-
isAxiosError:
|
|
2773
|
-
spread:
|
|
2774
|
-
toFormData:
|
|
2775
|
-
AxiosHeaders:
|
|
2764
|
+
Axios: Fa,
|
|
2765
|
+
AxiosError: Ba,
|
|
2766
|
+
CanceledError: Na,
|
|
2767
|
+
isCancel: Pa,
|
|
2768
|
+
CancelToken: Ha,
|
|
2769
|
+
VERSION: Ua,
|
|
2770
|
+
all: Va,
|
|
2771
|
+
Cancel: Da,
|
|
2772
|
+
isAxiosError: ja,
|
|
2773
|
+
spread: Ma,
|
|
2774
|
+
toFormData: Ia,
|
|
2775
|
+
AxiosHeaders: za,
|
|
2776
2776
|
HttpStatusCode: qa,
|
|
2777
|
-
formToJSON:
|
|
2777
|
+
formToJSON: Wa,
|
|
2778
2778
|
getAdapter: Ja,
|
|
2779
|
-
mergeConfig:
|
|
2779
|
+
mergeConfig: Ka
|
|
2780
2780
|
} = C, Lo = (e) => {
|
|
2781
2781
|
const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2782
2782
|
return t ? t[2] : null;
|
|
@@ -2796,13 +2796,15 @@ const {
|
|
|
2796
2796
|
let r = `${e}=; max-age=0; path=${s}`;
|
|
2797
2797
|
n && (r += `; domain=${n}`), document.cookie = r;
|
|
2798
2798
|
}, Yt = () => {
|
|
2799
|
-
|
|
2800
|
-
return
|
|
2801
|
-
}, De = "bolt-token",
|
|
2802
|
-
const e =
|
|
2799
|
+
const e = window.location.hostname;
|
|
2800
|
+
return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
|
|
2801
|
+
}, De = "bolt-next-token", te = Re("auth", () => {
|
|
2802
|
+
const e = oe({
|
|
2803
2803
|
user: null,
|
|
2804
2804
|
token: null,
|
|
2805
2805
|
ready: !1,
|
|
2806
|
+
// Dev JWT override token (bypasses normal auth flow)
|
|
2807
|
+
overrideToken: null,
|
|
2806
2808
|
// Configurable endpoints
|
|
2807
2809
|
endpoints: {
|
|
2808
2810
|
login: "/login",
|
|
@@ -2830,7 +2832,7 @@ const {
|
|
|
2830
2832
|
onLogoutError: null
|
|
2831
2833
|
}
|
|
2832
2834
|
}), t = (i = {}) => {
|
|
2833
|
-
i.endpoints && Object.assign(e.endpoints, i.endpoints), i.routes && Object.assign(e.routes, i.routes), i.devCredentials && Object.assign(e.devCredentials, i.devCredentials), i.callbacks && Object.assign(e.callbacks, i.callbacks);
|
|
2835
|
+
i.endpoints && Object.assign(e.endpoints, i.endpoints), i.routes && Object.assign(e.routes, i.routes), i.devCredentials && Object.assign(e.devCredentials, i.devCredentials), i.callbacks && Object.assign(e.callbacks, i.callbacks), i.overrideToken && (e.overrideToken = i.overrideToken);
|
|
2834
2836
|
}, n = (i) => {
|
|
2835
2837
|
Fo(De, i), e.token = i;
|
|
2836
2838
|
}, s = () => {
|
|
@@ -2855,7 +2857,7 @@ const {
|
|
|
2855
2857
|
s(), e.user = null;
|
|
2856
2858
|
}
|
|
2857
2859
|
}, c = async () => {
|
|
2858
|
-
const i = r();
|
|
2860
|
+
const i = e.overrideToken || r();
|
|
2859
2861
|
if (!i)
|
|
2860
2862
|
return e.ready = !0, null;
|
|
2861
2863
|
try {
|
|
@@ -2864,13 +2866,13 @@ const {
|
|
|
2864
2866
|
Authorization: `Bearer ${i}`
|
|
2865
2867
|
}
|
|
2866
2868
|
});
|
|
2867
|
-
e.user = d, e.token = i;
|
|
2869
|
+
e.user = d, e.overrideToken || (e.token = i);
|
|
2868
2870
|
} catch {
|
|
2869
|
-
s();
|
|
2871
|
+
e.overrideToken || s();
|
|
2870
2872
|
} finally {
|
|
2871
2873
|
e.ready = !0;
|
|
2872
2874
|
}
|
|
2873
|
-
}, l =
|
|
2875
|
+
}, l = T(() => e.overrideToken ? !0 : !!e.token && !!e.user);
|
|
2874
2876
|
return {
|
|
2875
2877
|
state: e,
|
|
2876
2878
|
initialize: t,
|
|
@@ -2892,7 +2894,7 @@ const {
|
|
|
2892
2894
|
}, Vo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Do = { class: "mb-7" }, jo = { class: "text-gray-600" }, Mo = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Io = {
|
|
2893
2895
|
key: 0,
|
|
2894
2896
|
class: "text-red-600 text-sm mb-2"
|
|
2895
|
-
},
|
|
2897
|
+
}, zo = { key: 0 }, qo = { key: 1 }, Wo = {
|
|
2896
2898
|
__name: "SparkLoginView",
|
|
2897
2899
|
props: {
|
|
2898
2900
|
logo: {
|
|
@@ -2909,7 +2911,7 @@ const {
|
|
|
2909
2911
|
}
|
|
2910
2912
|
},
|
|
2911
2913
|
setup(e) {
|
|
2912
|
-
const t = Ee(), n = Oe(), s = ma(), r =
|
|
2914
|
+
const t = Ee(), n = Oe(), s = ma(), r = te(), a = e, o = q(!1), c = q(""), l = async (i) => {
|
|
2913
2915
|
o.value = !0, c.value = "";
|
|
2914
2916
|
try {
|
|
2915
2917
|
await r.login(i);
|
|
@@ -2992,7 +2994,7 @@ const {
|
|
|
2992
2994
|
class: "text-sm text-primary-600 font-semibold"
|
|
2993
2995
|
}, {
|
|
2994
2996
|
default: O(() => [...d[2] || (d[2] = [
|
|
2995
|
-
|
|
2997
|
+
qe(" Forgot password ", -1)
|
|
2996
2998
|
])]),
|
|
2997
2999
|
_: 1
|
|
2998
3000
|
}, 8, ["to"])
|
|
@@ -3005,7 +3007,7 @@ const {
|
|
|
3005
3007
|
"button-class": "w-full mb-2"
|
|
3006
3008
|
}, {
|
|
3007
3009
|
default: O(() => [
|
|
3008
|
-
o.value ? (g(), y("span",
|
|
3010
|
+
o.value ? (g(), y("span", qo, "Signing in...")) : (g(), y("span", zo, "Sign in"))
|
|
3009
3011
|
]),
|
|
3010
3012
|
_: 1
|
|
3011
3013
|
}, 8, ["disabled"])
|
|
@@ -3016,7 +3018,7 @@ const {
|
|
|
3016
3018
|
]);
|
|
3017
3019
|
};
|
|
3018
3020
|
}
|
|
3019
|
-
},
|
|
3021
|
+
}, Jo = {
|
|
3020
3022
|
__name: "SparkLogoutView",
|
|
3021
3023
|
props: {
|
|
3022
3024
|
defaultRedirect: {
|
|
@@ -3025,7 +3027,7 @@ const {
|
|
|
3025
3027
|
}
|
|
3026
3028
|
},
|
|
3027
3029
|
setup(e) {
|
|
3028
|
-
const t = Ee(), n = Oe(), s =
|
|
3030
|
+
const t = Ee(), n = Oe(), s = te(), r = e;
|
|
3029
3031
|
return sn(async () => {
|
|
3030
3032
|
await s.logout();
|
|
3031
3033
|
const a = n.query.redirect;
|
|
@@ -3058,7 +3060,7 @@ const {
|
|
|
3058
3060
|
}
|
|
3059
3061
|
},
|
|
3060
3062
|
setup(e) {
|
|
3061
|
-
const t =
|
|
3063
|
+
const t = te(), n = e, s = q(!1), r = q(""), a = q(""), o = async ({ email: c }) => {
|
|
3062
3064
|
s.value = !0, r.value = "", a.value = "";
|
|
3063
3065
|
try {
|
|
3064
3066
|
await C.post(t.state.endpoints.passwordEmail, { email: c }), a.value = "Password reset link sent! Check your email.";
|
|
@@ -3133,7 +3135,7 @@ const {
|
|
|
3133
3135
|
class: "text-sm text-center text-primary-600 font-semibold block"
|
|
3134
3136
|
}, {
|
|
3135
3137
|
default: O(() => [...l[1] || (l[1] = [
|
|
3136
|
-
|
|
3138
|
+
qe(" Back to login ", -1)
|
|
3137
3139
|
])]),
|
|
3138
3140
|
_: 1
|
|
3139
3141
|
}, 8, ["to"])
|
|
@@ -3167,7 +3169,7 @@ const {
|
|
|
3167
3169
|
}
|
|
3168
3170
|
},
|
|
3169
3171
|
setup(e) {
|
|
3170
|
-
const t = Ee(), n = Oe(), s =
|
|
3172
|
+
const t = Ee(), n = Oe(), s = te(), r = e, a = q(!1), o = q(""), c = async ({ password: l, password_confirmation: i }) => {
|
|
3171
3173
|
a.value = !0, o.value = "";
|
|
3172
3174
|
try {
|
|
3173
3175
|
await C.post(s.state.endpoints.passwordReset, {
|
|
@@ -3257,7 +3259,7 @@ const {
|
|
|
3257
3259
|
};
|
|
3258
3260
|
}
|
|
3259
3261
|
};
|
|
3260
|
-
function
|
|
3262
|
+
function Ga(e = {}) {
|
|
3261
3263
|
const {
|
|
3262
3264
|
loginPath: t = "/login",
|
|
3263
3265
|
logoutPath: n = "/logout",
|
|
@@ -3270,14 +3272,14 @@ function Ka(e = {}) {
|
|
|
3270
3272
|
{
|
|
3271
3273
|
path: t,
|
|
3272
3274
|
name: "login",
|
|
3273
|
-
component:
|
|
3275
|
+
component: Wo,
|
|
3274
3276
|
props: { logo: a, defaultRedirect: o },
|
|
3275
3277
|
meta: { auth: !1 }
|
|
3276
3278
|
},
|
|
3277
3279
|
{
|
|
3278
3280
|
path: n,
|
|
3279
3281
|
name: "logout",
|
|
3280
|
-
component:
|
|
3282
|
+
component: Jo,
|
|
3281
3283
|
props: { defaultRedirect: t },
|
|
3282
3284
|
meta: { auth: !1 }
|
|
3283
3285
|
},
|
|
@@ -3297,15 +3299,19 @@ function Ka(e = {}) {
|
|
|
3297
3299
|
}
|
|
3298
3300
|
];
|
|
3299
3301
|
}
|
|
3300
|
-
function
|
|
3302
|
+
function Za(e, t = {}) {
|
|
3301
3303
|
const { defaultAuthenticatedRoute: n = "/dashboard" } = t;
|
|
3302
3304
|
e.beforeEach(async (s, r, a) => {
|
|
3303
|
-
const o =
|
|
3305
|
+
const o = te();
|
|
3304
3306
|
o.state.ready || await o.fetchUser(), pa(s, a, o, n);
|
|
3305
3307
|
});
|
|
3306
3308
|
}
|
|
3307
3309
|
function pa(e, t, n, s) {
|
|
3308
3310
|
const r = e.meta.auth !== !1, a = n.check;
|
|
3311
|
+
if (n.state.overrideToken && e.path === "/logout") {
|
|
3312
|
+
t({ path: s });
|
|
3313
|
+
return;
|
|
3314
|
+
}
|
|
3309
3315
|
if (!a) {
|
|
3310
3316
|
if (!r) {
|
|
3311
3317
|
if (e.path === "/logout") {
|
|
@@ -3338,8 +3344,45 @@ function pa(e, t, n, s) {
|
|
|
3338
3344
|
t();
|
|
3339
3345
|
}
|
|
3340
3346
|
}
|
|
3347
|
+
function ha(e = {}) {
|
|
3348
|
+
const t = C.create({
|
|
3349
|
+
baseURL: e.baseURL || "",
|
|
3350
|
+
timeout: e.timeout || 3e4,
|
|
3351
|
+
headers: {
|
|
3352
|
+
"Content-Type": "application/json",
|
|
3353
|
+
...e.headers
|
|
3354
|
+
}
|
|
3355
|
+
});
|
|
3356
|
+
return t.interceptors.request.use(
|
|
3357
|
+
(n) => {
|
|
3358
|
+
try {
|
|
3359
|
+
const s = te();
|
|
3360
|
+
s.state.overrideToken ? n.headers.Authorization = `Bearer ${s.state.overrideToken}` : s.state.token && (n.headers.Authorization = `Bearer ${s.state.token}`);
|
|
3361
|
+
} catch {
|
|
3362
|
+
}
|
|
3363
|
+
return n;
|
|
3364
|
+
},
|
|
3365
|
+
(n) => Promise.reject(n)
|
|
3366
|
+
), t.interceptors.response.use(
|
|
3367
|
+
(n) => n,
|
|
3368
|
+
async (n) => {
|
|
3369
|
+
if (n.response?.status === 401)
|
|
3370
|
+
try {
|
|
3371
|
+
const s = te();
|
|
3372
|
+
await s.logout(), window.location.href = s.state.routes.auth;
|
|
3373
|
+
} catch (s) {
|
|
3374
|
+
console.error("Error during auto-logout:", s), window.location.href = "/login";
|
|
3375
|
+
}
|
|
3376
|
+
return Promise.reject(n);
|
|
3377
|
+
}
|
|
3378
|
+
), t;
|
|
3379
|
+
}
|
|
3380
|
+
function Xa(e, t = {}) {
|
|
3381
|
+
const n = ha(t);
|
|
3382
|
+
return e.provide("axios", n), e.config.globalProperties.$axios = n, n;
|
|
3383
|
+
}
|
|
3341
3384
|
const ma = Re("sparkApp", () => {
|
|
3342
|
-
const e =
|
|
3385
|
+
const e = oe({
|
|
3343
3386
|
app: "",
|
|
3344
3387
|
icon: "",
|
|
3345
3388
|
homeRoute: "dashboard",
|
|
@@ -3352,8 +3395,8 @@ const ma = Re("sparkApp", () => {
|
|
|
3352
3395
|
e.app = n.app || "", e.icon = n.icon || "", e.homeRoute = n.homeRoute ?? "dashboard", e.showBrandSelector = n.showBrandSelector ?? !0, e.showAppSelector = n.showAppSelector ?? !0;
|
|
3353
3396
|
}
|
|
3354
3397
|
};
|
|
3355
|
-
}),
|
|
3356
|
-
const e =
|
|
3398
|
+
}), Qa = Re("sparkNav", () => {
|
|
3399
|
+
const e = oe({
|
|
3357
3400
|
menu: [],
|
|
3358
3401
|
collapsed: !1,
|
|
3359
3402
|
hidden: !1
|
|
@@ -3409,30 +3452,32 @@ const ma = Re("sparkApp", () => {
|
|
|
3409
3452
|
});
|
|
3410
3453
|
export {
|
|
3411
3454
|
N as Icons,
|
|
3412
|
-
|
|
3455
|
+
ka as SparkAlert,
|
|
3413
3456
|
os as SparkAppSelector,
|
|
3414
3457
|
Ss as SparkBrandSelector,
|
|
3415
3458
|
Ae as SparkButton,
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3459
|
+
Ra as SparkButtonGroup,
|
|
3460
|
+
Ea as SparkCard,
|
|
3461
|
+
Aa as SparkDefaultContainer,
|
|
3419
3462
|
sa as SparkForgotPasswordView,
|
|
3420
|
-
|
|
3421
|
-
|
|
3463
|
+
Wo as SparkLoginView,
|
|
3464
|
+
Jo as SparkLogoutView,
|
|
3422
3465
|
As as SparkModalContainer,
|
|
3423
|
-
|
|
3466
|
+
Oa as SparkModalDialog,
|
|
3424
3467
|
nt as SparkOverlay,
|
|
3425
|
-
|
|
3468
|
+
Ta as SparkPublicContainer,
|
|
3426
3469
|
fa as SparkResetPasswordView,
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3470
|
+
Ca as addIcons,
|
|
3471
|
+
Ga as createAuthRoutes,
|
|
3472
|
+
ha as createAxiosInstance,
|
|
3473
|
+
Za as setupAuthGuards,
|
|
3474
|
+
Xa as setupAxios,
|
|
3475
|
+
_a as setupFontAwesome,
|
|
3476
|
+
ue as sparkModalService,
|
|
3432
3477
|
Z as sparkOverlayService,
|
|
3433
3478
|
ma as useSparkAppStore,
|
|
3434
|
-
|
|
3479
|
+
te as useSparkAuthStore,
|
|
3435
3480
|
Ot as useSparkBrandFilterStore,
|
|
3436
|
-
|
|
3481
|
+
Qa as useSparkNavStore,
|
|
3437
3482
|
st as useSparkOverlay
|
|
3438
3483
|
};
|