bt-core-app 1.4.92 → 1.4.94

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.
@@ -1,8 +1,8 @@
1
- import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as Te, toRef as Yt, onMounted as Xr } from "vue";
2
- import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as Ae, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Gr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
1
+ import { ref as z, shallowRef as Ne, computed as ee, toValue as Q, watch as Te, toRef as Yt, onMounted as Xr } from "vue";
2
+ import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as Ee, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Gr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
3
3
  import { defineStore as pr } from "pinia";
4
4
  import { DateTime as he } from "luxon";
5
- import { useRouter as Mr, useRoute as et } from "vue-router";
5
+ import { useRouter as Lr, useRoute as et } from "vue-router";
6
6
  function Ot(e) {
7
7
  return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
8
8
  }
@@ -11,8 +11,8 @@ function pt(e) {
11
11
  return (e == "x" ? t : t & 3 | 8).toString(16);
12
12
  }
13
13
  function en(e) {
14
- const t = z([]), l = Re(), S = Re(), s = Re(), g = te(() => l.value != null);
15
- function x(d) {
14
+ const t = z([]), l = Ne(), S = Ne(), s = Ne(), g = ee(() => l.value != null);
15
+ function D(d) {
16
16
  t.value = t.value.filter((h) => h.id != d);
17
17
  }
18
18
  function P(d) {
@@ -25,7 +25,7 @@ function en(e) {
25
25
  function _(d) {
26
26
  d != null && (S.value = d.toString());
27
27
  }
28
- function N() {
28
+ function M() {
29
29
  S.value = void 0;
30
30
  }
31
31
  async function $(d, h) {
@@ -44,7 +44,7 @@ function en(e) {
44
44
  _(u.errorMsg ?? I ?? "error");
45
45
  }
46
46
  } finally {
47
- x(r);
47
+ D(r);
48
48
  }
49
49
  }
50
50
  return Or(t, (d) => {
@@ -53,17 +53,17 @@ function en(e) {
53
53
  actionErrorMsg: S,
54
54
  actionLoadingMsg: l,
55
55
  actionCompleteMsg: s,
56
- clearErrors: N,
56
+ clearErrors: M,
57
57
  doAction: $,
58
58
  isLoading: g,
59
59
  logError: _
60
60
  };
61
61
  }
62
- var Qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
62
+ var Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
63
63
  function rn(e) {
64
64
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
65
65
  }
66
- var Ue = function() {
66
+ var Re = function() {
67
67
  function e(s) {
68
68
  return s;
69
69
  }
@@ -72,17 +72,17 @@ var Ue = function() {
72
72
  }
73
73
  function l(s, g) {
74
74
  if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
75
- var x = s;
75
+ var D = s;
76
76
  s = function(d) {
77
- return d[x] ? d[x] : "";
77
+ return d[D] ? d[D] : "";
78
78
  };
79
79
  }
80
80
  if (s.length === 1) {
81
- var P = s, _ = g.ignoreCase ? t : e, N = g.cmp || function(d, h) {
81
+ var P = s, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
82
82
  return d < h ? -1 : d > h ? 1 : 0;
83
83
  };
84
84
  s = function(d, h) {
85
- return N(_(P(d)), _(P(h)));
85
+ return M(_(P(d)), _(P(h)));
86
86
  };
87
87
  }
88
88
  const $ = { "-1": "", desc: "" };
@@ -91,14 +91,14 @@ var Ue = function() {
91
91
  } : s;
92
92
  }
93
93
  function S(s, g) {
94
- var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = x ? function(N, $) {
95
- return x(N, $) || P(N, $);
94
+ var D = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = D ? function(M, $) {
95
+ return D(M, $) || P(M, $);
96
96
  } : P;
97
97
  return _.thenBy = S, _;
98
98
  }
99
99
  return S.firstBy = S, S;
100
100
  }();
101
- function Be(e, t) {
101
+ function Ue(e, t) {
102
102
  let l = e ?? "", S = t ?? "";
103
103
  if (l.endsWith("/"))
104
104
  do
@@ -170,8 +170,8 @@ async function pn(e, t = !0) {
170
170
  s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
171
171
  var g = document.createElement("canvas");
172
172
  g.width = this.width, g.height = this.height;
173
- var x = g.getContext("2d");
174
- x == null || x.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
173
+ var D = g.getContext("2d");
174
+ D == null || D.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
175
175
  }, s.onerror = function() {
176
176
  console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
177
177
  }, e != null && (s.src = e);
@@ -189,7 +189,7 @@ function ea(e) {
189
189
  function nn(e) {
190
190
  return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (l) => l.toUpperCase()));
191
191
  }
192
- const Ye = [
192
+ const Ze = [
193
193
  { value: 1, short: "sun", values: ["sun", "sunday"] },
194
194
  { value: 2, short: "mon", values: ["mon", "monday"] },
195
195
  { value: 3, short: "tue", values: ["tue", "tues", "tuesday"] },
@@ -202,33 +202,33 @@ const Ye = [
202
202
  function ra(e) {
203
203
  if (e == null)
204
204
  return 0;
205
- const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((s) => t.some((g) => s == g))).map((S) => S.value);
205
+ const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ze.filter((S) => S.values.some((s) => t.some((g) => s == g))).map((S) => S.value);
206
206
  return l.length == 0 ? 8 : Math.min(...l);
207
207
  }
208
208
  function ta(e) {
209
209
  return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
210
- let l = Ye.find((S) => S.values.some((s) => s == t));
210
+ let l = Ze.find((S) => S.values.some((s) => s == t));
211
211
  return l != null ? l.short : "";
212
212
  }).filter((t) => t != null && t.length > 0).toString();
213
213
  }
214
214
  function na(e, t) {
215
215
  if (e == null || t == null)
216
216
  return !0;
217
- const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ye.find((g) => g.values.some((x) => x == S));
218
- return s != null && l.some((g) => g == s.short || s.values.some((x) => x == g));
217
+ const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((D) => D == S));
218
+ return s != null && l.some((g) => g == s.short || s.values.some((D) => D == g));
219
219
  }
220
220
  function aa(e, t) {
221
221
  if (t == null)
222
222
  return e;
223
223
  let l = e ?? "";
224
224
  l = `${l},${t}`;
225
- let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ye.find((g) => g.values.some((x) => x == s))).filter((s) => s != null).sort(Ue.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
225
+ let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((D) => D == s))).filter((s) => s != null).sort(Re.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
226
226
  return S.length > 0 ? S : void 0;
227
227
  }
228
228
  function la(e, t) {
229
229
  if (t == null || e == null)
230
230
  return e;
231
- let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ye.find((x) => x.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Ue.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
231
+ let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((D) => D.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Re.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
232
232
  return s.length > 0 ? s : void 0;
233
233
  }
234
234
  function ua(e, t) {
@@ -267,12 +267,12 @@ function un(e, t) {
267
267
  var l = e.split(","), S = t.split(",");
268
268
  return l.some((s) => S.some((g) => g == s));
269
269
  }
270
- function Lr(e) {
270
+ function Nr(e) {
271
271
  if (!e)
272
272
  return e;
273
273
  let t, l = Array.isArray(e) ? [] : {};
274
274
  for (const S in e)
275
- t = e[S], l[S] = typeof t == "object" ? Lr(t) : t;
275
+ t = e[S], l[S] = typeof t == "object" ? Nr(t) : t;
276
276
  return l;
277
277
  }
278
278
  function cn(e) {
@@ -354,7 +354,7 @@ function hn(e) {
354
354
  function mn(e) {
355
355
  return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
356
356
  }
357
- function Xe(e) {
357
+ function Oe(e) {
358
358
  throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
359
359
  }
360
360
  var nt = { exports: {} };
@@ -369,34 +369,34 @@ var nt = { exports: {} };
369
369
  e.exports = l();
370
370
  })(function() {
371
371
  return function l(S, s, g) {
372
- function x(N, $) {
373
- if (!s[N]) {
374
- if (!S[N]) {
375
- var d = typeof Xe == "function" && Xe;
372
+ function D(M, $) {
373
+ if (!s[M]) {
374
+ if (!S[M]) {
375
+ var d = typeof Oe == "function" && Oe;
376
376
  if (!$ && d)
377
- return d(N, !0);
377
+ return d(M, !0);
378
378
  if (P)
379
- return P(N, !0);
380
- var h = new Error("Cannot find module '" + N + "'");
379
+ return P(M, !0);
380
+ var h = new Error("Cannot find module '" + M + "'");
381
381
  throw h.code = "MODULE_NOT_FOUND", h;
382
382
  }
383
- var u = s[N] = { exports: {} };
384
- S[N][0].call(u.exports, function(r) {
385
- var y = S[N][1][r];
386
- return x(y || r);
383
+ var u = s[M] = { exports: {} };
384
+ S[M][0].call(u.exports, function(r) {
385
+ var y = S[M][1][r];
386
+ return D(y || r);
387
387
  }, u, u.exports, l, S, s, g);
388
388
  }
389
- return s[N].exports;
389
+ return s[M].exports;
390
390
  }
391
- for (var P = typeof Xe == "function" && Xe, _ = 0; _ < g.length; _++)
392
- x(g[_]);
393
- return x;
391
+ for (var P = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
392
+ D(g[_]);
393
+ return D;
394
394
  }({ 1: [function(l, S, s) {
395
395
  (function(g) {
396
- var x = g.MutationObserver || g.WebKitMutationObserver, P;
397
- if (x) {
398
- var _ = 0, N = new x(r), $ = g.document.createTextNode("");
399
- N.observe($, {
396
+ var D = g.MutationObserver || g.WebKitMutationObserver, P;
397
+ if (D) {
398
+ var _ = 0, M = new D(r), $ = g.document.createTextNode("");
399
+ M.observe($, {
400
400
  characterData: !0
401
401
  }), P = function() {
402
402
  $.data = _ = ++_ % 2;
@@ -429,33 +429,33 @@ var nt = { exports: {} };
429
429
  function y(I) {
430
430
  u.push(I) === 1 && !h && P();
431
431
  }
432
- }).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
432
+ }).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
433
433
  }, {}], 2: [function(l, S, s) {
434
434
  var g = l(1);
435
- function x() {
435
+ function D() {
436
436
  }
437
- var P = {}, _ = ["REJECTED"], N = ["FULFILLED"], $ = ["PENDING"];
437
+ var P = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
438
438
  S.exports = d;
439
439
  function d(b) {
440
440
  if (typeof b != "function")
441
441
  throw new TypeError("resolver must be a function");
442
- this.state = $, this.queue = [], this.outcome = void 0, b !== x && y(this, b);
442
+ this.state = $, this.queue = [], this.outcome = void 0, b !== D && y(this, b);
443
443
  }
444
444
  d.prototype.catch = function(b) {
445
445
  return this.then(null, b);
446
446
  }, d.prototype.then = function(b, T) {
447
- if (typeof b != "function" && this.state === N || typeof T != "function" && this.state === _)
447
+ if (typeof b != "function" && this.state === M || typeof T != "function" && this.state === _)
448
448
  return this;
449
- var D = new this.constructor(x);
449
+ var x = new this.constructor(D);
450
450
  if (this.state !== $) {
451
- var L = this.state === N ? b : T;
452
- u(D, L, this.outcome);
451
+ var N = this.state === M ? b : T;
452
+ u(x, N, this.outcome);
453
453
  } else
454
- this.queue.push(new h(D, b, T));
455
- return D;
454
+ this.queue.push(new h(x, b, T));
455
+ return x;
456
456
  };
457
- function h(b, T, D) {
458
- this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof D == "function" && (this.onRejected = D, this.callRejected = this.otherCallRejected);
457
+ function h(b, T, x) {
458
+ this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
459
459
  }
460
460
  h.prototype.callFulfilled = function(b) {
461
461
  P.resolve(this.promise, b);
@@ -466,34 +466,34 @@ var nt = { exports: {} };
466
466
  }, h.prototype.otherCallRejected = function(b) {
467
467
  u(this.promise, this.onRejected, b);
468
468
  };
469
- function u(b, T, D) {
469
+ function u(b, T, x) {
470
470
  g(function() {
471
- var L;
471
+ var N;
472
472
  try {
473
- L = T(D);
473
+ N = T(x);
474
474
  } catch (f) {
475
475
  return P.reject(b, f);
476
476
  }
477
- L === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, L);
477
+ N === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, N);
478
478
  });
479
479
  }
480
480
  P.resolve = function(b, T) {
481
- var D = I(r, T);
482
- if (D.status === "error")
483
- return P.reject(b, D.value);
484
- var L = D.value;
485
- if (L)
486
- y(b, L);
481
+ var x = I(r, T);
482
+ if (x.status === "error")
483
+ return P.reject(b, x.value);
484
+ var N = x.value;
485
+ if (N)
486
+ y(b, N);
487
487
  else {
488
- b.state = N, b.outcome = T;
488
+ b.state = M, b.outcome = T;
489
489
  for (var f = -1, A = b.queue.length; ++f < A; )
490
490
  b.queue[f].callFulfilled(T);
491
491
  }
492
492
  return b;
493
493
  }, P.reject = function(b, T) {
494
494
  b.state = _, b.outcome = T;
495
- for (var D = -1, L = b.queue.length; ++D < L; )
496
- b.queue[D].callRejected(T);
495
+ for (var x = -1, N = b.queue.length; ++x < N; )
496
+ b.queue[x].callRejected(T);
497
497
  return b;
498
498
  };
499
499
  function r(b) {
@@ -504,35 +504,35 @@ var nt = { exports: {} };
504
504
  };
505
505
  }
506
506
  function y(b, T) {
507
- var D = !1;
508
- function L(Q) {
509
- D || (D = !0, P.reject(b, Q));
507
+ var x = !1;
508
+ function N(X) {
509
+ x || (x = !0, P.reject(b, X));
510
510
  }
511
- function f(Q) {
512
- D || (D = !0, P.resolve(b, Q));
511
+ function f(X) {
512
+ x || (x = !0, P.resolve(b, X));
513
513
  }
514
514
  function A() {
515
- T(f, L);
515
+ T(f, N);
516
516
  }
517
- var J = I(A);
518
- J.status === "error" && L(J.value);
517
+ var j = I(A);
518
+ j.status === "error" && N(j.value);
519
519
  }
520
520
  function I(b, T) {
521
- var D = {};
521
+ var x = {};
522
522
  try {
523
- D.value = b(T), D.status = "success";
524
- } catch (L) {
525
- D.status = "error", D.value = L;
523
+ x.value = b(T), x.status = "success";
524
+ } catch (N) {
525
+ x.status = "error", x.value = N;
526
526
  }
527
- return D;
527
+ return x;
528
528
  }
529
529
  d.resolve = i;
530
530
  function i(b) {
531
- return b instanceof this ? b : P.resolve(new this(x), b);
531
+ return b instanceof this ? b : P.resolve(new this(D), b);
532
532
  }
533
533
  d.reject = E;
534
534
  function E(b) {
535
- var T = new this(x);
535
+ var T = new this(D);
536
536
  return P.reject(T, b);
537
537
  }
538
538
  d.all = w;
@@ -540,51 +540,51 @@ var nt = { exports: {} };
540
540
  var T = this;
541
541
  if (Object.prototype.toString.call(b) !== "[object Array]")
542
542
  return this.reject(new TypeError("must be an array"));
543
- var D = b.length, L = !1;
544
- if (!D)
543
+ var x = b.length, N = !1;
544
+ if (!x)
545
545
  return this.resolve([]);
546
- for (var f = new Array(D), A = 0, J = -1, Q = new this(x); ++J < D; )
547
- O(b[J], J);
548
- return Q;
549
- function O(ce, we) {
550
- T.resolve(ce).then(W, function(Y) {
551
- L || (L = !0, P.reject(Q, Y));
546
+ for (var f = new Array(x), A = 0, j = -1, X = new this(D); ++j < x; )
547
+ re(b[j], j);
548
+ return X;
549
+ function re(ue, be) {
550
+ T.resolve(ue).then(G, function(Y) {
551
+ N || (N = !0, P.reject(X, Y));
552
552
  });
553
- function W(Y) {
554
- f[we] = Y, ++A === D && !L && (L = !0, P.resolve(Q, f));
553
+ function G(Y) {
554
+ f[be] = Y, ++A === x && !N && (N = !0, P.resolve(X, f));
555
555
  }
556
556
  }
557
557
  }
558
- d.race = M;
559
- function M(b) {
558
+ d.race = L;
559
+ function L(b) {
560
560
  var T = this;
561
561
  if (Object.prototype.toString.call(b) !== "[object Array]")
562
562
  return this.reject(new TypeError("must be an array"));
563
- var D = b.length, L = !1;
564
- if (!D)
563
+ var x = b.length, N = !1;
564
+ if (!x)
565
565
  return this.resolve([]);
566
- for (var f = -1, A = new this(x); ++f < D; )
567
- J(b[f]);
566
+ for (var f = -1, A = new this(D); ++f < x; )
567
+ j(b[f]);
568
568
  return A;
569
- function J(Q) {
570
- T.resolve(Q).then(function(O) {
571
- L || (L = !0, P.resolve(A, O));
572
- }, function(O) {
573
- L || (L = !0, P.reject(A, O));
569
+ function j(X) {
570
+ T.resolve(X).then(function(re) {
571
+ N || (N = !0, P.resolve(A, re));
572
+ }, function(re) {
573
+ N || (N = !0, P.reject(A, re));
574
574
  });
575
575
  }
576
576
  }
577
577
  }, { 1: 1 }], 3: [function(l, S, s) {
578
578
  (function(g) {
579
579
  typeof g.Promise != "function" && (g.Promise = l(2));
580
- }).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
580
+ }).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
581
581
  }, { 2: 2 }], 4: [function(l, S, s) {
582
582
  var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
583
583
  return typeof n;
584
584
  } : function(n) {
585
585
  return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
586
586
  };
587
- function x(n, c) {
587
+ function D(n, c) {
588
588
  if (!(n instanceof c))
589
589
  throw new TypeError("Cannot call a class as a function");
590
590
  }
@@ -605,7 +605,7 @@ var nt = { exports: {} };
605
605
  }
606
606
  }
607
607
  var _ = P();
608
- function N() {
608
+ function M() {
609
609
  try {
610
610
  if (!_ || !_.open)
611
611
  return !1;
@@ -650,13 +650,13 @@ var nt = { exports: {} };
650
650
  if (arguments.length && typeof arguments[arguments.length - 1] == "function")
651
651
  return arguments[arguments.length - 1];
652
652
  }
653
- var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, M = "readonly", b = "readwrite";
653
+ var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, L = "readonly", b = "readwrite";
654
654
  function T(n) {
655
655
  for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
656
656
  m[v] = n.charCodeAt(v);
657
657
  return a;
658
658
  }
659
- function D(n) {
659
+ function x(n) {
660
660
  return new d(function(c) {
661
661
  var a = n.transaction(I, b), m = $([""]);
662
662
  a.objectStore(I).put(m, "key"), a.onabort = function(v) {
@@ -669,8 +669,8 @@ var nt = { exports: {} };
669
669
  return !1;
670
670
  });
671
671
  }
672
- function L(n) {
673
- return typeof i == "boolean" ? d.resolve(i) : D(n).then(function(c) {
672
+ function N(n) {
673
+ return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
674
674
  return i = c, i;
675
675
  });
676
676
  }
@@ -687,12 +687,12 @@ var nt = { exports: {} };
687
687
  if (a)
688
688
  return a.resolve(), a.promise;
689
689
  }
690
- function J(n, c) {
690
+ function j(n, c) {
691
691
  var a = E[n.name], m = a.deferredOperations.pop();
692
692
  if (m)
693
693
  return m.reject(c), m.promise;
694
694
  }
695
- function Q(n, c) {
695
+ function X(n, c) {
696
696
  return new d(function(a, m) {
697
697
  if (E[n.name] = E[n.name] || ne(), n.db)
698
698
  if (c)
@@ -722,13 +722,13 @@ var nt = { exports: {} };
722
722
  };
723
723
  });
724
724
  }
725
- function O(n) {
726
- return Q(n, !1);
725
+ function re(n) {
726
+ return X(n, !1);
727
727
  }
728
- function ce(n) {
729
- return Q(n, !0);
728
+ function ue(n) {
729
+ return X(n, !0);
730
730
  }
731
- function we(n, c) {
731
+ function be(n, c) {
732
732
  if (!n.db)
733
733
  return !0;
734
734
  var a = !n.db.objectStoreNames.contains(n.storeName), m = n.version < n.db.version, v = n.version > n.db.version;
@@ -741,7 +741,7 @@ var nt = { exports: {} };
741
741
  }
742
742
  return !1;
743
743
  }
744
- function W(n) {
744
+ function G(n) {
745
745
  return new d(function(c, a) {
746
746
  var m = new FileReader();
747
747
  m.onerror = a, m.onloadend = function(v) {
@@ -761,7 +761,7 @@ var nt = { exports: {} };
761
761
  function H(n) {
762
762
  return n && n.__local_forage_encoded_blob;
763
763
  }
764
- function ae(n) {
764
+ function ie(n) {
765
765
  var c = this, a = c._initReady().then(function() {
766
766
  var m = E[c._dbInfo.name];
767
767
  if (m && m.dbReady)
@@ -769,23 +769,23 @@ var nt = { exports: {} };
769
769
  });
770
770
  return u(a, n, n), a;
771
771
  }
772
- function G(n) {
772
+ function Z(n) {
773
773
  f(n);
774
774
  for (var c = E[n.name], a = c.forages, m = 0; m < a.length; m++) {
775
775
  var v = a[m];
776
776
  v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
777
777
  }
778
- return n.db = null, O(n).then(function(o) {
779
- return n.db = o, we(n) ? ce(n) : o;
778
+ return n.db = null, re(n).then(function(o) {
779
+ return n.db = o, be(n) ? ue(n) : o;
780
780
  }).then(function(o) {
781
781
  n.db = c.db = o;
782
782
  for (var C = 0; C < a.length; C++)
783
783
  a[C]._dbInfo.db = o;
784
784
  }).catch(function(o) {
785
- throw J(n, o), o;
785
+ throw j(n, o), o;
786
786
  });
787
787
  }
788
- function X(n, c, a, m) {
788
+ function W(n, c, a, m) {
789
789
  m === void 0 && (m = 1);
790
790
  try {
791
791
  var v = n.db.transaction(n.storeName, c);
@@ -794,10 +794,10 @@ var nt = { exports: {} };
794
794
  if (m > 0 && (!n.db || o.name === "InvalidStateError" || o.name === "NotFoundError"))
795
795
  return d.resolve().then(function() {
796
796
  if (!n.db || o.name === "NotFoundError" && !n.db.objectStoreNames.contains(n.storeName) && n.version <= n.db.version)
797
- return n.db && (n.version = n.db.version + 1), ce(n);
797
+ return n.db && (n.version = n.db.version + 1), ue(n);
798
798
  }).then(function() {
799
- return G(n).then(function() {
800
- X(n, c, a, m - 1);
799
+ return Z(n).then(function() {
800
+ W(n, c, a, m - 1);
801
801
  });
802
802
  }).catch(a);
803
803
  a(o);
@@ -815,7 +815,7 @@ var nt = { exports: {} };
815
815
  deferredOperations: []
816
816
  };
817
817
  }
818
- function se(n) {
818
+ function ce(n) {
819
819
  var c = this, a = {
820
820
  db: null
821
821
  };
@@ -823,7 +823,7 @@ var nt = { exports: {} };
823
823
  for (var m in n)
824
824
  a[m] = n[m];
825
825
  var v = E[a.name];
826
- v || (v = ne(), E[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready = ae);
826
+ v || (v = ne(), E[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready = ie);
827
827
  var o = [];
828
828
  function C() {
829
829
  return d.resolve();
@@ -834,23 +834,23 @@ var nt = { exports: {} };
834
834
  }
835
835
  var F = v.forages.slice(0);
836
836
  return d.all(o).then(function() {
837
- return a.db = v.db, O(a);
837
+ return a.db = v.db, re(a);
838
838
  }).then(function(k) {
839
- return a.db = k, we(a, c._defaultConfig.version) ? ce(a) : k;
839
+ return a.db = k, be(a, c._defaultConfig.version) ? ue(a) : k;
840
840
  }).then(function(k) {
841
841
  a.db = v.db = k, c._dbInfo = a;
842
842
  for (var q = 0; q < F.length; q++) {
843
- var Z = F[q];
844
- Z !== c && (Z._dbInfo.db = a.db, Z._dbInfo.version = a.version);
843
+ var J = F[q];
844
+ J !== c && (J._dbInfo.db = a.db, J._dbInfo.version = a.version);
845
845
  }
846
846
  });
847
847
  }
848
- function fe(n, c) {
848
+ function se(n, c) {
849
849
  var a = this;
850
850
  n = r(n);
851
851
  var m = new d(function(v, o) {
852
852
  a.ready().then(function() {
853
- X(a._dbInfo, M, function(C, R) {
853
+ W(a._dbInfo, L, function(C, R) {
854
854
  if (C)
855
855
  return o(C);
856
856
  try {
@@ -869,10 +869,10 @@ var nt = { exports: {} };
869
869
  });
870
870
  return h(m, c), m;
871
871
  }
872
- function Ee(n, c) {
872
+ function ge(n, c) {
873
873
  var a = this, m = new d(function(v, o) {
874
874
  a.ready().then(function() {
875
- X(a._dbInfo, M, function(C, R) {
875
+ W(a._dbInfo, L, function(C, R) {
876
876
  if (C)
877
877
  return o(C);
878
878
  try {
@@ -880,10 +880,10 @@ var nt = { exports: {} };
880
880
  F.onsuccess = function() {
881
881
  var q = F.result;
882
882
  if (q) {
883
- var Z = q.value;
884
- H(Z) && (Z = Y(Z));
885
- var ee = n(Z, q.key, k++);
886
- ee !== void 0 ? v(ee) : q.continue();
883
+ var J = q.value;
884
+ H(J) && (J = Y(J));
885
+ var p = n(J, q.key, k++);
886
+ p !== void 0 ? v(p) : q.continue();
887
887
  } else
888
888
  v();
889
889
  }, F.onerror = function() {
@@ -897,43 +897,43 @@ var nt = { exports: {} };
897
897
  });
898
898
  return h(m, c), m;
899
899
  }
900
- function $e(n, c, a) {
900
+ function Be(n, c, a) {
901
901
  var m = this;
902
902
  n = r(n);
903
903
  var v = new d(function(o, C) {
904
904
  var R;
905
905
  m.ready().then(function() {
906
- return R = m._dbInfo, w.call(c) === "[object Blob]" ? L(R.db).then(function(B) {
907
- return B ? c : W(c);
906
+ return R = m._dbInfo, w.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
907
+ return B ? c : G(c);
908
908
  }) : c;
909
909
  }).then(function(B) {
910
- X(m._dbInfo, b, function(F, k) {
910
+ W(m._dbInfo, b, function(F, k) {
911
911
  if (F)
912
912
  return C(F);
913
913
  try {
914
914
  var q = k.objectStore(m._dbInfo.storeName);
915
915
  B === null && (B = void 0);
916
- var Z = q.put(B, n);
916
+ var J = q.put(B, n);
917
917
  k.oncomplete = function() {
918
918
  B === void 0 && (B = null), o(B);
919
919
  }, k.onabort = k.onerror = function() {
920
- var ee = Z.error ? Z.error : Z.transaction.error;
921
- C(ee);
920
+ var p = J.error ? J.error : J.transaction.error;
921
+ C(p);
922
922
  };
923
- } catch (ee) {
924
- C(ee);
923
+ } catch (p) {
924
+ C(p);
925
925
  }
926
926
  });
927
927
  }).catch(C);
928
928
  });
929
929
  return h(v, a), v;
930
930
  }
931
- function Ce(n, c) {
931
+ function $e(n, c) {
932
932
  var a = this;
933
933
  n = r(n);
934
934
  var m = new d(function(v, o) {
935
935
  a.ready().then(function() {
936
- X(a._dbInfo, b, function(C, R) {
936
+ W(a._dbInfo, b, function(C, R) {
937
937
  if (C)
938
938
  return o(C);
939
939
  try {
@@ -954,10 +954,10 @@ var nt = { exports: {} };
954
954
  });
955
955
  return h(m, c), m;
956
956
  }
957
- function rr(n) {
957
+ function Fe(n) {
958
958
  var c = this, a = new d(function(m, v) {
959
959
  c.ready().then(function() {
960
- X(c._dbInfo, b, function(o, C) {
960
+ W(c._dbInfo, b, function(o, C) {
961
961
  if (o)
962
962
  return v(o);
963
963
  try {
@@ -979,7 +979,7 @@ var nt = { exports: {} };
979
979
  function tr(n) {
980
980
  var c = this, a = new d(function(m, v) {
981
981
  c.ready().then(function() {
982
- X(c._dbInfo, M, function(o, C) {
982
+ W(c._dbInfo, L, function(o, C) {
983
983
  if (o)
984
984
  return v(o);
985
985
  try {
@@ -1004,7 +1004,7 @@ var nt = { exports: {} };
1004
1004
  return;
1005
1005
  }
1006
1006
  a.ready().then(function() {
1007
- X(a._dbInfo, M, function(C, R) {
1007
+ W(a._dbInfo, L, function(C, R) {
1008
1008
  if (C)
1009
1009
  return o(C);
1010
1010
  try {
@@ -1027,10 +1027,10 @@ var nt = { exports: {} };
1027
1027
  });
1028
1028
  return h(m, c), m;
1029
1029
  }
1030
- function Pe(n) {
1030
+ function Ce(n) {
1031
1031
  var c = this, a = new d(function(m, v) {
1032
1032
  c.ready().then(function() {
1033
- X(c._dbInfo, M, function(o, C) {
1033
+ W(c._dbInfo, L, function(o, C) {
1034
1034
  if (o)
1035
1035
  return v(o);
1036
1036
  try {
@@ -1061,7 +1061,7 @@ var nt = { exports: {} };
1061
1061
  if (!n.name)
1062
1062
  v = d.reject("Invalid arguments");
1063
1063
  else {
1064
- var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) : O(n).then(function(R) {
1064
+ var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) : re(n).then(function(R) {
1065
1065
  var B = E[n.name], F = B.forages;
1066
1066
  B.db = R;
1067
1067
  for (var k = 0; k < F.length; k++)
@@ -1075,31 +1075,31 @@ var nt = { exports: {} };
1075
1075
  var F = E[n.name], k = F.forages;
1076
1076
  R.close();
1077
1077
  for (var q = 0; q < k.length; q++) {
1078
- var Z = k[q];
1079
- Z._dbInfo.db = null, Z._dbInfo.version = B;
1078
+ var J = k[q];
1079
+ J._dbInfo.db = null, J._dbInfo.version = B;
1080
1080
  }
1081
- var ee = new d(function(re, ie) {
1082
- var le = _.open(n.name, B);
1083
- le.onerror = function(ye) {
1084
- var ze = le.result;
1085
- ze.close(), ie(ye);
1086
- }, le.onupgradeneeded = function() {
1087
- var ye = le.result;
1088
- ye.deleteObjectStore(n.storeName);
1089
- }, le.onsuccess = function() {
1090
- var ye = le.result;
1091
- ye.close(), re(ye);
1081
+ var p = new d(function(te, fe) {
1082
+ var ae = _.open(n.name, B);
1083
+ ae.onerror = function(we) {
1084
+ var Ye = ae.result;
1085
+ Ye.close(), fe(we);
1086
+ }, ae.onupgradeneeded = function() {
1087
+ var we = ae.result;
1088
+ we.deleteObjectStore(n.storeName);
1089
+ }, ae.onsuccess = function() {
1090
+ var we = ae.result;
1091
+ we.close(), te(we);
1092
1092
  };
1093
1093
  });
1094
- return ee.then(function(re) {
1095
- F.db = re;
1096
- for (var ie = 0; ie < k.length; ie++) {
1097
- var le = k[ie];
1098
- le._dbInfo.db = re, A(le._dbInfo);
1094
+ return p.then(function(te) {
1095
+ F.db = te;
1096
+ for (var fe = 0; fe < k.length; fe++) {
1097
+ var ae = k[fe];
1098
+ ae._dbInfo.db = te, A(ae._dbInfo);
1099
1099
  }
1100
- }).catch(function(re) {
1101
- throw (J(n, re) || d.resolve()).catch(function() {
1102
- }), re;
1100
+ }).catch(function(te) {
1101
+ throw (j(n, te) || d.resolve()).catch(function() {
1102
+ }), te;
1103
1103
  });
1104
1104
  }
1105
1105
  }) : v = C.then(function(R) {
@@ -1110,27 +1110,27 @@ var nt = { exports: {} };
1110
1110
  var q = F[k];
1111
1111
  q._dbInfo.db = null;
1112
1112
  }
1113
- var Z = new d(function(ee, re) {
1114
- var ie = _.deleteDatabase(n.name);
1115
- ie.onerror = function() {
1116
- var le = ie.result;
1117
- le && le.close(), re(ie.error);
1118
- }, ie.onblocked = function() {
1113
+ var J = new d(function(p, te) {
1114
+ var fe = _.deleteDatabase(n.name);
1115
+ fe.onerror = function() {
1116
+ var ae = fe.result;
1117
+ ae && ae.close(), te(fe.error);
1118
+ }, fe.onblocked = function() {
1119
1119
  console.warn('dropInstance blocked for database "' + n.name + '" until all open connections are closed');
1120
- }, ie.onsuccess = function() {
1121
- var le = ie.result;
1122
- le && le.close(), ee(le);
1120
+ }, fe.onsuccess = function() {
1121
+ var ae = fe.result;
1122
+ ae && ae.close(), p(ae);
1123
1123
  };
1124
1124
  });
1125
- return Z.then(function(ee) {
1126
- B.db = ee;
1127
- for (var re = 0; re < F.length; re++) {
1128
- var ie = F[re];
1129
- A(ie._dbInfo);
1125
+ return J.then(function(p) {
1126
+ B.db = p;
1127
+ for (var te = 0; te < F.length; te++) {
1128
+ var fe = F[te];
1129
+ A(fe._dbInfo);
1130
1130
  }
1131
- }).catch(function(ee) {
1132
- throw (J(n, ee) || d.resolve()).catch(function() {
1133
- }), ee;
1131
+ }).catch(function(p) {
1132
+ throw (j(n, p) || d.resolve()).catch(function() {
1133
+ }), p;
1134
1134
  });
1135
1135
  });
1136
1136
  }
@@ -1138,46 +1138,46 @@ var nt = { exports: {} };
1138
1138
  }
1139
1139
  var lr = {
1140
1140
  _driver: "asyncStorage",
1141
- _initStorage: se,
1142
- _support: N(),
1143
- iterate: Ee,
1144
- getItem: fe,
1145
- setItem: $e,
1146
- removeItem: Ce,
1147
- clear: rr,
1141
+ _initStorage: ce,
1142
+ _support: M(),
1143
+ iterate: ge,
1144
+ getItem: se,
1145
+ setItem: Be,
1146
+ removeItem: $e,
1147
+ clear: Fe,
1148
1148
  length: tr,
1149
1149
  key: nr,
1150
- keys: Pe,
1150
+ keys: Ce,
1151
1151
  dropInstance: ar
1152
1152
  };
1153
1153
  function ur() {
1154
1154
  return typeof openDatabase == "function";
1155
1155
  }
1156
- var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8", He = "si16", U = "si32", j = "ur16", V = "ui32", p = "fl32", de = "fl64", ge = Ne + We.length, De = Object.prototype.toString;
1157
- function Se(n) {
1156
+ var Se = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Je = /^~~local_forage_type~([^~]+)~/, ke = "__lfsc__:", Pe = ke.length, qe = "arbf", Ie = "blob", je = "si08", Ke = "ui08", He = "uic8", Ve = "si16", U = "si32", K = "ur16", V = "ui32", O = "fl32", de = "fl64", ye = Pe + qe.length, De = Object.prototype.toString;
1157
+ function Ae(n) {
1158
1158
  var c = n.length * 0.75, a = n.length, m, v = 0, o, C, R, B;
1159
1159
  n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
1160
1160
  var F = new ArrayBuffer(c), k = new Uint8Array(F);
1161
1161
  for (m = 0; m < a; m += 4)
1162
- o = be.indexOf(n[m]), C = be.indexOf(n[m + 1]), R = be.indexOf(n[m + 2]), B = be.indexOf(n[m + 3]), k[v++] = o << 2 | C >> 4, k[v++] = (C & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
1162
+ o = Se.indexOf(n[m]), C = Se.indexOf(n[m + 1]), R = Se.indexOf(n[m + 2]), B = Se.indexOf(n[m + 3]), k[v++] = o << 2 | C >> 4, k[v++] = (C & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
1163
1163
  return F;
1164
1164
  }
1165
1165
  function oe(n) {
1166
1166
  var c = new Uint8Array(n), a = "", m;
1167
1167
  for (m = 0; m < c.length; m += 3)
1168
- a += be[c[m] >> 2], a += be[(c[m] & 3) << 4 | c[m + 1] >> 4], a += be[(c[m + 1] & 15) << 2 | c[m + 2] >> 6], a += be[c[m + 2] & 63];
1168
+ a += Se[c[m] >> 2], a += Se[(c[m] & 3) << 4 | c[m + 1] >> 4], a += Se[(c[m + 1] & 15) << 2 | c[m + 2] >> 6], a += Se[c[m + 2] & 63];
1169
1169
  return c.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : c.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
1170
1170
  }
1171
1171
  function Me(n, c) {
1172
1172
  var a = "";
1173
1173
  if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
1174
- var m, v = Fe;
1175
- n instanceof ArrayBuffer ? (m = n, v += We) : (m = n.buffer, a === "[object Int8Array]" ? v += Je : a === "[object Uint8Array]" ? v += je : a === "[object Uint8ClampedArray]" ? v += qe : a === "[object Int16Array]" ? v += He : a === "[object Uint16Array]" ? v += j : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += p : a === "[object Float64Array]" ? v += de : c(new Error("Failed to get type for BinaryArray"))), c(v + oe(m));
1174
+ var m, v = ke;
1175
+ n instanceof ArrayBuffer ? (m = n, v += qe) : (m = n.buffer, a === "[object Int8Array]" ? v += je : a === "[object Uint8Array]" ? v += Ke : a === "[object Uint8ClampedArray]" ? v += He : a === "[object Int16Array]" ? v += Ve : a === "[object Uint16Array]" ? v += K : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += de : c(new Error("Failed to get type for BinaryArray"))), c(v + oe(m));
1176
1176
  } else if (a === "[object Blob]") {
1177
1177
  var o = new FileReader();
1178
1178
  o.onload = function() {
1179
1179
  var C = ir + n.type + "~" + oe(this.result);
1180
- c(Fe + Ie + C);
1180
+ c(ke + Ie + C);
1181
1181
  }, o.readAsArrayBuffer(n);
1182
1182
  } else
1183
1183
  try {
@@ -1187,34 +1187,34 @@ var nt = { exports: {} };
1187
1187
  }
1188
1188
  }
1189
1189
  function ct(n) {
1190
- if (n.substring(0, Ne) !== Fe)
1190
+ if (n.substring(0, Pe) !== ke)
1191
1191
  return JSON.parse(n);
1192
- var c = n.substring(ge), a = n.substring(Ne, ge), m;
1193
- if (a === Ie && Ze.test(c)) {
1194
- var v = c.match(Ze);
1192
+ var c = n.substring(ye), a = n.substring(Pe, ye), m;
1193
+ if (a === Ie && Je.test(c)) {
1194
+ var v = c.match(Je);
1195
1195
  m = v[1], c = c.substring(v[0].length);
1196
1196
  }
1197
- var o = Se(c);
1197
+ var o = Ae(c);
1198
1198
  switch (a) {
1199
- case We:
1199
+ case qe:
1200
1200
  return o;
1201
1201
  case Ie:
1202
1202
  return $([o], { type: m });
1203
- case Je:
1204
- return new Int8Array(o);
1205
1203
  case je:
1204
+ return new Int8Array(o);
1205
+ case Ke:
1206
1206
  return new Uint8Array(o);
1207
- case qe:
1208
- return new Uint8ClampedArray(o);
1209
1207
  case He:
1208
+ return new Uint8ClampedArray(o);
1209
+ case Ve:
1210
1210
  return new Int16Array(o);
1211
- case j:
1211
+ case K:
1212
1212
  return new Uint16Array(o);
1213
1213
  case U:
1214
1214
  return new Int32Array(o);
1215
1215
  case V:
1216
1216
  return new Uint32Array(o);
1217
- case p:
1217
+ case O:
1218
1218
  return new Float32Array(o);
1219
1219
  case de:
1220
1220
  return new Float64Array(o);
@@ -1225,7 +1225,7 @@ var nt = { exports: {} };
1225
1225
  var cr = {
1226
1226
  serialize: Me,
1227
1227
  deserialize: ct,
1228
- stringToBuffer: Se,
1228
+ stringToBuffer: Ae,
1229
1229
  bufferToString: oe
1230
1230
  };
1231
1231
  function Rr(n, c, a, m) {
@@ -1287,10 +1287,10 @@ var nt = { exports: {} };
1287
1287
  var C = a._dbInfo;
1288
1288
  C.db.transaction(function(R) {
1289
1289
  xe(R, C, "SELECT * FROM " + C.storeName, [], function(B, F) {
1290
- for (var k = F.rows, q = k.length, Z = 0; Z < q; Z++) {
1291
- var ee = k.item(Z), re = ee.value;
1292
- if (re && (re = C.serializer.deserialize(re)), re = n(re, ee.key, Z + 1), re !== void 0) {
1293
- v(re);
1290
+ for (var k = F.rows, q = k.length, J = 0; J < q; J++) {
1291
+ var p = k.item(J), te = p.value;
1292
+ if (te && (te = C.serializer.deserialize(te)), te = n(te, p.key, J + 1), te !== void 0) {
1293
+ v(te);
1294
1294
  return;
1295
1295
  }
1296
1296
  }
@@ -1311,19 +1311,19 @@ var nt = { exports: {} };
1311
1311
  c === void 0 && (c = null);
1312
1312
  var B = c, F = v._dbInfo;
1313
1313
  F.serializer.serialize(c, function(k, q) {
1314
- q ? R(q) : F.db.transaction(function(Z) {
1315
- xe(Z, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
1314
+ q ? R(q) : F.db.transaction(function(J) {
1315
+ xe(J, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
1316
1316
  C(B);
1317
- }, function(ee, re) {
1318
- R(re);
1317
+ }, function(p, te) {
1318
+ R(te);
1319
1319
  });
1320
- }, function(Z) {
1321
- if (Z.code === Z.QUOTA_ERR) {
1320
+ }, function(J) {
1321
+ if (J.code === J.QUOTA_ERR) {
1322
1322
  if (m > 0) {
1323
1323
  C(Ur.apply(v, [n, B, a, m - 1]));
1324
1324
  return;
1325
1325
  }
1326
- R(Z);
1326
+ R(J);
1327
1327
  }
1328
1328
  });
1329
1329
  });
@@ -1447,21 +1447,21 @@ var nt = { exports: {} };
1447
1447
  }).then(function(o) {
1448
1448
  return new d(function(C, R) {
1449
1449
  o.db.transaction(function(B) {
1450
- function F(ee) {
1451
- return new d(function(re, ie) {
1452
- B.executeSql("DROP TABLE IF EXISTS " + ee, [], function() {
1453
- re();
1454
- }, function(le, ye) {
1455
- ie(ye);
1450
+ function F(p) {
1451
+ return new d(function(te, fe) {
1452
+ B.executeSql("DROP TABLE IF EXISTS " + p, [], function() {
1453
+ te();
1454
+ }, function(ae, we) {
1455
+ fe(we);
1456
1456
  });
1457
1457
  });
1458
1458
  }
1459
- for (var k = [], q = 0, Z = o.storeNames.length; q < Z; q++)
1459
+ for (var k = [], q = 0, J = o.storeNames.length; q < J; q++)
1460
1460
  k.push(F(o.storeNames[q]));
1461
1461
  d.all(k).then(function() {
1462
1462
  C();
1463
- }).catch(function(ee) {
1464
- R(ee);
1463
+ }).catch(function(p) {
1464
+ R(p);
1465
1465
  });
1466
1466
  }, function(B) {
1467
1467
  R(B);
@@ -1566,13 +1566,13 @@ var nt = { exports: {} };
1566
1566
  });
1567
1567
  return h(a, n), a;
1568
1568
  }
1569
- function Nt(n) {
1569
+ function Mt(n) {
1570
1570
  var c = this, a = c.keys().then(function(m) {
1571
1571
  return m.length;
1572
1572
  });
1573
1573
  return h(a, n), a;
1574
1574
  }
1575
- function Mt(n, c) {
1575
+ function Lt(n, c) {
1576
1576
  var a = this;
1577
1577
  n = r(n);
1578
1578
  var m = a.ready().then(function() {
@@ -1581,7 +1581,7 @@ var nt = { exports: {} };
1581
1581
  });
1582
1582
  return h(m, c), m;
1583
1583
  }
1584
- function Lt(n, c, a) {
1584
+ function Nt(n, c, a) {
1585
1585
  var m = this;
1586
1586
  n = r(n);
1587
1587
  var v = m.ready().then(function() {
@@ -1624,10 +1624,10 @@ var nt = { exports: {} };
1624
1624
  _support: At(),
1625
1625
  iterate: _t,
1626
1626
  getItem: Tt,
1627
- setItem: Lt,
1628
- removeItem: Mt,
1627
+ setItem: Nt,
1628
+ removeItem: Lt,
1629
1629
  clear: xt,
1630
- length: Nt,
1630
+ length: Mt,
1631
1631
  key: Ct,
1632
1632
  keys: Pt,
1633
1633
  dropInstance: Rt
@@ -1642,11 +1642,11 @@ var nt = { exports: {} };
1642
1642
  return !1;
1643
1643
  }, $r = Array.isArray || function(n) {
1644
1644
  return Object.prototype.toString.call(n) === "[object Array]";
1645
- }, Ve = {}, Fr = {}, ke = {
1645
+ }, ze = {}, Fr = {}, Ge = {
1646
1646
  INDEXEDDB: lr,
1647
1647
  WEBSQL: St,
1648
1648
  LOCALSTORAGE: Ut
1649
- }, Ft = [ke.INDEXEDDB._driver, ke.WEBSQL._driver, ke.LOCALSTORAGE._driver], Ke = ["dropInstance"], fr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Ke), kt = {
1649
+ }, Ft = [Ge.INDEXEDDB._driver, Ge.WEBSQL._driver, Ge.LOCALSTORAGE._driver], Qe = ["dropInstance"], fr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Qe), kt = {
1650
1650
  description: "",
1651
1651
  driver: Ft.slice(),
1652
1652
  name: "localforage",
@@ -1675,11 +1675,11 @@ var nt = { exports: {} };
1675
1675
  }
1676
1676
  var Wt = function() {
1677
1677
  function n(c) {
1678
- x(this, n);
1679
- for (var a in ke)
1680
- if (ke.hasOwnProperty(a)) {
1681
- var m = ke[a], v = m._driver;
1682
- this[a] = v, Ve[v] || this.defineDriver(m);
1678
+ D(this, n);
1679
+ for (var a in Ge)
1680
+ if (Ge.hasOwnProperty(a)) {
1681
+ var m = Ge[a], v = m._driver;
1682
+ this[a] = v, ze[v] || this.defineDriver(m);
1683
1683
  }
1684
1684
  this._defaultConfig = sr({}, kt), this._config = sr({}, this._defaultConfig, c), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
1685
1685
  });
@@ -1704,38 +1704,38 @@ var nt = { exports: {} };
1704
1704
  R(F);
1705
1705
  return;
1706
1706
  }
1707
- for (var k = fr.concat("_initStorage"), q = 0, Z = k.length; q < Z; q++) {
1708
- var ee = k[q], re = !$t(Ke, ee);
1709
- if ((re || a[ee]) && typeof a[ee] != "function") {
1707
+ for (var k = fr.concat("_initStorage"), q = 0, J = k.length; q < J; q++) {
1708
+ var p = k[q], te = !$t(Qe, p);
1709
+ if ((te || a[p]) && typeof a[p] != "function") {
1710
1710
  R(F);
1711
1711
  return;
1712
1712
  }
1713
1713
  }
1714
- var ie = function() {
1715
- for (var ze = function(Vt) {
1714
+ var fe = function() {
1715
+ for (var Ye = function(Vt) {
1716
1716
  return function() {
1717
1717
  var zt = new Error("Method " + Vt + " is not implemented by the current driver"), kr = d.reject(zt);
1718
1718
  return h(kr, arguments[arguments.length - 1]), kr;
1719
1719
  };
1720
- }, or = 0, Ht = Ke.length; or < Ht; or++) {
1721
- var dr = Ke[or];
1722
- a[dr] || (a[dr] = ze(dr));
1720
+ }, or = 0, Ht = Qe.length; or < Ht; or++) {
1721
+ var dr = Qe[or];
1722
+ a[dr] || (a[dr] = Ye(dr));
1723
1723
  }
1724
1724
  };
1725
- ie();
1726
- var le = function(ze) {
1727
- Ve[B] && console.info("Redefining LocalForage driver: " + B), Ve[B] = a, Fr[B] = ze, C();
1725
+ fe();
1726
+ var ae = function(Ye) {
1727
+ ze[B] && console.info("Redefining LocalForage driver: " + B), ze[B] = a, Fr[B] = Ye, C();
1728
1728
  };
1729
- "_support" in a ? a._support && typeof a._support == "function" ? a._support().then(le, R) : le(!!a._support) : le(!0);
1730
- } catch (ye) {
1731
- R(ye);
1729
+ "_support" in a ? a._support && typeof a._support == "function" ? a._support().then(ae, R) : ae(!!a._support) : ae(!0);
1730
+ } catch (we) {
1731
+ R(we);
1732
1732
  }
1733
1733
  });
1734
1734
  return u(o, m, v), o;
1735
1735
  }, n.prototype.driver = function() {
1736
1736
  return this._driver || null;
1737
1737
  }, n.prototype.getDriver = function(a, m, v) {
1738
- var o = Ve[a] ? d.resolve(Ve[a]) : d.reject(new Error("Driver not found."));
1738
+ var o = ze[a] ? d.resolve(ze[a]) : d.reject(new Error("Driver not found."));
1739
1739
  return u(o, m, v), o;
1740
1740
  }, n.prototype.getSerializer = function(a) {
1741
1741
  var m = d.resolve(cr);
@@ -1757,17 +1757,17 @@ var nt = { exports: {} };
1757
1757
  }
1758
1758
  function F(q) {
1759
1759
  return function() {
1760
- var Z = 0;
1761
- function ee() {
1762
- for (; Z < q.length; ) {
1763
- var re = q[Z];
1764
- return Z++, o._dbInfo = null, o._ready = null, o.getDriver(re).then(B).catch(ee);
1760
+ var J = 0;
1761
+ function p() {
1762
+ for (; J < q.length; ) {
1763
+ var te = q[J];
1764
+ return J++, o._dbInfo = null, o._ready = null, o.getDriver(te).then(B).catch(p);
1765
1765
  }
1766
1766
  R();
1767
- var ie = new Error("No available storage method found.");
1768
- return o._driverSet = d.reject(ie), o._driverSet;
1767
+ var fe = new Error("No available storage method found.");
1768
+ return o._driverSet = d.reject(fe), o._driverSet;
1769
1769
  }
1770
- return ee();
1770
+ return p();
1771
1771
  };
1772
1772
  }
1773
1773
  var k = this._driverSet !== null ? this._driverSet.catch(function() {
@@ -1775,8 +1775,8 @@ var nt = { exports: {} };
1775
1775
  }) : d.resolve();
1776
1776
  return this._driverSet = k.then(function() {
1777
1777
  var q = C[0];
1778
- return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(Z) {
1779
- o._driver = Z._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(C);
1778
+ return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(J) {
1779
+ o._driver = J._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(C);
1780
1780
  });
1781
1781
  }).catch(function() {
1782
1782
  R();
@@ -1806,35 +1806,35 @@ var nt = { exports: {} };
1806
1806
  })(nt);
1807
1807
  var vn = nt.exports;
1808
1808
  const at = /* @__PURE__ */ rn(vn);
1809
- let ue;
1809
+ let le;
1810
1810
  function lt() {
1811
- const e = ue == null ? void 0 : ue.getEnv();
1812
- return ue == null ? e : (ue[e] ?? ue.development).localDbName ?? e;
1811
+ const e = le == null ? void 0 : le.getEnv();
1812
+ return le == null ? e : (le[e] ?? le.development).localDbName ?? e;
1813
1813
  }
1814
1814
  function Wr() {
1815
- const e = ue == null ? void 0 : ue.getEnv();
1816
- return console.log(`env var: ${e}`), ue == null ? "" : (ue[e] ?? ue.development).auth ?? "";
1815
+ const e = le == null ? void 0 : le.getEnv();
1816
+ return console.log(`env var: ${e}`), le == null ? "" : (le[e] ?? le.development).auth ?? "";
1817
1817
  }
1818
1818
  function gn(e) {
1819
- const t = ue == null ? void 0 : ue.getEnv();
1820
- if (ue == null)
1819
+ const t = le == null ? void 0 : le.getEnv();
1820
+ if (le == null)
1821
1821
  return "";
1822
- const l = ue[t] ?? ue.development;
1822
+ const l = le[t] ?? le.development;
1823
1823
  return e == null ? l.data ?? "" : l.other[e] ?? l.data ?? "";
1824
1824
  }
1825
1825
  function ha() {
1826
- return ue;
1826
+ return le;
1827
1827
  }
1828
1828
  function yn(e) {
1829
- return ue = e, ue;
1829
+ return le = e, le;
1830
1830
  }
1831
- let Oe = null;
1831
+ let pe = null;
1832
1832
  at.config({
1833
1833
  name: lt()
1834
1834
  });
1835
1835
  function ve() {
1836
1836
  const e = lt();
1837
- return (Oe == null || Oe.config.name != e) && (Oe = at.createInstance({ name: e })), Oe;
1837
+ return (pe == null || pe.config.name != e) && (pe = at.createInstance({ name: e })), pe;
1838
1838
  }
1839
1839
  function ma() {
1840
1840
  async function e(s) {
@@ -1859,40 +1859,42 @@ function ma() {
1859
1859
  saveAsync: S
1860
1860
  };
1861
1861
  }
1862
- let er;
1862
+ let rr;
1863
1863
  function va(e) {
1864
- return er(e)();
1864
+ return rr(e)();
1865
1865
  }
1866
1866
  function Le(e) {
1867
- return er(e);
1867
+ return rr(e);
1868
1868
  }
1869
1869
  function wn(e) {
1870
- return er = (t) => bn({
1870
+ return rr = (t) => bn({
1871
1871
  ...e,
1872
1872
  ...t
1873
- }), er;
1873
+ }), rr;
1874
1874
  }
1875
1875
  function bn(e) {
1876
- var t, l, S, s, g;
1877
- if (e.storeMode ?? (e.storeMode = ((l = (t = e.navigation) == null ? void 0 : t.findItem(e.nav)) == null ? void 0 : l.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((s = (S = e.navigation) == null ? void 0 : S.findItem(e.nav)) == null ? void 0 : s.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((g = e.navigation) == null ? void 0 : g.findStoreName(e.nav)) ?? e.nav), e.storeName == null)
1876
+ var l, S, s, g, D;
1877
+ e.storeMode ?? (e.storeMode = ((S = (l = e.navigation) == null ? void 0 : l.findItem(e.nav)) == null ? void 0 : S.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((g = (s = e.navigation) == null ? void 0 : s.findItem(e.nav)) == null ? void 0 : g.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((D = e.navigation) == null ? void 0 : D.findStoreName(e.nav)) ?? e.nav);
1878
+ const t = { ...e, storeName: e.storeName ?? "" };
1879
+ if (console.log("creating store def"), console.log(t), e.storeName == null)
1878
1880
  throw new Error("no store name provided");
1879
1881
  if (e.storeMode == "whole-last-updated") {
1880
1882
  if (e.api == null)
1881
1883
  throw new Error("Must supply an api object to use store");
1882
- return qr({ ...e, storeName: e.storeName ?? "" });
1884
+ return qr(t);
1883
1885
  } else if (e.storeMode == "partial-last-updated") {
1884
1886
  if (e.api == null)
1885
1887
  throw new Error("Must supply an api object to use store");
1886
- return qr({ ...e, storeName: e.storeName ?? "" });
1888
+ return qr(t);
1887
1889
  } else
1888
- return An({ ...e, storeName: e.storeName ?? "" });
1890
+ return An(t);
1889
1891
  }
1890
1892
  const Sn = (e) => {
1891
- let t = K(e.url) ?? void 0;
1892
- if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Be(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Be(t, e.id)), e.params != null) {
1893
+ let t = Q(e.url) ?? void 0;
1894
+ if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ue(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ue(t, e.id)), e.params != null) {
1893
1895
  t ?? (t = "");
1894
1896
  let l = new URLSearchParams();
1895
- Object.entries(e.params).sort(Ue.firstBy((s) => s[0])).forEach((s) => {
1897
+ Object.entries(e.params).sort(Re.firstBy((s) => s[0])).forEach((s) => {
1896
1898
  s[1] != null && l.append(s[0], s[1].toString());
1897
1899
  }), t = `${t}?${l.toString()}`;
1898
1900
  }
@@ -1902,15 +1904,15 @@ function An(e) {
1902
1904
  return pr(e.storeName, () => {
1903
1905
  var u;
1904
1906
  const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
1905
- function x(r) {
1907
+ function D(r) {
1906
1908
  var i, E;
1907
1909
  let y = "";
1908
1910
  const I = r.params ?? {};
1909
- return I != null && (y = Object.entries(I).sort(Ue.firstBy((w) => w[0])).map((w) => `${w[0]}=${JSON.stringify(w[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${y ?? "no-params"}`;
1911
+ return I != null && (y = Object.entries(I).sort(Re.firstBy((w) => w[0])).map((w) => `${w[0]}=${JSON.stringify(w[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${y ?? "no-params"}`;
1910
1912
  }
1911
1913
  async function P(r) {
1912
1914
  r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
1913
- const y = x(r), I = r.refresh;
1915
+ const y = D(r), I = r.refresh;
1914
1916
  if (!I && l.value[y] !== void 0)
1915
1917
  return l.value[y];
1916
1918
  if (!I && s == !0) {
@@ -1922,18 +1924,18 @@ function An(e) {
1922
1924
  return l.value[y];
1923
1925
  try {
1924
1926
  let i = S.value[y];
1925
- i == null && (i = new Promise(async (w, M) => {
1927
+ i == null && (i = new Promise(async (w, L) => {
1926
1928
  var b;
1927
1929
  try {
1928
- const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), D = {
1930
+ const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), x = {
1929
1931
  meta: { storedOn: t.toString() },
1930
1932
  data: T == null ? void 0 : T.data,
1931
1933
  count: T == null ? void 0 : T.count,
1932
1934
  filters: (T == null ? void 0 : T.filters) ?? []
1933
1935
  };
1934
- s == !0 && await ve().setItem(y, D), w(D);
1936
+ s == !0 && await ve().setItem(y, x), w(x);
1935
1937
  } catch (T) {
1936
- M(T);
1938
+ L(T);
1937
1939
  } finally {
1938
1940
  delete S.value[y];
1939
1941
  }
@@ -1950,7 +1952,7 @@ function An(e) {
1950
1952
  }
1951
1953
  async function _(r) {
1952
1954
  r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
1953
- const y = x(r), I = r.refresh;
1955
+ const y = D(r), I = r.refresh;
1954
1956
  if (!I && l.value[y] !== void 0)
1955
1957
  return l.value[y];
1956
1958
  if (!I && s == !0) {
@@ -1962,17 +1964,17 @@ function An(e) {
1962
1964
  return l.value[y];
1963
1965
  try {
1964
1966
  let i = S.value[y];
1965
- i == null && (i = new Promise(async (w, M) => {
1967
+ i == null && (i = new Promise(async (w, L) => {
1966
1968
  var b;
1967
1969
  try {
1968
1970
  let T = await ((b = e.api) == null ? void 0 : b.get(r));
1969
- const D = {
1971
+ const x = {
1970
1972
  meta: { storedOn: t.toString() },
1971
1973
  data: T == null ? void 0 : T.data
1972
1974
  };
1973
- s == !0 && await ve().setItem(y, D), w(D);
1975
+ s == !0 && await ve().setItem(y, x), w(x);
1974
1976
  } catch (T) {
1975
- M(T);
1977
+ L(T);
1976
1978
  } finally {
1977
1979
  delete S.value[y];
1978
1980
  }
@@ -1983,10 +1985,10 @@ function An(e) {
1983
1985
  throw i;
1984
1986
  }
1985
1987
  }
1986
- async function N(r) {
1988
+ async function M(r) {
1987
1989
  var i;
1988
1990
  r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
1989
- const y = x(r);
1991
+ const y = D(r);
1990
1992
  let I;
1991
1993
  if (e.api != null)
1992
1994
  try {
@@ -2002,21 +2004,21 @@ function An(e) {
2002
2004
  meta: { storedOn: t.toString() },
2003
2005
  data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
2004
2006
  };
2005
- return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((M) => {
2006
- const b = M[1].data;
2007
+ return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((L) => {
2008
+ const b = L[1].data;
2007
2009
  if (b != null)
2008
2010
  if (Array.isArray(b))
2009
2011
  for (let T = 0; T < b.length; T++)
2010
2012
  b[T].id == I.id && b.splice(T, 1, E.data);
2011
2013
  else
2012
- b.id == I.id && (l.value[M[0]] = E);
2014
+ b.id == I.id && (l.value[L[0]] = E);
2013
2015
  }), E.data;
2014
2016
  }
2015
2017
  return I;
2016
2018
  }
2017
2019
  async function $(r) {
2018
2020
  r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
2019
- const y = x(r);
2021
+ const y = D(r);
2020
2022
  let I;
2021
2023
  if (e.api != null)
2022
2024
  try {
@@ -2039,7 +2041,7 @@ function An(e) {
2039
2041
  async function d(r) {
2040
2042
  var i;
2041
2043
  r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
2042
- const y = x(r);
2044
+ const y = D(r);
2043
2045
  if (e.api != null)
2044
2046
  try {
2045
2047
  let E = await e.api.deleteItem(r);
@@ -2051,11 +2053,11 @@ function An(e) {
2051
2053
  delete l.value[y];
2052
2054
  const I = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2053
2055
  I != null && Object.entries(l.value).forEach((w) => {
2054
- const M = w[1].data;
2055
- if (M != null)
2056
- if (Array.isArray(M))
2057
- for (let b = 0; b < M.length; b++)
2058
- M[b].id == I && M.splice(b, 1);
2056
+ const L = w[1].data;
2057
+ if (L != null)
2058
+ if (Array.isArray(L))
2059
+ for (let b = 0; b < L.length; b++)
2060
+ L[b].id == I && L.splice(b, 1);
2059
2061
  else
2060
2062
  delete l.value[w[0]];
2061
2063
  }), s == !0 && await ve().removeItem(y);
@@ -2073,7 +2075,7 @@ function An(e) {
2073
2075
  deleteItem: d,
2074
2076
  get: _,
2075
2077
  getAll: P,
2076
- patch: N,
2078
+ patch: M,
2077
2079
  post: $,
2078
2080
  restore: h,
2079
2081
  searchMemory: l
@@ -2083,12 +2085,12 @@ function An(e) {
2083
2085
  }
2084
2086
  function qr(e) {
2085
2087
  return pr(e.storeName, () => {
2086
- const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
2088
+ const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), D = z({}), P = e.storageMode == "local-cache";
2087
2089
  function _() {
2088
2090
  var i;
2089
2091
  return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
2090
2092
  }
2091
- async function N() {
2093
+ async function M() {
2092
2094
  P == !0 && await ve().setItem(_(), {
2093
2095
  meta: g.value,
2094
2096
  data: t.value,
@@ -2098,44 +2100,44 @@ function qr(e) {
2098
2100
  }
2099
2101
  function $(i) {
2100
2102
  const E = _();
2101
- return x.value[E] || (x.value[E] = new Promise(async (w, M) => {
2103
+ return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
2102
2104
  var b, T;
2103
2105
  try {
2104
- let D = await ((T = e.api) == null ? void 0 : T.getAll({
2106
+ let x = await ((T = e.api) == null ? void 0 : T.getAll({
2105
2107
  additionalUrl: "/getAll",
2106
2108
  nav: i.nav,
2107
2109
  params: {
2108
2110
  lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
2109
2111
  }
2110
2112
  }));
2111
- D == null ? M(D) : (t.value ?? (t.value = []), D.data.forEach((L) => {
2112
- var A, J;
2113
- const f = t.value.findIndex((Q) => Q.id == L.id);
2114
- f >= 0 ? (A = t.value) == null || A.splice(f, 1, L) : (J = t.value) == null || J.push(L);
2113
+ x == null ? L(x) : (t.value ?? (t.value = []), x.data.forEach((N) => {
2114
+ var A, j;
2115
+ const f = t.value.findIndex((X) => X.id == N.id);
2116
+ f >= 0 ? (A = t.value) == null || A.splice(f, 1, N) : (j = t.value) == null || j.push(N);
2115
2117
  }), l.value = t.value.length, g.value = {
2116
2118
  lastUpdate: he.utc().toString(),
2117
2119
  storedOn: S.toString()
2118
- }, await N(), w(D));
2119
- } catch (D) {
2120
- M(D);
2120
+ }, await M(), w(x));
2121
+ } catch (x) {
2122
+ L(x);
2121
2123
  } finally {
2122
- delete x.value[E];
2124
+ delete D.value[E];
2123
2125
  }
2124
- })), x.value[E];
2126
+ })), D.value[E];
2125
2127
  }
2126
2128
  async function d(i) {
2127
- var M, b, T;
2129
+ var L, b, T;
2128
2130
  const E = _(), w = i.refresh;
2129
2131
  if (!w && t.value != null)
2130
2132
  return {
2131
- count: (M = t.value) == null ? void 0 : M.length,
2133
+ count: (L = t.value) == null ? void 0 : L.length,
2132
2134
  data: t.value,
2133
2135
  filters: []
2134
2136
  };
2135
2137
  if (!w && P == !0) {
2136
- const D = await ve().getItem(E);
2137
- if (D != null && parseFloat(D.meta.storedOn) > S - 7)
2138
- return t.value = D.data, l.value = D.data.length, s.value = D.filters ?? [], g.value = D.meta, {
2138
+ const x = await ve().getItem(E);
2139
+ if (x != null && parseFloat(x.meta.storedOn) > S - 7)
2140
+ return t.value = x.data, l.value = x.data.length, s.value = x.filters ?? [], g.value = x.meta, {
2139
2141
  count: (b = t.value) == null ? void 0 : b.length,
2140
2142
  data: t.value ?? [],
2141
2143
  filters: []
@@ -2150,45 +2152,45 @@ function qr(e) {
2150
2152
  t.value ?? (t.value = []);
2151
2153
  try {
2152
2154
  return await $(i);
2153
- } catch (D) {
2154
- let L = D;
2155
- throw new Error(L.message ?? "Problem");
2155
+ } catch (x) {
2156
+ let N = x;
2157
+ throw new Error(N.message ?? "Problem");
2156
2158
  }
2157
2159
  }
2158
2160
  async function h(i) {
2159
- var b, T, D, L;
2161
+ var b, T, x, N;
2160
2162
  const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
2161
2163
  if (w == null)
2162
2164
  throw new Error("no id provided");
2163
- let M = i.refresh;
2164
- if (!M && t.value != null) {
2165
+ let L = i.refresh;
2166
+ if (!L && t.value != null) {
2165
2167
  const f = t.value.find((A) => A.id == w);
2166
2168
  if (f != null)
2167
2169
  return { data: f };
2168
2170
  }
2169
- if (!M && P == !0) {
2171
+ if (!L && P == !0) {
2170
2172
  const f = await ve().getItem(E);
2171
2173
  if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
2172
2174
  t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
2173
- let A = (T = t.value) == null ? void 0 : T.find((J) => J.id == i.id);
2175
+ let A = (T = t.value) == null ? void 0 : T.find((j) => j.id == i.id);
2174
2176
  if (A != null)
2175
2177
  return { data: A };
2176
2178
  }
2177
2179
  }
2178
2180
  if (e.api == null)
2179
2181
  return {
2180
- data: (D = t.value) == null ? void 0 : D.find((f) => f.id == i.id)
2182
+ data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
2181
2183
  };
2182
2184
  t.value ?? (t.value = []);
2183
2185
  try {
2184
- return await $(i), { data: (L = t.value) == null ? void 0 : L.find((f) => f.id == i.id) };
2186
+ return await $(i), { data: (N = t.value) == null ? void 0 : N.find((f) => f.id == i.id) };
2185
2187
  } catch (f) {
2186
2188
  let A = f;
2187
2189
  throw new Error(A.message ?? "Problem");
2188
2190
  }
2189
2191
  }
2190
2192
  async function u(i) {
2191
- var w, M, b;
2193
+ var w, L, b;
2192
2194
  i.additionalUrl ?? (i.additionalUrl = "/patch");
2193
2195
  let E;
2194
2196
  if (e.api != null)
@@ -2196,19 +2198,19 @@ function qr(e) {
2196
2198
  let T = await e.api.patch(i);
2197
2199
  E = { ...i.data, ...T == null ? void 0 : T.data };
2198
2200
  } catch (T) {
2199
- let D = T;
2200
- throw new Error(D.message ?? "Patch Problem");
2201
+ let x = T;
2202
+ throw new Error(x.message ?? "Patch Problem");
2201
2203
  }
2202
2204
  else
2203
2205
  E = i.data;
2204
2206
  if (E != null) {
2205
- let T = (w = t.value) == null ? void 0 : w.findIndex((D) => D.id == E.id);
2206
- T != null && T >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(T, 1, E), await N());
2207
+ let T = (w = t.value) == null ? void 0 : w.findIndex((x) => x.id == E.id);
2208
+ T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
2207
2209
  }
2208
2210
  return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
2209
2211
  }
2210
2212
  async function r(i) {
2211
- var w, M;
2213
+ var w, L;
2212
2214
  i.additionalUrl ?? (i.additionalUrl = "/post");
2213
2215
  let E;
2214
2216
  if (e.api != null)
@@ -2221,10 +2223,10 @@ function qr(e) {
2221
2223
  }
2222
2224
  else
2223
2225
  E = i.data;
2224
- return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await N()), (M = t.value) == null ? void 0 : M.find((b) => b.id == (i.id ?? i.data.id));
2226
+ return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await M()), (L = t.value) == null ? void 0 : L.find((b) => b.id == (i.id ?? i.data.id));
2225
2227
  }
2226
2228
  async function y(i) {
2227
- var w, M;
2229
+ var w, L;
2228
2230
  if (i.additionalUrl ?? (i.additionalUrl = "/delete"), e.api != null)
2229
2231
  try {
2230
2232
  let b = await e.api.deleteItem(i);
@@ -2237,7 +2239,7 @@ function qr(e) {
2237
2239
  const E = i.id ?? i.data.id;
2238
2240
  if (E != null) {
2239
2241
  let b = (w = t.value) == null ? void 0 : w.findIndex((T) => T.id == E);
2240
- b != null && b >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(b, 1), await N());
2242
+ b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
2241
2243
  }
2242
2244
  }
2243
2245
  async function I(i) {
@@ -2246,14 +2248,14 @@ function qr(e) {
2246
2248
  try {
2247
2249
  await e.api.patch(i);
2248
2250
  } catch (w) {
2249
- let M = w;
2250
- throw new Error(M.message ?? "Patch Problem");
2251
+ let L = w;
2252
+ throw new Error(L.message ?? "Patch Problem");
2251
2253
  }
2252
2254
  try {
2253
2255
  i.additionalUrl = "/getAll", await $(i);
2254
2256
  } catch (w) {
2255
- let M = w;
2256
- throw new Error(M.message ?? "Problem");
2257
+ let L = w;
2258
+ throw new Error(L.message ?? "Problem");
2257
2259
  }
2258
2260
  return (E = t.value) == null ? void 0 : E.find((w) => w.id == (i.id ?? i.data.id));
2259
2261
  }
@@ -2272,7 +2274,7 @@ function Er() {
2272
2274
  return Ar;
2273
2275
  }
2274
2276
  function En(e) {
2275
- const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? x, s = e == null ? void 0 : e.demo;
2277
+ const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? D, s = e == null ? void 0 : e.demo;
2276
2278
  function g(u) {
2277
2279
  let r = new URLSearchParams();
2278
2280
  return Object.entries(u).forEach((y) => {
@@ -2281,9 +2283,9 @@ function En(e) {
2281
2283
  y[1] != null && r.append(y[0], y[1].toString());
2282
2284
  }), r.toString();
2283
2285
  }
2284
- function x(u) {
2285
- let r = K(u.url) ?? void 0, y = K(u.id);
2286
- return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Be(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Be(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
2286
+ function D(u) {
2287
+ let r = Q(u.url) ?? void 0, y = Q(u.id);
2288
+ return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ue(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
2287
2289
  }
2288
2290
  function P(u) {
2289
2291
  var y, I;
@@ -2310,22 +2312,22 @@ function En(e) {
2310
2312
  name: "Unauthorized",
2311
2313
  message: w.statusText
2312
2314
  };
2313
- let M = await w.text();
2314
- throw new Error(M ?? w.statusText ?? "Get error");
2315
+ let L = await w.text();
2316
+ throw new Error(L ?? w.statusText ?? "Get error");
2315
2317
  }
2316
2318
  if (I)
2317
2319
  return await w.text();
2318
2320
  if (y)
2319
2321
  return await w.json();
2320
2322
  throw new Error();
2321
- } catch (M) {
2322
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
2323
+ } catch (L) {
2324
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2323
2325
  if (!r)
2324
2326
  return;
2325
- throw M.code == 401 ? M : new Error(b);
2327
+ throw L.code == 401 ? L : new Error(b);
2326
2328
  }
2327
2329
  }
2328
- async function N(u) {
2330
+ async function M(u) {
2329
2331
  const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2330
2332
  let i = u.finalUrl, E = u.headers;
2331
2333
  if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
@@ -2345,19 +2347,19 @@ function En(e) {
2345
2347
  name: "Unauthorized",
2346
2348
  message: w.statusText
2347
2349
  };
2348
- let M = await w.text();
2349
- throw new Error(M ?? w.statusText ?? "Get all error");
2350
+ let L = await w.text();
2351
+ throw new Error(L ?? w.statusText ?? "Get all error");
2350
2352
  }
2351
2353
  if (I)
2352
2354
  return await w.text();
2353
2355
  if (y)
2354
2356
  return await w.json();
2355
2357
  throw new Error();
2356
- } catch (M) {
2357
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
2358
+ } catch (L) {
2359
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2358
2360
  if (!r)
2359
2361
  return;
2360
- throw M.code == 401 ? M : new Error(b);
2362
+ throw L.code == 401 ? L : new Error(b);
2361
2363
  }
2362
2364
  }
2363
2365
  async function $(u) {
@@ -2381,19 +2383,19 @@ function En(e) {
2381
2383
  name: "Unauthorized",
2382
2384
  message: w.statusText
2383
2385
  };
2384
- let M = await w.text();
2385
- throw new Error(M ?? w.statusText ?? "Post error!");
2386
+ let L = await w.text();
2387
+ throw new Error(L ?? w.statusText ?? "Post error!");
2386
2388
  }
2387
2389
  if (I)
2388
2390
  return await w.text();
2389
2391
  if (y)
2390
2392
  return await w.json();
2391
2393
  throw new Error();
2392
- } catch (M) {
2394
+ } catch (L) {
2393
2395
  if (w.status == 200 || !r)
2394
2396
  return;
2395
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
2396
- throw M.code == 401 ? M : new Error(b);
2397
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2398
+ throw L.code == 401 ? L : new Error(b);
2397
2399
  }
2398
2400
  }
2399
2401
  async function d(u) {
@@ -2417,19 +2419,19 @@ function En(e) {
2417
2419
  name: "Unauthorized",
2418
2420
  message: w.statusText
2419
2421
  };
2420
- let M = await w.text();
2421
- throw new Error(M ?? w.statusText ?? "Patch error!");
2422
+ let L = await w.text();
2423
+ throw new Error(L ?? w.statusText ?? "Patch error!");
2422
2424
  }
2423
2425
  if (I)
2424
2426
  return await w.text();
2425
2427
  if (y)
2426
2428
  return await w.json();
2427
2429
  throw new Error();
2428
- } catch (M) {
2430
+ } catch (L) {
2429
2431
  if (w.status == 200 || !r)
2430
2432
  return;
2431
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
2432
- throw M.code == 401 ? M : new Error(b);
2433
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2434
+ throw L.code == 401 ? L : new Error(b);
2433
2435
  }
2434
2436
  }
2435
2437
  async function h(u) {
@@ -2466,13 +2468,13 @@ function En(e) {
2466
2468
  buildUrl: S,
2467
2469
  deleteItem: h,
2468
2470
  get: _,
2469
- getAll: N,
2471
+ getAll: M,
2470
2472
  patch: d,
2471
2473
  post: $
2472
2474
  }, Ar;
2473
2475
  }
2474
2476
  function ut(e) {
2475
- const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: x } = en(e);
2477
+ const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: D } = en(e);
2476
2478
  function P(r) {
2477
2479
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
2478
2480
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
@@ -2482,11 +2484,11 @@ function ut(e) {
2482
2484
  const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
2483
2485
  if (i == null)
2484
2486
  return Promise.resolve("No id found in delete action");
2485
- const E = I.findIndex((M) => M.id == i);
2487
+ const E = I.findIndex((L) => L.id == i);
2486
2488
  return E >= 0 && I.splice(E, 1), Promise.resolve(void 0);
2487
2489
  }), g(async () => {
2488
2490
  let i;
2489
- r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), x(i);
2491
+ r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), D(i);
2490
2492
  }, {
2491
2493
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2492
2494
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2516,7 +2518,7 @@ function ut(e) {
2516
2518
  throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
2517
2519
  });
2518
2520
  }
2519
- function N(r) {
2521
+ function M(r) {
2520
2522
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
2521
2523
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2522
2524
  const I = (e == null ? void 0 : e.items) ?? [];
@@ -2537,7 +2539,7 @@ function ut(e) {
2537
2539
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2538
2540
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
2539
2541
  let I, i;
2540
- return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), x(I), i;
2542
+ return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), D(I), i;
2541
2543
  }, {
2542
2544
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2543
2545
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2563,7 +2565,7 @@ function ut(e) {
2563
2565
  return;
2564
2566
  if (r.onCanSaveAsync != null) {
2565
2567
  let w = await r.onCanSaveAsync(i);
2566
- if (x(w), w != null)
2568
+ if (D(w), w != null)
2567
2569
  return;
2568
2570
  }
2569
2571
  let E;
@@ -2591,10 +2593,10 @@ function ut(e) {
2591
2593
  clearErrors: S,
2592
2594
  deleteItem: P,
2593
2595
  doAction: g,
2594
- getAllItems: N,
2596
+ getAllItems: M,
2595
2597
  getItem: _,
2596
2598
  isLoading: s,
2597
- logError: x,
2599
+ logError: D,
2598
2600
  restoreItem: $,
2599
2601
  saveItem: d
2600
2602
  };
@@ -2612,177 +2614,177 @@ function Dn(e) {
2612
2614
  l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
2613
2615
  }
2614
2616
  const s = Zt("auth-credentials", {});
2615
- function g(D) {
2616
- if (D == null)
2617
+ function g(x) {
2618
+ if (x == null)
2617
2619
  return !0;
2618
- var L = e.getAuthItem != null ? e.getAuthItem(D) : null;
2619
- if (L == null)
2620
+ var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
2621
+ if (N == null)
2620
2622
  return !1;
2621
- if (L.requiresAuth === !1)
2623
+ if (N.requiresAuth === !1)
2622
2624
  return !0;
2623
- const f = K(s);
2624
- if (f.isSuspended && L.ignoreSuspension !== !0)
2625
+ const f = Q(s);
2626
+ if (f.isSuspended && N.ignoreSuspension !== !0)
2625
2627
  return !1;
2626
2628
  if (f.isGlobalAdmin)
2627
2629
  return !0;
2628
- if (L.permissions != null) {
2629
- for (var A = 0; A < L.permissions.length; A++)
2630
- if (!x(L.permissions[A]))
2630
+ if (N.permissions != null) {
2631
+ for (var A = 0; A < N.permissions.length; A++)
2632
+ if (!D(N.permissions[A]))
2631
2633
  return !1;
2632
2634
  }
2633
2635
  return !0;
2634
2636
  }
2635
- function x(D) {
2636
- const L = K(s);
2637
- if (L.userPermissions != null)
2638
- for (var f = 0; f < L.userPermissions.length; f++) {
2639
- var A = L.userPermissions[f].split(".");
2640
- if (L.userPermissions[f] == "everything.edit" || D == A[0] && A.length > 1 && A[1] == "edit")
2637
+ function D(x) {
2638
+ const N = Q(s);
2639
+ if (N.userPermissions != null)
2640
+ for (var f = 0; f < N.userPermissions.length; f++) {
2641
+ var A = N.userPermissions[f].split(".");
2642
+ if (N.userPermissions[f] == "everything.edit" || x == A[0] && A.length > 1 && A[1] == "edit")
2641
2643
  return !0;
2642
2644
  }
2643
2645
  return !1;
2644
2646
  }
2645
- function P(D) {
2646
- if (D == null)
2647
+ function P(x) {
2648
+ if (x == null)
2647
2649
  return !0;
2648
- var L = e.getAuthItem != null ? e.getAuthItem(D) : null;
2649
- if (L == null)
2650
+ var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
2651
+ if (N == null)
2650
2652
  return !1;
2651
- if (L.requiresAuth === !1)
2653
+ if (N.requiresAuth === !1)
2652
2654
  return !0;
2653
- const f = K(s);
2654
- if (f.isSuspended && L.ignoreSuspension !== !0)
2655
+ const f = Q(s);
2656
+ if (f.isSuspended && N.ignoreSuspension !== !0)
2655
2657
  return !1;
2656
2658
  if (f.isGlobalAdmin)
2657
2659
  return !0;
2658
- if (L.permissions != null) {
2659
- for (var A = 0; A < L.permissions.length; A++)
2660
- if (!_(L.permissions[A]))
2660
+ if (N.permissions != null) {
2661
+ for (var A = 0; A < N.permissions.length; A++)
2662
+ if (!_(N.permissions[A]))
2661
2663
  return !1;
2662
2664
  }
2663
2665
  return !0;
2664
2666
  }
2665
- function _(D) {
2666
- const L = K(s);
2667
- if (L.userPermissions != null)
2668
- for (var f = 0; f < L.userPermissions.length; f++) {
2669
- var A = L.userPermissions[f].split(".");
2670
- if (D == A[0] || D == "everything" || L.userPermissions[f] == "everything.view" || L.userPermissions[f] == "everything.edit")
2667
+ function _(x) {
2668
+ const N = Q(s);
2669
+ if (N.userPermissions != null)
2670
+ for (var f = 0; f < N.userPermissions.length; f++) {
2671
+ var A = N.userPermissions[f].split(".");
2672
+ if (x == A[0] || x == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
2671
2673
  return !0;
2672
2674
  }
2673
2675
  return !1;
2674
2676
  }
2675
- function N(D, L, f) {
2677
+ function M(x, N, f) {
2676
2678
  let A = !0;
2677
- return K(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((Q) => {
2678
- f == "edit" ? x(Q) || (A = !1) : _(Q) || (A = !1);
2679
- }), D != null && D.length > 0 && (D.some((Q) => u(Q)) || (A = !1)), A);
2679
+ return Q(s).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((X) => {
2680
+ f == "edit" ? D(X) || (A = !1) : _(X) || (A = !1);
2681
+ }), x != null && x.length > 0 && (x.some((X) => u(X)) || (A = !1)), A);
2680
2682
  }
2681
- function $(D, L = !1) {
2682
- var f = e.getAuthItem != null ? e.getAuthItem(D) : null;
2683
+ function $(x, N = !1) {
2684
+ var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
2683
2685
  let A = !1;
2684
2686
  if (f == null)
2685
2687
  return !1;
2686
- let J = f.subscriptions ?? [], Q = f.permissions ?? [], O = N(J, Q, "view");
2687
- return O || !L || !_e(f.children) ? O : ((f == null ? void 0 : f.children) != null && f.children.forEach((ce) => {
2688
- $(ce, !0) && (A = !0);
2688
+ let j = f.subscriptions ?? [], X = f.permissions ?? [], re = M(j, X, "view");
2689
+ return re || !N || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
2690
+ $(ue, !0) && (A = !0);
2689
2691
  }), A);
2690
2692
  }
2691
- function d(D) {
2692
- return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L, f) => {
2693
- const A = Be(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
2694
- return L ? `${A}&redirect_path=${L}` : A;
2695
- }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(D, l.value) ?? "" : "";
2693
+ function d(x) {
2694
+ return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, f) => {
2695
+ const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
2696
+ return N ? `${A}&redirect_path=${N}` : A;
2697
+ }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
2696
2698
  }
2697
- function h(D) {
2699
+ function h(x) {
2698
2700
  var f;
2699
- return D == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == D)) == null ? void 0 : f.value) ?? 0;
2701
+ return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == x)) == null ? void 0 : f.value) ?? 0;
2700
2702
  }
2701
- function u(D) {
2702
- const L = K(s);
2703
- if (L.subscriptionCode == null)
2703
+ function u(x) {
2704
+ const N = Q(s);
2705
+ if (N.subscriptionCode == null)
2704
2706
  return !1;
2705
- if (L.subscriptionCode == D)
2707
+ if (N.subscriptionCode == x)
2706
2708
  return !0;
2707
- const f = h(D), A = h(L.subscriptionCode);
2709
+ const f = h(x), A = h(N.subscriptionCode);
2708
2710
  return f <= A;
2709
2711
  }
2710
- function r(D) {
2711
- const f = D.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2712
- atob(f).split("").map(function(J) {
2713
- return "%" + ("00" + J.charCodeAt(0).toString(16)).slice(-2);
2712
+ function r(x) {
2713
+ const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2714
+ atob(f).split("").map(function(j) {
2715
+ return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
2714
2716
  }).join("")
2715
2717
  );
2716
2718
  return JSON.parse(A);
2717
2719
  }
2718
- function y(D, L) {
2719
- s.value = void 0, M(), D != null && L != null && L.currentRoute.value.path != D && L.push({ path: D });
2720
+ function y(x, N) {
2721
+ s.value = void 0, L(), x != null && N != null && N.currentRoute.value.path != x && N.push({ path: x });
2720
2722
  }
2721
- function I(D) {
2723
+ function I(x) {
2722
2724
  var f;
2723
- K(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(D)));
2725
+ Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(x)));
2724
2726
  }
2725
- async function i(D, L) {
2727
+ async function i(x, N) {
2726
2728
  return e.getToken ?? (e.getToken = async () => {
2727
- let f = D, A = L, J = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
2729
+ let f = x, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2728
2730
  if (f == null || A == null)
2729
2731
  throw new Error("Code and State required in OAuth token process");
2730
2732
  if (A != l.value)
2731
2733
  throw new Error("state does not match");
2732
- let O = "";
2733
- e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")), O = e.getTokenUrl(f, `${window.location.origin}/authentication`, J, Q);
2734
- const ce = {};
2735
- ce.grant_type = J, ce.code = f, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
2736
- const W = await Er().post({
2737
- additionalUrl: O,
2738
- data: ce
2734
+ let re = "";
2735
+ e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`, j, X);
2736
+ const ue = {};
2737
+ ue.grant_type = j, ue.code = f, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2738
+ const G = await Er().post({
2739
+ additionalUrl: re,
2740
+ data: ue
2739
2741
  });
2740
- E(W.access_token);
2741
- }), await e.getToken(D, L);
2742
+ E(G.access_token);
2743
+ }), await e.getToken(x, N);
2742
2744
  }
2743
- function E(D) {
2744
- if (D != null && (e.demo == null || !e.demo.isDemoing.value)) {
2745
- const L = r(D);
2746
- w(L, D), e.processTokenPayload != null && e.processTokenPayload(s, L);
2745
+ function E(x) {
2746
+ if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
2747
+ const N = r(x);
2748
+ w(N, x), e.processTokenPayload != null && e.processTokenPayload(s, N);
2747
2749
  }
2748
2750
  }
2749
- function w(D, L) {
2751
+ function w(x, N) {
2750
2752
  var A;
2751
2753
  const f = s.value;
2752
- f.expiresOn = D.ExpiresOn, f.isGlobalAdmin = D.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = D.Permissions, f.subscriptionCode = D.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = L, f.userID = D.UserLoginID, f.userPermissions = ((A = D.Permissions) == null ? void 0 : A.split(",")) ?? [];
2754
+ f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = N, f.userID = x.UserLoginID, f.userPermissions = ((A = x.Permissions) == null ? void 0 : A.split(",")) ?? [];
2753
2755
  }
2754
- function M() {
2755
- var D;
2756
- s.value ?? (s.value = {}), (D = s.value).timeZone ?? (D.timeZone = e.defaultTimeZone ?? hr);
2756
+ function L() {
2757
+ var x;
2758
+ s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
2757
2759
  }
2758
2760
  function b() {
2759
- const D = K(s);
2760
- return D.isLoggedIn && T() && (y(), window.location.href = d()), D.isLoggedIn;
2761
+ const x = Q(s);
2762
+ return x.isLoggedIn && T() && (y(), window.location.href = d()), x.isLoggedIn;
2761
2763
  }
2762
2764
  function T() {
2763
- const D = K(s);
2764
- if (D == null || D.expiresOn == null)
2765
+ const x = Q(s);
2766
+ if (x == null || x.expiresOn == null)
2765
2767
  return !0;
2766
- const L = he.fromFormat(D.expiresOn, t), f = he.utc();
2767
- return L <= f;
2768
+ const N = he.fromFormat(x.expiresOn, t), f = he.utc();
2769
+ return N <= f;
2768
2770
  }
2769
- return M(), Ir = {
2771
+ return L(), Ir = {
2770
2772
  authState: l,
2771
2773
  canEdit: g,
2772
- canEditPermit: x,
2774
+ canEditPermit: D,
2773
2775
  canView: P,
2774
2776
  canViewPermit: _,
2775
2777
  credentials: s,
2776
- doShow: N,
2778
+ doShow: M,
2777
2779
  doShowByNav: $,
2778
2780
  getAuthorizeUrl: d,
2779
2781
  getToken: i,
2780
- isLoggedIn: te(() => s.value.isLoggedIn === !0),
2782
+ isLoggedIn: ee(() => s.value.isLoggedIn === !0),
2781
2783
  login: I,
2782
2784
  logout: y,
2783
2785
  resetAuthState: S,
2784
2786
  setAuth: E,
2785
- timeZone: te(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
2787
+ timeZone: ee(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
2786
2788
  tryLogin: b
2787
2789
  }, Ir;
2788
2790
  }
@@ -2791,62 +2793,62 @@ function xn(e, t, l = {}) {
2791
2793
  preventDefault: S = !1,
2792
2794
  stopPropagation: s = !1,
2793
2795
  axis: g = "both"
2794
- } = l, x = { capture: l.capture ?? !0 };
2795
- let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2796
- function u(M) {
2797
- K(S) && M.preventDefault(), K(s) && M.stopPropagation();
2796
+ } = l, D = { capture: l.capture ?? !0 };
2797
+ let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2798
+ function u(L) {
2799
+ Q(S) && L.preventDefault(), Q(s) && L.stopPropagation();
2798
2800
  }
2799
- function r(M) {
2801
+ function r(L) {
2800
2802
  var f;
2801
- const b = K(e);
2803
+ const b = Q(e);
2802
2804
  if (!b)
2803
2805
  return;
2804
- const T = b.$el, L = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
2805
- N = { x: L.clientX, y: L.clientY }, _ = {
2806
+ const T = b.$el, N = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
2807
+ M = { x: N.clientX, y: N.clientY }, _ = {
2806
2808
  x: T.offsetLeft,
2807
2809
  y: T.offsetTop
2808
2810
  }, P = {
2809
2811
  x: T.offsetLeft,
2810
2812
  y: T.offsetTop
2811
- }, ((f = l.onStart) == null ? void 0 : f.call(l, N, M)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(M));
2813
+ }, ((f = l.onStart) == null ? void 0 : f.call(l, M, L)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(L));
2812
2814
  }
2813
- function y(M) {
2815
+ function y(L) {
2814
2816
  var A;
2815
- if (!N || !K(e))
2817
+ if (!M || !Q(e))
2816
2818
  return;
2817
- const D = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
2818
- let L = D.clientX - N.x, f = D.clientY - N.y;
2819
- (g === "x" || g === "both") && (P.x = _.x + L), (g === "y" || g === "both") && (P.y = _.y + f), (A = l.onMove) == null || A.call(l, P, M), u(M), i(P);
2819
+ const x = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
2820
+ let N = x.clientX - M.x, f = x.clientY - M.y;
2821
+ (g === "x" || g === "both") && (P.x = _.x + N), (g === "y" || g === "both") && (P.y = _.y + f), (A = l.onMove) == null || A.call(l, P, L), u(L), i(P);
2820
2822
  }
2821
- function I(M) {
2823
+ function I(L) {
2822
2824
  var b;
2823
2825
  document.documentElement.style.cursor = "", d.forEach((T) => {
2824
2826
  T();
2825
- }), d.length = 0, (b = l.onEnd) == null || b.call(l, P, M), u(M);
2827
+ }), d.length = 0, (b = l.onEnd) == null || b.call(l, P, L), u(L);
2826
2828
  }
2827
- function i(M) {
2828
- const b = K(e);
2829
+ function i(L) {
2830
+ const b = Q(e);
2829
2831
  if (!b)
2830
2832
  return;
2831
2833
  const T = b.$el;
2832
- T.style.left = `${M.x}px`, T.style.top = `${M.y}px`;
2834
+ T.style.left = `${L.x}px`, T.style.top = `${L.y}px`;
2833
2835
  }
2834
2836
  function E() {
2835
- if (K(h))
2837
+ if (Q(h))
2836
2838
  return;
2837
- const M = K(t);
2838
- if (!M)
2839
+ const L = Q(t);
2840
+ if (!L)
2839
2841
  return;
2840
- const b = M.$el;
2841
- b.style.cursor = "move", $.push(me(b, "mousedown", r, x)), $.push(me(b, "touchstart", r, x)), h.value = !0;
2842
+ const b = L.$el;
2843
+ b.style.cursor = "move", $.push(me(b, "mousedown", r, D)), $.push(me(b, "touchstart", r, D)), h.value = !0;
2842
2844
  }
2843
2845
  function w() {
2844
- if (!K(h))
2846
+ if (!Q(h))
2845
2847
  return;
2846
- const M = K(t);
2847
- if (!M)
2848
+ const L = Q(t);
2849
+ if (!L)
2848
2850
  return;
2849
- const b = M.$el;
2851
+ const b = L.$el;
2850
2852
  b.style.cursor = "", $.forEach((T) => {
2851
2853
  T();
2852
2854
  }), $.length = 0, h.value = !1;
@@ -2859,168 +2861,168 @@ function xn(e, t, l = {}) {
2859
2861
  }
2860
2862
  const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
2861
2863
  function _n(e, t = {}) {
2862
- let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, N = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2864
+ let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, D = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2863
2865
  const u = z(!1);
2864
2866
  let r = [], y = [];
2865
2867
  const I = z(!1), i = z({ x: 0, y: 0 });
2866
2868
  let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
2867
- function M(W) {
2868
- Ae(N) && W.preventDefault(), Ae($) && W.stopPropagation();
2869
+ function L(G) {
2870
+ Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
2869
2871
  }
2870
- function b(W, Y) {
2871
- h = Y.map(D), h.forEach((H) => W.$el.appendChild(H));
2872
+ function b(G, Y) {
2873
+ h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
2872
2874
  }
2873
- function T(W) {
2874
- h.forEach((Y) => W.$el.removeChild(Y));
2875
+ function T(G) {
2876
+ h.forEach((Y) => G.$el.removeChild(Y));
2875
2877
  }
2876
- function D(W) {
2877
- const Y = S + "px", H = -S / 2 + "px", ae = s + 1, G = document.createElement("div");
2878
- return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? s : ae).toString(), G.style.cursor = J(W), W.includes("t") && (G.style.top = H, G.style.height = Y, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = H, G.style.height = Y, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = H, G.style.width = Y, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = H, G.style.width = Y, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
2878
+ function x(G) {
2879
+ const Y = S + "px", H = -S / 2 + "px", ie = s + 1, Z = document.createElement("div");
2880
+ return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? s : ie).toString(), Z.style.cursor = j(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
2879
2881
  }
2880
- function L(W) {
2882
+ function N(G) {
2881
2883
  var ne;
2882
- if (!h.some((se) => se == W.target))
2884
+ if (!h.some((ce) => ce == G.target))
2883
2885
  return;
2884
- const Y = Ae(e);
2886
+ const Y = Ee(e);
2885
2887
  if (!Y)
2886
2888
  return;
2887
- const H = Y.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
2888
- if (i.value.x = G.clientX, i.value.y = G.clientY, E = {
2889
+ const H = Y.$el, Z = G.type === "touchstart" && G.touches.length > 0 ? G.touches[0] : G;
2890
+ if (i.value.x = Z.clientX, i.value.y = Z.clientY, E = {
2889
2891
  left: H.offsetLeft,
2890
2892
  top: H.offsetTop,
2891
2893
  height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
2892
2894
  width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
2893
- }, w = Lr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, W)) === !1)
2895
+ }, w = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
2894
2896
  return;
2895
- let X = W.target;
2896
- document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(me("mousemove", f)), y.push(me("mouseup", A)), y.push(me("touchmove", f)), y.push(me("touchend", A)), M(W);
2897
+ let W = G.target;
2898
+ document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, y.push(me("mousemove", f)), y.push(me("mouseup", A)), y.push(me("touchmove", f)), y.push(me("touchend", A)), L(G);
2897
2899
  }
2898
- function f(W) {
2899
- const Y = Ae(e);
2900
+ function f(G) {
2901
+ const Y = Ee(e);
2900
2902
  if (!Y)
2901
2903
  return;
2902
- const H = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
2903
- let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
2904
- const se = Ae(E);
2904
+ const H = Y.$el, Z = G.type === "touchmove" && G.touches.length > 0 ? G.touches[0] : G;
2905
+ let W = Z.clientX - i.value.x, ne = Z.clientY - i.value.y;
2906
+ const ce = Ee(E);
2905
2907
  if (d.includes("t")) {
2906
- const fe = Math.min(_, Math.max(P, (se.height ?? 0) - ne));
2907
- w.height = fe, w.top = (se.top ?? 0) + ne;
2908
+ const se = Math.min(_, Math.max(P, (ce.height ?? 0) - ne));
2909
+ w.height = se, w.top = (ce.top ?? 0) + ne;
2908
2910
  }
2909
2911
  if (d.includes("b")) {
2910
- const fe = Math.min(_, Math.max(P, (se.height ?? 0) + ne));
2911
- w.height = fe;
2912
+ const se = Math.min(_, Math.max(P, (ce.height ?? 0) + ne));
2913
+ w.height = se;
2912
2914
  }
2913
2915
  if (d.includes("l")) {
2914
- const fe = Math.min(x, Math.max(g, (se.width ?? 0) - X));
2915
- w.width = fe, w.left = (se.left ?? 0) + X;
2916
+ const se = Math.min(D, Math.max(g, (ce.width ?? 0) - W));
2917
+ w.width = se, w.left = (ce.left ?? 0) + W;
2916
2918
  }
2917
2919
  if (d.includes("r")) {
2918
- const fe = Math.min(x, Math.max(g, (se.width ?? 0) + X));
2919
- w.width = fe;
2920
+ const se = Math.min(D, Math.max(g, (ce.width ?? 0) + W));
2921
+ w.width = se;
2920
2922
  }
2921
- H.dispatchEvent(new CustomEvent("resize")), M(W), O(w);
2923
+ H.dispatchEvent(new CustomEvent("resize")), L(G), re(w);
2922
2924
  }
2923
2925
  function A() {
2924
- document.documentElement.style.cursor = "", d = null, y.forEach((W) => {
2925
- W();
2926
+ document.documentElement.style.cursor = "", d = null, y.forEach((G) => {
2927
+ G();
2926
2928
  }), y.length = 0;
2927
2929
  }
2928
- function J(W) {
2930
+ function j(G) {
2929
2931
  const Y = {
2930
2932
  t: "n",
2931
2933
  r: "e",
2932
2934
  b: "s",
2933
2935
  l: "w"
2934
2936
  };
2935
- return W.split("").map((H) => Y[H]).join("") + "-resize";
2937
+ return G.split("").map((H) => Y[H]).join("") + "-resize";
2936
2938
  }
2937
- function Q(W) {
2938
- const Y = Ae(e);
2939
+ function X(G) {
2940
+ const Y = Ee(e);
2939
2941
  if (!Y)
2940
2942
  return;
2941
2943
  const H = Y.$el;
2942
- if (console.log(l), l !== "page" && W == "page") {
2943
- const ae = Jt(H), G = Ae(ae) ?? null;
2944
- let X = 0;
2945
- if (G != null) {
2946
- const ne = window.getComputedStyle(G);
2947
- X = parseInt(ne.getPropertyValue("width")) - G.offsetLeft;
2944
+ if (console.log(l), l !== "page" && G == "page") {
2945
+ const ie = Jt(H), Z = Ee(ie) ?? null;
2946
+ let W = 0;
2947
+ if (Z != null) {
2948
+ const ne = window.getComputedStyle(Z);
2949
+ W = parseInt(ne.getPropertyValue("width")) - Z.offsetLeft;
2948
2950
  }
2949
- H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", H.offsetHeight, u.value = !0, O({
2951
+ H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", H.offsetHeight, u.value = !0, re({
2950
2952
  height: void 0,
2951
- width: X,
2953
+ width: W,
2952
2954
  top: 0,
2953
2955
  left: 0,
2954
2956
  position: void 0
2955
2957
  }), me(H, "transitionend", () => {
2956
2958
  H.style.width = "auto", H.style.top = "", H.style.left = "", H.style.position = "", H.style.transition = "", u.value = !1;
2957
2959
  }, { once: !0 });
2958
- } else if ((l == "page" || Y.$el.style.position !== "absolute") && W !== "page") {
2960
+ } else if ((l == "page" || Y.$el.style.position !== "absolute") && G !== "page") {
2959
2961
  H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0, E = {
2960
2962
  height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
2961
2963
  width: parseInt(window.getComputedStyle(H).getPropertyValue("width")),
2962
2964
  top: H.offsetTop,
2963
2965
  left: H.offsetLeft,
2964
2966
  position: "absolute"
2965
- }, O(E), H.offsetHeight;
2966
- const ae = E;
2967
- W == "freestyle" ? w = {
2968
- height: ae.height,
2969
- width: (ae.width ?? 100) / 2,
2970
- top: (ae.top ?? 0) + 2,
2971
- left: (ae.left ?? 0) + 2,
2967
+ }, re(E), H.offsetHeight;
2968
+ const ie = E;
2969
+ G == "freestyle" ? w = {
2970
+ height: ie.height,
2971
+ width: (ie.width ?? 100) / 2,
2972
+ top: (ie.top ?? 0) + 2,
2973
+ left: (ie.left ?? 0) + 2,
2972
2974
  position: "absolute"
2973
- } : W == "blade" && (w = {
2974
- height: ae.height,
2975
- width: (ae.width ?? 100) / 2,
2976
- top: (ae.top ?? 0) + 2,
2977
- left: (ae.left ?? 0) + 2,
2975
+ } : G == "blade" && (w = {
2976
+ height: ie.height,
2977
+ width: (ie.width ?? 100) / 2,
2978
+ top: (ie.top ?? 0) + 2,
2979
+ left: (ie.left ?? 0) + 2,
2978
2980
  position: "absolute"
2979
- }), O(w), me(H, "transitionend", () => {
2981
+ }), re(w), me(H, "transitionend", () => {
2980
2982
  H.style.transition = "", u.value = !1;
2981
2983
  }, { once: !0 });
2982
2984
  }
2983
2985
  }
2984
- function O(W) {
2985
- const Y = Ae(e);
2986
+ function re(G) {
2987
+ const Y = Ee(e);
2986
2988
  if (!Y)
2987
2989
  return;
2988
2990
  const H = Y.$el;
2989
- W.top ? H.style.top = `${W.top}px` : H.style.top = void 0, W.left ? H.style.left = `${W.left}px` : H.style.left = void 0, W.height ? H.style.height = `${W.height}px` : H.style.height = void 0, W.width ? H.style.width = `${W.width}px` : H.style.width = void 0, W.position ? H.style.position = `${W.position}` : H.style.position = void 0, console.log(H.style.position);
2991
+ G.top ? H.style.top = `${G.top}px` : H.style.top = void 0, G.left ? H.style.left = `${G.left}px` : H.style.left = void 0, G.height ? H.style.height = `${G.height}px` : H.style.height = void 0, G.width ? H.style.width = `${G.width}px` : H.style.width = void 0, G.position ? H.style.position = `${G.position}` : H.style.position = void 0, console.log(H.style.position);
2990
2992
  }
2991
- function ce(W, Y) {
2993
+ function ue(G, Y) {
2992
2994
  if (I.value)
2993
2995
  return;
2994
- const H = Ae(e);
2995
- H && (b(H, W ?? Tn), Q(Y), r.push(me(H.$el, "mousedown", L)), r.push(me(H.$el, "touchstart", L)), I.value = !0, l = Y);
2996
+ const H = Ee(e);
2997
+ H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), I.value = !0, l = Y);
2996
2998
  }
2997
- function we(W) {
2999
+ function be(G) {
2998
3000
  if (!I.value)
2999
3001
  return;
3000
- const Y = Ae(e);
3001
- Y && (T(Y), Q(W), r.forEach((H) => {
3002
+ const Y = Ee(e);
3003
+ Y && (T(Y), X(G), r.forEach((H) => {
3002
3004
  H();
3003
3005
  }), r.length = 0, I.value = !1);
3004
3006
  }
3005
3007
  return {
3006
3008
  resizingIsOn: I,
3007
- turnResizingOn: ce,
3008
- turnResizingOff: we
3009
+ turnResizingOn: ue,
3010
+ turnResizingOff: be
3009
3011
  };
3010
3012
  }
3011
3013
  function Cn(e) {
3012
- const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: _ } = _n(t), { turnDraggableOff: N, turnDraggableOn: $ } = xn(t, l);
3014
+ const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), D = z({}), { turnResizingOff: P, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
3013
3015
  jt(t, (h) => {
3014
3016
  const u = h[0], { width: r } = u.contentRect;
3015
3017
  S.value = r < s;
3016
3018
  });
3017
3019
  function d(h) {
3018
- N(), h == "page" ? P(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (P(), _(void 0, h), $()) : h == "inline" && P();
3020
+ M(), h == "page" ? P(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (P(), _(void 0, h), $()) : h == "inline" && P();
3019
3021
  }
3020
3022
  return d(g.value), Te(g, (h) => d(h)), {
3021
3023
  isMobile: S,
3022
3024
  variant: g,
3023
- bladeData: x
3025
+ bladeData: D
3024
3026
  };
3025
3027
  }
3026
3028
  const mr = {
@@ -3090,7 +3092,7 @@ function Pn(e) {
3090
3092
  }
3091
3093
  }));
3092
3094
  }
3093
- function x(d) {
3095
+ function D(d) {
3094
3096
  var h;
3095
3097
  if (l != null) {
3096
3098
  const u = l.themes.value.dark, r = l.themes.value.light;
@@ -3103,7 +3105,7 @@ function Pn(e) {
3103
3105
  function _() {
3104
3106
  t.value.drawerStick = !t.value.drawerStick;
3105
3107
  }
3106
- function N() {
3108
+ function M() {
3107
3109
  t.value.theme = t.value.theme == "dark" ? "light" : "dark", l != null && (l.global.name.value = t.value.theme);
3108
3110
  }
3109
3111
  function $() {
@@ -3118,17 +3120,17 @@ function Pn(e) {
3118
3120
  }), Dr = {
3119
3121
  state: t,
3120
3122
  resetCosmetics: g,
3121
- setTemporaryColor: x,
3123
+ setTemporaryColor: D,
3122
3124
  toggleDrawer: P,
3123
3125
  toggleDrawerStick: _,
3124
- toggleLightDark: N,
3126
+ toggleLightDark: M,
3125
3127
  undoTemporaryColor: $
3126
3128
  }, Dr;
3127
3129
  }
3128
3130
  const wa = {
3129
3131
  canExportCSV: !1
3130
3132
  };
3131
- function Nn() {
3133
+ function Mn() {
3132
3134
  function e(t) {
3133
3135
  const {
3134
3136
  items: l,
@@ -3138,29 +3140,29 @@ function Nn() {
3138
3140
  } = t;
3139
3141
  if (!_e(l))
3140
3142
  return;
3141
- let x = [];
3142
- S != null ? x = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
3143
+ let D = [];
3144
+ S != null ? D = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
3143
3145
  header: I.title ?? I.value ?? "",
3144
3146
  itemText: I.itemText,
3145
3147
  value: I.value
3146
- })) : x = Object.keys(l[0]).map((I) => ({ header: tn(I) ?? "", value: I })), x = x.filter((I) => I.header.length > 0);
3148
+ })) : D = Object.keys(l[0]).map((I) => ({ header: tn(I) ?? "", value: I })), D = D.filter((I) => I.header.length > 0);
3147
3149
  var P = [];
3148
3150
  for (let I = 0; I < l.length; I++) {
3149
3151
  const i = l[I];
3150
- var _ = {}, N = [];
3151
- for (let E = 0; E < x.length; E++) {
3152
- const w = x[E];
3152
+ var _ = {}, M = [];
3153
+ for (let E = 0; E < D.length; E++) {
3154
+ const w = D[E];
3153
3155
  var $ = null;
3154
3156
  typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? _[w.header] = Sr($, w.itemText) : _[w.header] = $;
3155
3157
  }
3156
- P.push(_), _e(N) && N.forEach((E) => {
3158
+ P.push(_), _e(M) && M.forEach((E) => {
3157
3159
  P.push(E);
3158
- }), N = [];
3160
+ }), M = [];
3159
3161
  }
3160
3162
  var d = [];
3161
- if (d.push(x.map((I) => I.header).toString()), P.forEach((I) => {
3163
+ if (d.push(D.map((I) => I.header).toString()), P.forEach((I) => {
3162
3164
  let i = [];
3163
- x.forEach(function(E) {
3165
+ D.forEach(function(E) {
3164
3166
  var w = I[E.header];
3165
3167
  i.push(w ?? "");
3166
3168
  }), d.push(i.join(","));
@@ -3185,7 +3187,7 @@ let xr;
3185
3187
  function ba() {
3186
3188
  return xr;
3187
3189
  }
3188
- function Mn(e) {
3190
+ function Ln(e) {
3189
3191
  const t = e.getUTC ?? he.utc;
3190
3192
  function l() {
3191
3193
  return s().startOf("day").toUTC().toString() ?? "";
@@ -3193,28 +3195,28 @@ function Mn(e) {
3193
3195
  function S() {
3194
3196
  return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3195
3197
  }
3196
- function s(_, N) {
3197
- return _ == null ? t().setZone(e.getTimeZone()) : N ? he.fromFormat(_, N, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3198
+ function s(_, M) {
3199
+ return _ == null ? t().setZone(e.getTimeZone()) : M ? he.fromFormat(_, M, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3198
3200
  }
3199
- function g(_, N, $) {
3201
+ function g(_, M, $) {
3200
3202
  if (_ == null) {
3201
3203
  const h = t().setZone(e.getTimeZone());
3202
- return N ? h.toFormat(N) : h.toString();
3204
+ return M ? h.toFormat(M) : h.toString();
3203
3205
  }
3204
3206
  if (_ == "Invalid DateTime")
3205
3207
  return "";
3206
3208
  const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3207
- return N ? d.toFormat(N) : d == null ? void 0 : d.toString();
3209
+ return M ? d.toFormat(M) : d == null ? void 0 : d.toString();
3208
3210
  }
3209
- function x(_, N) {
3210
- return _ == null ? t() : N ? he.fromFormat(_, N) : he.fromISO(_);
3211
+ function D(_, M) {
3212
+ return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
3211
3213
  }
3212
- function P(_, N, $) {
3214
+ function P(_, M, $) {
3213
3215
  if (_ == null)
3214
- return N ? t().toFormat(N) : t().toString();
3216
+ return M ? t().toFormat(M) : t().toString();
3215
3217
  {
3216
3218
  const d = $ ? he.fromFormat(_, $) : he.fromISO(_);
3217
- return N ? d.toFormat(N) : d.toString();
3219
+ return M ? d.toFormat(M) : d.toString();
3218
3220
  }
3219
3221
  }
3220
3222
  return xr = {
@@ -3222,7 +3224,7 @@ function Mn(e) {
3222
3224
  getTomorrow: S,
3223
3225
  tzDate: s,
3224
3226
  tzString: g,
3225
- utcDate: x,
3227
+ utcDate: D,
3226
3228
  utcString: P
3227
3229
  }, xr;
3228
3230
  }
@@ -3230,7 +3232,7 @@ let Tr;
3230
3232
  function Sa() {
3231
3233
  return Tr;
3232
3234
  }
3233
- function Ln(e) {
3235
+ function Nn(e) {
3234
3236
  const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
3235
3237
  function S() {
3236
3238
  t.value = !0;
@@ -3246,7 +3248,7 @@ function Ln(e) {
3246
3248
  }
3247
3249
  return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
3248
3250
  }
3249
- function x(d) {
3251
+ function D(d) {
3250
3252
  var r;
3251
3253
  if (l == null)
3252
3254
  return Promise.resolve("no demo data available for this api");
@@ -3290,7 +3292,7 @@ function Ln(e) {
3290
3292
  });
3291
3293
  });
3292
3294
  }
3293
- function N(d) {
3295
+ function M(d) {
3294
3296
  var r, y;
3295
3297
  if (l == null)
3296
3298
  throw new Error("no demo data available for this api");
@@ -3331,10 +3333,10 @@ function Ln(e) {
3331
3333
  isDemoing: t,
3332
3334
  startDemo: S,
3333
3335
  data: l,
3334
- deleteItem: x,
3336
+ deleteItem: D,
3335
3337
  get: P,
3336
3338
  getAll: _,
3337
- post: N,
3339
+ post: M,
3338
3340
  patch: $
3339
3341
  }, Tr;
3340
3342
  }
@@ -3347,8 +3349,8 @@ function Aa(e) {
3347
3349
  document.title = S.meta.title;
3348
3350
  else {
3349
3351
  const g = Rn.VITE_NODE_ENV;
3350
- let x = "";
3351
- g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
3352
+ let D = "";
3353
+ g == "development" ? D = "BWeb Dev" : g == "staging" ? D = "BlitzIt Sandpit" : D = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (D = `Training: ${D}`), document.title = D;
3352
3354
  }
3353
3355
  }
3354
3356
  return {
@@ -3360,8 +3362,8 @@ function Ea() {
3360
3362
  return _r;
3361
3363
  }
3362
3364
  function Un(e) {
3363
- function t(f, A, J) {
3364
- return f ? an(f) ? J ?? "" : e.dates.tzString(f, A) : J ?? f ?? "";
3365
+ function t(f, A, j) {
3366
+ return f ? an(f) ? j ?? "" : e.dates.tzString(f, A) : j ?? f ?? "";
3365
3367
  }
3366
3368
  function l(f) {
3367
3369
  if (!f)
@@ -3387,7 +3389,7 @@ function Un(e) {
3387
3389
  function g(f, A) {
3388
3390
  return t(f, "d LLL", A);
3389
3391
  }
3390
- function x(f, A) {
3392
+ function D(f, A) {
3391
3393
  return t(f, "ccc", A);
3392
3394
  }
3393
3395
  function P(f, A) {
@@ -3396,7 +3398,7 @@ function Un(e) {
3396
3398
  function _(f, A) {
3397
3399
  return t(f, "ccc dd LLL @ hh:mm a", A);
3398
3400
  }
3399
- function N(f) {
3401
+ function M(f) {
3400
3402
  return new Intl.NumberFormat().format(f);
3401
3403
  }
3402
3404
  function $(f) {
@@ -3441,7 +3443,7 @@ function Un(e) {
3441
3443
  function w(f, A) {
3442
3444
  return t(f, "dd LLL yyyy", A);
3443
3445
  }
3444
- function M(f, A) {
3446
+ function L(f, A) {
3445
3447
  return t(f, "dd LLL yyyy hh:mm a", A);
3446
3448
  }
3447
3449
  function b(f, A) {
@@ -3450,15 +3452,15 @@ function Un(e) {
3450
3452
  function T(f) {
3451
3453
  return f == null ? "" : typeof f == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: f }).toFormat("T") : typeof f == "string" ? e.dates.tzString(f, "t") : "unknown";
3452
3454
  }
3453
- const D = {
3455
+ const x = {
3454
3456
  toCompanyNameAndLocationLine: l,
3455
3457
  toCurrency: S,
3456
3458
  toDayDate: s,
3457
3459
  toDayMonth: g,
3458
- toDayOfWeek: x,
3460
+ toDayOfWeek: D,
3459
3461
  toDayShortDate: P,
3460
3462
  toDayShortDateAndTime: _,
3461
- toDisplayNumber: N,
3463
+ toDisplayNumber: M,
3462
3464
  toDisplayNumberOver: $,
3463
3465
  toDisplayNumberSigned: d,
3464
3466
  toFormat: h,
@@ -3469,199 +3471,203 @@ function Un(e) {
3469
3471
  toPercent: i,
3470
3472
  toPrettyCSV: E,
3471
3473
  toShortDate: w,
3472
- toShortDateAndTime: M,
3474
+ toShortDateAndTime: L,
3473
3475
  toTime: b,
3474
3476
  toTimeOfDay: T
3475
3477
  };
3476
- function L(f) {
3478
+ function N(f) {
3477
3479
  if (f != null) {
3478
3480
  let A = f;
3479
- if (A != null && D[A] != null)
3480
- return D[A];
3481
+ if (A != null && x[A] != null)
3482
+ return x[A];
3481
3483
  }
3482
3484
  return (A) => A;
3483
3485
  }
3484
3486
  return _r = {
3485
- findFilter: L,
3486
- ...D
3487
+ findFilter: N,
3488
+ ...x
3487
3489
  }, _r;
3488
3490
  }
3489
3491
  function Bn(e, t) {
3490
3492
  const l = z(!1), S = Yt(e);
3491
- let s = g(K(e));
3493
+ let s = g(Q(e));
3492
3494
  (t == null ? void 0 : t.useTracker) !== !1 && Te(S, (P) => {
3493
3495
  l.value = g(P) != s;
3494
3496
  }, { deep: !0 });
3495
3497
  function g(P) {
3496
- const _ = Lr(P);
3497
- return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((N) => {
3498
- delete _[N];
3498
+ const _ = Nr(P);
3499
+ return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((M) => {
3500
+ delete _[M];
3499
3501
  }) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
3500
3502
  t.propsToTrack.some((d) => d == $) || delete _[$];
3501
3503
  })), JSON.stringify(_);
3502
3504
  }
3503
- function x() {
3504
- s = g(K(S)), l.value = !1;
3505
+ function D() {
3506
+ s = g(Q(S)), l.value = !1;
3505
3507
  }
3506
3508
  return {
3507
3509
  asyncItem: S,
3508
3510
  isChanged: l,
3509
- restartTracker: x
3511
+ restartTracker: D
3510
3512
  };
3511
3513
  }
3512
3514
  function Ia(e, t) {
3513
- var ae;
3515
+ var Z;
3514
3516
  const {
3515
3517
  // useBladeSrc = true,
3516
3518
  useRouteSrc: l = !0
3517
- } = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", x = Mr(), P = et(), _ = K(e.proxyQueryKey), N = te(() => {
3518
- var G;
3519
- return K(e.proxyID) ?? (_ != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[_] : void 0);
3519
+ } = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", D = Lr(), P = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
3520
+ var W;
3521
+ return Q(e.proxyID) ?? (_ != null ? (W = P == null ? void 0 : P.query) == null ? void 0 : W[_] : void 0);
3520
3522
  }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
3521
3523
  nav: g,
3522
3524
  onError: e.onError ?? (t == null ? void 0 : t.onError),
3523
- proxyID: N.value,
3525
+ proxyID: M.value,
3524
3526
  store: Le({
3525
3527
  storeMode: S,
3526
3528
  storageMode: s,
3527
3529
  nav: g
3528
3530
  })
3529
- }), E = te(() => e.errorMsg ?? d.value), w = te(() => e.loadingMsg ?? h.value), M = te(() => w.value != null), b = z(e.itemID ?? (l ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), D = Re(!1), L = te(() => {
3531
+ }), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value), L = ee(() => w.value != null), b = z(e.itemID ?? (l ? (Z = P == null ? void 0 : P.params) == null ? void 0 : Z.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Ne(!1), N = ee(() => {
3532
+ let W = e.params != null ? { ...e.params } : {};
3533
+ return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
3534
+ }), f = ee(() => {
3530
3535
  if (T.value == "new")
3531
3536
  return !1;
3532
- const G = K($);
3533
- return e.onCanDelete != null ? e.onCanDelete(G) : (G == null ? void 0 : G.isInactive) !== !0;
3534
- }), f = te(() => {
3537
+ const W = Q($);
3538
+ return e.onCanDelete != null ? e.onCanDelete(W) : (W == null ? void 0 : W.isInactive) !== !0;
3539
+ }), A = ee(() => {
3535
3540
  if (T.value == "new")
3536
3541
  return !1;
3537
- const G = K($);
3538
- return e.onCanEdit != null ? e.onCanEdit(G) : !0;
3539
- }), A = te(() => {
3542
+ const W = Q($);
3543
+ return e.onCanEdit != null ? e.onCanEdit(W) : !0;
3544
+ }), j = ee(() => {
3540
3545
  if (T.value == "new")
3541
3546
  return !1;
3542
- const G = K($);
3543
- return e.onCanRestore != null ? e.onCanRestore(G) : (G == null ? void 0 : G.isInactive) === !0;
3544
- }), J = te(() => {
3545
- const G = K($);
3546
- return e.onCanSave != null ? e.onCanSave(G) : !0;
3547
- }), { isChanged: Q, restartTracker: O } = Bn($, {
3547
+ const W = Q($);
3548
+ return e.onCanRestore != null ? e.onCanRestore(W) : (W == null ? void 0 : W.isInactive) === !0;
3549
+ }), X = ee(() => {
3550
+ const W = Q($);
3551
+ return e.onCanSave != null ? e.onCanSave(W) : !0;
3552
+ }), { isChanged: re, restartTracker: ue } = Bn($, {
3548
3553
  useTracker: e.trackChanges,
3549
3554
  propsToIgnore: e.trackIgnoreProps,
3550
3555
  propsToTrack: e.trackProps
3551
3556
  });
3552
- function ce(G) {
3557
+ function be(W) {
3553
3558
  const {
3554
- additionalUrl: X,
3555
- onDeleteAsync: ne,
3556
- onDeleteSuccessAsync: se = () => (x.back(), Promise.resolve(void 0)),
3557
- proxyID: fe
3559
+ additionalUrl: ne,
3560
+ onDeleteAsync: ce,
3561
+ onDeleteSuccessAsync: se = () => (D.back(), Promise.resolve(void 0)),
3562
+ proxyID: ge
3558
3563
  } = { ...e };
3559
3564
  u({
3560
- additionalUrl: X,
3561
- data: G,
3565
+ additionalUrl: ne,
3566
+ data: W,
3562
3567
  nav: g,
3563
- onDeleteAsync: ne,
3568
+ onDeleteAsync: ce,
3564
3569
  onDeleteSuccessAsync: se,
3565
- proxyID: fe
3570
+ proxyID: ge
3566
3571
  // ...params.getOptions(),
3567
3572
  //...(useBladeSrc ? bladeData.value : {}),
3568
3573
  //requireConfirmation: true
3569
3574
  });
3570
3575
  }
3571
- function we(G) {
3576
+ function G(W) {
3572
3577
  const {
3573
- additionalUrl: X,
3574
- onRestoreAsync: ne,
3578
+ additionalUrl: ne,
3579
+ onRestoreAsync: ce,
3575
3580
  onRestoreSuccessAsync: se,
3576
- proxyID: fe
3581
+ proxyID: ge
3577
3582
  } = { ...e };
3578
3583
  I({
3579
- additionalUrl: X,
3580
- data: G,
3584
+ additionalUrl: ne,
3585
+ data: W,
3581
3586
  nav: g,
3582
- onRestoreAsync: ne,
3587
+ onRestoreAsync: ce,
3583
3588
  onRestoreSuccessAsync: se,
3584
- proxyID: fe
3589
+ proxyID: ge
3585
3590
  // ...params.getOptions(),
3586
3591
  // ...(useBladeSrc ? bladeData.value : {}),
3587
3592
  });
3588
3593
  }
3589
- async function W(G) {
3590
- if (D.value = !1, e.item != null)
3594
+ async function Y(W) {
3595
+ if (x.value = !1, e.item != null)
3591
3596
  $.value = e.item;
3592
3597
  else {
3593
- const X = {
3598
+ const ne = {
3594
3599
  additionalUrl: e.additionalUrl,
3595
3600
  id: b.value,
3596
3601
  nav: g,
3597
- proxyID: N.value,
3598
- params: e.params,
3602
+ proxyID: M.value,
3603
+ params: N.value,
3604
+ //props.params,
3599
3605
  // ...(useBladeSrc ? bladeData.value : {}),
3600
- refresh: (G == null ? void 0 : G.deepRefresh) ?? !1,
3606
+ refresh: (W == null ? void 0 : W.deepRefresh) ?? !1,
3601
3607
  onGetAsync: e.onGetAsync,
3602
3608
  onGetSuccessAsync: e.onGetSuccessAsync
3603
3609
  };
3604
3610
  if (e.isSingle === !0)
3605
- X.id === "new" ? $.value = e.onGetNew ? e.onGetNew() : {} : $.value = await r(X);
3611
+ ne.id === "new" ? $.value = e.onGetNew ? e.onGetNew() : {} : $.value = await r(ne);
3606
3612
  else {
3607
- const ne = await y(X);
3608
- $.value = ne.data;
3613
+ const ce = await y(ne);
3614
+ $.value = ce.data;
3609
3615
  }
3610
3616
  }
3611
- O();
3617
+ ue();
3612
3618
  }
3613
- function Y(G, X) {
3619
+ function H(W, ne) {
3614
3620
  const {
3615
- additionalUrl: ne,
3621
+ additionalUrl: ce,
3616
3622
  onCanSaveAsync: se,
3617
- onGetSaveAsync: fe,
3618
- onSaveAsync: Ee,
3619
- onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), O(), T.value = "view"), Promise.resolve(void 0))
3623
+ onGetSaveAsync: ge,
3624
+ onSaveAsync: Be,
3625
+ onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? D.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
3620
3626
  } = { ...e };
3621
3627
  i({
3622
- additionalUrl: ne,
3623
- data: G,
3628
+ additionalUrl: ce,
3629
+ data: W,
3624
3630
  nav: g,
3625
3631
  onCanSaveAsync: se,
3626
- onGetSaveAsync: fe,
3627
- onSaveAsync: Ee,
3632
+ onGetSaveAsync: ge,
3633
+ onSaveAsync: Be,
3628
3634
  onSaveSuccessAsync: $e,
3629
- proxyID: N.value,
3635
+ proxyID: M.value,
3630
3636
  // ...params.getOptions(),
3631
3637
  // ...(useBladeSrc ? bladeData.value : {}),
3632
3638
  mode: T.value
3633
3639
  });
3634
3640
  }
3635
- function H() {
3636
- const G = K(T);
3637
- !G || G == "view" ? T.value = "edit" : G == "edit" && (T.value = "view");
3641
+ function ie() {
3642
+ const W = Q(T);
3643
+ !W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
3638
3644
  }
3639
- return Te(E, (G) => {
3640
- D.value = G != null;
3645
+ return Te(E, (W) => {
3646
+ x.value = W != null;
3641
3647
  }), Te(() => e.refreshToggle, () => {
3642
- W({ deepRefresh: !0 });
3648
+ Y({ deepRefresh: !0 });
3643
3649
  }), Xr(async () => {
3644
- var G;
3645
- e.eager == !0 && await W({ deepRefresh: ((G = P == null ? void 0 : P.params) == null ? void 0 : G.refresh) == "true" });
3650
+ var W;
3651
+ e.eager == !0 && await Y({ deepRefresh: ((W = P == null ? void 0 : P.params) == null ? void 0 : W.refresh) == "true" });
3646
3652
  }), {
3647
3653
  asyncItem: $,
3648
- deleteItem: ce,
3654
+ deleteItem: be,
3649
3655
  errorMsg: E,
3650
- isChanged: Q,
3651
- isDeletable: L,
3652
- isEditing: te(() => T.value == "new" || T.value == "edit"),
3653
- isEditable: f,
3654
- isLoading: M,
3655
- isNew: te(() => T.value == "new"),
3656
- isRestorable: A,
3657
- isSaveable: J,
3656
+ isChanged: re,
3657
+ isDeletable: f,
3658
+ isEditing: ee(() => T.value == "new" || T.value == "edit"),
3659
+ isEditable: A,
3660
+ isLoading: L,
3661
+ isNew: ee(() => T.value == "new"),
3662
+ isRestorable: j,
3663
+ isSaveable: X,
3658
3664
  loadingMsg: w,
3659
3665
  mode: T,
3660
- refresh: W,
3661
- restoreItem: we,
3662
- saveItem: Y,
3663
- showError: D,
3664
- toggleMode: H
3666
+ refresh: Y,
3667
+ restoreItem: G,
3668
+ saveItem: H,
3669
+ showError: x,
3670
+ toggleMode: ie
3665
3671
  };
3666
3672
  }
3667
3673
  const Vr = z(!0), zr = z(!1), Yr = z(), gr = z(!1);
@@ -3693,7 +3699,7 @@ function $n(e) {
3693
3699
  var u;
3694
3700
  return (u = P(h)) == null ? void 0 : u.displayName;
3695
3701
  }
3696
- function x(h) {
3702
+ function D(h) {
3697
3703
  var u;
3698
3704
  return (u = P(h)) == null ? void 0 : u.icon;
3699
3705
  }
@@ -3708,9 +3714,9 @@ function $n(e) {
3708
3714
  if (u == null)
3709
3715
  return;
3710
3716
  let r = gn(u.microservice ?? "default") ?? "";
3711
- return u.path != null && (r = Be(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
3717
+ return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
3712
3718
  }
3713
- function N(h) {
3719
+ function M(h) {
3714
3720
  const u = P(h);
3715
3721
  if ((u == null ? void 0 : u.singleName) != null)
3716
3722
  return u.singleName;
@@ -3739,70 +3745,70 @@ function $n(e) {
3739
3745
  findArchiveName: S,
3740
3746
  findCacheHours: s,
3741
3747
  findDisplay: g,
3742
- findIcon: x,
3748
+ findIcon: D,
3743
3749
  findItem: P,
3744
3750
  findStoreName: $,
3745
3751
  findPath: _,
3746
- findSingleDisplay: N,
3752
+ findSingleDisplay: M,
3747
3753
  updateNavigationProperties: d
3748
3754
  }, Cr;
3749
3755
  }
3750
3756
  function Da(e, t, l) {
3751
- var qe, He;
3752
- const S = Nn(), s = it(), g = Mr(), x = et(), { bladeData: P } = Cn({}), _ = e.useBladeSrc ?? !0, N = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = s.findItem($)) == null ? void 0 : qe.storeMode), h = e.storageMode ?? ((He = s.findItem($)) == null ? void 0 : He.storageMode), u = K(e.customFilters) ?? [], r = z([]), y = te(() => Kt([
3757
+ var He, Ve;
3758
+ const S = Mn(), s = it(), g = Lr(), D = et(), { bladeData: P } = Cn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = s.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = Q(e.customFilters) ?? [], r = z([]), y = ee(() => Kt([
3753
3759
  ...u.filter((U) => U.name != null).map((U) => U.name),
3754
3760
  ...e.defaultFilters ?? [],
3755
3761
  ...r.value
3756
3762
  ]).value), I = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3757
3763
  let i = z([...I.value]);
3758
- const E = te(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(M());
3759
- function M() {
3760
- var U, j;
3764
+ const E = ee(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(L());
3765
+ function L() {
3766
+ var U, K;
3761
3767
  if (_) {
3762
3768
  const V = (U = P.value) == null ? void 0 : U.page;
3763
3769
  if (V != null)
3764
3770
  return Number.parseInt(V);
3765
3771
  }
3766
- if (N) {
3767
- const V = (j = x == null ? void 0 : x.query) == null ? void 0 : j.page;
3772
+ if (M) {
3773
+ const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.page;
3768
3774
  if (V != null)
3769
3775
  return Number.parseInt(typeof V == "string" ? V : V.toString());
3770
3776
  }
3771
3777
  return 1;
3772
3778
  }
3773
- const b = te(() => {
3774
- var U, j;
3779
+ const b = ee(() => {
3780
+ var U, K;
3775
3781
  if (_) {
3776
3782
  const V = (U = P.value) == null ? void 0 : U.proxyID;
3777
3783
  if (V != null)
3778
3784
  return V;
3779
3785
  }
3780
- if (N) {
3781
- const V = (j = x == null ? void 0 : x.query) == null ? void 0 : j.query;
3786
+ if (M) {
3787
+ const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.query;
3782
3788
  if (V != null)
3783
3789
  return V;
3784
3790
  }
3785
3791
  return e.proxyID;
3786
- }), T = z(D());
3787
- function D() {
3788
- var U, j;
3792
+ }), T = z(x());
3793
+ function x() {
3794
+ var U, K;
3789
3795
  if (_) {
3790
3796
  const V = (U = P.value) == null ? void 0 : U.search;
3791
3797
  if (V != null)
3792
3798
  return V;
3793
3799
  }
3794
- if (N) {
3795
- const V = (j = x == null ? void 0 : x.query) == null ? void 0 : j.search;
3800
+ if (M) {
3801
+ const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.search;
3796
3802
  if (V != null)
3797
3803
  return V;
3798
3804
  }
3799
3805
  }
3800
- const L = z(K(e.startShowingInactive) ?? !1), f = te(() => [
3806
+ const N = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
3801
3807
  ...e.searchProps ?? [],
3802
3808
  ...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
3803
- ]), A = z([]), J = Re([]), Q = z([]);
3804
- let O;
3805
- const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = ut({
3809
+ ]), A = z([]), j = Ne([]), X = z([]);
3810
+ let re;
3811
+ const { actionErrorMsg: ue, actionLoadingMsg: be, deleteItem: G, doAction: Y, getItem: H, getAllItems: ie, restoreItem: Z } = ut({
3806
3812
  nav: $,
3807
3813
  onError: e.onError ?? (l == null ? void 0 : l.onError),
3808
3814
  proxyID: b.value,
@@ -3811,78 +3817,78 @@ function Da(e, t, l) {
3811
3817
  storageMode: h,
3812
3818
  nav: $
3813
3819
  })
3814
- }), X = te(() => e.errorMsg ?? ce.value), ne = te(() => e.loadingMsg ?? we.value), se = te(() => ne.value != null), fe = Re(!1), Ee = Re(e.showSearch ?? !0), $e = z(0), Ce = te(() => {
3815
- let U, j = [];
3816
- I.value.forEach((p) => {
3817
- const de = y.value[p], ge = u.find((De) => De.name == de);
3818
- ge != null ? U = U != null ? `${U}ANDALSO${ge.filterFunction()}` : ge.filterFunction() : j.push(de);
3820
+ }), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Ne(!1), ge = Ne(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
3821
+ let U, K = [];
3822
+ I.value.forEach((O) => {
3823
+ const de = y.value[O], ye = u.find((De) => De.name == de);
3824
+ ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
3819
3825
  });
3820
3826
  const V = {};
3821
- return _e(j) && (V.filterBy = j.toString()), U != null && (V.query = U), V;
3822
- }), rr = te(() => {
3823
- var j;
3827
+ return _e(K) && (V.filterBy = K.toString()), U != null && (V.query = U), V;
3828
+ }), Fe = ee(() => {
3829
+ var K;
3824
3830
  let U = e.params != null ? { ...e.params } : {};
3825
- return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (j = e.selectProps) == null ? void 0 : j.toString()), T.value != null && (U.searchString = T.value), U;
3826
- }), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) => L.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Pe = te(() => Q.value.filter((U) => !U.hide)), ar = te(() => {
3831
+ return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), N.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (K = e.selectProps) == null ? void 0 : K.toString()), T.value != null && (U.searchString = T.value), U;
3832
+ }), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => N.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = ee(() => X.value.filter((U) => !U.hide)), ar = ee(() => {
3827
3833
  let U = new Array();
3828
- return Pe.value.filter((V) => V.sublevel != null).forEach((V) => {
3829
- let p = U.find((de) => de.position == V.sublevel);
3830
- p == null ? U.push({ position: V.sublevel ?? 0, values: [V] }) : p.values.push(V);
3831
- }), U.sort(Ue.firstBy((V) => V.position));
3832
- }), lr = te(() => {
3834
+ return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
3835
+ let O = U.find((de) => de.position == V.sublevel);
3836
+ O == null ? U.push({ position: V.sublevel ?? 0, values: [V] }) : O.values.push(V);
3837
+ }), U.sort(Re.firstBy((V) => V.position));
3838
+ }), lr = ee(() => {
3833
3839
  let U = new Array();
3834
- return Pe.value.filter((V) => V.level != null).forEach((V) => {
3835
- let p = U.find((de) => de.position == V.level);
3836
- p == null ? U.push({ position: V.level ?? 0, values: [V] }) : p.values.push(V);
3837
- }), U.sort(Ue.firstBy((V) => V.position));
3838
- }), ur = te(() => Pe.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
3839
- function be(U) {
3840
+ return Ce.value.filter((V) => V.level != null).forEach((V) => {
3841
+ let O = U.find((de) => de.position == V.level);
3842
+ O == null ? U.push({ position: V.level ?? 0, values: [V] }) : O.values.push(V);
3843
+ }), U.sort(Re.firstBy((V) => V.position));
3844
+ }), ur = ee(() => Ce.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
3845
+ function Se(U) {
3840
3846
  if (e.itemBladeName != null) {
3841
- let j = {
3847
+ let K = {
3842
3848
  bladeName: e.itemBladeName,
3843
3849
  id: "new",
3844
3850
  nav: $
3845
3851
  };
3846
3852
  U == "page" && g.push({
3847
- name: j.bladeName,
3853
+ name: K.bladeName,
3848
3854
  params: { id: "new" }
3849
3855
  });
3850
3856
  }
3851
3857
  }
3852
3858
  function ir(U) {
3853
3859
  const {
3854
- additionalUrl: j,
3860
+ additionalUrl: K,
3855
3861
  onDeleteAsync: V
3856
- } = { ...e }, p = K(U), de = p.id, ge = (De) => {
3862
+ } = { ...e }, O = Q(U), de = O.id, ye = (De) => {
3857
3863
  if (De != null) {
3858
- let Se = A.value.findIndex((oe) => oe.id == De);
3859
- if (Se > -1 && A.value.splice(Se, 1), e.items != null) {
3864
+ let Ae = A.value.findIndex((oe) => oe.id == De);
3865
+ if (Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
3860
3866
  let oe = e.items.findIndex((Me) => Me.id == De);
3861
3867
  oe > -1 && e.items.splice(oe, 1);
3862
3868
  }
3863
3869
  } else {
3864
- let Se = A.value.findIndex((oe) => oe === p);
3865
- if (Se == -1 && (Se = A.value.findIndex((oe) => oe == p)), Se > -1 && A.value.splice(Se, 1), e.items != null) {
3866
- let oe = e.items.findIndex((Me) => Me === p);
3867
- oe == -1 && (oe = e.items.findIndex((Me) => Me == p)), oe > -1 && e.items.splice(oe, 1);
3870
+ let Ae = A.value.findIndex((oe) => oe === O);
3871
+ if (Ae == -1 && (Ae = A.value.findIndex((oe) => oe == O)), Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
3872
+ let oe = e.items.findIndex((Me) => Me === O);
3873
+ oe == -1 && (oe = e.items.findIndex((Me) => Me == O)), oe > -1 && e.items.splice(oe, 1);
3868
3874
  }
3869
3875
  }
3870
3876
  };
3871
- e.localOnly == !0 || $ == null ? ge(de) : W({
3872
- additionalUrl: j,
3873
- data: p,
3877
+ e.localOnly == !0 || $ == null ? ye(de) : G({
3878
+ additionalUrl: K,
3879
+ data: O,
3874
3880
  nav: $,
3875
3881
  onCanDeleteAsync: e.onCanDeleteAsync,
3876
3882
  onDeleteAsync: V,
3877
- onDeleteSuccessAsync: async () => (ge(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(p) : Promise.resolve(void 0)),
3883
+ onDeleteSuccessAsync: async () => (ye(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
3878
3884
  proxyID: b.value,
3879
3885
  // ...(useBladeSrc ? bladeData.value : {}),
3880
3886
  requireConfirmation: !0
3881
3887
  }), t && t("deleted", U);
3882
3888
  }
3883
- function Ze(U) {
3884
- G({
3885
- data: K(U),
3889
+ function Je(U) {
3890
+ Z({
3891
+ data: Q(U),
3886
3892
  additionalUrl: e.additionalUrl,
3887
3893
  nav: $,
3888
3894
  onCanRestoreAsync: e.onCanRestoreAsync,
@@ -3892,33 +3898,33 @@ function Da(e, t, l) {
3892
3898
  // ...(useBladeSrc ? bladeData.value : {})
3893
3899
  });
3894
3900
  }
3895
- function Fe() {
3901
+ function ke() {
3896
3902
  Y(() => {
3897
- S.exportToCSV(Pe.value, J.value);
3903
+ S.exportToCSV(Ce.value, j.value);
3898
3904
  }, { loadingMsg: "Exporting to CSV" });
3899
3905
  }
3900
- function Ne() {
3901
- let U = K(A);
3906
+ function Pe() {
3907
+ let U = Q(A);
3902
3908
  if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
3903
- let j = [...f.value];
3904
- e.itemText && j.push(e.itemText), _e(j) && (U = U.filter((V) => dn(V, T.value, j)));
3909
+ let K = [...f.value];
3910
+ e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
3905
3911
  }
3906
- J.value = U;
3912
+ j.value = U;
3907
3913
  }
3908
- function We() {
3914
+ function qe() {
3909
3915
  const U = (l == null ? void 0 : l.hideActions) ?? e.hideActions;
3910
- e.headers != null && (Q.value = [...e.headers], U || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
3916
+ e.headers != null && (X.value = [...e.headers], U || X.value.push({ title: "Actions", value: "itemActions", align: "end" }));
3911
3917
  }
3912
3918
  async function Ie(U) {
3913
- if (fe.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, T.value = void 0), e.items != null) {
3919
+ if (se.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (ge.value = e.showSearch ?? !1, T.value = void 0), e.items != null) {
3914
3920
  A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
3915
3921
  return;
3916
3922
  }
3917
- const j = {
3923
+ const K = {
3918
3924
  additionalUrl: e.additionalUrl,
3919
3925
  id: e.itemID,
3920
3926
  nav: $,
3921
- params: rr.value,
3927
+ params: Fe.value,
3922
3928
  //params,
3923
3929
  // params: params.getParamOptions(),
3924
3930
  proxyID: b.value,
@@ -3929,125 +3935,125 @@ function Da(e, t, l) {
3929
3935
  onGetSuccessAsync: e.onGetSuccessAsync
3930
3936
  };
3931
3937
  if (e.isSingle === !0)
3932
- j.id === "new" ? A.value = [] : A.value = await H(j);
3938
+ K.id === "new" ? A.value = [] : A.value = await H(K);
3933
3939
  else {
3934
- let V = await ae({
3935
- ...j,
3936
- onGetSuccessAsync: async (p, de) => {
3937
- let ge = p == null ? void 0 : p.data;
3938
- return r.value = (p == null ? void 0 : p.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && p.count && ($e.value = Math.ceil(p.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ge = await e.onGetSuccessAsync(ge, de)), ge;
3940
+ let V = await ie({
3941
+ ...K,
3942
+ onGetSuccessAsync: async (O, de) => {
3943
+ let ye = O == null ? void 0 : O.data;
3944
+ return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && (Be.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ye = await e.onGetSuccessAsync(ye, de)), ye;
3939
3945
  }
3940
3946
  });
3941
3947
  A.value = V, i.value = [...I.value];
3942
3948
  }
3943
- Ne();
3949
+ Pe();
3944
3950
  }
3945
- function Je(U, j) {
3946
- const V = K(U);
3947
- if (V != null && V === O && e.canUnselect ? O = null : O = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
3951
+ function je(U, K) {
3952
+ const V = Q(U);
3953
+ if (V != null && V === re && e.canUnselect ? re = null : re = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
3948
3954
  if (e.onSelectItem != null)
3949
- e.onSelectItem(O);
3955
+ e.onSelectItem(re);
3950
3956
  else {
3951
- let p = {
3957
+ let O = {
3952
3958
  bladeName: e.itemBladeName,
3953
3959
  id: V.id,
3954
3960
  nav: $
3955
3961
  };
3956
- j == "page" && g.push({
3957
- name: p.bladeName,
3958
- params: { id: p.id }
3962
+ K == "page" && g.push({
3963
+ name: O.bladeName,
3964
+ params: { id: O.id }
3959
3965
  });
3960
3966
  }
3961
- t != null && (t("select", O), t("confirm", O));
3967
+ t != null && (t("select", re), t("confirm", re));
3962
3968
  }
3963
- function je() {
3964
- Ee.value ? (Ee.value = e.showSearch ?? !1, T.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
3969
+ function Ke() {
3970
+ ge.value ? (ge.value = e.showSearch ?? !1, T.value = void 0, Ie()) : ge.value = e.showSearch ?? !0;
3965
3971
  }
3966
- return We(), Qt([T], () => {
3967
- Ne();
3968
- }, { debounce: 500, maxWait: 500 }), Te([L, w], async () => {
3972
+ return qe(), Qt([T], () => {
3973
+ Pe();
3974
+ }, { debounce: 500, maxWait: 500 }), Te([N, w], async () => {
3969
3975
  await Ie();
3970
- }), Te([X, () => e.errorMsg], ([U, j]) => {
3971
- fe.value = U != null || j != null;
3976
+ }), Te([W, () => e.errorMsg], ([U, K]) => {
3977
+ se.value = U != null || K != null;
3972
3978
  }), Te(() => e.refreshToggle, () => {
3973
3979
  Ie({ deepRefresh: !0 });
3974
3980
  }), Or([A, () => e.items], () => {
3975
- Ne();
3981
+ Pe();
3976
3982
  }), Xr(async () => {
3977
3983
  var U;
3978
- e.eager == !0 && await Ie({ deepRefresh: ((U = x == null ? void 0 : x.params) == null ? void 0 : U.refresh) == "true" });
3984
+ e.eager == !0 && await Ie({ deepRefresh: ((U = D == null ? void 0 : D.params) == null ? void 0 : U.refresh) == "true" });
3979
3985
  }), {
3980
- add: be,
3986
+ add: Se,
3981
3987
  asyncItems: A,
3982
3988
  currentPage: w,
3983
3989
  deleteItem: ir,
3984
3990
  displayHeaders: ur,
3985
- errorMsg: X,
3986
- exportToCSV: Fe,
3987
- filteredItems: J,
3991
+ errorMsg: W,
3992
+ exportToCSV: ke,
3993
+ filteredItems: j,
3988
3994
  filters: y,
3989
3995
  filtersChanged: E,
3990
- headerOptions: Q,
3996
+ headerOptions: X,
3991
3997
  isDeletable: tr,
3992
- isLoading: se,
3998
+ isLoading: ce,
3993
3999
  isRestorable: nr,
3994
4000
  loadingMsg: ne,
3995
4001
  refresh: Ie,
3996
- restoreItem: Ze,
4002
+ restoreItem: Je,
3997
4003
  searchString: T,
3998
4004
  selectedFilters: I,
3999
- selectItem: Je,
4005
+ selectItem: je,
4000
4006
  // serverFilters,
4001
- showError: fe,
4002
- showInactive: L,
4003
- showSearch: Ee,
4007
+ showError: se,
4008
+ showInactive: N,
4009
+ showSearch: ge,
4004
4010
  subtitleOptions: ar,
4005
- tableHeaders: Pe,
4011
+ tableHeaders: Ce,
4006
4012
  titleOptions: lr,
4007
- toggleSearch: je,
4008
- totalPages: $e
4013
+ toggleSearch: Ke,
4014
+ totalPages: Be
4009
4015
  };
4010
4016
  }
4011
- let Ge;
4017
+ let We;
4012
4018
  function Fn(e) {
4013
4019
  const t = z((e == null ? void 0 : e.default) ?? "Admin"), l = z((e == null ? void 0 : e.groups) ?? []);
4014
- return Ge = {
4020
+ return We = {
4015
4021
  currentGroup: t,
4016
4022
  groupOptions: l,
4017
4023
  useRoutes: e == null ? void 0 : e.useRoutes
4018
- }, Ge;
4024
+ }, We;
4019
4025
  }
4020
4026
  function xa() {
4021
- const e = Mr(), t = it(), l = In();
4027
+ const e = Lr(), t = it(), l = In();
4022
4028
  let S = e.getRoutes();
4023
4029
  return {
4024
- ...Ge,
4025
- sidebarNavItems: te(() => {
4030
+ ...We,
4031
+ sidebarNavItems: ee(() => {
4026
4032
  var g;
4027
- S = S.filter((x) => x.meta != null && x.meta.menuGroup != null);
4033
+ S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
4028
4034
  const s = [];
4029
- return S.forEach((x) => {
4035
+ return S.forEach((D) => {
4030
4036
  var d;
4031
- const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup), _ = t.findItem(x.meta.nav), N = x.meta;
4032
- let $ = s.find((h) => h.displayName == N.menuGroup);
4037
+ const P = We.groupOptions.value.find((h) => h.displayName == D.meta.menuGroup), _ = t.findItem(D.meta.nav), M = D.meta;
4038
+ let $ = s.find((h) => h.displayName == M.menuGroup);
4033
4039
  $ == null && ($ = {
4034
- displayName: N.menuGroup,
4035
- icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (_ == null ? void 0 : _.icon),
4040
+ displayName: M.menuGroup,
4041
+ icon: (P == null ? void 0 : P.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
4036
4042
  isGroup: !0,
4037
4043
  items: []
4038
4044
  }, s.push($)), (d = $.items) == null || d.push({
4039
- displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(_ ?? void 0),
4040
- icon: (N == null ? void 0 : N.icon) ?? t.findIcon(_ ?? void 0),
4041
- permissions: (N == null ? void 0 : N.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
4042
- requiresAuth: (N == null ? void 0 : N.requiresAuth) !== !1,
4043
- subscriptions: (N == null ? void 0 : N.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
4044
- subFilters: (N == null ? void 0 : N.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4045
- routeName: x.name
4045
+ displayName: (M == null ? void 0 : M.displayName) ?? t.findDisplay(_ ?? void 0),
4046
+ icon: (M == null ? void 0 : M.icon) ?? t.findIcon(_ ?? void 0),
4047
+ permissions: (M == null ? void 0 : M.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
4048
+ requiresAuth: (M == null ? void 0 : M.requiresAuth) !== !1,
4049
+ subscriptions: (M == null ? void 0 : M.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
4050
+ subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4051
+ routeName: D.name
4046
4052
  });
4047
- }), s.forEach((x) => {
4053
+ }), s.forEach((D) => {
4048
4054
  var P;
4049
- x.items = (P = x.items) == null ? void 0 : P.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Ue.firstBy((_) => _.displayName));
4050
- }), Ge.currentGroup.value != null ? ((g = s.find((x) => x.displayName == Ge.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((x) => !x.requiresAuth || l.doShow(x.subscriptions, x.permissions, "view"));
4055
+ D.items = (P = D.items) == null ? void 0 : P.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4056
+ }), We.currentGroup.value != null ? ((g = s.find((D) => D.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((D) => !D.requiresAuth || l.doShow(D.subscriptions, D.permissions, "view"));
4051
4057
  })
4052
4058
  };
4053
4059
  }
@@ -4067,40 +4073,40 @@ function kn(e) {
4067
4073
  }, Pr;
4068
4074
  }
4069
4075
  let Zr, Jr, jr, Kr = !1;
4070
- const wr = z(!1), br = z(!1), Qr = z(), pe = z();
4071
- let Nr;
4076
+ const wr = z(!1), br = z(!1), Qr = z(), er = z();
4077
+ let Mr;
4072
4078
  function _a() {
4073
- return Nr;
4079
+ return Mr;
4074
4080
  }
4075
4081
  function Gn() {
4076
- function e(x) {
4077
- pe.value = x.detail, br.value = !0;
4082
+ function e(D) {
4083
+ er.value = D.detail, br.value = !0;
4078
4084
  }
4079
4085
  function t() {
4080
4086
  Kr || (Kr = !0, window.location.reload());
4081
4087
  }
4082
4088
  function l() {
4083
- var x;
4084
- (x = Qr.value) == null || x.prompt(), wr.value = !1;
4089
+ var D;
4090
+ (D = Qr.value) == null || D.prompt(), wr.value = !1;
4085
4091
  }
4086
4092
  function S() {
4087
4093
  return !!window.matchMedia("(display-mode: standalone)").matches;
4088
4094
  }
4089
- function s(x) {
4090
- x.preventDefault(), wr.value = !0, Qr.value = x;
4095
+ function s(D) {
4096
+ D.preventDefault(), wr.value = !0, Qr.value = D;
4091
4097
  }
4092
4098
  function g() {
4093
- br.value = !1, !(!pe.value || !pe.value.waiting) && pe.value.waiting.postMessage({ type: "SKIP_WAITING" });
4099
+ br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
4094
4100
  }
4095
4101
  return Xt(() => {
4096
4102
  Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
4097
- }), Nr = {
4103
+ }), Mr = {
4098
4104
  canInstallApp: wr,
4099
4105
  canUpdateApp: br,
4100
4106
  installApp: l,
4101
4107
  isInstalled: S,
4102
4108
  updateApp: g
4103
- }, Nr;
4109
+ }, Mr;
4104
4110
  }
4105
4111
  function Ca(e) {
4106
4112
  const t = [];
@@ -4111,21 +4117,21 @@ function Pa(e) {
4111
4117
  install(t, l) {
4112
4118
  var _;
4113
4119
  console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
4114
- const S = Ln(), s = $n(e);
4120
+ const S = Nn(), s = $n(e);
4115
4121
  kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
4116
4122
  const g = Dn(e.auth);
4117
4123
  Fn(e.menu);
4118
- const x = En({
4124
+ const D = En({
4119
4125
  auth: g,
4120
4126
  findPath: s.findPath,
4121
4127
  useBearerToken: !0
4122
- }), P = Mn({
4128
+ }), P = Ln({
4123
4129
  getTimeZone: () => g.timeZone.value
4124
4130
  });
4125
4131
  Un({
4126
4132
  dates: P
4127
4133
  }), Gn(), wn({
4128
- api: x,
4134
+ api: D,
4129
4135
  auth: g,
4130
4136
  navigation: s
4131
4137
  });
@@ -4135,19 +4141,19 @@ function Pa(e) {
4135
4141
  export {
4136
4142
  sa as DataURIToBlob,
4137
4143
  aa as addWeekday,
4138
- Be as appendUrl,
4144
+ Ue as appendUrl,
4139
4145
  nn as capitalizeWords,
4140
4146
  On as checkImage,
4141
4147
  fn as containsSearch,
4142
4148
  na as containsWeekday,
4143
- Lr as copyDeep,
4149
+ Nr as copyDeep,
4144
4150
  cn as copyItemByAlphabet,
4145
4151
  En as createApi,
4146
4152
  Dn as createAuth,
4147
4153
  Pa as createCore,
4148
4154
  Pn as createCosmetics,
4149
- Mn as createDates,
4150
- Ln as createDemo,
4155
+ Ln as createDates,
4156
+ Nn as createDemo,
4151
4157
  Un as createFilters,
4152
4158
  Fn as createMenu,
4153
4159
  $n as createNavigation,
@@ -4191,7 +4197,7 @@ export {
4191
4197
  In as useAuth,
4192
4198
  Wr as useAuthUrl,
4193
4199
  Cn as useBlade,
4194
- Nn as useCSV,
4200
+ Mn as useCSV,
4195
4201
  ga as useCosmetics,
4196
4202
  gn as useDataUrl,
4197
4203
  ba as useDates,
@@ -4217,7 +4223,7 @@ export {
4217
4223
  Bn as useTracker,
4218
4224
  ha as useUrls,
4219
4225
  hn as validEmail,
4220
- Ye as weekdayPairs,
4226
+ Ze as weekdayPairs,
4221
4227
  ta as weekdayShortName,
4222
4228
  ra as weekdayValue
4223
4229
  };