@wishbone-media/spark 0.9.0 → 0.9.2

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,7 +1,7 @@
1
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
2
  import { library as _t } from "@fortawesome/fontawesome-svg-core";
3
3
  import { FontAwesomeIcon as on } from "@fortawesome/vue-fontawesome";
4
- import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as 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";
4
+ import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as hn, faSatelliteDish as mn, faLayerPlus as gn, faLaptopMobile as yn, faInfoCircle as wn, faGripDotsVertical as bn, faGearComplex as xn, faFlag as Sn, faFaceSmileWink as vn, faFaceSmileRelaxed as Cn, faExclamationTriangle as _n, faEllipsisVertical as kn, faEllipsis as Rn, faEdit as En, faComments as On, faCircleXmark as An, faCircleUser as $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
5
  import { defineStore as Re } from "pinia";
6
6
  import { TransitionRoot as kt, Dialog as Rt, TransitionChild as _e, DialogPanel as Et } from "@headlessui/vue";
7
7
  import { useRouter as Ee, useRoute as Oe } from "vue-router";
@@ -32,8 +32,8 @@ const N = {
32
32
  farInfoCircle: wn,
33
33
  farLaptopMobile: yn,
34
34
  farLayerPlus: gn,
35
- farSatelliteDish: hn,
36
- farScaleBalanced: mn,
35
+ farSatelliteDish: mn,
36
+ farScaleBalanced: hn,
37
37
  farSort: pn,
38
38
  farSortDown: fn,
39
39
  farSortUp: dn,
@@ -48,7 +48,7 @@ function va(e) {
48
48
  function Ca(e) {
49
49
  _t.add(...Object.values(N)), e.component("FontAwesomeIcon", on);
50
50
  }
51
- const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }, qn = { class: "ml-3" }, zn = { class: "ml-auto pl-3 pt-1 self-start" }, Jn = { class: "-mx-1.5 -my-1.5" }, _a = {
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" }, Wn = { class: "-mx-1.5 -my-1.5" }, _a = {
52
52
  __name: "SparkAlert",
53
53
  props: {
54
54
  type: {
@@ -96,7 +96,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
96
96
  q(o.$slots, "default")
97
97
  ]),
98
98
  p("div", zn, [
99
- p("div", Jn, [
99
+ p("div", Wn, [
100
100
  p("button", {
101
101
  type: "button",
102
102
  class: _(["inline-flex rounded-md px-2 py-1.5", a.value]),
@@ -112,7 +112,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
112
112
  ], 2);
113
113
  };
114
114
  }
115
- }, 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
+ }, Jn = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Kn = { class: "flex flex-1 flex-col" }, Gn = { class: "divide-y divide-gray-200" }, Zn = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Xn = { class: "ml-auto flex items-center" }, Qn = ["onClick"], Yn = { class: "gap-y-1" }, es = { class: "text-base text-gray-800 flex items-center" }, ts = { class: "font-medium" }, ns = {
116
116
  key: 0,
117
117
  class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
118
118
  }, ss = { class: "text-sm text-gray-500" }, rs = { class: "ml-auto flex items-center" }, os = {
@@ -176,7 +176,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
176
176
  };
177
177
  return (o, c) => {
178
178
  const l = V("font-awesome-icon");
179
- return g(), y("div", Wn, [
179
+ return g(), y("div", Jn, [
180
180
  p("div", Kn, [
181
181
  p("div", Gn, [
182
182
  p("div", Zn, [
@@ -265,7 +265,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
265
265
  ), as = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, is = { class: "flex flex-1 flex-col" }, ls = { class: "divide-y divide-gray-200" }, cs = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, us = { class: "ml-auto flex items-center" }, ds = {
266
266
  key: 0,
267
267
  class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
268
- }, fs = ["onClick"], ps = { class: "gap-y-1 flex" }, 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
+ }, fs = ["onClick"], ps = { class: "gap-y-1 flex" }, hs = { class: "flex items-center mr-4" }, ms = ["src", "alt"], gs = { class: "ml-auto flex flex-col" }, ys = { class: "text-base text-gray-800 flex items-center" }, ws = { class: "font-medium" }, bs = {
269
269
  key: 0,
270
270
  class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
271
271
  }, xs = { class: "text-sm text-gray-500" }, Ss = {
@@ -297,12 +297,12 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
297
297
  onClick: (i) => r(l)
298
298
  }, [
299
299
  p("div", ps, [
300
- p("div", ms, [
300
+ p("div", hs, [
301
301
  p("img", {
302
302
  src: l.logo,
303
303
  alt: `${l.name} logo`,
304
304
  class: "h-8 w-auto"
305
- }, null, 8, hs)
305
+ }, null, 8, ms)
306
306
  ]),
307
307
  p("div", gs, [
308
308
  p("div", ys, [
@@ -364,13 +364,13 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
364
364
  }, o = (l, i) => {
365
365
  if (!i) return l;
366
366
  const d = l.split(" ").filter(Boolean), f = i.split(" ").filter(Boolean);
367
- return [...d.filter((E) => !f.some((m) => {
367
+ return [...d.filter((E) => !f.some((h) => {
368
368
  const w = Object.entries(a).find(
369
369
  ([k, T]) => T.test(E)
370
- )?.[0], h = Object.entries(a).find(
371
- ([k, T]) => T.test(m)
370
+ )?.[0], m = Object.entries(a).find(
371
+ ([k, T]) => T.test(h)
372
372
  )?.[0];
373
- return w && w === h;
373
+ return w && w === m;
374
374
  })), ...f].join(" ");
375
375
  }, c = $(() => {
376
376
  let l = "", i = "";
@@ -807,7 +807,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
807
807
  }, Ms = ["href", "onClick"], Is = {
808
808
  key: 1,
809
809
  class: "text-[13px]"
810
- }, 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
+ }, qs = { class: "mt-auto" }, zs = { class: "p-[10px] flex-shrink-0" }, Ws = { class: "flex flex-1 items-center gap-x-6" }, Js = { class: "relative flex flex-1 items-center gap-4" }, Ks = { class: "cursor-pointer" }, Gs = ["src"], Zs = { class: "ml-auto" }, Xs = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Oa = {
811
811
  __name: "SparkDefaultContainer",
812
812
  props: {
813
813
  appStore: {
@@ -935,8 +935,8 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
935
935
  class: _([o.value, "h-full transition-all flex flex-col"])
936
936
  }, [
937
937
  p("div", zs, [
938
- p("div", Js, [
939
- p("div", Ws, [
938
+ p("div", Ws, [
939
+ p("div", Js, [
940
940
  q(c.$slots, "header-left", {}, () => [
941
941
  p("div", Ks, [
942
942
  v(i, {
@@ -1014,7 +1014,7 @@ function At(e, t) {
1014
1014
  return e.apply(t, arguments);
1015
1015
  };
1016
1016
  }
1017
- const { toString: nr } = Object.prototype, { getPrototypeOf: Je } = Object, { iterator: $e, toStringTag: $t } = Symbol, Te = /* @__PURE__ */ ((e) => (t) => {
1017
+ const { toString: nr } = Object.prototype, { getPrototypeOf: We } = Object, { iterator: $e, toStringTag: $t } = Symbol, Te = /* @__PURE__ */ ((e) => (t) => {
1018
1018
  const n = nr.call(t);
1019
1019
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1020
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");
@@ -1029,7 +1029,7 @@ function sr(e) {
1029
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
1030
  if (Te(e) !== "object")
1031
1031
  return !1;
1032
- const t = Je(e);
1032
+ const t = We(e);
1033
1033
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !($t in e) && !($e in e);
1034
1034
  }, ar = (e) => {
1035
1035
  if (!pe(e) || fe(e))
@@ -1043,8 +1043,8 @@ const rr = Le("string"), P = Le("function"), Lt = Le("number"), pe = (e) => e !=
1043
1043
  let t;
1044
1044
  return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Te(e)) === "formdata" || // detect form-data instance
1045
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 } = {}) {
1046
+ }, pr = j("URLSearchParams"), [hr, mr, gr, yr] = ["ReadableStream", "Request", "Response", "Headers"].map(j), wr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1047
+ function he(e, t, { allOwnKeys: n = !1 } = {}) {
1048
1048
  if (e === null || typeof e > "u")
1049
1049
  return;
1050
1050
  let s, r;
@@ -1078,10 +1078,10 @@ function je() {
1078
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
1079
  };
1080
1080
  for (let r = 0, a = arguments.length; r < a; r++)
1081
- arguments[r] && me(arguments[r], s);
1081
+ arguments[r] && he(arguments[r], s);
1082
1082
  return n;
1083
1083
  }
1084
- const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
1084
+ const br = (e, t, n, { allOwnKeys: s } = {}) => (he(t, (r, a) => {
1085
1085
  n && P(r) ? e[a] = At(r, n) : e[a] = r;
1086
1086
  }, { allOwnKeys: s }), e), xr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Sr = (e, t, n, s) => {
1087
1087
  e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
@@ -1094,7 +1094,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
1094
1094
  do {
1095
1095
  for (r = Object.getOwnPropertyNames(e), a = r.length; a-- > 0; )
1096
1096
  o = r[a], (!s || s(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
1097
- e = n !== !1 && Je(e);
1097
+ e = n !== !1 && We(e);
1098
1098
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
1099
1099
  return t;
1100
1100
  }, Cr = (e, t, n) => {
@@ -1110,7 +1110,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
1110
1110
  for (; t-- > 0; )
1111
1111
  n[t] = e[t];
1112
1112
  return n;
1113
- }, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Je(Uint8Array)), Rr = (e, t) => {
1113
+ }, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && We(Uint8Array)), Rr = (e, t) => {
1114
1114
  const s = (e && e[$e]).call(e);
1115
1115
  let r;
1116
1116
  for (; (r = s.next()) && !r.done; ) {
@@ -1130,7 +1130,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
1130
1130
  }
1131
1131
  ), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), $r = j("RegExp"), Nt = (e, t) => {
1132
1132
  const n = Object.getOwnPropertyDescriptors(e), s = {};
1133
- me(n, (r, a) => {
1133
+ he(n, (r, a) => {
1134
1134
  let o;
1135
1135
  (o = t(r, a, e)) !== !1 && (s[a] = o || r);
1136
1136
  }), Object.defineProperties(e, s);
@@ -1171,7 +1171,7 @@ const Pr = (e) => {
1171
1171
  if (!("toJSON" in s)) {
1172
1172
  t[r] = s;
1173
1173
  const a = oe(s) ? [] : {};
1174
- return me(s, (o, c) => {
1174
+ return he(s, (o, c) => {
1175
1175
  const l = n(o, r + 1);
1176
1176
  !se(l) && (a[c] = l);
1177
1177
  }), t[r] = void 0, a;
@@ -1199,8 +1199,8 @@ const Pr = (e) => {
1199
1199
  isObject: pe,
1200
1200
  isPlainObject: Se,
1201
1201
  isEmptyObject: ar,
1202
- isReadableStream: mr,
1203
- isRequest: hr,
1202
+ isReadableStream: hr,
1203
+ isRequest: mr,
1204
1204
  isResponse: gr,
1205
1205
  isHeaders: yr,
1206
1206
  isUndefined: se,
@@ -1213,7 +1213,7 @@ const Pr = (e) => {
1213
1213
  isURLSearchParams: pr,
1214
1214
  isTypedArray: kr,
1215
1215
  isFileList: ur,
1216
- forEach: me,
1216
+ forEach: he,
1217
1217
  merge: je,
1218
1218
  extend: br,
1219
1219
  trim: wr,
@@ -1324,28 +1324,28 @@ function Fe(e, t, n) {
1324
1324
  metaTokens: !0,
1325
1325
  dots: !1,
1326
1326
  indexes: !1
1327
- }, !1, function(w, h) {
1328
- return !u.isUndefined(h[w]);
1327
+ }, !1, function(w, m) {
1328
+ return !u.isUndefined(m[w]);
1329
1329
  });
1330
1330
  const s = n.metaTokens, r = n.visitor || d, a = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
1331
1331
  if (!u.isFunction(r))
1332
1332
  throw new TypeError("visitor must be a function");
1333
- function i(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))
1333
+ function i(h) {
1334
+ if (h === null) return "";
1335
+ if (u.isDate(h))
1336
+ return h.toISOString();
1337
+ if (u.isBoolean(h))
1338
+ return h.toString();
1339
+ if (!l && u.isBlob(h))
1340
1340
  throw new S("Blob is not supported. Use a Buffer instead.");
1341
- return u.isArrayBuffer(m) || u.isTypedArray(m) ? l && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
1341
+ return u.isArrayBuffer(h) || u.isTypedArray(h) ? l && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
1342
1342
  }
1343
- function d(m, w, h) {
1344
- let k = m;
1345
- if (m && !h && typeof m == "object") {
1343
+ function d(h, w, m) {
1344
+ let k = h;
1345
+ if (h && !m && typeof h == "object") {
1346
1346
  if (u.endsWith(w, "{}"))
1347
- w = s ? w : w.slice(0, -2), m = JSON.stringify(m);
1348
- else if (u.isArray(m) && Mr(m) || (u.isFileList(m) || u.endsWith(w, "[]")) && (k = u.toArray(m)))
1347
+ w = s ? w : w.slice(0, -2), h = JSON.stringify(h);
1348
+ else if (u.isArray(h) && Mr(h) || (u.isFileList(h) || u.endsWith(w, "[]")) && (k = u.toArray(h)))
1349
1349
  return w = Vt(w), k.forEach(function(A, B) {
1350
1350
  !(u.isUndefined(A) || A === null) && t.append(
1351
1351
  // eslint-disable-next-line no-nested-ternary
@@ -1354,18 +1354,18 @@ function Fe(e, t, n) {
1354
1354
  );
1355
1355
  }), !1;
1356
1356
  }
1357
- return Me(m) ? !0 : (t.append(ot(h, w, a), i(m)), !1);
1357
+ return Me(h) ? !0 : (t.append(ot(m, w, a), i(h)), !1);
1358
1358
  }
1359
1359
  const f = [], b = Object.assign(Ir, {
1360
1360
  defaultVisitor: d,
1361
1361
  convertValue: i,
1362
1362
  isVisitable: Me
1363
1363
  });
1364
- function E(m, w) {
1365
- if (!u.isUndefined(m)) {
1366
- if (f.indexOf(m) !== -1)
1364
+ function E(h, w) {
1365
+ if (!u.isUndefined(h)) {
1366
+ if (f.indexOf(h) !== -1)
1367
1367
  throw Error("Circular reference detected in " + w.join("."));
1368
- f.push(m), u.forEach(m, function(k, T) {
1368
+ f.push(h), u.forEach(h, function(k, T) {
1369
1369
  (!(u.isUndefined(k) || k === null) && r.call(
1370
1370
  t,
1371
1371
  k,
@@ -1394,10 +1394,10 @@ function at(e) {
1394
1394
  return t[s];
1395
1395
  });
1396
1396
  }
1397
- function We(e, t) {
1397
+ function Je(e, t) {
1398
1398
  this._pairs = [], e && Fe(e, this, t);
1399
1399
  }
1400
- const Dt = We.prototype;
1400
+ const Dt = Je.prototype;
1401
1401
  Dt.append = function(t, n) {
1402
1402
  this._pairs.push([t, n]);
1403
1403
  };
@@ -1421,7 +1421,7 @@ function jt(e, t, n) {
1421
1421
  });
1422
1422
  const r = n && n.serialize;
1423
1423
  let a;
1424
- if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new We(t, n).toString(s), a) {
1424
+ if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new Je(t, n).toString(s), a) {
1425
1425
  const o = e.indexOf("#");
1426
1426
  o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
1427
1427
  }
@@ -1485,12 +1485,12 @@ const Mt = {
1485
1485
  silentJSONParsing: !0,
1486
1486
  forcedJSONParsing: !0,
1487
1487
  clarifyTimeoutError: !1
1488
- }, zr = typeof URLSearchParams < "u" ? URLSearchParams : We, Jr = typeof FormData < "u" ? FormData : null, Wr = typeof Blob < "u" ? Blob : null, Kr = {
1488
+ }, zr = typeof URLSearchParams < "u" ? URLSearchParams : Je, Wr = typeof FormData < "u" ? FormData : null, Jr = typeof Blob < "u" ? Blob : null, Kr = {
1489
1489
  isBrowser: !0,
1490
1490
  classes: {
1491
1491
  URLSearchParams: zr,
1492
- FormData: Jr,
1493
- Blob: Wr
1492
+ FormData: Wr,
1493
+ Blob: Jr
1494
1494
  },
1495
1495
  protocols: ["http", "https", "file", "blob", "url", "data"]
1496
1496
  }, Ke = typeof window < "u" && typeof document < "u", Ie = typeof navigator == "object" && navigator || void 0, Gr = Ke && (!Ie || ["ReactNative", "NativeScript", "NS"].indexOf(Ie.product) < 0), Zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
@@ -1550,7 +1550,7 @@ function no(e, t, n) {
1550
1550
  }
1551
1551
  return (n || JSON.stringify)(e);
1552
1552
  }
1553
- const he = {
1553
+ const me = {
1554
1554
  transitional: Mt,
1555
1555
  adapter: ["xhr", "http", "fetch"],
1556
1556
  transformRequest: [function(t, n) {
@@ -1579,7 +1579,7 @@ const he = {
1579
1579
  return a || r ? (n.setContentType("application/json", !1), no(t)) : t;
1580
1580
  }],
1581
1581
  transformResponse: [function(t) {
1582
- const n = this.transitional || he.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
1582
+ const n = this.transitional || me.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
1583
1583
  if (u.isResponse(t) || u.isReadableStream(t))
1584
1584
  return t;
1585
1585
  if (t && u.isString(t) && (s && !this.responseType || r)) {
@@ -1617,7 +1617,7 @@ const he = {
1617
1617
  }
1618
1618
  };
1619
1619
  u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1620
- he.headers[e] = {};
1620
+ me.headers[e] = {};
1621
1621
  });
1622
1622
  const so = u.toObjectSet([
1623
1623
  "age",
@@ -1821,7 +1821,7 @@ u.reduceDescriptors(H.prototype, ({ value: e }, t) => {
1821
1821
  });
1822
1822
  u.freezeMethods(H);
1823
1823
  function Ue(e, t) {
1824
- const n = this || he, s = t || n, r = H.from(s.headers);
1824
+ const n = this || me, s = t || n, r = H.from(s.headers);
1825
1825
  let a = s.data;
1826
1826
  return u.forEach(e, function(c) {
1827
1827
  a = c.call(n, a, r.normalize(), t ? t.status : void 0);
@@ -1907,7 +1907,7 @@ const ke = (e, t, n = 3) => {
1907
1907
  }, ut = (e) => (...t) => u.asap(() => e(...t)), po = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, L.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1908
1908
  new URL(L.origin),
1909
1909
  L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
1910
- ) : () => !0, mo = L.hasStandardBrowserEnv ? (
1910
+ ) : () => !0, ho = L.hasStandardBrowserEnv ? (
1911
1911
  // Standard browser envs support document.cookie
1912
1912
  {
1913
1913
  write(e, t, n, s, r, a, o) {
@@ -1936,14 +1936,14 @@ const ke = (e, t, n = 3) => {
1936
1936
  }
1937
1937
  }
1938
1938
  );
1939
- function ho(e) {
1939
+ function mo(e) {
1940
1940
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1941
1941
  }
1942
1942
  function go(e, t) {
1943
1943
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1944
1944
  }
1945
- function Jt(e, t, n) {
1946
- let s = !ho(t);
1945
+ function Wt(e, t, n) {
1946
+ let s = !mo(t);
1947
1947
  return e && (s || n == !1) ? go(e, t) : t;
1948
1948
  }
1949
1949
  const dt = (e) => e instanceof H ? { ...e } : e;
@@ -2011,10 +2011,10 @@ function ee(e, t) {
2011
2011
  u.isUndefined(b) && f !== c || (n[d] = b);
2012
2012
  }), n;
2013
2013
  }
2014
- const Wt = (e) => {
2014
+ const Jt = (e) => {
2015
2015
  const t = ee({}, e);
2016
2016
  let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: a, headers: o, auth: c } = t;
2017
- if (t.headers = o = H.from(o), t.url = jt(Jt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
2017
+ if (t.headers = o = H.from(o), t.url = jt(Wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
2018
2018
  "Authorization",
2019
2019
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
2020
2020
  ), u.isFormData(n)) {
@@ -2028,67 +2028,67 @@ const Wt = (e) => {
2028
2028
  }
2029
2029
  }
2030
2030
  if (L.hasStandardBrowserEnv && (s && u.isFunction(s) && (s = s(t)), s || s !== !1 && po(t.url))) {
2031
- const l = r && a && mo.read(a);
2031
+ const l = r && a && ho.read(a);
2032
2032
  l && o.set(r, l);
2033
2033
  }
2034
2034
  return t;
2035
2035
  }, yo = typeof XMLHttpRequest < "u", wo = yo && function(e) {
2036
2036
  return new Promise(function(n, s) {
2037
- const r = Wt(e);
2037
+ const r = Jt(e);
2038
2038
  let a = r.data;
2039
2039
  const o = H.from(r.headers).normalize();
2040
- let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E, m;
2040
+ let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E, h;
2041
2041
  function w() {
2042
- E && E(), m && m(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
2042
+ E && E(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
2043
2043
  }
2044
- let h = new XMLHttpRequest();
2045
- h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
2044
+ let m = new XMLHttpRequest();
2045
+ m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout;
2046
2046
  function k() {
2047
- if (!h)
2047
+ if (!m)
2048
2048
  return;
2049
2049
  const A = H.from(
2050
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
2050
+ "getAllResponseHeaders" in m && m.getAllResponseHeaders()
2051
2051
  ), D = {
2052
- data: !c || c === "text" || c === "json" ? h.responseText : h.response,
2053
- status: h.status,
2054
- statusText: h.statusText,
2052
+ data: !c || c === "text" || c === "json" ? m.responseText : m.response,
2053
+ status: m.status,
2054
+ statusText: m.statusText,
2055
2055
  headers: A,
2056
2056
  config: e,
2057
- request: h
2057
+ request: m
2058
2058
  };
2059
2059
  zt(function(U) {
2060
2060
  n(U), w();
2061
2061
  }, function(U) {
2062
2062
  s(U), w();
2063
- }, D), h = null;
2063
+ }, D), m = null;
2064
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() {
2065
+ "onloadend" in m ? m.onloadend = k : m.onreadystatechange = function() {
2066
+ !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(k);
2067
+ }, m.onabort = function() {
2068
+ m && (s(new S("Request aborted", S.ECONNABORTED, e, m)), m = null);
2069
+ }, m.onerror = function(B) {
2070
+ const D = B && B.message ? B.message : "Network Error", K = new S(D, S.ERR_NETWORK, e, m);
2071
+ K.event = B || null, s(K), m = null;
2072
+ }, m.ontimeout = function() {
2073
2073
  let B = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
2074
2074
  const D = r.transitional || Mt;
2075
2075
  r.timeoutErrorMessage && (B = r.timeoutErrorMessage), s(new S(
2076
2076
  B,
2077
2077
  D.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
2078
2078
  e,
2079
- 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);
2079
+ m
2080
+ )), m = null;
2081
+ }, a === void 0 && o.setContentType(null), "setRequestHeader" in m && u.forEach(o.toJSON(), function(B, D) {
2082
+ m.setRequestHeader(D, B);
2083
+ }), u.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), c && c !== "json" && (m.responseType = r.responseType), i && ([b, h] = ke(i, !0), m.addEventListener("progress", b)), l && m.upload && ([f, E] = ke(l), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (d = (A) => {
2084
+ m && (s(!A || A.type ? new ae(null, e, m) : A), m.abort(), m = null);
2085
2085
  }, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
2086
2086
  const T = co(r.url);
2087
2087
  if (T && L.protocols.indexOf(T) === -1) {
2088
2088
  s(new S("Unsupported protocol " + T + ":", S.ERR_BAD_REQUEST, e));
2089
2089
  return;
2090
2090
  }
2091
- h.send(a || null);
2091
+ m.send(a || null);
2092
2092
  });
2093
2093
  }, bo = (e, t) => {
2094
2094
  const { length: n } = e = e ? e.filter(Boolean) : [];
@@ -2174,8 +2174,8 @@ const Wt = (e) => {
2174
2174
  Request: e,
2175
2175
  Response: t
2176
2176
  }))(u.global), {
2177
- ReadableStream: mt,
2178
- TextEncoder: ht
2177
+ ReadableStream: ht,
2178
+ TextEncoder: mt
2179
2179
  } = u.global, gt = (e, ...t) => {
2180
2180
  try {
2181
2181
  return !!e(...t);
@@ -2189,49 +2189,49 @@ const Wt = (e) => {
2189
2189
  const { fetch: t, Request: n, Response: s } = e, r = t ? xe(t) : typeof fetch == "function", a = xe(n), o = xe(s);
2190
2190
  if (!r)
2191
2191
  return !1;
2192
- const c = r && xe(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;
2192
+ const c = r && xe(ht), l = r && (typeof mt == "function" ? /* @__PURE__ */ ((h) => (w) => h.encode(w))(new mt()) : async (h) => new Uint8Array(await new n(h).arrayBuffer())), i = a && c && gt(() => {
2193
+ let h = !1;
2194
2194
  const w = new n(L.origin, {
2195
- body: new mt(),
2195
+ body: new ht(),
2196
2196
  method: "POST",
2197
2197
  get duplex() {
2198
- return m = !0, "half";
2198
+ return h = !0, "half";
2199
2199
  }
2200
2200
  }).headers.has("Content-Type");
2201
- return m && !w;
2201
+ return h && !w;
2202
2202
  }), d = o && c && gt(() => u.isReadableStream(new s("").body)), f = {
2203
- stream: d && ((m) => m.body)
2203
+ stream: d && ((h) => h.body)
2204
2204
  };
2205
- r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((m) => {
2206
- !f[m] && (f[m] = (w, h) => {
2207
- let k = w && w[m];
2205
+ r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((h) => {
2206
+ !f[h] && (f[h] = (w, m) => {
2207
+ let k = w && w[h];
2208
2208
  if (k)
2209
2209
  return k.call(w);
2210
- throw new S(`Response type '${m}' is not supported`, S.ERR_NOT_SUPPORT, h);
2210
+ throw new S(`Response type '${h}' is not supported`, S.ERR_NOT_SUPPORT, m);
2211
2211
  });
2212
2212
  });
2213
- const b = async (m) => {
2214
- if (m == null)
2213
+ const b = async (h) => {
2214
+ if (h == null)
2215
2215
  return 0;
2216
- if (u.isBlob(m))
2217
- return m.size;
2218
- if (u.isSpecCompliantForm(m))
2216
+ if (u.isBlob(h))
2217
+ return h.size;
2218
+ if (u.isSpecCompliantForm(h))
2219
2219
  return (await new n(L.origin, {
2220
2220
  method: "POST",
2221
- body: m
2221
+ body: h
2222
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);
2223
+ if (u.isArrayBufferView(h) || u.isArrayBuffer(h))
2224
+ return h.byteLength;
2225
+ if (u.isURLSearchParams(h) && (h = h + ""), u.isString(h))
2226
+ return (await l(h)).byteLength;
2227
+ }, E = async (h, w) => {
2228
+ const m = u.toFiniteNumber(h.getContentLength());
2229
+ return m ?? b(w);
2230
2230
  };
2231
- return async (m) => {
2231
+ return async (h) => {
2232
2232
  let {
2233
2233
  url: w,
2234
- method: h,
2234
+ method: m,
2235
2235
  data: k,
2236
2236
  signal: T,
2237
2237
  cancelToken: A,
@@ -2242,7 +2242,7 @@ const Wt = (e) => {
2242
2242
  headers: Ne,
2243
2243
  withCredentials: ye = "same-origin",
2244
2244
  fetchOptions: Ze
2245
- } = Wt(m), Xe = t || fetch;
2245
+ } = Jt(h), Xe = t || fetch;
2246
2246
  U = U ? (U + "").toLowerCase() : "text";
2247
2247
  let we = bo([T, A && A.toAbortSignal()], B), ie = null;
2248
2248
  const G = we && we.unsubscribe && (() => {
@@ -2250,68 +2250,68 @@ const Wt = (e) => {
2250
2250
  });
2251
2251
  let Qe;
2252
2252
  try {
2253
- if (K && i && h !== "get" && h !== "head" && (Qe = await E(Ne, k)) !== 0) {
2254
- let W = new n(w, {
2253
+ if (K && i && m !== "get" && m !== "head" && (Qe = await E(Ne, k)) !== 0) {
2254
+ let J = new n(w, {
2255
2255
  method: "POST",
2256
2256
  body: k,
2257
2257
  duplex: "half"
2258
2258
  }), te;
2259
- if (u.isFormData(k) && (te = W.headers.get("content-type")) && Ne.setContentType(te), W.body) {
2259
+ if (u.isFormData(k) && (te = J.headers.get("content-type")) && Ne.setContentType(te), J.body) {
2260
2260
  const [Pe, be] = ct(
2261
2261
  Qe,
2262
2262
  ke(ut(K))
2263
2263
  );
2264
- k = ft(W.body, pt, Pe, be);
2264
+ k = ft(J.body, pt, Pe, be);
2265
2265
  }
2266
2266
  }
2267
2267
  u.isString(ye) || (ye = ye ? "include" : "omit");
2268
2268
  const M = a && "credentials" in n.prototype, Ye = {
2269
2269
  ...Ze,
2270
2270
  signal: we,
2271
- method: h.toUpperCase(),
2271
+ method: m.toUpperCase(),
2272
2272
  headers: Ne.normalize().toJSON(),
2273
2273
  body: k,
2274
2274
  duplex: "half",
2275
2275
  credentials: M ? ye : void 0
2276
2276
  };
2277
2277
  ie = a && new n(w, Ye);
2278
- let J = await (a ? Xe(ie, Ze) : Xe(w, Ye));
2278
+ let W = await (a ? Xe(ie, Ze) : Xe(w, Ye));
2279
2279
  const et = d && (U === "stream" || U === "response");
2280
2280
  if (d && (D || et && G)) {
2281
- const W = {};
2281
+ const J = {};
2282
2282
  ["status", "statusText", "headers"].forEach((tt) => {
2283
- W[tt] = J[tt];
2283
+ J[tt] = W[tt];
2284
2284
  });
2285
- const te = u.toFiniteNumber(J.headers.get("content-length")), [Pe, be] = D && ct(
2285
+ const te = u.toFiniteNumber(W.headers.get("content-length")), [Pe, be] = D && ct(
2286
2286
  te,
2287
2287
  ke(ut(D), !0)
2288
2288
  ) || [];
2289
- J = new s(
2290
- ft(J.body, pt, Pe, () => {
2289
+ W = new s(
2290
+ ft(W.body, pt, Pe, () => {
2291
2291
  be && be(), G && G();
2292
2292
  }),
2293
- W
2293
+ J
2294
2294
  );
2295
2295
  }
2296
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, {
2297
+ let en = await f[u.findKey(f, U) || "text"](W, h);
2298
+ return !et && G && G(), await new Promise((J, te) => {
2299
+ zt(J, te, {
2300
2300
  data: en,
2301
- headers: H.from(J.headers),
2302
- status: J.status,
2303
- statusText: J.statusText,
2304
- config: m,
2301
+ headers: H.from(W.headers),
2302
+ status: W.status,
2303
+ statusText: W.statusText,
2304
+ config: h,
2305
2305
  request: ie
2306
2306
  });
2307
2307
  });
2308
2308
  } catch (M) {
2309
2309
  throw G && G(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
2310
- new S("Network Error", S.ERR_NETWORK, m, ie),
2310
+ new S("Network Error", S.ERR_NETWORK, h, ie),
2311
2311
  {
2312
2312
  cause: M.cause || M
2313
2313
  }
2314
- ) : S.from(M, M && M.code, m, ie);
2314
+ ) : S.from(M, M && M.code, h, ie);
2315
2315
  }
2316
2316
  };
2317
2317
  }, ko = /* @__PURE__ */ new Map(), Kt = (e) => {
@@ -2392,7 +2392,7 @@ function wt(e) {
2392
2392
  return Ve(e), e.headers = H.from(e.headers), e.data = Ue.call(
2393
2393
  e,
2394
2394
  e.transformRequest
2395
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter || he.adapter, e)(e).then(function(s) {
2395
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter || me.adapter, e)(e).then(function(s) {
2396
2396
  return Ve(e), s.data = Ue.call(
2397
2397
  e,
2398
2398
  e.transformResponse,
@@ -2509,8 +2509,8 @@ let Q = class {
2509
2509
  );
2510
2510
  a && u.forEach(
2511
2511
  ["delete", "get", "head", "post", "put", "patch", "common"],
2512
- (m) => {
2513
- delete a[m];
2512
+ (h) => {
2513
+ delete a[h];
2514
2514
  }
2515
2515
  ), n.headers = H.concat(o, a);
2516
2516
  const c = [];
@@ -2524,26 +2524,26 @@ let Q = class {
2524
2524
  });
2525
2525
  let d, f = 0, b;
2526
2526
  if (!l) {
2527
- const 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++]);
2527
+ const h = [wt.bind(this), void 0];
2528
+ for (h.unshift(...c), h.push(...i), b = h.length, d = Promise.resolve(n); f < b; )
2529
+ d = d.then(h[f++], h[f++]);
2530
2530
  return d;
2531
2531
  }
2532
2532
  b = c.length;
2533
2533
  let E = n;
2534
2534
  for (; f < b; ) {
2535
- const m = c[f++], w = c[f++];
2535
+ const h = c[f++], w = c[f++];
2536
2536
  try {
2537
- E = m(E);
2538
- } catch (h) {
2539
- w.call(this, h);
2537
+ E = h(E);
2538
+ } catch (m) {
2539
+ w.call(this, m);
2540
2540
  break;
2541
2541
  }
2542
2542
  }
2543
2543
  try {
2544
2544
  d = wt.call(this, E);
2545
- } catch (m) {
2546
- return Promise.reject(m);
2545
+ } catch (h) {
2546
+ return Promise.reject(h);
2547
2547
  }
2548
2548
  for (f = 0, b = i.length; f < b; )
2549
2549
  d = d.then(i[f++], i[f++]);
@@ -2551,7 +2551,7 @@ let Q = class {
2551
2551
  }
2552
2552
  getUri(t) {
2553
2553
  t = ee(this.defaults, t);
2554
- const n = Jt(t.baseURL, t.url, t.allowAbsoluteUrls);
2554
+ const n = Wt(t.baseURL, t.url, t.allowAbsoluteUrls);
2555
2555
  return jt(n, t.params, t.paramsSerializer);
2556
2556
  }
2557
2557
  };
@@ -2740,7 +2740,7 @@ function Qt(e) {
2740
2740
  return Qt(ee(e, r));
2741
2741
  }, n;
2742
2742
  }
2743
- const C = Qt(he);
2743
+ const C = Qt(me);
2744
2744
  C.Axios = Q;
2745
2745
  C.CanceledError = ae;
2746
2746
  C.CancelToken = Ao;
@@ -2775,8 +2775,8 @@ const {
2775
2775
  AxiosHeaders: Ia,
2776
2776
  HttpStatusCode: qa,
2777
2777
  formToJSON: za,
2778
- getAdapter: Ja,
2779
- mergeConfig: Wa
2778
+ getAdapter: Wa,
2779
+ mergeConfig: Ja
2780
2780
  } = C, Lo = (e) => {
2781
2781
  const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
2782
2782
  return t ? t[2] : null;
@@ -2796,8 +2796,8 @@ const {
2796
2796
  let r = `${e}=; max-age=0; path=${s}`;
2797
2797
  n && (r += `; domain=${n}`), document.cookie = r;
2798
2798
  }, Yt = () => {
2799
- let e = -3;
2800
- return window.location.hostname.endsWith(".test") && (e = -2), window.location.hostname.split(".").slice(e).join(".");
2799
+ const e = window.location.hostname;
2800
+ return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
2801
2801
  }, De = "bolt-token", ge = Re("auth", () => {
2802
2802
  const e = re({
2803
2803
  user: null,
@@ -2892,7 +2892,7 @@ const {
2892
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 = {
2893
2893
  key: 0,
2894
2894
  class: "text-red-600 text-sm mb-2"
2895
- }, qo = { key: 0 }, zo = { key: 1 }, Jo = {
2895
+ }, qo = { key: 0 }, zo = { key: 1 }, Wo = {
2896
2896
  __name: "SparkLoginView",
2897
2897
  props: {
2898
2898
  logo: {
@@ -2909,7 +2909,7 @@ const {
2909
2909
  }
2910
2910
  },
2911
2911
  setup(e) {
2912
- const t = Ee(), n = Oe(), s = ma(), r = ge(), a = e, o = z(!1), c = z(""), l = async (i) => {
2912
+ const t = Ee(), n = Oe(), s = ha(), r = ge(), a = e, o = z(!1), c = z(""), l = async (i) => {
2913
2913
  o.value = !0, c.value = "";
2914
2914
  try {
2915
2915
  await r.login(i);
@@ -3016,7 +3016,7 @@ const {
3016
3016
  ]);
3017
3017
  };
3018
3018
  }
3019
- }, Wo = {
3019
+ }, Jo = {
3020
3020
  __name: "SparkLogoutView",
3021
3021
  props: {
3022
3022
  defaultRedirect: {
@@ -3270,14 +3270,14 @@ function Ka(e = {}) {
3270
3270
  {
3271
3271
  path: t,
3272
3272
  name: "login",
3273
- component: Jo,
3273
+ component: Wo,
3274
3274
  props: { logo: a, defaultRedirect: o },
3275
3275
  meta: { auth: !1 }
3276
3276
  },
3277
3277
  {
3278
3278
  path: n,
3279
3279
  name: "logout",
3280
- component: Wo,
3280
+ component: Jo,
3281
3281
  props: { defaultRedirect: t },
3282
3282
  meta: { auth: !1 }
3283
3283
  },
@@ -3320,7 +3320,7 @@ function pa(e, t, n, s) {
3320
3320
  t({ path: n.state.routes.auth });
3321
3321
  return;
3322
3322
  }
3323
- o.includes("%") && (o = decodeURIComponent(o)), o = encodeURIComponent(o), t({
3323
+ o.includes("%") && (o = decodeURIComponent(o)), t({
3324
3324
  path: n.state.routes.auth,
3325
3325
  query: { redirect: o }
3326
3326
  });
@@ -3338,7 +3338,7 @@ function pa(e, t, n, s) {
3338
3338
  t();
3339
3339
  }
3340
3340
  }
3341
- const ma = Re("sparkApp", () => {
3341
+ const ha = Re("sparkApp", () => {
3342
3342
  const e = re({
3343
3343
  app: "",
3344
3344
  icon: "",
@@ -3417,8 +3417,8 @@ export {
3417
3417
  Ra as SparkCard,
3418
3418
  Oa as SparkDefaultContainer,
3419
3419
  sa as SparkForgotPasswordView,
3420
- Jo as SparkLoginView,
3421
- Wo as SparkLogoutView,
3420
+ Wo as SparkLoginView,
3421
+ Jo as SparkLogoutView,
3422
3422
  As as SparkModalContainer,
3423
3423
  Ea as SparkModalDialog,
3424
3424
  nt as SparkOverlay,
@@ -3430,7 +3430,7 @@ export {
3430
3430
  Ca as setupFontAwesome,
3431
3431
  ce as sparkModalService,
3432
3432
  Z as sparkOverlayService,
3433
- ma as useSparkAppStore,
3433
+ ha as useSparkAppStore,
3434
3434
  ge as useSparkAuthStore,
3435
3435
  Ot as useSparkBrandFilterStore,
3436
3436
  Za as useSparkNavStore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wishbone-media/spark",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -93,7 +93,7 @@ function processNavigation(to, next, authStore, defaultAuthenticatedRoute) {
93
93
  if (redirect.includes('%')) {
94
94
  redirect = decodeURIComponent(redirect)
95
95
  }
96
- redirect = encodeURIComponent(redirect)
96
+ // redirect = encodeURIComponent(redirect)
97
97
 
98
98
  next({
99
99
  path: authStore.state.routes.auth,
@@ -38,14 +38,28 @@ export const deleteCookie = (name, options = {}) => {
38
38
  }
39
39
 
40
40
  export const getDomain = () => {
41
- // For PRODUCTION: returns .letsbolt.com.au
42
- // For STAGING: returns .ENV.letsbolt.io
43
- // For DEV: returns .letsbolt.test
44
- let reserveSlices = -3
41
+ const hostname = window.location.hostname
45
42
 
46
- if (window.location.hostname.endsWith('.test')) {
47
- reserveSlices = -2
43
+ // Case 1: Pure localhost (localhost:5173)
44
+ if (hostname === 'localhost') {
45
+ return 'localhost'
48
46
  }
49
47
 
50
- return window.location.hostname.split('.').slice(reserveSlices).join('.')
48
+ // Case 2: .test domain (web.bolt.test, dash.bolt.test:8080) -> .bolt.test
49
+ if (hostname.endsWith('.test')) {
50
+ return '.' + hostname.split('.').slice(-2).join('.')
51
+ }
52
+
53
+ // Case 3: Staging .io domain (alpha.letsbolt.io, buzz.letsbolt.io) -> .letsbolt.io
54
+ if (hostname.endsWith('.io')) {
55
+ return '.' + hostname.split('.').slice(-2).join('.')
56
+ }
57
+
58
+ // Case 4: Production .com.au domain (letsbolt.com.au, buzz.letsbolt.com.au) -> .letsbolt.com.au
59
+ if (hostname.endsWith('.com.au')) {
60
+ return '.' + hostname.split('.').slice(-3).join('.')
61
+ }
62
+
63
+ // Fallback: return hostname as-is
64
+ return hostname
51
65
  }