@wishbone-media/spark 0.8.6 → 0.9.1

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 CHANGED
@@ -1,53 +1,54 @@
1
- import { computed as y, resolveComponent as S, createElementBlock as u, openBlock as l, normalizeClass as h, createElementVNode as s, createVNode as m, unref as d, renderSlot as C, Fragment as L, renderList as F, createCommentVNode as x, toDisplayString as k, reactive as z, ref as A, inject as te, provide as se, markRaw as G, createBlock as B, withCtx as _, resolveDynamicComponent as E, mergeProps as j, toHandlers as P, createTextVNode as X, withModifiers as V } from "vue";
2
- import { library as q } from "@fortawesome/fontawesome-svg-core";
3
- import { FontAwesomeIcon as ne } from "@fortawesome/vue-fontawesome";
4
- import { faXmark as oe, faTimes as re, faStreetView as ae, faSortUp as le, faSortDown as ie, faSort as ce, faScaleBalanced as de, faSatelliteDish as ue, faLayerPlus as pe, faLaptopMobile as fe, faInfoCircle as me, faGripDotsVertical as ge, faGearComplex as he, faFlag as ve, faFaceSmileWink as xe, faFaceSmileRelaxed as ye, faExclamationTriangle as be, faEllipsisVertical as _e, faEllipsis as we, faEdit as ke, faComments as Ce, faCircleXmark as Se, faCircleUser as $e, faChevronUp as Be, faChevronRight as Le, faChevronLeft as Ve, faChevronDown as Re, faCheckCircle as Fe, faCheck as Ae, faBullhorn as ze, faBellRing as He, faBarsSort as Ie, faArrowRightToLine as Ne, faArrowLeftToLine as Me } from "@fortawesome/pro-regular-svg-icons";
5
- import { defineStore as M } from "pinia";
6
- import { TransitionRoot as U, Dialog as Z, TransitionChild as H, DialogPanel as K } from "@headlessui/vue";
7
- import { useRouter as Te } from "vue-router";
8
- const b = {
9
- farArrowLeftToLine: Me,
10
- farArrowRightToLine: Ne,
11
- farBarsSort: Ie,
12
- farBellRing: He,
13
- farBullhorn: ze,
14
- farCheck: Ae,
15
- farCheckCircle: Fe,
16
- farChevronDown: Re,
17
- farChevronLeft: Ve,
18
- farChevronRight: Le,
19
- farChevronUp: Be,
20
- farCircleUser: $e,
21
- farCircleXmark: Se,
22
- farComments: Ce,
23
- farEdit: ke,
24
- farEllipsis: we,
25
- farEllipsisVertical: _e,
26
- farExclamationTriangle: be,
27
- farFaceSmileRelaxed: ye,
28
- farFaceSmileWink: xe,
29
- farFlag: ve,
30
- farGearComplex: he,
31
- farGripDotsVertical: ge,
32
- farInfoCircle: me,
33
- farLaptopMobile: fe,
34
- farLayerPlus: pe,
35
- farSatelliteDish: ue,
36
- farScaleBalanced: de,
37
- farSort: ce,
38
- farSortDown: ie,
39
- farSortUp: le,
40
- farStreetView: ae,
41
- farTimes: re,
42
- farXmark: oe
1
+ import { computed as $, resolveComponent as V, createElementBlock as y, openBlock as g, normalizeClass as _, createElementVNode as p, createVNode as v, unref as x, renderSlot as q, Fragment as ne, renderList as de, createCommentVNode as R, toDisplayString as F, reactive as re, ref as z, 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 ze, withModifiers as le, onMounted as sn, watch as rn } from "vue";
2
+ import { library as _t } from "@fortawesome/fontawesome-svg-core";
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 mn, faSatelliteDish as hn, 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 $n, faChevronUp as Tn, 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
+ import { defineStore as Re } from "pinia";
6
+ import { TransitionRoot as kt, Dialog as Rt, TransitionChild as _e, DialogPanel as Et } from "@headlessui/vue";
7
+ import { useRouter as Ee, useRoute as Oe } from "vue-router";
8
+ const N = {
9
+ farArrowLeftToLine: jn,
10
+ farArrowRightToLine: Dn,
11
+ farBarsSort: Vn,
12
+ farBellRing: Un,
13
+ farBullhorn: Hn,
14
+ farCheck: Pn,
15
+ farCheckCircle: Nn,
16
+ farChevronDown: Bn,
17
+ farChevronLeft: Fn,
18
+ farChevronRight: Ln,
19
+ farChevronUp: Tn,
20
+ farCircleUser: $n,
21
+ farCircleXmark: An,
22
+ farComments: On,
23
+ farEdit: En,
24
+ farEllipsis: Rn,
25
+ farEllipsisVertical: kn,
26
+ farExclamationTriangle: _n,
27
+ farFaceSmileRelaxed: Cn,
28
+ farFaceSmileWink: vn,
29
+ farFlag: Sn,
30
+ farGearComplex: xn,
31
+ farGripDotsVertical: bn,
32
+ farInfoCircle: wn,
33
+ farLaptopMobile: yn,
34
+ farLayerPlus: gn,
35
+ farSatelliteDish: hn,
36
+ farScaleBalanced: mn,
37
+ farSort: pn,
38
+ farSortDown: fn,
39
+ farSortUp: dn,
40
+ farStreetView: un,
41
+ farTimes: cn,
42
+ farXmark: ln,
43
+ farSignOut: an
43
44
  };
44
- function xs(e) {
45
- Object.assign(b, e), q.add(...Object.values(e));
45
+ function va(e) {
46
+ Object.assign(N, e), _t.add(...Object.values(e));
46
47
  }
47
- function ys(e) {
48
- q.add(...Object.values(b)), e.component("FontAwesomeIcon", ne);
48
+ function Ca(e) {
49
+ _t.add(...Object.values(N)), e.component("FontAwesomeIcon", on);
49
50
  }
50
- const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }, Ge = { class: "ml-3" }, Ee = { class: "ml-auto pl-3 pt-1 self-start" }, je = { class: "-mx-1.5 -my-1.5" }, bs = {
51
+ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }, qn = { class: "ml-3" }, zn = { class: "ml-auto pl-3 pt-1 self-start" }, Jn = { class: "-mx-1.5 -my-1.5" }, _a = {
51
52
  __name: "SparkAlert",
52
53
  props: {
53
54
  type: {
@@ -58,51 +59,51 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
58
59
  },
59
60
  emits: ["close"],
60
61
  setup(e) {
61
- const o = e, r = y(() => ({
62
+ const t = e, n = $(() => ({
62
63
  success: "bg-green-50 border-green-200 text-green-700",
63
64
  warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
64
65
  danger: "bg-red-50 border-red-200 text-red-700",
65
66
  info: "bg-blue-50 border-blue-200 text-blue-700"
66
- })[o.type]), c = y(() => ({
67
+ })[t.type]), s = $(() => ({
67
68
  success: "text-green-400",
68
69
  warning: "text-yellow-400",
69
70
  danger: "text-red-400",
70
71
  info: "text-blue-400"
71
- })[o.type]), g = y(() => ({
72
+ })[t.type]), r = $(() => ({
72
73
  success: "farCheckCircle",
73
74
  warning: "farExclamationTriangle",
74
75
  danger: "farCircleXmark",
75
76
  info: "farInfoCircle"
76
- })[o.type]), f = y(() => ({
77
+ })[t.type]), a = $(() => ({
77
78
  success: "text-green-400 hover:bg-green-100",
78
79
  warning: "text-yellow-400 hover:bg-yellow-100",
79
80
  danger: "text-red-400 hover:bg-red-100",
80
81
  info: "text-blue-400 hover:bg-blue-100"
81
- })[o.type]);
82
- return (a, i) => {
83
- const t = S("font-awesome-icon");
84
- return l(), u("div", {
85
- class: h(["rounded-md border p-4", r.value])
82
+ })[t.type]);
83
+ return (o, c) => {
84
+ const l = V("font-awesome-icon");
85
+ return g(), y("div", {
86
+ class: _(["rounded-md border p-4", n.value])
86
87
  }, [
87
- s("div", Oe, [
88
- s("div", De, [
89
- m(t, {
90
- icon: d(b)[g.value],
91
- class: h(c.value)
88
+ p("div", Mn, [
89
+ p("div", In, [
90
+ v(l, {
91
+ icon: x(N)[r.value],
92
+ class: _(s.value)
92
93
  }, null, 8, ["icon", "class"])
93
94
  ]),
94
- s("div", Ge, [
95
- C(a.$slots, "default")
95
+ p("div", qn, [
96
+ q(o.$slots, "default")
96
97
  ]),
97
- s("div", Ee, [
98
- s("div", je, [
99
- s("button", {
98
+ p("div", zn, [
99
+ p("div", Jn, [
100
+ p("button", {
100
101
  type: "button",
101
- class: h(["inline-flex rounded-md px-2 py-1.5", f.value]),
102
- onClick: i[0] || (i[0] = (n) => a.$emit("close"))
102
+ class: _(["inline-flex rounded-md px-2 py-1.5", a.value]),
103
+ onClick: c[0] || (c[0] = (i) => o.$emit("close"))
103
104
  }, [
104
- m(t, {
105
- icon: d(b).farXmark
105
+ v(l, {
106
+ icon: x(N).farXmark
106
107
  }, null, 8, ["icon"])
107
108
  ], 2)
108
109
  ])
@@ -111,10 +112,10 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
111
112
  ], 2);
112
113
  };
113
114
  }
114
- }, Pe = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Xe = { class: "flex flex-1 flex-col" }, qe = { class: "divide-y divide-gray-200" }, Ue = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ze = { class: "ml-auto flex items-center" }, Ke = ["onClick"], We = { class: "gap-y-1" }, Ye = { class: "text-base text-gray-800 flex items-center" }, Je = { class: "font-medium" }, Qe = {
115
+ }, Wn = { 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 = {
115
116
  key: 0,
116
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"
117
- }, et = { class: "text-sm text-gray-500" }, tt = { class: "ml-auto flex items-center" }, st = {
118
+ }, ss = { class: "text-sm text-gray-500" }, rs = { class: "ml-auto flex items-center" }, os = {
118
119
  __name: "SparkAppSelector",
119
120
  props: {
120
121
  appItems: {
@@ -166,92 +167,92 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
166
167
  }
167
168
  },
168
169
  emits: ["close", "select"],
169
- setup(e, { emit: o }) {
170
- const r = e, c = o, g = y(() => r.appItems.map((a) => ({
171
- ...a,
172
- current: a.name === r.currentApp
173
- }))), f = (a) => {
174
- window.open(a.href, "_blank"), c("select", a);
170
+ setup(e, { emit: t }) {
171
+ const n = e, s = t, r = $(() => n.appItems.map((o) => ({
172
+ ...o,
173
+ current: o.name === n.currentApp
174
+ }))), a = (o) => {
175
+ window.open(o.href, "_blank"), s("select", o);
175
176
  };
176
- return (a, i) => {
177
- const t = S("font-awesome-icon");
178
- return l(), u("div", Pe, [
179
- s("div", Xe, [
180
- s("div", qe, [
181
- s("div", Ue, [
182
- i[1] || (i[1] = s("div", null, "Mr Group Network", -1)),
183
- s("div", Ze, [
184
- m(t, {
185
- icon: d(b).farTimes,
177
+ return (o, c) => {
178
+ const l = V("font-awesome-icon");
179
+ return g(), y("div", Wn, [
180
+ p("div", Kn, [
181
+ p("div", Gn, [
182
+ p("div", Zn, [
183
+ c[1] || (c[1] = p("div", null, "Mr Group Network", -1)),
184
+ p("div", Xn, [
185
+ v(l, {
186
+ icon: x(N).farTimes,
186
187
  class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
187
- onClick: i[0] || (i[0] = (n) => c("close"))
188
+ onClick: c[0] || (c[0] = (i) => s("close"))
188
189
  }, null, 8, ["icon"])
189
190
  ])
190
191
  ]),
191
- (l(!0), u(L, null, F(g.value, (n) => (l(), u("div", {
192
- key: n.name,
193
- class: h([n.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
194
- onClick: (v) => f(n)
192
+ (g(!0), y(ne, null, de(r.value, (i) => (g(), y("div", {
193
+ key: i.name,
194
+ class: _([i.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
195
+ onClick: (d) => a(i)
195
196
  }, [
196
- s("div", We, [
197
- s("div", Ye, [
198
- s("div", Je, k(n.name), 1),
199
- n.current ? (l(), u("span", Qe, " Active ")) : x("", !0)
197
+ p("div", Yn, [
198
+ p("div", es, [
199
+ p("div", ts, F(i.name), 1),
200
+ i.current ? (g(), y("span", ns, " Active ")) : R("", !0)
200
201
  ]),
201
- s("div", et, k(n.description), 1)
202
+ p("div", ss, F(i.description), 1)
202
203
  ]),
203
- s("div", tt, [
204
- m(t, {
205
- class: h([n.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
206
- icon: d(b)[n.icon]
204
+ p("div", rs, [
205
+ v(l, {
206
+ class: _([i.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
207
+ icon: x(N)[i.icon]
207
208
  }, null, 8, ["class", "icon"])
208
209
  ])
209
- ], 10, Ke))), 128)),
210
- i[2] || (i[2] = s("div", null, null, -1))
210
+ ], 10, Qn))), 128)),
211
+ c[2] || (c[2] = p("div", null, null, -1))
211
212
  ]),
212
- i[3] || (i[3] = s("div", { class: "mt-auto" }, [
213
- s("div", { class: "p-6" }, "Learn More"),
214
- s("div", { class: "bg-gray-50 p-6" }, "Footer")
213
+ c[3] || (c[3] = p("div", { class: "mt-auto" }, [
214
+ p("div", { class: "p-6" }, "Learn More"),
215
+ p("div", { class: "bg-gray-50 p-6" }, "Footer")
215
216
  ], -1))
216
217
  ])
217
218
  ]);
218
219
  };
219
220
  }
220
- }, W = M(
221
+ }, Ot = Re(
221
222
  "brandFilter",
222
223
  () => {
223
- const e = z({
224
+ const e = re({
224
225
  brands: []
225
- }), o = (f = {}) => {
226
- if (!f.brands || !Array.isArray(f.brands)) {
226
+ }), t = (a = {}) => {
227
+ if (!a.brands || !Array.isArray(a.brands)) {
227
228
  console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
228
229
  return;
229
230
  }
230
- const a = f.brands.filter((t) => {
231
- const n = t.id && t.name && t.logo;
232
- return n || console.warn("useSparkBrandFilterStore: Invalid brand object", t), n;
233
- }), i = a.filter((t) => t.current);
234
- i.length === 0 && a.length > 0 ? a[0].current = !0 : i.length > 1 && a.forEach((t) => {
235
- t.current = t === i[0];
236
- }), e.brands = a.map((t) => ({
237
- id: t.id,
238
- name: t.name,
239
- logo: t.logo,
240
- current: t.current || !1
231
+ const o = a.brands.filter((l) => {
232
+ const i = l.id && l.name && l.logo;
233
+ return i || console.warn("useSparkBrandFilterStore: Invalid brand object", l), i;
234
+ }), c = o.filter((l) => l.current);
235
+ c.length === 0 && o.length > 0 ? o[0].current = !0 : c.length > 1 && o.forEach((l) => {
236
+ l.current = l === c[0];
237
+ }), e.brands = o.map((l) => ({
238
+ id: l.id,
239
+ name: l.name,
240
+ logo: l.logo,
241
+ current: l.current || !1
241
242
  }));
242
- }, r = y(() => e.brands.find((f) => f.current) || null), c = y(() => e.brands);
243
+ }, n = $(() => e.brands.find((a) => a.current) || null), s = $(() => e.brands);
243
244
  return {
244
245
  state: e,
245
- initialize: o,
246
- currentBrand: r,
247
- allBrands: c,
248
- toggleBrand: (f) => {
249
- if (!f || !e.brands.includes(f)) {
246
+ initialize: t,
247
+ currentBrand: n,
248
+ allBrands: s,
249
+ toggleBrand: (a) => {
250
+ if (!a || !e.brands.includes(a)) {
250
251
  console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
251
252
  return;
252
253
  }
253
- e.brands.forEach((a) => {
254
- a.current = a === f;
254
+ e.brands.forEach((o) => {
255
+ o.current = o === a;
255
256
  });
256
257
  }
257
258
  };
@@ -261,65 +262,65 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
261
262
  paths: ["state.brands"]
262
263
  }
263
264
  }
264
- ), nt = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ot = { class: "flex flex-1 flex-col" }, rt = { class: "divide-y divide-gray-200" }, at = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, lt = { class: "ml-auto flex items-center" }, it = {
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 = {
265
266
  key: 0,
266
267
  class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
267
- }, ct = ["onClick"], dt = { class: "gap-y-1 flex" }, ut = { class: "flex items-center mr-4" }, pt = ["src", "alt"], ft = { class: "ml-auto flex flex-col" }, mt = { class: "text-base text-gray-800 flex items-center" }, gt = { class: "font-medium" }, ht = {
268
+ }, fs = ["onClick"], ps = { class: "gap-y-1 flex" }, ms = { class: "flex items-center mr-4" }, hs = ["src", "alt"], gs = { class: "ml-auto flex flex-col" }, ys = { class: "text-base text-gray-800 flex items-center" }, ws = { class: "font-medium" }, bs = {
268
269
  key: 0,
269
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"
270
- }, vt = { class: "text-sm text-gray-500" }, xt = {
271
+ }, xs = { class: "text-sm text-gray-500" }, Ss = {
271
272
  __name: "SparkBrandSelector",
272
273
  emits: ["close", "select"],
273
- setup(e, { emit: o }) {
274
- const r = o, c = W(), g = (f) => {
275
- r("select", f);
274
+ setup(e, { emit: t }) {
275
+ const n = t, s = Ot(), r = (a) => {
276
+ n("select", a);
276
277
  };
277
- return (f, a) => {
278
- const i = S("font-awesome-icon");
279
- return l(), u("div", nt, [
280
- s("div", ot, [
281
- s("div", rt, [
282
- s("div", at, [
283
- a[1] || (a[1] = s("div", null, "Filter by Brand", -1)),
284
- s("div", lt, [
285
- m(i, {
286
- icon: d(b).farTimes,
278
+ return (a, o) => {
279
+ const c = V("font-awesome-icon");
280
+ return g(), y("div", as, [
281
+ p("div", is, [
282
+ p("div", ls, [
283
+ p("div", cs, [
284
+ o[1] || (o[1] = p("div", null, "Filter by Brand", -1)),
285
+ p("div", us, [
286
+ v(c, {
287
+ icon: x(N).farTimes,
287
288
  class: "size-4 text-gray-400 cursor-pointer",
288
- onClick: a[0] || (a[0] = (t) => r("close"))
289
+ onClick: o[0] || (o[0] = (l) => n("close"))
289
290
  }, null, 8, ["icon"])
290
291
  ])
291
292
  ]),
292
- d(c).allBrands.length === 0 ? (l(), u("div", it, " No brands configured ")) : x("", !0),
293
- (l(!0), u(L, null, F(d(c).allBrands, (t) => (l(), u("div", {
294
- key: t.id,
295
- class: h([t.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
296
- onClick: (n) => g(t)
293
+ x(s).allBrands.length === 0 ? (g(), y("div", ds, " No brands configured ")) : R("", !0),
294
+ (g(!0), y(ne, null, de(x(s).allBrands, (l) => (g(), y("div", {
295
+ key: l.id,
296
+ class: _([l.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
297
+ onClick: (i) => r(l)
297
298
  }, [
298
- s("div", dt, [
299
- s("div", ut, [
300
- s("img", {
301
- src: t.logo,
302
- alt: `${t.name} logo`,
299
+ p("div", ps, [
300
+ p("div", ms, [
301
+ p("img", {
302
+ src: l.logo,
303
+ alt: `${l.name} logo`,
303
304
  class: "h-8 w-auto"
304
- }, null, 8, pt)
305
+ }, null, 8, hs)
305
306
  ]),
306
- s("div", ft, [
307
- s("div", mt, [
308
- s("div", gt, k(t.name), 1),
309
- t.current ? (l(), u("span", ht, " Current ")) : x("", !0)
307
+ p("div", gs, [
308
+ p("div", ys, [
309
+ p("div", ws, F(l.name), 1),
310
+ l.current ? (g(), y("span", bs, " Current ")) : R("", !0)
310
311
  ]),
311
- s("div", vt, k(t.current ? "Current Brand" : "Change to"), 1)
312
+ p("div", xs, F(l.current ? "Current Brand" : "Change to"), 1)
312
313
  ])
313
314
  ])
314
- ], 10, ct))), 128)),
315
- a[2] || (a[2] = s("div", null, null, -1))
315
+ ], 10, fs))), 128)),
316
+ o[2] || (o[2] = p("div", null, null, -1))
316
317
  ]),
317
- a[3] || (a[3] = s("div", { class: "mt-auto" }, null, -1))
318
+ o[3] || (o[3] = p("div", { class: "mt-auto" }, null, -1))
318
319
  ])
319
320
  ]);
320
321
  };
321
322
  }
322
- }, yt = ["disabled"], Y = {
323
+ }, vs = ["disabled"], Ae = {
323
324
  __name: "SparkButton",
324
325
  props: {
325
326
  size: {
@@ -341,16 +342,16 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
341
342
  }
342
343
  },
343
344
  setup(e) {
344
- const o = e, r = A(null), c = te("buttonGroup", null), g = y(() => {
345
- if (!c?.isInGroup || !r.value) return null;
346
- const t = c.getButtonIndex(r.value), n = c.getButtonCount();
345
+ const t = e, n = z(null), s = tn("buttonGroup", null), r = $(() => {
346
+ if (!s?.isInGroup || !n.value) return null;
347
+ const l = s.getButtonIndex(n.value), i = s.getButtonCount();
347
348
  return {
348
- isFirst: t === 0,
349
- isLast: t === n - 1,
350
- index: t,
351
- total: n
349
+ isFirst: l === 0,
350
+ isLast: l === i - 1,
351
+ index: l,
352
+ total: i
352
353
  };
353
- }), f = {
354
+ }), a = {
354
355
  paddingX: /^px-/,
355
356
  paddingY: /^py-/,
356
357
  paddingAll: /^p-/,
@@ -360,99 +361,99 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
360
361
  borderRadius: /^rounded-/,
361
362
  background: /^bg-/,
362
363
  text: /^text-(?!white|black)/
363
- }, a = (t, n) => {
364
- if (!n) return t;
365
- const v = t.split(" ").filter(Boolean), p = n.split(" ").filter(Boolean);
366
- return [...v.filter((I) => !p.some((J) => {
367
- const T = Object.entries(f).find(
368
- ([ee, N]) => N.test(I)
369
- )?.[0], Q = Object.entries(f).find(
370
- ([ee, N]) => N.test(J)
364
+ }, o = (l, i) => {
365
+ if (!i) return l;
366
+ const d = l.split(" ").filter(Boolean), f = i.split(" ").filter(Boolean);
367
+ return [...d.filter((E) => !f.some((m) => {
368
+ const w = Object.entries(a).find(
369
+ ([k, T]) => T.test(E)
370
+ )?.[0], h = Object.entries(a).find(
371
+ ([k, T]) => T.test(m)
371
372
  )?.[0];
372
- return T && T === Q;
373
- })), ...p].join(" ");
374
- }, i = y(() => {
375
- let t = "", n = "";
376
- switch (o.size) {
373
+ return w && w === h;
374
+ })), ...f].join(" ");
375
+ }, c = $(() => {
376
+ let l = "", i = "";
377
+ switch (t.size) {
377
378
  case "xs":
378
- t += " px-2 py-1 text-xs", n = "sm";
379
+ l += " px-2 py-1 text-xs", i = "sm";
379
380
  break;
380
381
  case "sm":
381
- t += " px-2 py-1 text-sm", n = "sm";
382
+ l += " px-2 py-1 text-sm", i = "sm";
382
383
  break;
383
384
  case "md":
384
- t += " px-2.5 py-1.5 text-sm", n = "md";
385
+ l += " px-2.5 py-1.5 text-sm", i = "md";
385
386
  break;
386
387
  case "lg":
387
- t += " px-3 py-2 text-sm", n = "md";
388
+ l += " px-3 py-2 text-sm", i = "md";
388
389
  break;
389
390
  case "xl":
390
- t += " px-3.5 py-2.5 text-sm", n = "md";
391
+ l += " px-3.5 py-2.5 text-sm", i = "md";
391
392
  break;
392
393
  }
393
- if (c?.isInGroup && g.value) {
394
- const { isFirst: v, isLast: p } = g.value;
395
- t += " relative inline-flex items-center focus:z-10", v && p ? t += ` rounded-${n}` : v ? t += ` rounded-l-${n} rounded-r-none` : p ? t += ` rounded-r-${n} rounded-l-none -ml-px` : t += " rounded-none -ml-px";
394
+ if (s?.isInGroup && r.value) {
395
+ const { isFirst: d, isLast: f } = r.value;
396
+ l += " relative inline-flex items-center focus:z-10", d && f ? l += ` rounded-${i}` : d ? l += ` rounded-l-${i} rounded-r-none` : f ? l += ` rounded-r-${i} rounded-l-none -ml-px` : l += " rounded-none -ml-px";
396
397
  } else
397
- t += ` shadow-xs rounded-${n}`;
398
- switch (o.variant) {
398
+ l += ` shadow-xs rounded-${i}`;
399
+ switch (t.variant) {
399
400
  case "primary":
400
- t += " bg-primary-600 hover:bg-primary-500 text-white";
401
+ l += " bg-primary-600 hover:bg-primary-500 text-white";
401
402
  break;
402
403
  case "secondary":
403
- t += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
404
+ l += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
404
405
  break;
405
406
  case "success":
406
- t += " bg-green-600 hover:bg-green-500 text-white";
407
+ l += " bg-green-600 hover:bg-green-500 text-white";
407
408
  break;
408
409
  case "warning":
409
- t += " bg-amber-600 hover:bg-amber-500 text-white";
410
+ l += " bg-amber-600 hover:bg-amber-500 text-white";
410
411
  break;
411
412
  case "danger":
412
- t += " bg-red-600 hover:bg-red-500 text-white";
413
+ l += " bg-red-600 hover:bg-red-500 text-white";
413
414
  break;
414
415
  case "info":
415
- t += " bg-cyan-600 hover:bg-cyan-500 text-white";
416
+ l += " bg-cyan-600 hover:bg-cyan-500 text-white";
416
417
  break;
417
418
  default:
418
- t += ` bg-${o.variant}-600 hover:bg-${o.variant}-500 text-white`;
419
+ l += ` bg-${t.variant}-600 hover:bg-${t.variant}-500 text-white`;
419
420
  }
420
- return t = a(t, o.buttonClass), t;
421
+ return l = o(l, t.buttonClass), l;
421
422
  });
422
- return (t, n) => (l(), u("button", {
423
+ return (l, i) => (g(), y("button", {
423
424
  type: "button",
424
425
  ref_key: "buttonRef",
425
- ref: r,
426
- class: h(i.value),
426
+ ref: n,
427
+ class: _(c.value),
427
428
  disabled: e.disabled,
428
- onClick: n[0] || (n[0] = (v) => t.$emit("click"))
429
+ onClick: i[0] || (i[0] = (d) => l.$emit("click"))
429
430
  }, [
430
- C(t.$slots, "default")
431
- ], 10, yt));
431
+ q(l.$slots, "default")
432
+ ], 10, vs));
432
433
  }
433
- }, _s = {
434
+ }, ka = {
434
435
  __name: "SparkButtonGroup",
435
436
  setup(e) {
436
- const o = A(null);
437
- return se("buttonGroup", {
437
+ const t = z(null);
438
+ return nn("buttonGroup", {
438
439
  isInGroup: !0,
439
- getButtonIndex: (g) => o.value ? Array.from(o.value.children).indexOf(g) : -1,
440
- getButtonCount: () => o.value?.children.length || 0
441
- }), (g, f) => (l(), u("div", {
440
+ getButtonIndex: (r) => t.value ? Array.from(t.value.children).indexOf(r) : -1,
441
+ getButtonCount: () => t.value?.children.length || 0
442
+ }), (r, a) => (g(), y("div", {
442
443
  class: "inline-flex rounded-md shadow-xs",
443
444
  ref_key: "groupRef",
444
- ref: o
445
+ ref: t
445
446
  }, [
446
- C(g.$slots, "default")
447
+ q(r.$slots, "default")
447
448
  ], 512));
448
449
  }
449
- }, bt = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, _t = {
450
+ }, Cs = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, _s = {
450
451
  key: 0,
451
452
  class: "p-5"
452
- }, wt = {
453
+ }, ks = {
453
454
  key: 1,
454
455
  class: "p-5"
455
- }, ws = {
456
+ }, Ra = {
456
457
  __name: "SparkCard",
457
458
  props: {
458
459
  padded: {
@@ -465,52 +466,52 @@ const Oe = { class: "flex items-center" }, De = { class: "shrink-0 self-start" }
465
466
  }
466
467
  },
467
468
  setup(e) {
468
- const o = e;
469
- return (r, c) => (l(), u("div", bt, [
470
- r.$slots.header ? (l(), u("div", _t, [
471
- C(r.$slots, "header")
472
- ])) : x("", !0),
473
- s("div", {
474
- class: h([o.padded ? o.paddedClass : ""])
469
+ const t = e;
470
+ return (n, s) => (g(), y("div", Cs, [
471
+ n.$slots.header ? (g(), y("div", _s, [
472
+ q(n.$slots, "header")
473
+ ])) : R("", !0),
474
+ p("div", {
475
+ class: _([t.padded ? t.paddedClass : ""])
475
476
  }, [
476
- C(r.$slots, "default")
477
+ q(n.$slots, "default")
477
478
  ], 2),
478
- r.$slots.footer ? (l(), u("div", wt, [
479
- C(r.$slots, "footer")
480
- ])) : x("", !0)
479
+ n.$slots.footer ? (g(), y("div", ks, [
480
+ q(n.$slots, "footer")
481
+ ])) : R("", !0)
481
482
  ]));
482
483
  }
483
484
  };
484
- class kt {
485
+ class Rs {
485
486
  constructor() {
486
- this.state = z({
487
+ this.state = re({
487
488
  isVisible: !1,
488
489
  content: null,
489
490
  props: {},
490
491
  eventHandlers: {}
491
492
  });
492
493
  }
493
- show = (o, r = {}, c = {}) => {
494
- this.state.content = G(o), this.state.props = r, this.state.eventHandlers = c, this.state.isVisible = !0;
494
+ show = (t, n = {}, s = {}) => {
495
+ this.state.content = xt(t), this.state.props = n, this.state.eventHandlers = s, this.state.isVisible = !0;
495
496
  };
496
497
  hide = () => {
497
498
  this.state.isVisible = !1, this.state.eventHandlers = {};
498
499
  };
499
500
  }
500
- const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, St = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, $t = {
501
+ const ce = 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 = {
501
502
  __name: "SparkModalContainer",
502
503
  setup(e) {
503
- return (o, r) => (l(), B(d(U), {
504
+ return (t, n) => (g(), Y(x(kt), {
504
505
  as: "template",
505
- show: d(R).state.isVisible
506
+ show: x(ce).state.isVisible
506
507
  }, {
507
- default: _(() => [
508
- m(d(Z), {
508
+ default: O(() => [
509
+ v(x(Rt), {
509
510
  class: "relative z-200",
510
- onClose: d(R).hide
511
+ onClose: x(ce).hide
511
512
  }, {
512
- default: _(() => [
513
- m(d(H), {
513
+ default: O(() => [
514
+ v(x(_e), {
514
515
  as: "template",
515
516
  enter: "ease-out duration-300",
516
517
  "enter-from": "opacity-0",
@@ -519,14 +520,14 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
519
520
  "leave-from": "opacity-100",
520
521
  "leave-to": "opacity-0"
521
522
  }, {
522
- default: _(() => [...r[0] || (r[0] = [
523
- s("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
523
+ default: O(() => [...n[0] || (n[0] = [
524
+ p("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
524
525
  ])]),
525
526
  _: 1
526
527
  }),
527
- s("div", Ct, [
528
- s("div", St, [
529
- m(d(H), {
528
+ p("div", Es, [
529
+ p("div", Os, [
530
+ v(x(_e), {
530
531
  as: "template",
531
532
  enter: "ease-out duration-300",
532
533
  "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
@@ -535,10 +536,10 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
535
536
  "leave-from": "opacity-100 translate-y-0 sm:scale-100",
536
537
  "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
537
538
  }, {
538
- default: _(() => [
539
- m(d(K), { 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" }, {
540
- default: _(() => [
541
- (l(), B(E(d(R).state.content), j(d(R).state.props, P(d(R).state.eventHandlers)), null, 16))
539
+ default: O(() => [
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
+ default: O(() => [
542
+ (g(), Y(St(x(ce).state.content), vt(x(ce).state.props, Ct(x(ce).state.eventHandlers)), null, 16))
542
543
  ]),
543
544
  _: 1
544
545
  })
@@ -554,10 +555,10 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
554
555
  _: 1
555
556
  }, 8, ["show"]));
556
557
  }
557
- }, Bt = { class: "px-4 pt-5 pb-4 sm:p-6" }, Lt = {
558
+ }, $s = { class: "px-4 pt-5 pb-4 sm:p-6" }, Ts = {
558
559
  key: 0,
559
560
  class: "text-lg font-medium text-gray-900"
560
- }, ks = {
561
+ }, Ea = {
561
562
  __name: "SparkModalDialog",
562
563
  props: {
563
564
  title: {
@@ -607,8 +608,8 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
607
608
  "input"
608
609
  ],
609
610
  setup(e) {
610
- const o = e, r = y(() => !o.buttons || o.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : o.buttons), c = y(() => {
611
- switch (r.value.length) {
611
+ const t = e, n = $(() => !t.buttons || t.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : t.buttons), s = $(() => {
612
+ switch (n.value.length) {
612
613
  case 1:
613
614
  return "sm:grid sm:grid-flow-row-dense";
614
615
  case 2:
@@ -618,53 +619,53 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
618
619
  default:
619
620
  return "flex flex-col gap-3";
620
621
  }
621
- }), g = {
622
+ }), r = {
622
623
  info: "farInfoCircle",
623
624
  success: "farCheckCircle",
624
625
  warning: "farExclamationTriangle",
625
626
  danger: "farCircleXmark"
626
- }, f = y(() => o.icon || g[o.type]), a = y(() => ({
627
+ }, a = $(() => t.icon || r[t.type]), o = $(() => ({
627
628
  info: "bg-blue-100",
628
629
  success: "bg-green-100",
629
630
  warning: "bg-yellow-100",
630
631
  danger: "bg-red-100"
631
- })[o.type]), i = y(() => ({
632
+ })[t.type]), c = $(() => ({
632
633
  info: "text-blue-400",
633
634
  success: "text-green-400",
634
635
  warning: "text-yellow-400",
635
636
  danger: "text-red-400"
636
- })[o.type]);
637
- return (t, n) => {
638
- const v = S("font-awesome-icon");
639
- return l(), u("div", Bt, [
640
- f.value ? (l(), u("div", {
637
+ })[t.type]);
638
+ return (l, i) => {
639
+ const d = V("font-awesome-icon");
640
+ return g(), y("div", $s, [
641
+ a.value ? (g(), y("div", {
641
642
  key: 0,
642
- class: h(["mx-auto flex size-12 items-center justify-center rounded-full", a.value])
643
+ class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
643
644
  }, [
644
- m(v, {
645
- icon: d(b)[f.value],
646
- class: h(["h-5 w-5", i.value])
645
+ v(d, {
646
+ icon: x(N)[a.value],
647
+ class: _(["h-5 w-5", c.value])
647
648
  }, null, 8, ["icon", "class"])
648
- ], 2)) : x("", !0),
649
- s("div", {
650
- class: h(["text-center", { "mt-3 sm:mt-5": f.value }])
649
+ ], 2)) : R("", !0),
650
+ p("div", {
651
+ class: _(["text-center", { "mt-3 sm:mt-5": a.value }])
651
652
  }, [
652
- e.title ? (l(), u("h3", Lt, k(e.title), 1)) : x("", !0),
653
- e.message ? (l(), u("div", {
653
+ e.title ? (g(), y("h3", Ts, F(e.title), 1)) : R("", !0),
654
+ e.message ? (g(), y("div", {
654
655
  key: 1,
655
- class: h([{ "mt-2": e.title }, "text-sm text-gray-500"])
656
- }, k(e.message), 3)) : x("", !0)
656
+ class: _([{ "mt-2": e.title }, "text-sm text-gray-500"])
657
+ }, F(e.message), 3)) : R("", !0)
657
658
  ], 2),
658
- s("div", {
659
- class: h(["mt-5 sm:mt-6", c.value])
659
+ p("div", {
660
+ class: _(["mt-5 sm:mt-6", s.value])
660
661
  }, [
661
- (l(!0), u(L, null, F(r.value, (p, w) => (l(), B(d(Y), {
662
- key: w,
663
- variant: p.variant,
664
- onClick: (I) => t.$emit(p.event, p)
662
+ (g(!0), y(ne, null, de(n.value, (f, b) => (g(), Y(x(Ae), {
663
+ key: b,
664
+ variant: f.variant,
665
+ onClick: (E) => l.$emit(f.event, f)
665
666
  }, {
666
- default: _(() => [
667
- X(k(p.text), 1)
667
+ default: O(() => [
668
+ ze(F(f.text), 1)
668
669
  ]),
669
670
  _: 2
670
671
  }, 1032, ["variant", "onClick"]))), 128))
@@ -672,7 +673,7 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
672
673
  ]);
673
674
  };
674
675
  }
675
- }, Vt = { class: "fixed inset-0 flex" }, O = {
676
+ }, Ls = { class: "fixed inset-0 flex" }, nt = {
676
677
  __name: "SparkOverlay",
677
678
  props: {
678
679
  position: {
@@ -686,19 +687,19 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
686
687
  }
687
688
  },
688
689
  setup(e) {
689
- const o = A(null);
690
- return (r, c) => (l(), B(d(U), {
690
+ const t = z(null);
691
+ return (n, s) => (g(), Y(x(kt), {
691
692
  show: e.overlayInstance.state.isVisible,
692
693
  as: "template"
693
694
  }, {
694
- default: _(() => [
695
- m(d(Z), {
696
- initialFocus: o.value,
695
+ default: O(() => [
696
+ v(x(Rt), {
697
+ initialFocus: t.value,
697
698
  class: "relative z-200",
698
699
  onClose: e.overlayInstance.close
699
700
  }, {
700
- default: _(() => [
701
- m(d(H), {
701
+ default: O(() => [
702
+ v(x(_e), {
702
703
  as: "template",
703
704
  enter: "transition-opacity ease-linear duration-150",
704
705
  "enter-from": "opacity-0",
@@ -707,13 +708,13 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
707
708
  "leave-from": "opacity-100",
708
709
  "leave-to": "opacity-0"
709
710
  }, {
710
- default: _(() => [...c[0] || (c[0] = [
711
- s("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
711
+ default: O(() => [...s[0] || (s[0] = [
712
+ p("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
712
713
  ])]),
713
714
  _: 1
714
715
  }),
715
- s("div", Vt, [
716
- m(d(H), {
716
+ p("div", Ls, [
717
+ v(x(_e), {
717
718
  as: "template",
718
719
  enter: "transition ease-in-out duration-150 transform",
719
720
  "enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
@@ -722,17 +723,17 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
722
723
  "leave-from": "translate-x-0 opacity-100",
723
724
  "leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
724
725
  }, {
725
- default: _(() => [
726
- m(d(K), {
726
+ default: O(() => [
727
+ v(x(Et), {
727
728
  ref_key: "panelRef",
728
- ref: o,
729
- class: h([
729
+ ref: t,
730
+ class: _([
730
731
  "flex w-[400px] py-2.5",
731
732
  e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
732
733
  ])
733
734
  }, {
734
- default: _(() => [
735
- (l(), B(E(e.overlayInstance.state.content), j({ ...r.$attrs, ...e.overlayInstance.state.props }, P(e.overlayInstance.state.eventHandlers)), null, 16))
735
+ default: O(() => [
736
+ (g(), Y(St(e.overlayInstance.state.content), vt({ ...n.$attrs, ...e.overlayInstance.state.props }, Ct(e.overlayInstance.state.eventHandlers)), null, 16))
736
737
  ]),
737
738
  _: 1
738
739
  }, 8, ["class"])
@@ -748,41 +749,41 @@ const R = new kt(), Ct = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
748
749
  }, 8, ["show"]));
749
750
  }
750
751
  };
751
- function D() {
752
- const e = z({
752
+ function st() {
753
+ const e = re({
753
754
  isVisible: !1,
754
755
  content: null,
755
756
  props: {},
756
757
  eventHandlers: {}
757
- }), o = () => {
758
+ }), t = () => {
758
759
  e.isVisible = !e.isVisible;
759
- }, r = () => {
760
+ }, n = () => {
760
761
  e.isVisible = !1, e.eventHandlers = {};
761
- }, c = () => {
762
+ }, s = () => {
762
763
  e.isVisible = !0;
763
- }, g = (a, i = {}, t = {}) => {
764
- e.content = G(a), e.props = i, e.eventHandlers = t;
764
+ }, r = (o, c = {}, l = {}) => {
765
+ e.content = xt(o), e.props = c, e.eventHandlers = l;
765
766
  };
766
767
  return {
767
768
  state: e,
768
- toggle: o,
769
- close: r,
770
- open: c,
771
- setContent: g,
772
- show: (a, i = {}, t = {}) => {
773
- a && g(a, i, t), c();
769
+ toggle: t,
770
+ close: n,
771
+ open: s,
772
+ setContent: r,
773
+ show: (o, c = {}, l = {}) => {
774
+ o && r(o, c, l), s();
774
775
  }
775
776
  };
776
777
  }
777
- class Rt {
778
+ class Fs {
778
779
  constructor() {
779
- this.left = D(), this.right = D();
780
+ this.left = st(), this.right = st();
780
781
  }
781
- showLeft = (o, r = {}, c = {}) => {
782
- this.left.show(o, r, c);
782
+ showLeft = (t, n = {}, s = {}) => {
783
+ this.left.show(t, n, s);
783
784
  };
784
- showRight = (o, r = {}, c = {}) => {
785
- this.right.show(o, r, c);
785
+ showRight = (t, n = {}, s = {}) => {
786
+ this.right.show(t, n, s);
786
787
  };
787
788
  closeLeft = () => {
788
789
  this.left.close();
@@ -794,19 +795,19 @@ class Rt {
794
795
  this.left.close(), this.right.close();
795
796
  };
796
797
  }
797
- const $ = new Rt(), Ft = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, At = { class: "flex flex-1 flex-col" }, zt = {
798
+ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns = { class: "flex flex-1 flex-col" }, Ps = {
798
799
  class: "flex flex-1 flex-col gap-y-7",
799
800
  role: "list"
800
- }, Ht = { role: "list" }, It = { class: "flex items-center pb-8" }, Nt = ["href", "onClick"], Mt = {
801
+ }, Hs = { role: "list" }, Us = { class: "flex items-center pb-8" }, Vs = ["href", "onClick"], Ds = {
801
802
  key: 2,
802
803
  class: "w-full flex justify-center"
803
- }, Tt = {
804
+ }, js = {
804
805
  key: 0,
805
806
  class: "mt-[5px] flex flex-col gap-[5px]"
806
- }, Ot = ["href", "onClick"], Dt = {
807
+ }, Ms = ["href", "onClick"], Is = {
807
808
  key: 1,
808
809
  class: "text-[13px]"
809
- }, Gt = { class: "mt-auto" }, Et = { class: "p-[10px] flex-shrink-0" }, jt = { class: "flex flex-1 items-center gap-x-6" }, Pt = { class: "relative flex flex-1 items-center gap-4" }, Xt = { class: "cursor-pointer" }, qt = ["src"], Ut = { class: "ml-auto" }, Zt = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Cs = {
810
+ }, qs = { class: "mt-auto" }, zs = { class: "p-[10px] flex-shrink-0" }, Js = { class: "flex flex-1 items-center gap-x-6" }, Ws = { 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" }, Oa = {
810
811
  __name: "SparkDefaultContainer",
811
812
  props: {
812
813
  appStore: {
@@ -819,109 +820,109 @@ const $ = new Rt(), Ft = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, At =
819
820
  }
820
821
  },
821
822
  setup(e) {
822
- const o = e, r = W(), c = () => {
823
- $.showRight(st, {
824
- currentApp: o.appStore.state.app
823
+ const t = e, n = Ot(), s = () => {
824
+ Z.showRight(os, {
825
+ currentApp: t.appStore.state.app
825
826
  });
826
- }, g = () => {
827
- $.showLeft(
828
- xt,
827
+ }, r = () => {
828
+ Z.showLeft(
829
+ Ss,
829
830
  {},
830
831
  {
831
- select: (i) => {
832
- r.toggleBrand(i), $.closeLeft();
832
+ select: (c) => {
833
+ n.toggleBrand(c), Z.closeLeft();
833
834
  }
834
835
  }
835
836
  );
836
- }, f = y(() => o.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [o.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), a = y(() => o.mainNavStore.state.hidden ? ["pl-2.5"] : [o.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
837
- return (i, t) => {
838
- const n = S("font-awesome-icon"), v = S("router-view");
839
- return l(), u(L, null, [
840
- s("div", {
841
- class: h([f.value, "fixed inset-y-0 flex transition-all z-100"])
837
+ }, a = $(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), o = $(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
838
+ return (c, l) => {
839
+ const i = V("font-awesome-icon"), d = V("router-view");
840
+ return g(), y(ne, null, [
841
+ p("div", {
842
+ class: _([a.value, "fixed inset-y-0 flex transition-all z-100"])
842
843
  }, [
843
- s("div", Ft, [
844
- s("nav", At, [
845
- s("ul", zt, [
846
- s("li", null, [
847
- s("ul", Ht, [
848
- s("li", It, [
849
- s("a", {
844
+ p("div", Bs, [
845
+ p("nav", Ns, [
846
+ p("ul", Ps, [
847
+ p("li", null, [
848
+ p("ul", Hs, [
849
+ p("li", Us, [
850
+ p("a", {
850
851
  class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
851
- onClick: t[0] || (t[0] = V((p) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
852
+ onClick: l[0] || (l[0] = le((f) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
852
853
  }, [
853
- m(n, {
854
- icon: d(b)[e.appStore.state.icon],
854
+ v(i, {
855
+ icon: x(N)[e.appStore.state.icon],
855
856
  class: "size-5"
856
857
  }, null, 8, ["icon"])
857
858
  ]),
858
- e.mainNavStore.state.collapsed ? x("", !0) : (l(), u("a", {
859
+ e.mainNavStore.state.collapsed ? R("", !0) : (g(), y("a", {
859
860
  key: 0,
860
- onClick: t[1] || (t[1] = V((p) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
861
+ onClick: l[1] || (l[1] = le((f) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
861
862
  class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
862
- }, k(e.appStore.state.app), 1))
863
+ }, F(e.appStore.state.app), 1))
863
864
  ]),
864
- (l(!0), u(L, null, F(e.mainNavStore.state.menu, (p) => (l(), u("li", {
865
- key: p.name,
866
- class: h({
867
- "mt-[10px]": p.children
865
+ (g(!0), y(ne, null, de(e.mainNavStore.state.menu, (f) => (g(), y("li", {
866
+ key: f.name,
867
+ class: _({
868
+ "mt-[10px]": f.children
868
869
  })
869
870
  }, [
870
- s("a", {
871
- class: h([{
872
- "bg-gray-100": p.current,
873
- "hover:bg-gray-100": p?.href
871
+ p("a", {
872
+ class: _([{
873
+ "bg-gray-100": f.current,
874
+ "hover:bg-gray-100": f?.href
874
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"]),
875
- href: p?.href,
876
- onClick: V((w) => e.mainNavStore.goto(p.href), ["prevent"])
876
+ href: f?.href,
877
+ onClick: le((b) => e.mainNavStore.goto(f.href), ["prevent"])
877
878
  }, [
878
- p.icon ? (l(), B(n, {
879
+ f.icon ? (g(), Y(i, {
879
880
  key: 0,
880
- icon: d(b)[p.icon],
881
- class: h([[(p.current, "text-gray-400")], "size-4"])
882
- }, null, 8, ["icon", "class"])) : x("", !0),
883
- e.mainNavStore.state.collapsed ? p?.children ? (l(), u("div", Mt, [...t[4] || (t[4] = [
884
- s("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
885
- ])])) : x("", !0) : (l(), u("span", {
881
+ icon: x(N)[f.icon],
882
+ class: _([[(f.current, "text-gray-400")], "size-4"])
883
+ }, null, 8, ["icon", "class"])) : R("", !0),
884
+ e.mainNavStore.state.collapsed ? f?.children ? (g(), y("div", Ds, [...l[4] || (l[4] = [
885
+ p("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
886
+ ])])) : R("", !0) : (g(), y("span", {
886
887
  key: 1,
887
- class: h({
888
- "text-[11px]": p?.children,
889
- "text-[13px]": !p?.children,
890
- "font-semibold": p?.children,
891
- "text-gray-500": p?.children
888
+ class: _({
889
+ "text-[11px]": f?.children,
890
+ "text-[13px]": !f?.children,
891
+ "font-semibold": f?.children,
892
+ "text-gray-500": f?.children
892
893
  })
893
- }, k(p.name), 3))
894
- ], 10, Nt),
895
- p.children ? (l(), u("ul", Tt, [
896
- (l(!0), u(L, null, F(p.children, (w) => (l(), u("li", {
897
- key: w.name
894
+ }, F(f.name), 3))
895
+ ], 10, Vs),
896
+ f.children ? (g(), y("ul", js, [
897
+ (g(!0), y(ne, null, de(f.children, (b) => (g(), y("li", {
898
+ key: b.name
898
899
  }, [
899
- s("a", {
900
- class: h([[w.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"]),
901
- href: w.href,
902
- onClick: V((I) => e.mainNavStore.goto(w.href), ["prevent"])
900
+ p("a", {
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
+ href: b.href,
903
+ onClick: le((E) => e.mainNavStore.goto(b.href), ["prevent"])
903
904
  }, [
904
- w.icon ? (l(), B(n, {
905
+ b.icon ? (g(), Y(i, {
905
906
  key: 0,
906
- icon: d(b)[w.icon],
907
- class: h([[(w.current, "text-gray-400")], "size-4"])
908
- }, null, 8, ["icon", "class"])) : x("", !0),
909
- e.mainNavStore.state.collapsed ? x("", !0) : (l(), u("span", Dt, k(w.name), 1))
910
- ], 10, Ot)
907
+ icon: x(N)[b.icon],
908
+ class: _([[(b.current, "text-gray-400")], "size-4"])
909
+ }, null, 8, ["icon", "class"])) : R("", !0),
910
+ e.mainNavStore.state.collapsed ? R("", !0) : (g(), y("span", Is, F(b.name), 1))
911
+ ], 10, Ms)
911
912
  ]))), 128))
912
- ])) : x("", !0)
913
+ ])) : R("", !0)
913
914
  ], 2))), 128))
914
915
  ])
915
916
  ]),
916
- s("li", Gt, [
917
- C(i.$slots, "sidebar-footer"),
918
- s("a", {
917
+ p("li", qs, [
918
+ q(c.$slots, "sidebar-footer"),
919
+ p("a", {
919
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",
920
921
  href: "#",
921
- onClick: t[2] || (t[2] = V((p) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
922
+ onClick: l[2] || (l[2] = le((f) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
922
923
  }, [
923
- m(n, {
924
- icon: d(b)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
924
+ v(i, {
925
+ icon: x(N)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
925
926
  class: "class-5"
926
927
  }, null, 8, ["icon"])
927
928
  ])
@@ -930,258 +931,2321 @@ const $ = new Rt(), Ft = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, At =
930
931
  ])
931
932
  ])
932
933
  ], 2),
933
- s("div", {
934
- class: h([a.value, "h-full transition-all flex flex-col"])
934
+ p("div", {
935
+ class: _([o.value, "h-full transition-all flex flex-col"])
935
936
  }, [
936
- s("div", Et, [
937
- s("div", jt, [
938
- s("div", Pt, [
939
- C(i.$slots, "header-left", {}, () => [
940
- s("div", Xt, [
941
- m(n, {
942
- icon: d(b).farBarsSort,
937
+ p("div", zs, [
938
+ p("div", Js, [
939
+ p("div", Ws, [
940
+ q(c.$slots, "header-left", {}, () => [
941
+ p("div", Ks, [
942
+ v(i, {
943
+ icon: x(N).farBarsSort,
943
944
  class: "size-5",
944
- onClick: t[3] || (t[3] = (p) => e.mainNavStore.toggleHidden())
945
+ onClick: l[3] || (l[3] = (f) => e.mainNavStore.toggleHidden())
945
946
  }, null, 8, ["icon"])
946
947
  ])
947
948
  ]),
948
- C(i.$slots, "header-center", {}, () => [
949
- e.appStore.state.showBrandSelector ? (l(), u("div", {
949
+ q(c.$slots, "header-center", {}, () => [
950
+ e.appStore.state.showBrandSelector ? (g(), y("div", {
950
951
  key: 0,
951
952
  class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
952
- onClick: g
953
+ onClick: r
953
954
  }, [
954
- d(r).currentBrand ? (l(), u("img", {
955
+ x(n).currentBrand ? (g(), y("img", {
955
956
  key: 0,
956
- src: d(r).currentBrand.logo,
957
+ src: x(n).currentBrand.logo,
957
958
  alt: "",
958
959
  class: "h-[30px] w-auto"
959
- }, null, 8, qt)) : x("", !0)
960
- ])) : x("", !0)
960
+ }, null, 8, Gs)) : R("", !0)
961
+ ])) : R("", !0)
961
962
  ]),
962
- s("div", Ut, [
963
- C(i.$slots, "header-right", {}, () => [
964
- e.appStore.state.showAppSelector ? (l(), u("button", {
963
+ p("div", Zs, [
964
+ q(c.$slots, "header-right", {}, () => [
965
+ e.appStore.state.showAppSelector ? (g(), y("button", {
965
966
  key: 0,
966
967
  class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
967
968
  type: "button",
968
- onClick: c
969
+ onClick: s
969
970
  }, [
970
- m(n, {
971
- icon: d(b).farGripDotsVertical,
971
+ v(i, {
972
+ icon: x(N).farGripDotsVertical,
972
973
  class: "size-4 text-gray-400"
973
974
  }, null, 8, ["icon"])
974
- ])) : x("", !0)
975
+ ])) : R("", !0)
975
976
  ])
976
977
  ])
977
978
  ])
978
979
  ])
979
980
  ]),
980
- s("main", Zt, [
981
- m(v)
981
+ p("main", Xs, [
982
+ v(d)
982
983
  ])
983
984
  ], 2),
984
- m(d(O), {
985
+ v(x(nt), {
985
986
  position: "left",
986
- "overlay-instance": d($).left,
987
- onClose: d($).closeLeft
987
+ "overlay-instance": x(Z).left,
988
+ onClose: x(Z).closeLeft
988
989
  }, null, 8, ["overlay-instance", "onClose"]),
989
- m(d(O), {
990
+ v(x(nt), {
990
991
  position: "right",
991
- "overlay-instance": d($).right,
992
- onClose: d($).closeRight
992
+ "overlay-instance": x(Z).right,
993
+ onClose: x(Z).closeRight
993
994
  }, null, 8, ["overlay-instance", "onClose"]),
994
- m(d($t))
995
+ v(x(As))
995
996
  ], 64);
996
997
  };
997
998
  }
998
- }, Kt = (e, o) => {
999
- const r = e.__vccOpts || e;
1000
- for (const [c, g] of o)
1001
- r[c] = g;
1002
- return r;
1003
- }, Wt = {}, Yt = { class: "h-full" };
1004
- function Jt(e, o) {
1005
- const r = S("router-view");
1006
- return l(), u("main", Yt, [
1007
- m(r)
999
+ }, Qs = (e, t) => {
1000
+ const n = e.__vccOpts || e;
1001
+ for (const [s, r] of t)
1002
+ n[s] = r;
1003
+ return n;
1004
+ }, Ys = {}, er = { class: "h-full" };
1005
+ function tr(e, t) {
1006
+ const n = V("router-view");
1007
+ return g(), y("main", er, [
1008
+ v(n)
1008
1009
  ]);
1009
1010
  }
1010
- const Ss = /* @__PURE__ */ Kt(Wt, [["render", Jt]]), Qt = M("sparkApp", () => {
1011
- const e = z({
1012
- app: "",
1013
- icon: "",
1014
- homeRoute: "dashboard",
1015
- showBrandSelector: !0,
1016
- showAppSelector: !0
1011
+ const Aa = /* @__PURE__ */ Qs(Ys, [["render", tr]]);
1012
+ function At(e, t) {
1013
+ return function() {
1014
+ return e.apply(t, arguments);
1015
+ };
1016
+ }
1017
+ const { toString: nr } = Object.prototype, { getPrototypeOf: Je } = Object, { iterator: $e, toStringTag: $t } = Symbol, Te = /* @__PURE__ */ ((e) => (t) => {
1018
+ const n = nr.call(t);
1019
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1020
+ })(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => Te(t) === e), Le = (e) => (t) => typeof t === e, { isArray: oe } = Array, se = Le("undefined");
1021
+ function fe(e) {
1022
+ return e !== null && !se(e) && e.constructor !== null && !se(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1023
+ }
1024
+ const Tt = j("ArrayBuffer");
1025
+ function sr(e) {
1026
+ let t;
1027
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Tt(e.buffer), t;
1028
+ }
1029
+ const rr = Le("string"), P = Le("function"), Lt = Le("number"), pe = (e) => e !== null && typeof e == "object", or = (e) => e === !0 || e === !1, Se = (e) => {
1030
+ if (Te(e) !== "object")
1031
+ return !1;
1032
+ const t = Je(e);
1033
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !($t in e) && !($e in e);
1034
+ }, ar = (e) => {
1035
+ if (!pe(e) || fe(e))
1036
+ return !1;
1037
+ try {
1038
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
1039
+ } catch {
1040
+ return !1;
1041
+ }
1042
+ }, ir = j("Date"), lr = j("File"), cr = j("Blob"), ur = j("FileList"), dr = (e) => pe(e) && P(e.pipe), fr = (e) => {
1043
+ let t;
1044
+ return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Te(e)) === "formdata" || // detect form-data instance
1045
+ t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
1046
+ }, pr = j("URLSearchParams"), [mr, hr, gr, yr] = ["ReadableStream", "Request", "Response", "Headers"].map(j), wr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1047
+ function me(e, t, { allOwnKeys: n = !1 } = {}) {
1048
+ if (e === null || typeof e > "u")
1049
+ return;
1050
+ let s, r;
1051
+ if (typeof e != "object" && (e = [e]), oe(e))
1052
+ for (s = 0, r = e.length; s < r; s++)
1053
+ t.call(null, e[s], s, e);
1054
+ else {
1055
+ if (fe(e))
1056
+ return;
1057
+ const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = a.length;
1058
+ let c;
1059
+ for (s = 0; s < o; s++)
1060
+ c = a[s], t.call(null, e[c], c, e);
1061
+ }
1062
+ }
1063
+ function Ft(e, t) {
1064
+ if (fe(e))
1065
+ return null;
1066
+ t = t.toLowerCase();
1067
+ const n = Object.keys(e);
1068
+ let s = n.length, r;
1069
+ for (; s-- > 0; )
1070
+ if (r = n[s], t === r.toLowerCase())
1071
+ return r;
1072
+ return null;
1073
+ }
1074
+ const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Bt = (e) => !se(e) && e !== X;
1075
+ function je() {
1076
+ const { caseless: e, skipUndefined: t } = Bt(this) && this || {}, n = {}, s = (r, a) => {
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) : oe(r) ? n[o] = r.slice() : (!t || !se(r)) && (n[o] = r);
1079
+ };
1080
+ for (let r = 0, a = arguments.length; r < a; r++)
1081
+ arguments[r] && me(arguments[r], s);
1082
+ return n;
1083
+ }
1084
+ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
1085
+ n && P(r) ? e[a] = At(r, n) : e[a] = r;
1086
+ }, { allOwnKeys: s }), e), xr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Sr = (e, t, n, s) => {
1087
+ e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1088
+ value: t.prototype
1089
+ }), n && Object.assign(e.prototype, n);
1090
+ }, vr = (e, t, n, s) => {
1091
+ let r, a, o;
1092
+ const c = {};
1093
+ if (t = t || {}, e == null) return t;
1094
+ do {
1095
+ for (r = Object.getOwnPropertyNames(e), a = r.length; a-- > 0; )
1096
+ o = r[a], (!s || s(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
1097
+ e = n !== !1 && Je(e);
1098
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
1099
+ return t;
1100
+ }, Cr = (e, t, n) => {
1101
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
1102
+ const s = e.indexOf(t, n);
1103
+ return s !== -1 && s === n;
1104
+ }, _r = (e) => {
1105
+ if (!e) return null;
1106
+ if (oe(e)) return e;
1107
+ let t = e.length;
1108
+ if (!Lt(t)) return null;
1109
+ const n = new Array(t);
1110
+ for (; t-- > 0; )
1111
+ n[t] = e[t];
1112
+ return n;
1113
+ }, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Je(Uint8Array)), Rr = (e, t) => {
1114
+ const s = (e && e[$e]).call(e);
1115
+ let r;
1116
+ for (; (r = s.next()) && !r.done; ) {
1117
+ const a = r.value;
1118
+ t.call(e, a[0], a[1]);
1119
+ }
1120
+ }, Er = (e, t) => {
1121
+ let n;
1122
+ const s = [];
1123
+ for (; (n = e.exec(t)) !== null; )
1124
+ s.push(n);
1125
+ return s;
1126
+ }, Or = j("HTMLFormElement"), Ar = (e) => e.toLowerCase().replace(
1127
+ /[-_\s]([a-z\d])(\w*)/g,
1128
+ function(n, s, r) {
1129
+ return s.toUpperCase() + r;
1130
+ }
1131
+ ), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), $r = j("RegExp"), Nt = (e, t) => {
1132
+ const n = Object.getOwnPropertyDescriptors(e), s = {};
1133
+ me(n, (r, a) => {
1134
+ let o;
1135
+ (o = t(r, a, e)) !== !1 && (s[a] = o || r);
1136
+ }), Object.defineProperties(e, s);
1137
+ }, Tr = (e) => {
1138
+ Nt(e, (t, n) => {
1139
+ if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1140
+ return !1;
1141
+ const s = e[n];
1142
+ if (P(s)) {
1143
+ if (t.enumerable = !1, "writable" in t) {
1144
+ t.writable = !1;
1145
+ return;
1146
+ }
1147
+ t.set || (t.set = () => {
1148
+ throw Error("Can not rewrite read-only method '" + n + "'");
1149
+ });
1150
+ }
1151
+ });
1152
+ }, Lr = (e, t) => {
1153
+ const n = {}, s = (r) => {
1154
+ r.forEach((a) => {
1155
+ n[a] = !0;
1156
+ });
1157
+ };
1158
+ return oe(e) ? s(e) : s(String(e).split(t)), n;
1159
+ }, Fr = () => {
1160
+ }, Br = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1161
+ function Nr(e) {
1162
+ return !!(e && P(e.append) && e[$t] === "FormData" && e[$e]);
1163
+ }
1164
+ const Pr = (e) => {
1165
+ const t = new Array(10), n = (s, r) => {
1166
+ if (pe(s)) {
1167
+ if (t.indexOf(s) >= 0)
1168
+ return;
1169
+ if (fe(s))
1170
+ return s;
1171
+ if (!("toJSON" in s)) {
1172
+ t[r] = s;
1173
+ const a = oe(s) ? [] : {};
1174
+ return me(s, (o, c) => {
1175
+ const l = n(o, r + 1);
1176
+ !se(l) && (a[c] = l);
1177
+ }), t[r] = void 0, a;
1178
+ }
1179
+ }
1180
+ return s;
1181
+ };
1182
+ return n(e, 0);
1183
+ }, Hr = j("AsyncFunction"), Ur = (e) => e && (pe(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
+ r === X && a === n && s.length && s.shift()();
1185
+ }, !1), (r) => {
1186
+ s.push(r), X.postMessage(n, "*");
1187
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1188
+ typeof setImmediate == "function",
1189
+ P(X.postMessage)
1190
+ ), Vr = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || Pt, Dr = (e) => e != null && P(e[$e]), u = {
1191
+ isArray: oe,
1192
+ isArrayBuffer: Tt,
1193
+ isBuffer: fe,
1194
+ isFormData: fr,
1195
+ isArrayBufferView: sr,
1196
+ isString: rr,
1197
+ isNumber: Lt,
1198
+ isBoolean: or,
1199
+ isObject: pe,
1200
+ isPlainObject: Se,
1201
+ isEmptyObject: ar,
1202
+ isReadableStream: mr,
1203
+ isRequest: hr,
1204
+ isResponse: gr,
1205
+ isHeaders: yr,
1206
+ isUndefined: se,
1207
+ isDate: ir,
1208
+ isFile: lr,
1209
+ isBlob: cr,
1210
+ isRegExp: $r,
1211
+ isFunction: P,
1212
+ isStream: dr,
1213
+ isURLSearchParams: pr,
1214
+ isTypedArray: kr,
1215
+ isFileList: ur,
1216
+ forEach: me,
1217
+ merge: je,
1218
+ extend: br,
1219
+ trim: wr,
1220
+ stripBOM: xr,
1221
+ inherits: Sr,
1222
+ toFlatObject: vr,
1223
+ kindOf: Te,
1224
+ kindOfTest: j,
1225
+ endsWith: Cr,
1226
+ toArray: _r,
1227
+ forEachEntry: Rr,
1228
+ matchAll: Er,
1229
+ isHTMLForm: Or,
1230
+ hasOwnProperty: rt,
1231
+ hasOwnProp: rt,
1232
+ // an alias to avoid ESLint no-prototype-builtins detection
1233
+ reduceDescriptors: Nt,
1234
+ freezeMethods: Tr,
1235
+ toObjectSet: Lr,
1236
+ toCamelCase: Ar,
1237
+ noop: Fr,
1238
+ toFiniteNumber: Br,
1239
+ findKey: Ft,
1240
+ global: X,
1241
+ isContextDefined: Bt,
1242
+ isSpecCompliantForm: Nr,
1243
+ toJSONObject: Pr,
1244
+ isAsyncFn: Hr,
1245
+ isThenable: Ur,
1246
+ setImmediate: Pt,
1247
+ asap: Vr,
1248
+ isIterable: Dr
1249
+ };
1250
+ function S(e, t, n, s, r) {
1251
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null);
1252
+ }
1253
+ u.inherits(S, Error, {
1254
+ toJSON: function() {
1255
+ return {
1256
+ // Standard
1257
+ message: this.message,
1258
+ name: this.name,
1259
+ // Microsoft
1260
+ description: this.description,
1261
+ number: this.number,
1262
+ // Mozilla
1263
+ fileName: this.fileName,
1264
+ lineNumber: this.lineNumber,
1265
+ columnNumber: this.columnNumber,
1266
+ stack: this.stack,
1267
+ // Axios
1268
+ config: u.toJSONObject(this.config),
1269
+ code: this.code,
1270
+ status: this.status
1271
+ };
1272
+ }
1273
+ });
1274
+ const Ht = S.prototype, Ut = {};
1275
+ [
1276
+ "ERR_BAD_OPTION_VALUE",
1277
+ "ERR_BAD_OPTION",
1278
+ "ECONNABORTED",
1279
+ "ETIMEDOUT",
1280
+ "ERR_NETWORK",
1281
+ "ERR_FR_TOO_MANY_REDIRECTS",
1282
+ "ERR_DEPRECATED",
1283
+ "ERR_BAD_RESPONSE",
1284
+ "ERR_BAD_REQUEST",
1285
+ "ERR_CANCELED",
1286
+ "ERR_NOT_SUPPORT",
1287
+ "ERR_INVALID_URL"
1288
+ // eslint-disable-next-line func-names
1289
+ ].forEach((e) => {
1290
+ Ut[e] = { value: e };
1291
+ });
1292
+ Object.defineProperties(S, Ut);
1293
+ Object.defineProperty(Ht, "isAxiosError", { value: !0 });
1294
+ S.from = (e, t, n, s, r, a) => {
1295
+ const o = Object.create(Ht);
1296
+ u.toFlatObject(e, o, function(d) {
1297
+ return d !== Error.prototype;
1298
+ }, (i) => i !== "isAxiosError");
1299
+ const c = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
1300
+ return S.call(o, c, l, n, s, r), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", a && Object.assign(o, a), o;
1301
+ };
1302
+ const jr = null;
1303
+ function Me(e) {
1304
+ return u.isPlainObject(e) || u.isArray(e);
1305
+ }
1306
+ function Vt(e) {
1307
+ return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
1308
+ }
1309
+ function ot(e, t, n) {
1310
+ return e ? e.concat(t).map(function(r, a) {
1311
+ return r = Vt(r), !n && a ? "[" + r + "]" : r;
1312
+ }).join(n ? "." : "") : t;
1313
+ }
1314
+ function Mr(e) {
1315
+ return u.isArray(e) && !e.some(Me);
1316
+ }
1317
+ const Ir = u.toFlatObject(u, {}, null, function(t) {
1318
+ return /^is[A-Z]/.test(t);
1319
+ });
1320
+ function Fe(e, t, n) {
1321
+ if (!u.isObject(e))
1322
+ throw new TypeError("target must be an object");
1323
+ t = t || new FormData(), n = u.toFlatObject(n, {
1324
+ metaTokens: !0,
1325
+ dots: !1,
1326
+ indexes: !1
1327
+ }, !1, function(w, h) {
1328
+ return !u.isUndefined(h[w]);
1329
+ });
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
+ if (!u.isFunction(r))
1332
+ throw new TypeError("visitor must be a function");
1333
+ function i(m) {
1334
+ if (m === null) return "";
1335
+ if (u.isDate(m))
1336
+ return m.toISOString();
1337
+ if (u.isBoolean(m))
1338
+ return m.toString();
1339
+ if (!l && u.isBlob(m))
1340
+ throw new S("Blob is not supported. Use a Buffer instead.");
1341
+ return u.isArrayBuffer(m) || u.isTypedArray(m) ? l && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
1342
+ }
1343
+ function d(m, w, h) {
1344
+ let k = m;
1345
+ if (m && !h && typeof m == "object") {
1346
+ if (u.endsWith(w, "{}"))
1347
+ w = s ? w : w.slice(0, -2), m = JSON.stringify(m);
1348
+ else if (u.isArray(m) && Mr(m) || (u.isFileList(m) || u.endsWith(w, "[]")) && (k = u.toArray(m)))
1349
+ return w = Vt(w), k.forEach(function(A, B) {
1350
+ !(u.isUndefined(A) || A === null) && t.append(
1351
+ // eslint-disable-next-line no-nested-ternary
1352
+ o === !0 ? ot([w], B, a) : o === null ? w : w + "[]",
1353
+ i(A)
1354
+ );
1355
+ }), !1;
1356
+ }
1357
+ return Me(m) ? !0 : (t.append(ot(h, w, a), i(m)), !1);
1358
+ }
1359
+ const f = [], b = Object.assign(Ir, {
1360
+ defaultVisitor: d,
1361
+ convertValue: i,
1362
+ isVisitable: Me
1363
+ });
1364
+ function E(m, w) {
1365
+ if (!u.isUndefined(m)) {
1366
+ if (f.indexOf(m) !== -1)
1367
+ throw Error("Circular reference detected in " + w.join("."));
1368
+ f.push(m), u.forEach(m, function(k, T) {
1369
+ (!(u.isUndefined(k) || k === null) && r.call(
1370
+ t,
1371
+ k,
1372
+ u.isString(T) ? T.trim() : T,
1373
+ w,
1374
+ b
1375
+ )) === !0 && E(k, w ? w.concat(T) : [T]);
1376
+ }), f.pop();
1377
+ }
1378
+ }
1379
+ if (!u.isObject(e))
1380
+ throw new TypeError("data must be an object");
1381
+ return E(e), t;
1382
+ }
1383
+ function at(e) {
1384
+ const t = {
1385
+ "!": "%21",
1386
+ "'": "%27",
1387
+ "(": "%28",
1388
+ ")": "%29",
1389
+ "~": "%7E",
1390
+ "%20": "+",
1391
+ "%00": "\0"
1392
+ };
1393
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(s) {
1394
+ return t[s];
1395
+ });
1396
+ }
1397
+ function We(e, t) {
1398
+ this._pairs = [], e && Fe(e, this, t);
1399
+ }
1400
+ const Dt = We.prototype;
1401
+ Dt.append = function(t, n) {
1402
+ this._pairs.push([t, n]);
1403
+ };
1404
+ Dt.toString = function(t) {
1405
+ const n = t ? function(s) {
1406
+ return t.call(this, s, at);
1407
+ } : at;
1408
+ return this._pairs.map(function(r) {
1409
+ return n(r[0]) + "=" + n(r[1]);
1410
+ }, "").join("&");
1411
+ };
1412
+ function qr(e) {
1413
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
1414
+ }
1415
+ function jt(e, t, n) {
1416
+ if (!t)
1417
+ return e;
1418
+ const s = n && n.encode || qr;
1419
+ u.isFunction(n) && (n = {
1420
+ serialize: n
1017
1421
  });
1422
+ const r = n && n.serialize;
1423
+ let a;
1424
+ if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new We(t, n).toString(s), a) {
1425
+ const o = e.indexOf("#");
1426
+ o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
1427
+ }
1428
+ return e;
1429
+ }
1430
+ class it {
1431
+ constructor() {
1432
+ this.handlers = [];
1433
+ }
1434
+ /**
1435
+ * Add a new interceptor to the stack
1436
+ *
1437
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1438
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1439
+ *
1440
+ * @return {Number} An ID used to remove interceptor later
1441
+ */
1442
+ use(t, n, s) {
1443
+ return this.handlers.push({
1444
+ fulfilled: t,
1445
+ rejected: n,
1446
+ synchronous: s ? s.synchronous : !1,
1447
+ runWhen: s ? s.runWhen : null
1448
+ }), this.handlers.length - 1;
1449
+ }
1450
+ /**
1451
+ * Remove an interceptor from the stack
1452
+ *
1453
+ * @param {Number} id The ID that was returned by `use`
1454
+ *
1455
+ * @returns {void}
1456
+ */
1457
+ eject(t) {
1458
+ this.handlers[t] && (this.handlers[t] = null);
1459
+ }
1460
+ /**
1461
+ * Clear all interceptors from the stack
1462
+ *
1463
+ * @returns {void}
1464
+ */
1465
+ clear() {
1466
+ this.handlers && (this.handlers = []);
1467
+ }
1468
+ /**
1469
+ * Iterate over all the registered interceptors
1470
+ *
1471
+ * This method is particularly useful for skipping over any
1472
+ * interceptors that may have become `null` calling `eject`.
1473
+ *
1474
+ * @param {Function} fn The function to call for each interceptor
1475
+ *
1476
+ * @returns {void}
1477
+ */
1478
+ forEach(t) {
1479
+ u.forEach(this.handlers, function(s) {
1480
+ s !== null && t(s);
1481
+ });
1482
+ }
1483
+ }
1484
+ const Mt = {
1485
+ silentJSONParsing: !0,
1486
+ forcedJSONParsing: !0,
1487
+ clarifyTimeoutError: !1
1488
+ }, zr = typeof URLSearchParams < "u" ? URLSearchParams : We, Jr = typeof FormData < "u" ? FormData : null, Wr = typeof Blob < "u" ? Blob : null, Kr = {
1489
+ isBrowser: !0,
1490
+ classes: {
1491
+ URLSearchParams: zr,
1492
+ FormData: Jr,
1493
+ Blob: Wr
1494
+ },
1495
+ protocols: ["http", "https", "file", "blob", "url", "data"]
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
1497
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xr = Ke && window.location.href || "http://localhost", Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1498
+ __proto__: null,
1499
+ hasBrowserEnv: Ke,
1500
+ hasStandardBrowserEnv: Gr,
1501
+ hasStandardBrowserWebWorkerEnv: Zr,
1502
+ navigator: Ie,
1503
+ origin: Xr
1504
+ }, Symbol.toStringTag, { value: "Module" })), L = {
1505
+ ...Qr,
1506
+ ...Kr
1507
+ };
1508
+ function Yr(e, t) {
1509
+ return Fe(e, new L.classes.URLSearchParams(), {
1510
+ visitor: function(n, s, r, a) {
1511
+ return L.isNode && u.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
1512
+ },
1513
+ ...t
1514
+ });
1515
+ }
1516
+ function eo(e) {
1517
+ return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1518
+ }
1519
+ function to(e) {
1520
+ const t = {}, n = Object.keys(e);
1521
+ let s;
1522
+ const r = n.length;
1523
+ let a;
1524
+ for (s = 0; s < r; s++)
1525
+ a = n[s], t[a] = e[a];
1526
+ return t;
1527
+ }
1528
+ function It(e) {
1529
+ function t(n, s, r, a) {
1530
+ let o = n[a++];
1531
+ if (o === "__proto__") return !0;
1532
+ const c = Number.isFinite(+o), l = a >= n.length;
1533
+ return o = !o && u.isArray(r) ? r.length : o, l ? (u.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !c) : ((!r[o] || !u.isObject(r[o])) && (r[o] = []), t(n, s, r[o], a) && u.isArray(r[o]) && (r[o] = to(r[o])), !c);
1534
+ }
1535
+ if (u.isFormData(e) && u.isFunction(e.entries)) {
1536
+ const n = {};
1537
+ return u.forEachEntry(e, (s, r) => {
1538
+ t(eo(s), r, n, 0);
1539
+ }), n;
1540
+ }
1541
+ return null;
1542
+ }
1543
+ function no(e, t, n) {
1544
+ if (u.isString(e))
1545
+ try {
1546
+ return (t || JSON.parse)(e), u.trim(e);
1547
+ } catch (s) {
1548
+ if (s.name !== "SyntaxError")
1549
+ throw s;
1550
+ }
1551
+ return (n || JSON.stringify)(e);
1552
+ }
1553
+ const he = {
1554
+ transitional: Mt,
1555
+ adapter: ["xhr", "http", "fetch"],
1556
+ transformRequest: [function(t, n) {
1557
+ const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, a = u.isObject(t);
1558
+ if (a && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
1559
+ return r ? JSON.stringify(It(t)) : t;
1560
+ if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
1561
+ return t;
1562
+ if (u.isArrayBufferView(t))
1563
+ return t.buffer;
1564
+ if (u.isURLSearchParams(t))
1565
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1566
+ let c;
1567
+ if (a) {
1568
+ if (s.indexOf("application/x-www-form-urlencoded") > -1)
1569
+ return Yr(t, this.formSerializer).toString();
1570
+ if ((c = u.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
1571
+ const l = this.env && this.env.FormData;
1572
+ return Fe(
1573
+ c ? { "files[]": t } : t,
1574
+ l && new l(),
1575
+ this.formSerializer
1576
+ );
1577
+ }
1578
+ }
1579
+ return a || r ? (n.setContentType("application/json", !1), no(t)) : t;
1580
+ }],
1581
+ transformResponse: [function(t) {
1582
+ const n = this.transitional || he.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
1583
+ if (u.isResponse(t) || u.isReadableStream(t))
1584
+ return t;
1585
+ if (t && u.isString(t) && (s && !this.responseType || r)) {
1586
+ const o = !(n && n.silentJSONParsing) && r;
1587
+ try {
1588
+ return JSON.parse(t, this.parseReviver);
1589
+ } catch (c) {
1590
+ if (o)
1591
+ throw c.name === "SyntaxError" ? S.from(c, S.ERR_BAD_RESPONSE, this, null, this.response) : c;
1592
+ }
1593
+ }
1594
+ return t;
1595
+ }],
1596
+ /**
1597
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1598
+ * timeout is not created.
1599
+ */
1600
+ timeout: 0,
1601
+ xsrfCookieName: "XSRF-TOKEN",
1602
+ xsrfHeaderName: "X-XSRF-TOKEN",
1603
+ maxContentLength: -1,
1604
+ maxBodyLength: -1,
1605
+ env: {
1606
+ FormData: L.classes.FormData,
1607
+ Blob: L.classes.Blob
1608
+ },
1609
+ validateStatus: function(t) {
1610
+ return t >= 200 && t < 300;
1611
+ },
1612
+ headers: {
1613
+ common: {
1614
+ Accept: "application/json, text/plain, */*",
1615
+ "Content-Type": void 0
1616
+ }
1617
+ }
1618
+ };
1619
+ u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1620
+ he.headers[e] = {};
1621
+ });
1622
+ const so = u.toObjectSet([
1623
+ "age",
1624
+ "authorization",
1625
+ "content-length",
1626
+ "content-type",
1627
+ "etag",
1628
+ "expires",
1629
+ "from",
1630
+ "host",
1631
+ "if-modified-since",
1632
+ "if-unmodified-since",
1633
+ "last-modified",
1634
+ "location",
1635
+ "max-forwards",
1636
+ "proxy-authorization",
1637
+ "referer",
1638
+ "retry-after",
1639
+ "user-agent"
1640
+ ]), ro = (e) => {
1641
+ const t = {};
1642
+ let n, s, r;
1643
+ return e && e.split(`
1644
+ `).forEach(function(o) {
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
+ }), t;
1647
+ }, lt = Symbol("internals");
1648
+ function ue(e) {
1649
+ return e && String(e).trim().toLowerCase();
1650
+ }
1651
+ function ve(e) {
1652
+ return e === !1 || e == null ? e : u.isArray(e) ? e.map(ve) : String(e);
1653
+ }
1654
+ function oo(e) {
1655
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1656
+ let s;
1657
+ for (; s = n.exec(e); )
1658
+ t[s[1]] = s[2];
1659
+ return t;
1660
+ }
1661
+ const ao = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1662
+ function He(e, t, n, s, r) {
1663
+ if (u.isFunction(s))
1664
+ return s.call(this, t, n);
1665
+ if (r && (t = n), !!u.isString(t)) {
1666
+ if (u.isString(s))
1667
+ return t.indexOf(s) !== -1;
1668
+ if (u.isRegExp(s))
1669
+ return s.test(t);
1670
+ }
1671
+ }
1672
+ function io(e) {
1673
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
1674
+ }
1675
+ function lo(e, t) {
1676
+ const n = u.toCamelCase(" " + t);
1677
+ ["get", "set", "has"].forEach((s) => {
1678
+ Object.defineProperty(e, s + n, {
1679
+ value: function(r, a, o) {
1680
+ return this[s].call(this, t, r, a, o);
1681
+ },
1682
+ configurable: !0
1683
+ });
1684
+ });
1685
+ }
1686
+ let H = class {
1687
+ constructor(t) {
1688
+ t && this.set(t);
1689
+ }
1690
+ set(t, n, s) {
1691
+ const r = this;
1692
+ function a(c, l, i) {
1693
+ const d = ue(l);
1694
+ if (!d)
1695
+ throw new Error("header name must be a non-empty string");
1696
+ const f = u.findKey(r, d);
1697
+ (!f || r[f] === void 0 || i === !0 || i === void 0 && r[f] !== !1) && (r[f || l] = ve(c));
1698
+ }
1699
+ const o = (c, l) => u.forEach(c, (i, d) => a(i, d, l));
1700
+ if (u.isPlainObject(t) || t instanceof this.constructor)
1701
+ o(t, n);
1702
+ else if (u.isString(t) && (t = t.trim()) && !ao(t))
1703
+ o(ro(t), n);
1704
+ else if (u.isObject(t) && u.isIterable(t)) {
1705
+ let c = {}, l, i;
1706
+ for (const d of t) {
1707
+ if (!u.isArray(d))
1708
+ throw TypeError("Object iterator must return a key-value pair");
1709
+ c[i = d[0]] = (l = c[i]) ? u.isArray(l) ? [...l, d[1]] : [l, d[1]] : d[1];
1710
+ }
1711
+ o(c, n);
1712
+ } else
1713
+ t != null && a(n, t, s);
1714
+ return this;
1715
+ }
1716
+ get(t, n) {
1717
+ if (t = ue(t), t) {
1718
+ const s = u.findKey(this, t);
1719
+ if (s) {
1720
+ const r = this[s];
1721
+ if (!n)
1722
+ return r;
1723
+ if (n === !0)
1724
+ return oo(r);
1725
+ if (u.isFunction(n))
1726
+ return n.call(this, r, s);
1727
+ if (u.isRegExp(n))
1728
+ return n.exec(r);
1729
+ throw new TypeError("parser must be boolean|regexp|function");
1730
+ }
1731
+ }
1732
+ }
1733
+ has(t, n) {
1734
+ if (t = ue(t), t) {
1735
+ const s = u.findKey(this, t);
1736
+ return !!(s && this[s] !== void 0 && (!n || He(this, this[s], s, n)));
1737
+ }
1738
+ return !1;
1739
+ }
1740
+ delete(t, n) {
1741
+ const s = this;
1742
+ let r = !1;
1743
+ function a(o) {
1744
+ if (o = ue(o), o) {
1745
+ const c = u.findKey(s, o);
1746
+ c && (!n || He(s, s[c], c, n)) && (delete s[c], r = !0);
1747
+ }
1748
+ }
1749
+ return u.isArray(t) ? t.forEach(a) : a(t), r;
1750
+ }
1751
+ clear(t) {
1752
+ const n = Object.keys(this);
1753
+ let s = n.length, r = !1;
1754
+ for (; s--; ) {
1755
+ const a = n[s];
1756
+ (!t || He(this, this[a], a, t, !0)) && (delete this[a], r = !0);
1757
+ }
1758
+ return r;
1759
+ }
1760
+ normalize(t) {
1761
+ const n = this, s = {};
1762
+ return u.forEach(this, (r, a) => {
1763
+ const o = u.findKey(s, a);
1764
+ if (o) {
1765
+ n[o] = ve(r), delete n[a];
1766
+ return;
1767
+ }
1768
+ const c = t ? io(a) : String(a).trim();
1769
+ c !== a && delete n[a], n[c] = ve(r), s[c] = !0;
1770
+ }), this;
1771
+ }
1772
+ concat(...t) {
1773
+ return this.constructor.concat(this, ...t);
1774
+ }
1775
+ toJSON(t) {
1776
+ const n = /* @__PURE__ */ Object.create(null);
1777
+ return u.forEach(this, (s, r) => {
1778
+ s != null && s !== !1 && (n[r] = t && u.isArray(s) ? s.join(", ") : s);
1779
+ }), n;
1780
+ }
1781
+ [Symbol.iterator]() {
1782
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1783
+ }
1784
+ toString() {
1785
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
1786
+ `);
1787
+ }
1788
+ getSetCookie() {
1789
+ return this.get("set-cookie") || [];
1790
+ }
1791
+ get [Symbol.toStringTag]() {
1792
+ return "AxiosHeaders";
1793
+ }
1794
+ static from(t) {
1795
+ return t instanceof this ? t : new this(t);
1796
+ }
1797
+ static concat(t, ...n) {
1798
+ const s = new this(t);
1799
+ return n.forEach((r) => s.set(r)), s;
1800
+ }
1801
+ static accessor(t) {
1802
+ const s = (this[lt] = this[lt] = {
1803
+ accessors: {}
1804
+ }).accessors, r = this.prototype;
1805
+ function a(o) {
1806
+ const c = ue(o);
1807
+ s[c] || (lo(r, o), s[c] = !0);
1808
+ }
1809
+ return u.isArray(t) ? t.forEach(a) : a(t), this;
1810
+ }
1811
+ };
1812
+ H.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1813
+ u.reduceDescriptors(H.prototype, ({ value: e }, t) => {
1814
+ let n = t[0].toUpperCase() + t.slice(1);
1018
1815
  return {
1019
- state: e,
1020
- initialize: (r = {}) => {
1021
- e.app = r.app || "", e.icon = r.icon || "", e.homeRoute = r.homeRoute ?? "dashboard", e.showBrandSelector = r.showBrandSelector ?? !0, e.showAppSelector = r.showAppSelector ?? !0;
1816
+ get: () => e,
1817
+ set(s) {
1818
+ this[n] = s;
1022
1819
  }
1023
1820
  };
1024
- }), $s = M("sparkNav", () => {
1025
- const e = z({
1026
- menu: [],
1027
- collapsed: !1,
1028
- hidden: !1
1029
- }), o = Te(), r = (i = []) => {
1030
- e.menu = i;
1031
- }, c = (i, t) => {
1032
- for (const n of i) {
1033
- if (n.href === t) return n;
1034
- if (n.children) {
1035
- const v = c(n.children, t);
1036
- if (v) return v;
1821
+ });
1822
+ u.freezeMethods(H);
1823
+ function Ue(e, t) {
1824
+ const n = this || he, s = t || n, r = H.from(s.headers);
1825
+ let a = s.data;
1826
+ return u.forEach(e, function(c) {
1827
+ a = c.call(n, a, r.normalize(), t ? t.status : void 0);
1828
+ }), r.normalize(), a;
1829
+ }
1830
+ function qt(e) {
1831
+ return !!(e && e.__CANCEL__);
1832
+ }
1833
+ function ae(e, t, n) {
1834
+ S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
1835
+ }
1836
+ u.inherits(ae, S, {
1837
+ __CANCEL__: !0
1838
+ });
1839
+ function zt(e, t, n) {
1840
+ const s = n.config.validateStatus;
1841
+ !n.status || !s || s(n.status) ? e(n) : t(new S(
1842
+ "Request failed with status code " + n.status,
1843
+ [S.ERR_BAD_REQUEST, S.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1844
+ n.config,
1845
+ n.request,
1846
+ n
1847
+ ));
1848
+ }
1849
+ function co(e) {
1850
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1851
+ return t && t[1] || "";
1852
+ }
1853
+ function uo(e, t) {
1854
+ e = e || 10;
1855
+ const n = new Array(e), s = new Array(e);
1856
+ let r = 0, a = 0, o;
1857
+ return t = t !== void 0 ? t : 1e3, function(l) {
1858
+ const i = Date.now(), d = s[a];
1859
+ o || (o = i), n[r] = l, s[r] = i;
1860
+ let f = a, b = 0;
1861
+ for (; f !== r; )
1862
+ b += n[f++], f = f % e;
1863
+ if (r = (r + 1) % e, r === a && (a = (a + 1) % e), i - o < t)
1864
+ return;
1865
+ const E = d && i - d;
1866
+ return E ? Math.round(b * 1e3 / E) : void 0;
1867
+ };
1868
+ }
1869
+ function fo(e, t) {
1870
+ let n = 0, s = 1e3 / t, r, a;
1871
+ const o = (i, d = Date.now()) => {
1872
+ n = d, r = null, a && (clearTimeout(a), a = null), e(...i);
1873
+ };
1874
+ return [(...i) => {
1875
+ const d = Date.now(), f = d - n;
1876
+ f >= s ? o(i, d) : (r = i, a || (a = setTimeout(() => {
1877
+ a = null, o(r);
1878
+ }, s - f)));
1879
+ }, () => r && o(r)];
1880
+ }
1881
+ const ke = (e, t, n = 3) => {
1882
+ let s = 0;
1883
+ const r = uo(50, 250);
1884
+ return fo((a) => {
1885
+ const o = a.loaded, c = a.lengthComputable ? a.total : void 0, l = o - s, i = r(l), d = o <= c;
1886
+ s = o;
1887
+ const f = {
1888
+ loaded: o,
1889
+ total: c,
1890
+ progress: c ? o / c : void 0,
1891
+ bytes: l,
1892
+ rate: i || void 0,
1893
+ estimated: i && c && d ? (c - o) / i : void 0,
1894
+ event: a,
1895
+ lengthComputable: c != null,
1896
+ [t ? "download" : "upload"]: !0
1897
+ };
1898
+ e(f);
1899
+ }, n);
1900
+ }, ct = (e, t) => {
1901
+ const n = e != null;
1902
+ return [(s) => t[0]({
1903
+ lengthComputable: n,
1904
+ total: e,
1905
+ loaded: s
1906
+ }), t[1]];
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
+ new URL(L.origin),
1909
+ L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
1910
+ ) : () => !0, mo = L.hasStandardBrowserEnv ? (
1911
+ // Standard browser envs support document.cookie
1912
+ {
1913
+ write(e, t, n, s, r, a, o) {
1914
+ if (typeof document > "u") return;
1915
+ const c = [`${e}=${encodeURIComponent(t)}`];
1916
+ u.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), u.isString(s) && c.push(`path=${s}`), u.isString(r) && c.push(`domain=${r}`), a === !0 && c.push("secure"), u.isString(o) && c.push(`SameSite=${o}`), document.cookie = c.join("; ");
1917
+ },
1918
+ read(e) {
1919
+ if (typeof document > "u") return null;
1920
+ const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
1921
+ return t ? decodeURIComponent(t[1]) : null;
1922
+ },
1923
+ remove(e) {
1924
+ this.write(e, "", Date.now() - 864e5, "/");
1925
+ }
1926
+ }
1927
+ ) : (
1928
+ // Non-standard browser env (web workers, react-native) lack needed support.
1929
+ {
1930
+ write() {
1931
+ },
1932
+ read() {
1933
+ return null;
1934
+ },
1935
+ remove() {
1936
+ }
1937
+ }
1938
+ );
1939
+ function ho(e) {
1940
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1941
+ }
1942
+ function go(e, t) {
1943
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1944
+ }
1945
+ function Jt(e, t, n) {
1946
+ let s = !ho(t);
1947
+ return e && (s || n == !1) ? go(e, t) : t;
1948
+ }
1949
+ const dt = (e) => e instanceof H ? { ...e } : e;
1950
+ function ee(e, t) {
1951
+ t = t || {};
1952
+ const n = {};
1953
+ function s(i, d, f, b) {
1954
+ return u.isPlainObject(i) && u.isPlainObject(d) ? u.merge.call({ caseless: b }, i, d) : u.isPlainObject(d) ? u.merge({}, d) : u.isArray(d) ? d.slice() : d;
1955
+ }
1956
+ function r(i, d, f, b) {
1957
+ if (u.isUndefined(d)) {
1958
+ if (!u.isUndefined(i))
1959
+ return s(void 0, i, f, b);
1960
+ } else return s(i, d, f, b);
1961
+ }
1962
+ function a(i, d) {
1963
+ if (!u.isUndefined(d))
1964
+ return s(void 0, d);
1965
+ }
1966
+ function o(i, d) {
1967
+ if (u.isUndefined(d)) {
1968
+ if (!u.isUndefined(i))
1969
+ return s(void 0, i);
1970
+ } else return s(void 0, d);
1971
+ }
1972
+ function c(i, d, f) {
1973
+ if (f in t)
1974
+ return s(i, d);
1975
+ if (f in e)
1976
+ return s(void 0, i);
1977
+ }
1978
+ const l = {
1979
+ url: a,
1980
+ method: a,
1981
+ data: a,
1982
+ baseURL: o,
1983
+ transformRequest: o,
1984
+ transformResponse: o,
1985
+ paramsSerializer: o,
1986
+ timeout: o,
1987
+ timeoutMessage: o,
1988
+ withCredentials: o,
1989
+ withXSRFToken: o,
1990
+ adapter: o,
1991
+ responseType: o,
1992
+ xsrfCookieName: o,
1993
+ xsrfHeaderName: o,
1994
+ onUploadProgress: o,
1995
+ onDownloadProgress: o,
1996
+ decompress: o,
1997
+ maxContentLength: o,
1998
+ maxBodyLength: o,
1999
+ beforeRedirect: o,
2000
+ transport: o,
2001
+ httpAgent: o,
2002
+ httpsAgent: o,
2003
+ cancelToken: o,
2004
+ socketPath: o,
2005
+ responseEncoding: o,
2006
+ validateStatus: c,
2007
+ headers: (i, d, f) => r(dt(i), dt(d), f, !0)
2008
+ };
2009
+ return u.forEach(Object.keys({ ...e, ...t }), function(d) {
2010
+ const f = l[d] || r, b = f(e[d], t[d], d);
2011
+ u.isUndefined(b) && f !== c || (n[d] = b);
2012
+ }), n;
2013
+ }
2014
+ const Wt = (e) => {
2015
+ const t = ee({}, e);
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(Jt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
2018
+ "Authorization",
2019
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
2020
+ ), u.isFormData(n)) {
2021
+ if (L.hasStandardBrowserEnv || L.hasStandardBrowserWebWorkerEnv)
2022
+ o.setContentType(void 0);
2023
+ else if (u.isFunction(n.getHeaders)) {
2024
+ const l = n.getHeaders(), i = ["content-type", "content-length"];
2025
+ Object.entries(l).forEach(([d, f]) => {
2026
+ i.includes(d.toLowerCase()) && o.set(d, f);
2027
+ });
2028
+ }
2029
+ }
2030
+ if (L.hasStandardBrowserEnv && (s && u.isFunction(s) && (s = s(t)), s || s !== !1 && po(t.url))) {
2031
+ const l = r && a && mo.read(a);
2032
+ l && o.set(r, l);
2033
+ }
2034
+ return t;
2035
+ }, yo = typeof XMLHttpRequest < "u", wo = yo && function(e) {
2036
+ return new Promise(function(n, s) {
2037
+ const r = Wt(e);
2038
+ let a = r.data;
2039
+ const o = H.from(r.headers).normalize();
2040
+ let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E, m;
2041
+ function w() {
2042
+ E && E(), m && m(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
2043
+ }
2044
+ let h = new XMLHttpRequest();
2045
+ h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
2046
+ function k() {
2047
+ if (!h)
2048
+ return;
2049
+ const A = H.from(
2050
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
2051
+ ), D = {
2052
+ data: !c || c === "text" || c === "json" ? h.responseText : h.response,
2053
+ status: h.status,
2054
+ statusText: h.statusText,
2055
+ headers: A,
2056
+ config: e,
2057
+ request: h
2058
+ };
2059
+ zt(function(U) {
2060
+ n(U), w();
2061
+ }, function(U) {
2062
+ s(U), w();
2063
+ }, D), h = null;
2064
+ }
2065
+ "onloadend" in h ? h.onloadend = k : h.onreadystatechange = function() {
2066
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(k);
2067
+ }, h.onabort = function() {
2068
+ h && (s(new S("Request aborted", S.ECONNABORTED, e, h)), h = null);
2069
+ }, h.onerror = function(B) {
2070
+ const D = B && B.message ? B.message : "Network Error", K = new S(D, S.ERR_NETWORK, e, h);
2071
+ K.event = B || null, s(K), h = null;
2072
+ }, h.ontimeout = function() {
2073
+ let B = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
2074
+ const D = r.transitional || Mt;
2075
+ r.timeoutErrorMessage && (B = r.timeoutErrorMessage), s(new S(
2076
+ B,
2077
+ D.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
2078
+ e,
2079
+ h
2080
+ )), h = null;
2081
+ }, a === void 0 && o.setContentType(null), "setRequestHeader" in h && u.forEach(o.toJSON(), function(B, D) {
2082
+ h.setRequestHeader(D, B);
2083
+ }), u.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), c && c !== "json" && (h.responseType = r.responseType), i && ([b, m] = ke(i, !0), h.addEventListener("progress", b)), l && h.upload && ([f, E] = ke(l), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (d = (A) => {
2084
+ h && (s(!A || A.type ? new ae(null, e, h) : A), h.abort(), h = null);
2085
+ }, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
2086
+ const T = co(r.url);
2087
+ if (T && L.protocols.indexOf(T) === -1) {
2088
+ s(new S("Unsupported protocol " + T + ":", S.ERR_BAD_REQUEST, e));
2089
+ return;
2090
+ }
2091
+ h.send(a || null);
2092
+ });
2093
+ }, bo = (e, t) => {
2094
+ const { length: n } = e = e ? e.filter(Boolean) : [];
2095
+ if (t || n) {
2096
+ let s = new AbortController(), r;
2097
+ const a = function(i) {
2098
+ if (!r) {
2099
+ r = !0, c();
2100
+ const d = i instanceof Error ? i : this.reason;
2101
+ s.abort(d instanceof S ? d : new ae(d instanceof Error ? d.message : d));
1037
2102
  }
2103
+ };
2104
+ let o = t && setTimeout(() => {
2105
+ o = null, a(new S(`timeout ${t} of ms exceeded`, S.ETIMEDOUT));
2106
+ }, t);
2107
+ const c = () => {
2108
+ e && (o && clearTimeout(o), o = null, e.forEach((i) => {
2109
+ i.unsubscribe ? i.unsubscribe(a) : i.removeEventListener("abort", a);
2110
+ }), e = null);
2111
+ };
2112
+ e.forEach((i) => i.addEventListener("abort", a));
2113
+ const { signal: l } = s;
2114
+ return l.unsubscribe = () => u.asap(c), l;
2115
+ }
2116
+ }, xo = function* (e, t) {
2117
+ let n = e.byteLength;
2118
+ if (n < t) {
2119
+ yield e;
2120
+ return;
2121
+ }
2122
+ let s = 0, r;
2123
+ for (; s < n; )
2124
+ r = s + t, yield e.slice(s, r), s = r;
2125
+ }, So = async function* (e, t) {
2126
+ for await (const n of vo(e))
2127
+ yield* xo(n, t);
2128
+ }, vo = async function* (e) {
2129
+ if (e[Symbol.asyncIterator]) {
2130
+ yield* e;
2131
+ return;
2132
+ }
2133
+ const t = e.getReader();
2134
+ try {
2135
+ for (; ; ) {
2136
+ const { done: n, value: s } = await t.read();
2137
+ if (n)
2138
+ break;
2139
+ yield s;
1038
2140
  }
1039
- return null;
2141
+ } finally {
2142
+ await t.cancel();
2143
+ }
2144
+ }, ft = (e, t, n, s) => {
2145
+ const r = So(e, t);
2146
+ let a = 0, o, c = (l) => {
2147
+ o || (o = !0, s && s(l));
1040
2148
  };
1041
- return {
1042
- state: e,
1043
- initialize: r,
1044
- goto: async (i) => {
1045
- if (i) {
1046
- const t = (v) => {
1047
- v.forEach((p) => {
1048
- p.current = p.href === i, p.children && t(p.children);
1049
- });
1050
- };
1051
- t(e.menu);
1052
- const n = c(e.menu, i);
1053
- if (n && typeof n.action == "function") {
1054
- n.action();
2149
+ return new ReadableStream({
2150
+ async pull(l) {
2151
+ try {
2152
+ const { done: i, value: d } = await r.next();
2153
+ if (i) {
2154
+ c(), l.close();
1055
2155
  return;
1056
2156
  }
1057
- await o.push(i);
2157
+ let f = d.byteLength;
2158
+ if (n) {
2159
+ let b = a += f;
2160
+ n(b);
2161
+ }
2162
+ l.enqueue(new Uint8Array(d));
2163
+ } catch (i) {
2164
+ throw c(i), i;
1058
2165
  }
1059
2166
  },
1060
- toggleCollapsed: () => {
1061
- e.collapsed = !e.collapsed;
2167
+ cancel(l) {
2168
+ return c(l), r.return();
2169
+ }
2170
+ }, {
2171
+ highWaterMark: 2
2172
+ });
2173
+ }, pt = 64 * 1024, { isFunction: xe } = u, Co = (({ Request: e, Response: t }) => ({
2174
+ Request: e,
2175
+ Response: t
2176
+ }))(u.global), {
2177
+ ReadableStream: mt,
2178
+ TextEncoder: ht
2179
+ } = u.global, gt = (e, ...t) => {
2180
+ try {
2181
+ return !!e(...t);
2182
+ } catch {
2183
+ return !1;
2184
+ }
2185
+ }, _o = (e) => {
2186
+ e = u.merge.call({
2187
+ skipUndefined: !0
2188
+ }, Co, e);
2189
+ const { fetch: t, Request: n, Response: s } = e, r = t ? xe(t) : typeof fetch == "function", a = xe(n), o = xe(s);
2190
+ if (!r)
2191
+ return !1;
2192
+ const c = r && xe(mt), l = r && (typeof ht == "function" ? /* @__PURE__ */ ((m) => (w) => m.encode(w))(new ht()) : async (m) => new Uint8Array(await new n(m).arrayBuffer())), i = a && c && gt(() => {
2193
+ let m = !1;
2194
+ const w = new n(L.origin, {
2195
+ body: new mt(),
2196
+ method: "POST",
2197
+ get duplex() {
2198
+ return m = !0, "half";
2199
+ }
2200
+ }).headers.has("Content-Type");
2201
+ return m && !w;
2202
+ }), d = o && c && gt(() => u.isReadableStream(new s("").body)), f = {
2203
+ stream: d && ((m) => m.body)
2204
+ };
2205
+ r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((m) => {
2206
+ !f[m] && (f[m] = (w, h) => {
2207
+ let k = w && w[m];
2208
+ if (k)
2209
+ return k.call(w);
2210
+ throw new S(`Response type '${m}' is not supported`, S.ERR_NOT_SUPPORT, h);
2211
+ });
2212
+ });
2213
+ const b = async (m) => {
2214
+ if (m == null)
2215
+ return 0;
2216
+ if (u.isBlob(m))
2217
+ return m.size;
2218
+ if (u.isSpecCompliantForm(m))
2219
+ return (await new n(L.origin, {
2220
+ method: "POST",
2221
+ body: m
2222
+ }).arrayBuffer()).byteLength;
2223
+ if (u.isArrayBufferView(m) || u.isArrayBuffer(m))
2224
+ return m.byteLength;
2225
+ if (u.isURLSearchParams(m) && (m = m + ""), u.isString(m))
2226
+ return (await l(m)).byteLength;
2227
+ }, E = async (m, w) => {
2228
+ const h = u.toFiniteNumber(m.getContentLength());
2229
+ return h ?? b(w);
2230
+ };
2231
+ return async (m) => {
2232
+ let {
2233
+ url: w,
2234
+ method: h,
2235
+ data: k,
2236
+ signal: T,
2237
+ cancelToken: A,
2238
+ timeout: B,
2239
+ onDownloadProgress: D,
2240
+ onUploadProgress: K,
2241
+ responseType: U,
2242
+ headers: Ne,
2243
+ withCredentials: ye = "same-origin",
2244
+ fetchOptions: Ze
2245
+ } = Wt(m), Xe = t || fetch;
2246
+ U = U ? (U + "").toLowerCase() : "text";
2247
+ let we = bo([T, A && A.toAbortSignal()], B), ie = null;
2248
+ const G = we && we.unsubscribe && (() => {
2249
+ we.unsubscribe();
2250
+ });
2251
+ let Qe;
2252
+ try {
2253
+ if (K && i && h !== "get" && h !== "head" && (Qe = await E(Ne, k)) !== 0) {
2254
+ let W = new n(w, {
2255
+ method: "POST",
2256
+ body: k,
2257
+ duplex: "half"
2258
+ }), te;
2259
+ if (u.isFormData(k) && (te = W.headers.get("content-type")) && Ne.setContentType(te), W.body) {
2260
+ const [Pe, be] = ct(
2261
+ Qe,
2262
+ ke(ut(K))
2263
+ );
2264
+ k = ft(W.body, pt, Pe, be);
2265
+ }
2266
+ }
2267
+ u.isString(ye) || (ye = ye ? "include" : "omit");
2268
+ const M = a && "credentials" in n.prototype, Ye = {
2269
+ ...Ze,
2270
+ signal: we,
2271
+ method: h.toUpperCase(),
2272
+ headers: Ne.normalize().toJSON(),
2273
+ body: k,
2274
+ duplex: "half",
2275
+ credentials: M ? ye : void 0
2276
+ };
2277
+ ie = a && new n(w, Ye);
2278
+ let J = await (a ? Xe(ie, Ze) : Xe(w, Ye));
2279
+ const et = d && (U === "stream" || U === "response");
2280
+ if (d && (D || et && G)) {
2281
+ const W = {};
2282
+ ["status", "statusText", "headers"].forEach((tt) => {
2283
+ W[tt] = J[tt];
2284
+ });
2285
+ const te = u.toFiniteNumber(J.headers.get("content-length")), [Pe, be] = D && ct(
2286
+ te,
2287
+ ke(ut(D), !0)
2288
+ ) || [];
2289
+ J = new s(
2290
+ ft(J.body, pt, Pe, () => {
2291
+ be && be(), G && G();
2292
+ }),
2293
+ W
2294
+ );
2295
+ }
2296
+ U = U || "text";
2297
+ let en = await f[u.findKey(f, U) || "text"](J, m);
2298
+ return !et && G && G(), await new Promise((W, te) => {
2299
+ zt(W, te, {
2300
+ data: en,
2301
+ headers: H.from(J.headers),
2302
+ status: J.status,
2303
+ statusText: J.statusText,
2304
+ config: m,
2305
+ request: ie
2306
+ });
2307
+ });
2308
+ } catch (M) {
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, m, ie),
2311
+ {
2312
+ cause: M.cause || M
2313
+ }
2314
+ ) : S.from(M, M && M.code, m, ie);
2315
+ }
2316
+ };
2317
+ }, ko = /* @__PURE__ */ new Map(), Kt = (e) => {
2318
+ let t = e && e.env || {};
2319
+ const { fetch: n, Request: s, Response: r } = t, a = [
2320
+ s,
2321
+ r,
2322
+ n
2323
+ ];
2324
+ let o = a.length, c = o, l, i, d = ko;
2325
+ for (; c--; )
2326
+ l = a[c], i = d.get(l), i === void 0 && d.set(l, i = c ? /* @__PURE__ */ new Map() : _o(t)), d = i;
2327
+ return i;
2328
+ };
2329
+ Kt();
2330
+ const Ge = {
2331
+ http: jr,
2332
+ xhr: wo,
2333
+ fetch: {
2334
+ get: Kt
2335
+ }
2336
+ };
2337
+ u.forEach(Ge, (e, t) => {
2338
+ if (e) {
2339
+ try {
2340
+ Object.defineProperty(e, "name", { value: t });
2341
+ } catch {
2342
+ }
2343
+ Object.defineProperty(e, "adapterName", { value: t });
2344
+ }
2345
+ });
2346
+ const yt = (e) => `- ${e}`, Ro = (e) => u.isFunction(e) || e === null || e === !1;
2347
+ function Eo(e, t) {
2348
+ e = u.isArray(e) ? e : [e];
2349
+ const { length: n } = e;
2350
+ let s, r;
2351
+ const a = {};
2352
+ for (let o = 0; o < n; o++) {
2353
+ s = e[o];
2354
+ let c;
2355
+ if (r = s, !Ro(s) && (r = Ge[(c = String(s)).toLowerCase()], r === void 0))
2356
+ throw new S(`Unknown adapter '${c}'`);
2357
+ if (r && (u.isFunction(r) || (r = r.get(t))))
2358
+ break;
2359
+ a[c || "#" + o] = r;
2360
+ }
2361
+ if (!r) {
2362
+ const o = Object.entries(a).map(
2363
+ ([l, i]) => `adapter ${l} ` + (i === !1 ? "is not supported by the environment" : "is not available in the build")
2364
+ );
2365
+ let c = n ? o.length > 1 ? `since :
2366
+ ` + o.map(yt).join(`
2367
+ `) : " " + yt(o[0]) : "as no adapter specified";
2368
+ throw new S(
2369
+ "There is no suitable adapter to dispatch the request " + c,
2370
+ "ERR_NOT_SUPPORT"
2371
+ );
2372
+ }
2373
+ return r;
2374
+ }
2375
+ const Gt = {
2376
+ /**
2377
+ * Resolve an adapter from a list of adapter names or functions.
2378
+ * @type {Function}
2379
+ */
2380
+ getAdapter: Eo,
2381
+ /**
2382
+ * Exposes all known adapters
2383
+ * @type {Object<string, Function|Object>}
2384
+ */
2385
+ adapters: Ge
2386
+ };
2387
+ function Ve(e) {
2388
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2389
+ throw new ae(null, e);
2390
+ }
2391
+ function wt(e) {
2392
+ return Ve(e), e.headers = H.from(e.headers), e.data = Ue.call(
2393
+ e,
2394
+ e.transformRequest
2395
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter || he.adapter, e)(e).then(function(s) {
2396
+ return Ve(e), s.data = Ue.call(
2397
+ e,
2398
+ e.transformResponse,
2399
+ s
2400
+ ), s.headers = H.from(s.headers), s;
2401
+ }, function(s) {
2402
+ return qt(s) || (Ve(e), s && s.response && (s.response.data = Ue.call(
2403
+ e,
2404
+ e.transformResponse,
2405
+ s.response
2406
+ ), s.response.headers = H.from(s.response.headers))), Promise.reject(s);
2407
+ });
2408
+ }
2409
+ const Zt = "1.13.2", Be = {};
2410
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2411
+ Be[e] = function(s) {
2412
+ return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
2413
+ };
2414
+ });
2415
+ const bt = {};
2416
+ Be.transitional = function(t, n, s) {
2417
+ function r(a, o) {
2418
+ return "[Axios v" + Zt + "] Transitional option '" + a + "'" + o + (s ? ". " + s : "");
2419
+ }
2420
+ return (a, o, c) => {
2421
+ if (t === !1)
2422
+ throw new S(
2423
+ r(o, " has been removed" + (n ? " in " + n : "")),
2424
+ S.ERR_DEPRECATED
2425
+ );
2426
+ return n && !bt[o] && (bt[o] = !0, console.warn(
2427
+ r(
2428
+ o,
2429
+ " has been deprecated since v" + n + " and will be removed in the near future"
2430
+ )
2431
+ )), t ? t(a, o, c) : !0;
2432
+ };
2433
+ };
2434
+ Be.spelling = function(t) {
2435
+ return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
2436
+ };
2437
+ function Oo(e, t, n) {
2438
+ if (typeof e != "object")
2439
+ throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
2440
+ const s = Object.keys(e);
2441
+ let r = s.length;
2442
+ for (; r-- > 0; ) {
2443
+ const a = s[r], o = t[a];
2444
+ if (o) {
2445
+ const c = e[a], l = c === void 0 || o(c, a, e);
2446
+ if (l !== !0)
2447
+ throw new S("option " + a + " must be " + l, S.ERR_BAD_OPTION_VALUE);
2448
+ continue;
2449
+ }
2450
+ if (n !== !0)
2451
+ throw new S("Unknown option " + a, S.ERR_BAD_OPTION);
2452
+ }
2453
+ }
2454
+ const Ce = {
2455
+ assertOptions: Oo,
2456
+ validators: Be
2457
+ }, I = Ce.validators;
2458
+ let Q = class {
2459
+ constructor(t) {
2460
+ this.defaults = t || {}, this.interceptors = {
2461
+ request: new it(),
2462
+ response: new it()
2463
+ };
2464
+ }
2465
+ /**
2466
+ * Dispatch a request
2467
+ *
2468
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2469
+ * @param {?Object} config
2470
+ *
2471
+ * @returns {Promise} The Promise to be fulfilled
2472
+ */
2473
+ async request(t, n) {
2474
+ try {
2475
+ return await this._request(t, n);
2476
+ } catch (s) {
2477
+ if (s instanceof Error) {
2478
+ let r = {};
2479
+ Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
2480
+ const a = r.stack ? r.stack.replace(/^.+\n/, "") : "";
2481
+ try {
2482
+ s.stack ? a && !String(s.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (s.stack += `
2483
+ ` + a) : s.stack = a;
2484
+ } catch {
2485
+ }
2486
+ }
2487
+ throw s;
2488
+ }
2489
+ }
2490
+ _request(t, n) {
2491
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ee(this.defaults, n);
2492
+ const { transitional: s, paramsSerializer: r, headers: a } = n;
2493
+ s !== void 0 && Ce.assertOptions(s, {
2494
+ silentJSONParsing: I.transitional(I.boolean),
2495
+ forcedJSONParsing: I.transitional(I.boolean),
2496
+ clarifyTimeoutError: I.transitional(I.boolean)
2497
+ }, !1), r != null && (u.isFunction(r) ? n.paramsSerializer = {
2498
+ serialize: r
2499
+ } : Ce.assertOptions(r, {
2500
+ encode: I.function,
2501
+ serialize: I.function
2502
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ce.assertOptions(n, {
2503
+ baseUrl: I.spelling("baseURL"),
2504
+ withXsrfToken: I.spelling("withXSRFToken")
2505
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2506
+ let o = a && u.merge(
2507
+ a.common,
2508
+ a[n.method]
2509
+ );
2510
+ a && u.forEach(
2511
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2512
+ (m) => {
2513
+ delete a[m];
2514
+ }
2515
+ ), n.headers = H.concat(o, a);
2516
+ const c = [];
2517
+ let l = !0;
2518
+ this.interceptors.request.forEach(function(w) {
2519
+ typeof w.runWhen == "function" && w.runWhen(n) === !1 || (l = l && w.synchronous, c.unshift(w.fulfilled, w.rejected));
2520
+ });
2521
+ const i = [];
2522
+ this.interceptors.response.forEach(function(w) {
2523
+ i.push(w.fulfilled, w.rejected);
2524
+ });
2525
+ let d, f = 0, b;
2526
+ if (!l) {
2527
+ const m = [wt.bind(this), void 0];
2528
+ for (m.unshift(...c), m.push(...i), b = m.length, d = Promise.resolve(n); f < b; )
2529
+ d = d.then(m[f++], m[f++]);
2530
+ return d;
2531
+ }
2532
+ b = c.length;
2533
+ let E = n;
2534
+ for (; f < b; ) {
2535
+ const m = c[f++], w = c[f++];
2536
+ try {
2537
+ E = m(E);
2538
+ } catch (h) {
2539
+ w.call(this, h);
2540
+ break;
2541
+ }
2542
+ }
2543
+ try {
2544
+ d = wt.call(this, E);
2545
+ } catch (m) {
2546
+ return Promise.reject(m);
2547
+ }
2548
+ for (f = 0, b = i.length; f < b; )
2549
+ d = d.then(i[f++], i[f++]);
2550
+ return d;
2551
+ }
2552
+ getUri(t) {
2553
+ t = ee(this.defaults, t);
2554
+ const n = Jt(t.baseURL, t.url, t.allowAbsoluteUrls);
2555
+ return jt(n, t.params, t.paramsSerializer);
2556
+ }
2557
+ };
2558
+ u.forEach(["delete", "get", "head", "options"], function(t) {
2559
+ Q.prototype[t] = function(n, s) {
2560
+ return this.request(ee(s || {}, {
2561
+ method: t,
2562
+ url: n,
2563
+ data: (s || {}).data
2564
+ }));
2565
+ };
2566
+ });
2567
+ u.forEach(["post", "put", "patch"], function(t) {
2568
+ function n(s) {
2569
+ return function(a, o, c) {
2570
+ return this.request(ee(c || {}, {
2571
+ method: t,
2572
+ headers: s ? {
2573
+ "Content-Type": "multipart/form-data"
2574
+ } : {},
2575
+ url: a,
2576
+ data: o
2577
+ }));
2578
+ };
2579
+ }
2580
+ Q.prototype[t] = n(), Q.prototype[t + "Form"] = n(!0);
2581
+ });
2582
+ let Ao = class Xt {
2583
+ constructor(t) {
2584
+ if (typeof t != "function")
2585
+ throw new TypeError("executor must be a function.");
2586
+ let n;
2587
+ this.promise = new Promise(function(a) {
2588
+ n = a;
2589
+ });
2590
+ const s = this;
2591
+ this.promise.then((r) => {
2592
+ if (!s._listeners) return;
2593
+ let a = s._listeners.length;
2594
+ for (; a-- > 0; )
2595
+ s._listeners[a](r);
2596
+ s._listeners = null;
2597
+ }), this.promise.then = (r) => {
2598
+ let a;
2599
+ const o = new Promise((c) => {
2600
+ s.subscribe(c), a = c;
2601
+ }).then(r);
2602
+ return o.cancel = function() {
2603
+ s.unsubscribe(a);
2604
+ }, o;
2605
+ }, t(function(a, o, c) {
2606
+ s.reason || (s.reason = new ae(a, o, c), n(s.reason));
2607
+ });
2608
+ }
2609
+ /**
2610
+ * Throws a `CanceledError` if cancellation has been requested.
2611
+ */
2612
+ throwIfRequested() {
2613
+ if (this.reason)
2614
+ throw this.reason;
2615
+ }
2616
+ /**
2617
+ * Subscribe to the cancel signal
2618
+ */
2619
+ subscribe(t) {
2620
+ if (this.reason) {
2621
+ t(this.reason);
2622
+ return;
2623
+ }
2624
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
2625
+ }
2626
+ /**
2627
+ * Unsubscribe from the cancel signal
2628
+ */
2629
+ unsubscribe(t) {
2630
+ if (!this._listeners)
2631
+ return;
2632
+ const n = this._listeners.indexOf(t);
2633
+ n !== -1 && this._listeners.splice(n, 1);
2634
+ }
2635
+ toAbortSignal() {
2636
+ const t = new AbortController(), n = (s) => {
2637
+ t.abort(s);
2638
+ };
2639
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2640
+ }
2641
+ /**
2642
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2643
+ * cancels the `CancelToken`.
2644
+ */
2645
+ static source() {
2646
+ let t;
2647
+ return {
2648
+ token: new Xt(function(r) {
2649
+ t = r;
2650
+ }),
2651
+ cancel: t
2652
+ };
2653
+ }
2654
+ };
2655
+ function $o(e) {
2656
+ return function(n) {
2657
+ return e.apply(null, n);
2658
+ };
2659
+ }
2660
+ function To(e) {
2661
+ return u.isObject(e) && e.isAxiosError === !0;
2662
+ }
2663
+ const qe = {
2664
+ Continue: 100,
2665
+ SwitchingProtocols: 101,
2666
+ Processing: 102,
2667
+ EarlyHints: 103,
2668
+ Ok: 200,
2669
+ Created: 201,
2670
+ Accepted: 202,
2671
+ NonAuthoritativeInformation: 203,
2672
+ NoContent: 204,
2673
+ ResetContent: 205,
2674
+ PartialContent: 206,
2675
+ MultiStatus: 207,
2676
+ AlreadyReported: 208,
2677
+ ImUsed: 226,
2678
+ MultipleChoices: 300,
2679
+ MovedPermanently: 301,
2680
+ Found: 302,
2681
+ SeeOther: 303,
2682
+ NotModified: 304,
2683
+ UseProxy: 305,
2684
+ Unused: 306,
2685
+ TemporaryRedirect: 307,
2686
+ PermanentRedirect: 308,
2687
+ BadRequest: 400,
2688
+ Unauthorized: 401,
2689
+ PaymentRequired: 402,
2690
+ Forbidden: 403,
2691
+ NotFound: 404,
2692
+ MethodNotAllowed: 405,
2693
+ NotAcceptable: 406,
2694
+ ProxyAuthenticationRequired: 407,
2695
+ RequestTimeout: 408,
2696
+ Conflict: 409,
2697
+ Gone: 410,
2698
+ LengthRequired: 411,
2699
+ PreconditionFailed: 412,
2700
+ PayloadTooLarge: 413,
2701
+ UriTooLong: 414,
2702
+ UnsupportedMediaType: 415,
2703
+ RangeNotSatisfiable: 416,
2704
+ ExpectationFailed: 417,
2705
+ ImATeapot: 418,
2706
+ MisdirectedRequest: 421,
2707
+ UnprocessableEntity: 422,
2708
+ Locked: 423,
2709
+ FailedDependency: 424,
2710
+ TooEarly: 425,
2711
+ UpgradeRequired: 426,
2712
+ PreconditionRequired: 428,
2713
+ TooManyRequests: 429,
2714
+ RequestHeaderFieldsTooLarge: 431,
2715
+ UnavailableForLegalReasons: 451,
2716
+ InternalServerError: 500,
2717
+ NotImplemented: 501,
2718
+ BadGateway: 502,
2719
+ ServiceUnavailable: 503,
2720
+ GatewayTimeout: 504,
2721
+ HttpVersionNotSupported: 505,
2722
+ VariantAlsoNegotiates: 506,
2723
+ InsufficientStorage: 507,
2724
+ LoopDetected: 508,
2725
+ NotExtended: 510,
2726
+ NetworkAuthenticationRequired: 511,
2727
+ WebServerIsDown: 521,
2728
+ ConnectionTimedOut: 522,
2729
+ OriginIsUnreachable: 523,
2730
+ TimeoutOccurred: 524,
2731
+ SslHandshakeFailed: 525,
2732
+ InvalidSslCertificate: 526
2733
+ };
2734
+ Object.entries(qe).forEach(([e, t]) => {
2735
+ qe[t] = e;
2736
+ });
2737
+ function Qt(e) {
2738
+ const t = new Q(e), n = At(Q.prototype.request, t);
2739
+ return u.extend(n, Q.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
2740
+ return Qt(ee(e, r));
2741
+ }, n;
2742
+ }
2743
+ const C = Qt(he);
2744
+ C.Axios = Q;
2745
+ C.CanceledError = ae;
2746
+ C.CancelToken = Ao;
2747
+ C.isCancel = qt;
2748
+ C.VERSION = Zt;
2749
+ C.toFormData = Fe;
2750
+ C.AxiosError = S;
2751
+ C.Cancel = C.CanceledError;
2752
+ C.all = function(t) {
2753
+ return Promise.all(t);
2754
+ };
2755
+ C.spread = $o;
2756
+ C.isAxiosError = To;
2757
+ C.mergeConfig = ee;
2758
+ C.AxiosHeaders = H;
2759
+ C.formToJSON = (e) => It(u.isHTMLForm(e) ? new FormData(e) : e);
2760
+ C.getAdapter = Gt.getAdapter;
2761
+ C.HttpStatusCode = qe;
2762
+ C.default = C;
2763
+ const {
2764
+ Axios: La,
2765
+ AxiosError: Fa,
2766
+ CanceledError: Ba,
2767
+ isCancel: Na,
2768
+ CancelToken: Pa,
2769
+ VERSION: Ha,
2770
+ all: Ua,
2771
+ Cancel: Va,
2772
+ isAxiosError: Da,
2773
+ spread: ja,
2774
+ toFormData: Ma,
2775
+ AxiosHeaders: Ia,
2776
+ HttpStatusCode: qa,
2777
+ formToJSON: za,
2778
+ getAdapter: Ja,
2779
+ mergeConfig: Wa
2780
+ } = C, Lo = (e) => {
2781
+ const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
2782
+ return t ? t[2] : null;
2783
+ }, Fo = (e, t, n = {}) => {
2784
+ const {
2785
+ maxAge: s = 31536e3,
2786
+ // 365 days in seconds
2787
+ domain: r = Yt(),
2788
+ secure: a = !0,
2789
+ sameSite: o = "Lax",
2790
+ path: c = "/"
2791
+ } = n;
2792
+ let l = `${e}=${t}; max-age=${s}; path=${c}; samesite=${o}`;
2793
+ r && (l += `; domain=${r}`), a && (l += "; secure"), document.cookie = l;
2794
+ }, Bo = (e, t = {}) => {
2795
+ const { domain: n = Yt(), path: s = "/" } = t;
2796
+ let r = `${e}=; max-age=0; path=${s}`;
2797
+ n && (r += `; domain=${n}`), document.cookie = r;
2798
+ }, Yt = () => {
2799
+ let e = -3;
2800
+ return window.location.hostname.endsWith(".test") && (e = -2), window.location.hostname.split(".").slice(e).join(".");
2801
+ }, De = "bolt-token", ge = Re("auth", () => {
2802
+ const e = re({
2803
+ user: null,
2804
+ token: null,
2805
+ ready: !1,
2806
+ // Configurable endpoints
2807
+ endpoints: {
2808
+ login: "/login",
2809
+ logout: "/logout",
2810
+ fetch: "/user",
2811
+ passwordEmail: "/password/email",
2812
+ passwordReset: "/password/reset"
2813
+ },
2814
+ // Configurable routes
2815
+ routes: {
2816
+ auth: "/login",
2817
+ forbidden: "/error/403",
2818
+ notFound: "/error/404"
2819
+ },
2820
+ // Dev credentials for autofill (optional)
2821
+ devCredentials: {
2822
+ username: null,
2823
+ password: null
1062
2824
  },
1063
- toggleHidden: () => {
1064
- e.hidden = !e.hidden;
2825
+ // Lifecycle callbacks (optional)
2826
+ callbacks: {
2827
+ onLoginSuccess: null,
2828
+ onLoginError: null,
2829
+ onLogoutSuccess: null,
2830
+ onLogoutError: null
1065
2831
  }
2832
+ }), 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);
2834
+ }, n = (i) => {
2835
+ Fo(De, i), e.token = i;
2836
+ }, s = () => {
2837
+ Bo(De), e.token = null;
2838
+ }, r = () => Lo(De), a = async (i) => {
2839
+ const d = await C.post(e.endpoints.login, i), f = d.headers.authorization;
2840
+ return n(f), e.user = d.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(d.data), d.data;
2841
+ }, o = async () => {
2842
+ try {
2843
+ await C.post(
2844
+ e.endpoints.logout,
2845
+ {},
2846
+ {
2847
+ headers: {
2848
+ Authorization: `Bearer ${e.token}`
2849
+ }
2850
+ }
2851
+ ), e.callbacks.onLogoutSuccess && await e.callbacks.onLogoutSuccess();
2852
+ } catch (i) {
2853
+ throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(i), i;
2854
+ } finally {
2855
+ s(), e.user = null;
2856
+ }
2857
+ }, c = async () => {
2858
+ const i = r();
2859
+ if (!i)
2860
+ return e.ready = !0, null;
2861
+ try {
2862
+ const { data: d } = await C.get(e.endpoints.fetch, {
2863
+ headers: {
2864
+ Authorization: `Bearer ${i}`
2865
+ }
2866
+ });
2867
+ e.user = d, e.token = i;
2868
+ } catch {
2869
+ s();
2870
+ } finally {
2871
+ e.ready = !0;
2872
+ }
2873
+ }, l = $(() => !!e.token && !!e.user);
2874
+ return {
2875
+ state: e,
2876
+ initialize: t,
2877
+ login: a,
2878
+ logout: o,
2879
+ fetchUser: c,
2880
+ check: l,
2881
+ setTokenCookie: n,
2882
+ clearTokenCookie: s,
2883
+ getTokenCookie: r
1066
2884
  };
1067
- }), es = { class: "h-full grid place-content-center relative" }, ts = { class: "absolute top-8 left-8" }, ss = ["src"], ns = {
2885
+ }), No = { class: "h-full grid place-content-center relative" }, Po = { class: "absolute top-8 left-8" }, Ho = ["src"], Uo = {
1068
2886
  key: 1,
1069
2887
  width: "59",
1070
2888
  height: "23",
1071
2889
  viewBox: "0 0 59 23",
1072
2890
  fill: "none",
1073
2891
  xmlns: "http://www.w3.org/2000/svg"
1074
- }, os = { class: "max-w-sm grid gap-y-1 -mt-8" }, rs = { class: "mb-7" }, as = { class: "text-gray-600" }, ls = { class: "grid grid-flow-col justify-between my-1" }, is = {
2892
+ }, 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 = {
1075
2893
  key: 0,
1076
2894
  class: "text-red-600 text-sm mb-2"
1077
- }, cs = { key: 0 }, ds = { key: 1 }, Bs = {
2895
+ }, qo = { key: 0 }, zo = { key: 1 }, Jo = {
1078
2896
  __name: "SparkLoginView",
1079
2897
  props: {
1080
2898
  logo: {
1081
2899
  type: String,
1082
2900
  default: ""
1083
2901
  },
1084
- onLogin: {
1085
- type: Function,
1086
- required: !0
1087
- },
1088
2902
  forgotPasswordRoute: {
1089
2903
  type: String,
1090
2904
  default: "/forgot-password"
2905
+ },
2906
+ defaultRedirect: {
2907
+ type: String,
2908
+ default: "/dashboard"
1091
2909
  }
1092
2910
  },
1093
- emits: ["login-success", "login-error"],
1094
- setup(e, { emit: o }) {
1095
- const r = Qt(), c = e, g = o, f = A(!1), a = A(""), i = async (t) => {
1096
- f.value = !0, a.value = "";
2911
+ setup(e) {
2912
+ const t = Ee(), n = Oe(), s = ma(), r = ge(), a = e, o = z(!1), c = z(""), l = async (i) => {
2913
+ o.value = !0, c.value = "";
1097
2914
  try {
1098
- await c.onLogin(t), g("login-success");
1099
- } catch (n) {
1100
- a.value = n.message || "Login failed. Please try again.", g("login-error", n);
2915
+ await r.login(i);
2916
+ const d = n.query.redirect;
2917
+ if (d) {
2918
+ if (d.startsWith("http")) {
2919
+ window.location.href = d;
2920
+ return;
2921
+ }
2922
+ await t.push(d);
2923
+ } else
2924
+ await t.push(a.defaultRedirect);
2925
+ } catch (d) {
2926
+ c.value = d.response?.data?.message || d.message || "Login failed. Please try again.";
1101
2927
  } finally {
1102
- f.value = !1;
2928
+ o.value = !1;
1103
2929
  }
1104
2930
  };
1105
- return (t, n) => {
1106
- const v = S("FormKit"), p = S("router-link");
1107
- return l(), u("div", es, [
1108
- s("div", ts, [
1109
- c.logo ? (l(), u("img", {
2931
+ return (i, d) => {
2932
+ const f = V("FormKit"), b = V("router-link");
2933
+ return g(), y("div", No, [
2934
+ p("div", Po, [
2935
+ a.logo ? (g(), y("img", {
1110
2936
  key: 0,
1111
- src: c.logo,
2937
+ src: a.logo,
1112
2938
  alt: "Logo",
1113
2939
  class: "h-[23px] w-auto"
1114
- }, null, 8, ss)) : (l(), u("svg", ns, [...n[0] || (n[0] = [
1115
- s("path", {
2940
+ }, null, 8, Ho)) : (g(), y("svg", Uo, [...d[0] || (d[0] = [
2941
+ p("path", {
1116
2942
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
1117
2943
  fill: "#1C64F2"
1118
2944
  }, null, -1),
1119
- s("path", {
2945
+ p("path", {
1120
2946
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
1121
2947
  fill: "#1C64F2"
1122
2948
  }, null, -1),
1123
- s("path", {
2949
+ p("path", {
1124
2950
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
1125
2951
  fill: "#1C64F2"
1126
2952
  }, null, -1),
1127
- s("path", {
2953
+ p("path", {
1128
2954
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
1129
2955
  fill: "#1C64F2"
1130
2956
  }, null, -1)
1131
2957
  ])]))
1132
2958
  ]),
1133
- s("div", os, [
1134
- s("div", rs, [
1135
- n[1] || (n[1] = s("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
1136
- s("p", as, " Welcome back" + k(d(r).state.app ? ` to ${d(r).state.app}` : "") + "! Please enter your details. ", 1)
2959
+ p("div", Vo, [
2960
+ p("div", Do, [
2961
+ d[1] || (d[1] = p("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
2962
+ p("p", jo, " Welcome back" + F(x(s).state.app ? ` to ${x(s).state.app}` : "") + "! Please enter your details. ", 1)
1137
2963
  ]),
1138
- m(v, {
2964
+ v(f, {
1139
2965
  type: "form",
1140
- onSubmit: i,
2966
+ onSubmit: l,
1141
2967
  actions: !1
1142
2968
  }, {
1143
- default: _(() => [
1144
- m(v, {
2969
+ default: O(() => [
2970
+ v(f, {
1145
2971
  label: "Email",
1146
2972
  name: "email",
1147
2973
  placeholder: "Enter your email",
1148
2974
  type: "email",
1149
2975
  validation: "required|email",
1150
- "outer-class": "max-w-full"
1151
- }),
1152
- m(v, {
2976
+ "outer-class": "max-w-full",
2977
+ value: x(r).state.devCredentials.username
2978
+ }, null, 8, ["value"]),
2979
+ v(f, {
1153
2980
  label: "Password",
1154
2981
  name: "password",
1155
2982
  placeholder: "••••••••",
1156
2983
  type: "password",
1157
2984
  validation: "required",
1158
- "outer-class": "max-w-full"
1159
- }),
1160
- s("div", ls, [
1161
- m(v, {
1162
- label: "Remember me",
1163
- name: "remember",
1164
- type: "checkbox"
1165
- }),
1166
- m(p, {
1167
- to: c.forgotPasswordRoute,
2985
+ "outer-class": "max-w-full",
2986
+ value: x(r).state.devCredentials.password
2987
+ }, null, 8, ["value"]),
2988
+ p("div", Mo, [
2989
+ d[3] || (d[3] = p("span", null, null, -1)),
2990
+ v(b, {
2991
+ to: a.forgotPasswordRoute,
1168
2992
  class: "text-sm text-primary-600 font-semibold"
1169
2993
  }, {
1170
- default: _(() => [...n[2] || (n[2] = [
1171
- X(" Forgot password ", -1)
2994
+ default: O(() => [...d[2] || (d[2] = [
2995
+ ze(" Forgot password ", -1)
1172
2996
  ])]),
1173
2997
  _: 1
1174
2998
  }, 8, ["to"])
1175
2999
  ]),
1176
- a.value ? (l(), u("div", is, k(a.value), 1)) : x("", !0),
1177
- m(d(Y), {
3000
+ c.value ? (g(), y("div", Io, F(c.value), 1)) : R("", !0),
3001
+ v(x(Ae), {
1178
3002
  type: "submit",
1179
3003
  size: "xl",
1180
- disabled: f.value,
3004
+ disabled: o.value,
1181
3005
  "button-class": "w-full mb-2"
1182
3006
  }, {
1183
- default: _(() => [
1184
- f.value ? (l(), u("span", ds, "Signing in...")) : (l(), u("span", cs, "Sign in"))
3007
+ default: O(() => [
3008
+ o.value ? (g(), y("span", zo, "Signing in...")) : (g(), y("span", qo, "Sign in"))
3009
+ ]),
3010
+ _: 1
3011
+ }, 8, ["disabled"])
3012
+ ]),
3013
+ _: 1
3014
+ })
3015
+ ])
3016
+ ]);
3017
+ };
3018
+ }
3019
+ }, Wo = {
3020
+ __name: "SparkLogoutView",
3021
+ props: {
3022
+ defaultRedirect: {
3023
+ type: String,
3024
+ default: "/login"
3025
+ }
3026
+ },
3027
+ setup(e) {
3028
+ const t = Ee(), n = Oe(), s = ge(), r = e;
3029
+ return sn(async () => {
3030
+ await s.logout();
3031
+ const a = n.query.redirect;
3032
+ a && a.startsWith("http") ? window.location.href = a : await t.push(a || r.defaultRedirect);
3033
+ }), (a, o) => null;
3034
+ }
3035
+ }, Ko = { class: "h-full grid place-content-center relative" }, Go = { class: "absolute top-8 left-8" }, Zo = ["src"], Xo = {
3036
+ key: 1,
3037
+ width: "59",
3038
+ height: "23",
3039
+ viewBox: "0 0 59 23",
3040
+ fill: "none",
3041
+ xmlns: "http://www.w3.org/2000/svg"
3042
+ }, Qo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Yo = {
3043
+ key: 0,
3044
+ class: "text-red-600 text-sm mb-2"
3045
+ }, ea = {
3046
+ key: 1,
3047
+ class: "text-green-600 text-sm mb-2"
3048
+ }, ta = { key: 0 }, na = { key: 1 }, sa = {
3049
+ __name: "SparkForgotPasswordView",
3050
+ props: {
3051
+ logo: {
3052
+ type: String,
3053
+ default: ""
3054
+ },
3055
+ loginRoute: {
3056
+ type: String,
3057
+ default: "/login"
3058
+ }
3059
+ },
3060
+ setup(e) {
3061
+ const t = ge(), n = e, s = z(!1), r = z(""), a = z(""), o = async ({ email: c }) => {
3062
+ s.value = !0, r.value = "", a.value = "";
3063
+ try {
3064
+ await C.post(t.state.endpoints.passwordEmail, { email: c }), a.value = "Password reset link sent! Check your email.";
3065
+ } catch (l) {
3066
+ r.value = l.response?.data?.message || "Failed to send reset link.";
3067
+ } finally {
3068
+ s.value = !1;
3069
+ }
3070
+ };
3071
+ return (c, l) => {
3072
+ const i = V("FormKit"), d = V("router-link");
3073
+ return g(), y("div", Ko, [
3074
+ p("div", Go, [
3075
+ n.logo ? (g(), y("img", {
3076
+ key: 0,
3077
+ src: n.logo,
3078
+ alt: "Logo",
3079
+ class: "h-[23px] w-auto"
3080
+ }, null, 8, Zo)) : (g(), y("svg", Xo, [...l[0] || (l[0] = [
3081
+ p("path", {
3082
+ d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3083
+ fill: "#1C64F2"
3084
+ }, null, -1),
3085
+ p("path", {
3086
+ d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
3087
+ fill: "#1C64F2"
3088
+ }, null, -1),
3089
+ p("path", {
3090
+ d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
3091
+ fill: "#1C64F2"
3092
+ }, null, -1),
3093
+ p("path", {
3094
+ d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
3095
+ fill: "#1C64F2"
3096
+ }, null, -1)
3097
+ ])]))
3098
+ ]),
3099
+ p("div", Qo, [
3100
+ l[2] || (l[2] = p("div", { class: "mb-7" }, [
3101
+ p("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
3102
+ p("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
3103
+ ], -1)),
3104
+ v(i, {
3105
+ type: "form",
3106
+ onSubmit: o,
3107
+ actions: !1
3108
+ }, {
3109
+ default: O(() => [
3110
+ v(i, {
3111
+ label: "Email",
3112
+ name: "email",
3113
+ placeholder: "Enter your email",
3114
+ type: "email",
3115
+ validation: "required|email",
3116
+ "outer-class": "max-w-full"
3117
+ }),
3118
+ r.value ? (g(), y("div", Yo, F(r.value), 1)) : R("", !0),
3119
+ a.value ? (g(), y("div", ea, F(a.value), 1)) : R("", !0),
3120
+ v(x(Ae), {
3121
+ type: "submit",
3122
+ size: "xl",
3123
+ disabled: s.value,
3124
+ "button-class": "w-full mb-2"
3125
+ }, {
3126
+ default: O(() => [
3127
+ s.value ? (g(), y("span", na, "Sending...")) : (g(), y("span", ta, "Send reset link"))
3128
+ ]),
3129
+ _: 1
3130
+ }, 8, ["disabled"]),
3131
+ v(d, {
3132
+ to: n.loginRoute,
3133
+ class: "text-sm text-center text-primary-600 font-semibold block"
3134
+ }, {
3135
+ default: O(() => [...l[1] || (l[1] = [
3136
+ ze(" Back to login ", -1)
3137
+ ])]),
3138
+ _: 1
3139
+ }, 8, ["to"])
3140
+ ]),
3141
+ _: 1
3142
+ })
3143
+ ])
3144
+ ]);
3145
+ };
3146
+ }
3147
+ }, ra = { class: "h-full grid place-content-center relative" }, oa = { class: "absolute top-8 left-8" }, aa = ["src"], ia = {
3148
+ key: 1,
3149
+ width: "59",
3150
+ height: "23",
3151
+ viewBox: "0 0 59 23",
3152
+ fill: "none",
3153
+ xmlns: "http://www.w3.org/2000/svg"
3154
+ }, la = { class: "max-w-sm grid gap-y-1 -mt-8" }, ca = {
3155
+ key: 0,
3156
+ class: "text-red-600 text-sm mb-2"
3157
+ }, ua = { key: 0 }, da = { key: 1 }, fa = {
3158
+ __name: "SparkResetPasswordView",
3159
+ props: {
3160
+ logo: {
3161
+ type: String,
3162
+ default: ""
3163
+ },
3164
+ loginRoute: {
3165
+ type: String,
3166
+ default: "/login"
3167
+ }
3168
+ },
3169
+ setup(e) {
3170
+ const t = Ee(), n = Oe(), s = ge(), r = e, a = z(!1), o = z(""), c = async ({ password: l, password_confirmation: i }) => {
3171
+ a.value = !0, o.value = "";
3172
+ try {
3173
+ await C.post(s.state.endpoints.passwordReset, {
3174
+ email: n.query.email,
3175
+ token: n.query.token,
3176
+ password: l,
3177
+ password_confirmation: i
3178
+ }), await t.push(r.loginRoute);
3179
+ } catch (d) {
3180
+ o.value = d.response?.data?.message || "Failed to reset password.";
3181
+ } finally {
3182
+ a.value = !1;
3183
+ }
3184
+ };
3185
+ return (l, i) => {
3186
+ const d = V("FormKit");
3187
+ return g(), y("div", ra, [
3188
+ p("div", oa, [
3189
+ r.logo ? (g(), y("img", {
3190
+ key: 0,
3191
+ src: r.logo,
3192
+ alt: "Logo",
3193
+ class: "h-[23px] w-auto"
3194
+ }, null, 8, aa)) : (g(), y("svg", ia, [...i[0] || (i[0] = [
3195
+ p("path", {
3196
+ d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3197
+ fill: "#1C64F2"
3198
+ }, null, -1),
3199
+ p("path", {
3200
+ d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
3201
+ fill: "#1C64F2"
3202
+ }, null, -1),
3203
+ p("path", {
3204
+ d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
3205
+ fill: "#1C64F2"
3206
+ }, null, -1),
3207
+ p("path", {
3208
+ d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
3209
+ fill: "#1C64F2"
3210
+ }, null, -1)
3211
+ ])]))
3212
+ ]),
3213
+ p("div", la, [
3214
+ i[1] || (i[1] = p("div", { class: "mb-7" }, [
3215
+ p("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
3216
+ p("p", { class: "text-gray-600" }, " Enter your new password below. ")
3217
+ ], -1)),
3218
+ v(d, {
3219
+ type: "form",
3220
+ onSubmit: c,
3221
+ actions: !1
3222
+ }, {
3223
+ default: O(() => [
3224
+ v(d, {
3225
+ label: "New Password",
3226
+ name: "password",
3227
+ placeholder: "••••••••",
3228
+ type: "password",
3229
+ validation: "required|length:8",
3230
+ "outer-class": "max-w-full"
3231
+ }),
3232
+ v(d, {
3233
+ label: "Confirm Password",
3234
+ name: "password_confirmation",
3235
+ placeholder: "••••••••",
3236
+ type: "password",
3237
+ validation: "required|confirm",
3238
+ "outer-class": "max-w-full"
3239
+ }),
3240
+ o.value ? (g(), y("div", ca, F(o.value), 1)) : R("", !0),
3241
+ v(x(Ae), {
3242
+ type: "submit",
3243
+ size: "xl",
3244
+ disabled: a.value,
3245
+ "button-class": "w-full mb-2"
3246
+ }, {
3247
+ default: O(() => [
3248
+ a.value ? (g(), y("span", da, "Resetting...")) : (g(), y("span", ua, "Reset password"))
1185
3249
  ]),
1186
3250
  _: 1
1187
3251
  }, 8, ["disabled"])
@@ -1193,26 +3257,182 @@ const Ss = /* @__PURE__ */ Kt(Wt, [["render", Jt]]), Qt = M("sparkApp", () => {
1193
3257
  };
1194
3258
  }
1195
3259
  };
3260
+ function Ka(e = {}) {
3261
+ const {
3262
+ loginPath: t = "/login",
3263
+ logoutPath: n = "/logout",
3264
+ forgotPasswordPath: s = "/forgot-password",
3265
+ resetPasswordPath: r = "/reset-password",
3266
+ logo: a = "",
3267
+ defaultRedirect: o = "/dashboard"
3268
+ } = e;
3269
+ return [
3270
+ {
3271
+ path: t,
3272
+ name: "login",
3273
+ component: Jo,
3274
+ props: { logo: a, defaultRedirect: o },
3275
+ meta: { auth: !1 }
3276
+ },
3277
+ {
3278
+ path: n,
3279
+ name: "logout",
3280
+ component: Wo,
3281
+ props: { defaultRedirect: t },
3282
+ meta: { auth: !1 }
3283
+ },
3284
+ {
3285
+ path: s,
3286
+ name: "forgot-password",
3287
+ component: sa,
3288
+ props: { logo: a, loginRoute: t },
3289
+ meta: { auth: !1 }
3290
+ },
3291
+ {
3292
+ path: r,
3293
+ name: "reset-password",
3294
+ component: fa,
3295
+ props: { logo: a, loginRoute: t },
3296
+ meta: { auth: !1 }
3297
+ }
3298
+ ];
3299
+ }
3300
+ function Ga(e, t = {}) {
3301
+ const { defaultAuthenticatedRoute: n = "/dashboard" } = t;
3302
+ e.beforeEach(async (s, r, a) => {
3303
+ const o = ge();
3304
+ o.state.ready || await o.fetchUser(), pa(s, a, o, n);
3305
+ });
3306
+ }
3307
+ function pa(e, t, n, s) {
3308
+ const r = e.meta.auth !== !1, a = n.check;
3309
+ if (!a) {
3310
+ if (!r) {
3311
+ if (e.path === "/logout") {
3312
+ t({ path: n.state.routes.auth });
3313
+ return;
3314
+ }
3315
+ t();
3316
+ return;
3317
+ }
3318
+ let o = e.fullPath;
3319
+ if (o === "/" || o === "" || o === s) {
3320
+ t({ path: n.state.routes.auth });
3321
+ return;
3322
+ }
3323
+ o.includes("%") && (o = decodeURIComponent(o)), t({
3324
+ path: n.state.routes.auth,
3325
+ query: { redirect: o }
3326
+ });
3327
+ return;
3328
+ }
3329
+ if (a) {
3330
+ if (!r && e.path === n.state.routes.auth) {
3331
+ t({ path: s });
3332
+ return;
3333
+ }
3334
+ if (e.path === "/") {
3335
+ t({ path: s });
3336
+ return;
3337
+ }
3338
+ t();
3339
+ }
3340
+ }
3341
+ const ma = Re("sparkApp", () => {
3342
+ const e = re({
3343
+ app: "",
3344
+ icon: "",
3345
+ homeRoute: "dashboard",
3346
+ showBrandSelector: !0,
3347
+ showAppSelector: !0
3348
+ });
3349
+ return {
3350
+ state: e,
3351
+ initialize: (n = {}) => {
3352
+ e.app = n.app || "", e.icon = n.icon || "", e.homeRoute = n.homeRoute ?? "dashboard", e.showBrandSelector = n.showBrandSelector ?? !0, e.showAppSelector = n.showAppSelector ?? !0;
3353
+ }
3354
+ };
3355
+ }), Za = Re("sparkNav", () => {
3356
+ const e = re({
3357
+ menu: [],
3358
+ collapsed: !1,
3359
+ hidden: !1
3360
+ }), t = Ee(), n = Oe(), s = (i = []) => {
3361
+ e.menu = i;
3362
+ }, r = (i, d) => {
3363
+ for (const f of i) {
3364
+ if (f.href === d) return f;
3365
+ if (f.children) {
3366
+ const b = r(f.children, d);
3367
+ if (b) return b;
3368
+ }
3369
+ }
3370
+ return null;
3371
+ }, a = async (i) => {
3372
+ if (i) {
3373
+ const d = r(e.menu, i);
3374
+ if (d && typeof d.action == "function") {
3375
+ d.action();
3376
+ return;
3377
+ }
3378
+ await t.push(i);
3379
+ }
3380
+ }, o = () => {
3381
+ e.collapsed = !e.collapsed;
3382
+ }, c = () => {
3383
+ e.hidden = !e.hidden;
3384
+ }, l = () => {
3385
+ const i = n.name || n.path.replace("/", "");
3386
+ if (i) {
3387
+ const d = (f) => {
3388
+ f.forEach((b) => {
3389
+ b.current = b.href === i, b.children && d(b.children);
3390
+ });
3391
+ };
3392
+ d(e.menu);
3393
+ }
3394
+ };
3395
+ return rn(
3396
+ () => n.path,
3397
+ () => {
3398
+ l();
3399
+ },
3400
+ { immediate: !0 }
3401
+ ), {
3402
+ state: e,
3403
+ initialize: s,
3404
+ goto: a,
3405
+ toggleCollapsed: o,
3406
+ toggleHidden: c,
3407
+ syncWithRoute: l
3408
+ };
3409
+ });
1196
3410
  export {
1197
- b as Icons,
1198
- bs as SparkAlert,
1199
- st as SparkAppSelector,
1200
- xt as SparkBrandSelector,
1201
- Y as SparkButton,
1202
- _s as SparkButtonGroup,
1203
- ws as SparkCard,
1204
- Cs as SparkDefaultContainer,
1205
- Bs as SparkLoginView,
1206
- $t as SparkModalContainer,
1207
- ks as SparkModalDialog,
1208
- O as SparkOverlay,
1209
- Ss as SparkPublicContainer,
1210
- xs as addIcons,
1211
- ys as setupFontAwesome,
1212
- R as sparkModalService,
1213
- $ as sparkOverlayService,
1214
- Qt as useSparkAppStore,
1215
- W as useSparkBrandFilterStore,
1216
- $s as useSparkNavStore,
1217
- D as useSparkOverlay
3411
+ N as Icons,
3412
+ _a as SparkAlert,
3413
+ os as SparkAppSelector,
3414
+ Ss as SparkBrandSelector,
3415
+ Ae as SparkButton,
3416
+ ka as SparkButtonGroup,
3417
+ Ra as SparkCard,
3418
+ Oa as SparkDefaultContainer,
3419
+ sa as SparkForgotPasswordView,
3420
+ Jo as SparkLoginView,
3421
+ Wo as SparkLogoutView,
3422
+ As as SparkModalContainer,
3423
+ Ea as SparkModalDialog,
3424
+ nt as SparkOverlay,
3425
+ Aa as SparkPublicContainer,
3426
+ fa as SparkResetPasswordView,
3427
+ va as addIcons,
3428
+ Ka as createAuthRoutes,
3429
+ Ga as setupAuthGuards,
3430
+ Ca as setupFontAwesome,
3431
+ ce as sparkModalService,
3432
+ Z as sparkOverlayService,
3433
+ ma as useSparkAppStore,
3434
+ ge as useSparkAuthStore,
3435
+ Ot as useSparkBrandFilterStore,
3436
+ Za as useSparkNavStore,
3437
+ st as useSparkOverlay
1218
3438
  };