bt-core-app 1.4.94 → 1.4.96

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.
Files changed (2) hide show
  1. package/dist/bt-core-app.js +316 -315
  2. package/package.json +1 -1
@@ -12,7 +12,7 @@ function pt(e) {
12
12
  }
13
13
  function en(e) {
14
14
  const t = z([]), l = Ne(), S = Ne(), s = Ne(), g = ee(() => l.value != null);
15
- function D(d) {
15
+ function x(d) {
16
16
  t.value = t.value.filter((h) => h.id != d);
17
17
  }
18
18
  function P(d) {
@@ -35,16 +35,16 @@ function en(e) {
35
35
  let y = null;
36
36
  try {
37
37
  return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (s.value = u.completionMsg), y;
38
- } catch (I) {
38
+ } catch (D) {
39
39
  if ((e == null ? void 0 : e.onError) != null)
40
- e.onError(I);
40
+ e.onError(D);
41
41
  else {
42
42
  if (u.throwError == !0)
43
- return I;
44
- _(u.errorMsg ?? I ?? "error");
43
+ return D;
44
+ _(u.errorMsg ?? D ?? "error");
45
45
  }
46
46
  } finally {
47
- D(r);
47
+ x(r);
48
48
  }
49
49
  }
50
50
  return Or(t, (d) => {
@@ -72,9 +72,9 @@ var Re = function() {
72
72
  }
73
73
  function l(s, g) {
74
74
  if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
75
- var D = s;
75
+ var x = s;
76
76
  s = function(d) {
77
- return d[D] ? d[D] : "";
77
+ return d[x] ? d[x] : "";
78
78
  };
79
79
  }
80
80
  if (s.length === 1) {
@@ -91,8 +91,8 @@ var Re = function() {
91
91
  } : s;
92
92
  }
93
93
  function S(s, g) {
94
- var D = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = D ? function(M, $) {
95
- return D(M, $) || P(M, $);
94
+ var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = x ? function(M, $) {
95
+ return x(M, $) || P(M, $);
96
96
  } : P;
97
97
  return _.thenBy = S, _;
98
98
  }
@@ -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 D = g.getContext("2d");
174
- D == null || D.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
173
+ var x = g.getContext("2d");
174
+ x == null || x.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);
@@ -214,21 +214,21 @@ function ta(e) {
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 = 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));
217
+ const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((x) => x == S));
218
+ return s != null && l.some((g) => g == s.short || s.values.some((x) => x == 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) => 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();
225
+ let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((x) => x == 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) => 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();
231
+ let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((x) => x.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) {
@@ -369,7 +369,7 @@ var nt = { exports: {} };
369
369
  e.exports = l();
370
370
  })(function() {
371
371
  return function l(S, s, g) {
372
- function D(M, $) {
372
+ function x(M, $) {
373
373
  if (!s[M]) {
374
374
  if (!S[M]) {
375
375
  var d = typeof Oe == "function" && Oe;
@@ -383,19 +383,19 @@ var nt = { exports: {} };
383
383
  var u = s[M] = { exports: {} };
384
384
  S[M][0].call(u.exports, function(r) {
385
385
  var y = S[M][1][r];
386
- return D(y || r);
386
+ return x(y || r);
387
387
  }, u, u.exports, l, S, s, g);
388
388
  }
389
389
  return s[M].exports;
390
390
  }
391
391
  for (var P = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
392
- D(g[_]);
393
- return D;
392
+ x(g[_]);
393
+ return x;
394
394
  }({ 1: [function(l, S, s) {
395
395
  (function(g) {
396
- var D = g.MutationObserver || g.WebKitMutationObserver, P;
397
- if (D) {
398
- var _ = 0, M = new D(r), $ = g.document.createTextNode("");
396
+ var x = g.MutationObserver || g.WebKitMutationObserver, P;
397
+ if (x) {
398
+ var _ = 0, M = new x(r), $ = g.document.createTextNode("");
399
399
  M.observe($, {
400
400
  characterData: !0
401
401
  }), P = function() {
@@ -408,54 +408,54 @@ var nt = { exports: {} };
408
408
  };
409
409
  } else
410
410
  "document" in g && "onreadystatechange" in g.document.createElement("script") ? P = function() {
411
- var I = g.document.createElement("script");
412
- I.onreadystatechange = function() {
413
- r(), I.onreadystatechange = null, I.parentNode.removeChild(I), I = null;
414
- }, g.document.documentElement.appendChild(I);
411
+ var D = g.document.createElement("script");
412
+ D.onreadystatechange = function() {
413
+ r(), D.onreadystatechange = null, D.parentNode.removeChild(D), D = null;
414
+ }, g.document.documentElement.appendChild(D);
415
415
  } : P = function() {
416
416
  setTimeout(r, 0);
417
417
  };
418
418
  var h, u = [];
419
419
  function r() {
420
420
  h = !0;
421
- for (var I, i, E = u.length; E; ) {
422
- for (i = u, u = [], I = -1; ++I < E; )
423
- i[I]();
421
+ for (var D, i, E = u.length; E; ) {
422
+ for (i = u, u = [], D = -1; ++D < E; )
423
+ i[D]();
424
424
  E = u.length;
425
425
  }
426
426
  h = !1;
427
427
  }
428
428
  S.exports = y;
429
- function y(I) {
430
- u.push(I) === 1 && !h && P();
429
+ function y(D) {
430
+ u.push(D) === 1 && !h && P();
431
431
  }
432
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 D() {
435
+ function x() {
436
436
  }
437
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 !== D && y(this, b);
442
+ this.state = $, this.queue = [], this.outcome = void 0, b !== x && 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
447
  if (typeof b != "function" && this.state === M || typeof T != "function" && this.state === _)
448
448
  return this;
449
- var x = new this.constructor(D);
449
+ var I = new this.constructor(x);
450
450
  if (this.state !== $) {
451
451
  var N = this.state === M ? b : T;
452
- u(x, N, this.outcome);
452
+ u(I, N, this.outcome);
453
453
  } else
454
- this.queue.push(new h(x, b, T));
455
- return x;
454
+ this.queue.push(new h(I, b, T));
455
+ return I;
456
456
  };
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);
457
+ function h(b, T, I) {
458
+ this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
459
459
  }
460
460
  h.prototype.callFulfilled = function(b) {
461
461
  P.resolve(this.promise, b);
@@ -466,11 +466,11 @@ 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, x) {
469
+ function u(b, T, I) {
470
470
  g(function() {
471
471
  var N;
472
472
  try {
473
- N = T(x);
473
+ N = T(I);
474
474
  } catch (f) {
475
475
  return P.reject(b, f);
476
476
  }
@@ -478,10 +478,10 @@ var nt = { exports: {} };
478
478
  });
479
479
  }
480
480
  P.resolve = function(b, T) {
481
- var x = I(r, T);
482
- if (x.status === "error")
483
- return P.reject(b, x.value);
484
- var N = x.value;
481
+ var I = D(r, T);
482
+ if (I.status === "error")
483
+ return P.reject(b, I.value);
484
+ var N = I.value;
485
485
  if (N)
486
486
  y(b, N);
487
487
  else {
@@ -492,8 +492,8 @@ var nt = { exports: {} };
492
492
  return b;
493
493
  }, P.reject = function(b, T) {
494
494
  b.state = _, b.outcome = T;
495
- for (var x = -1, N = b.queue.length; ++x < N; )
496
- b.queue[x].callRejected(T);
495
+ for (var I = -1, N = b.queue.length; ++I < N; )
496
+ b.queue[I].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 x = !1;
507
+ var I = !1;
508
508
  function N(X) {
509
- x || (x = !0, P.reject(b, X));
509
+ I || (I = !0, P.reject(b, X));
510
510
  }
511
511
  function f(X) {
512
- x || (x = !0, P.resolve(b, X));
512
+ I || (I = !0, P.resolve(b, X));
513
513
  }
514
514
  function A() {
515
515
  T(f, N);
516
516
  }
517
- var j = I(A);
517
+ var j = D(A);
518
518
  j.status === "error" && N(j.value);
519
519
  }
520
- function I(b, T) {
521
- var x = {};
520
+ function D(b, T) {
521
+ var I = {};
522
522
  try {
523
- x.value = b(T), x.status = "success";
523
+ I.value = b(T), I.status = "success";
524
524
  } catch (N) {
525
- x.status = "error", x.value = N;
525
+ I.status = "error", I.value = N;
526
526
  }
527
- return x;
527
+ return I;
528
528
  }
529
529
  d.resolve = i;
530
530
  function i(b) {
531
- return b instanceof this ? b : P.resolve(new this(D), b);
531
+ return b instanceof this ? b : P.resolve(new this(x), b);
532
532
  }
533
533
  d.reject = E;
534
534
  function E(b) {
535
- var T = new this(D);
535
+ var T = new this(x);
536
536
  return P.reject(T, b);
537
537
  }
538
538
  d.all = w;
@@ -540,10 +540,10 @@ 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 x = b.length, N = !1;
544
- if (!x)
543
+ var I = b.length, N = !1;
544
+ if (!I)
545
545
  return this.resolve([]);
546
- for (var f = new Array(x), A = 0, j = -1, X = new this(D); ++j < x; )
546
+ for (var f = new Array(I), A = 0, j = -1, X = new this(x); ++j < I; )
547
547
  re(b[j], j);
548
548
  return X;
549
549
  function re(ue, be) {
@@ -551,7 +551,7 @@ var nt = { exports: {} };
551
551
  N || (N = !0, P.reject(X, Y));
552
552
  });
553
553
  function G(Y) {
554
- f[be] = Y, ++A === x && !N && (N = !0, P.resolve(X, f));
554
+ f[be] = Y, ++A === I && !N && (N = !0, P.resolve(X, f));
555
555
  }
556
556
  }
557
557
  }
@@ -560,10 +560,10 @@ var nt = { exports: {} };
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 x = b.length, N = !1;
564
- if (!x)
563
+ var I = b.length, N = !1;
564
+ if (!I)
565
565
  return this.resolve([]);
566
- for (var f = -1, A = new this(D); ++f < x; )
566
+ for (var f = -1, A = new this(x); ++f < I; )
567
567
  j(b[f]);
568
568
  return A;
569
569
  function j(X) {
@@ -584,7 +584,7 @@ var nt = { exports: {} };
584
584
  } : function(n) {
585
585
  return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
586
586
  };
587
- function D(n, c) {
587
+ function x(n, c) {
588
588
  if (!(n instanceof c))
589
589
  throw new TypeError("Cannot call a class as a function");
590
590
  }
@@ -650,16 +650,16 @@ 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, L = "readonly", b = "readwrite";
653
+ var D = "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 x(n) {
659
+ function I(n) {
660
660
  return new d(function(c) {
661
- var a = n.transaction(I, b), m = $([""]);
662
- a.objectStore(I).put(m, "key"), a.onabort = function(v) {
661
+ var a = n.transaction(D, b), m = $([""]);
662
+ a.objectStore(D).put(m, "key"), a.onabort = function(v) {
663
663
  v.preventDefault(), v.stopPropagation(), c(!1);
664
664
  }, a.oncomplete = function() {
665
665
  var v = navigator.userAgent.match(/Chrome\/(\d+)/), o = navigator.userAgent.match(/Edge\//);
@@ -670,7 +670,7 @@ var nt = { exports: {} };
670
670
  });
671
671
  }
672
672
  function N(n) {
673
- return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
673
+ return typeof i == "boolean" ? d.resolve(i) : I(n).then(function(c) {
674
674
  return i = c, i;
675
675
  });
676
676
  }
@@ -705,7 +705,7 @@ var nt = { exports: {} };
705
705
  c && (o.onupgradeneeded = function(C) {
706
706
  var R = o.result;
707
707
  try {
708
- R.createObjectStore(n.storeName), C.oldVersion <= 1 && R.createObjectStore(I);
708
+ R.createObjectStore(n.storeName), C.oldVersion <= 1 && R.createObjectStore(D);
709
709
  } catch (B) {
710
710
  if (B.name === "ConstraintError")
711
711
  console.warn('The database "' + n.name + '" has been upgraded from version ' + C.oldVersion + " to version " + C.newVersion + ', but the storage "' + n.storeName + '" already exists.');
@@ -1675,7 +1675,7 @@ var nt = { exports: {} };
1675
1675
  }
1676
1676
  var Wt = function() {
1677
1677
  function n(c) {
1678
- D(this, n);
1678
+ x(this, n);
1679
1679
  for (var a in Ge)
1680
1680
  if (Ge.hasOwnProperty(a)) {
1681
1681
  var m = Ge[a], v = m._driver;
@@ -1873,8 +1873,8 @@ function wn(e) {
1873
1873
  }), rr;
1874
1874
  }
1875
1875
  function bn(e) {
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);
1876
+ var l, S, s, g, x;
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 = ((x = e.navigation) == null ? void 0 : x.findStoreName(e.nav)) ?? e.nav);
1878
1878
  const t = { ...e, storeName: e.storeName ?? "" };
1879
1879
  if (console.log("creating store def"), console.log(t), e.storeName == null)
1880
1880
  throw new Error("no store name provided");
@@ -1904,18 +1904,18 @@ function An(e) {
1904
1904
  return pr(e.storeName, () => {
1905
1905
  var u;
1906
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;
1907
- function D(r) {
1907
+ function x(r) {
1908
1908
  var i, E;
1909
1909
  let y = "";
1910
- const I = r.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
+ const D = r.params ?? {};
1911
+ return D != null && (y = Object.entries(D).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"}`;
1912
1912
  }
1913
1913
  async function P(r) {
1914
1914
  r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
1915
- const y = D(r), I = r.refresh;
1916
- if (!I && l.value[y] !== void 0)
1915
+ const y = x(r), D = r.refresh;
1916
+ if (!D && l.value[y] !== void 0)
1917
1917
  return l.value[y];
1918
- if (!I && s == !0) {
1918
+ if (!D && s == !0) {
1919
1919
  const i = await ve().getItem(y);
1920
1920
  if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
1921
1921
  return l.value[y] = i, i;
@@ -1927,13 +1927,13 @@ function An(e) {
1927
1927
  i == null && (i = new Promise(async (w, L) => {
1928
1928
  var b;
1929
1929
  try {
1930
- const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), x = {
1930
+ const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), I = {
1931
1931
  meta: { storedOn: t.toString() },
1932
1932
  data: T == null ? void 0 : T.data,
1933
1933
  count: T == null ? void 0 : T.count,
1934
1934
  filters: (T == null ? void 0 : T.filters) ?? []
1935
1935
  };
1936
- s == !0 && await ve().setItem(y, x), w(x);
1936
+ s == !0 && await ve().setItem(y, I), w(I);
1937
1937
  } catch (T) {
1938
1938
  L(T);
1939
1939
  } finally {
@@ -1952,10 +1952,10 @@ function An(e) {
1952
1952
  }
1953
1953
  async function _(r) {
1954
1954
  r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
1955
- const y = D(r), I = r.refresh;
1956
- if (!I && l.value[y] !== void 0)
1955
+ const y = x(r), D = r.refresh;
1956
+ if (!D && l.value[y] !== void 0)
1957
1957
  return l.value[y];
1958
- if (!I && s == !0) {
1958
+ if (!D && s == !0) {
1959
1959
  const i = await ve().getItem(y);
1960
1960
  if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
1961
1961
  return l.value[y] = i, { data: i.data };
@@ -1968,11 +1968,11 @@ function An(e) {
1968
1968
  var b;
1969
1969
  try {
1970
1970
  let T = await ((b = e.api) == null ? void 0 : b.get(r));
1971
- const x = {
1971
+ const I = {
1972
1972
  meta: { storedOn: t.toString() },
1973
1973
  data: T == null ? void 0 : T.data
1974
1974
  };
1975
- s == !0 && await ve().setItem(y, x), w(x);
1975
+ s == !0 && await ve().setItem(y, I), w(I);
1976
1976
  } catch (T) {
1977
1977
  L(T);
1978
1978
  } finally {
@@ -1988,60 +1988,60 @@ function An(e) {
1988
1988
  async function M(r) {
1989
1989
  var i;
1990
1990
  r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
1991
- const y = D(r);
1992
- let I;
1991
+ const y = x(r);
1992
+ let D;
1993
1993
  if (e.api != null)
1994
1994
  try {
1995
1995
  let E = await e.api.patch(r);
1996
- I = E == null ? void 0 : E.data;
1996
+ D = E == null ? void 0 : E.data;
1997
1997
  } catch (E) {
1998
1998
  throw E;
1999
1999
  }
2000
2000
  else
2001
- I = r.data;
2002
- if (I != null) {
2001
+ D = r.data;
2002
+ if (D != null) {
2003
2003
  let E = {
2004
2004
  meta: { storedOn: t.toString() },
2005
- data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
2005
+ data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...D }
2006
2006
  };
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) => {
2007
+ return l.value[y] = E, s == !0 && await ve().setItem(y, E), D.id != null && D.rowVersion != null && Object.entries(l.value).forEach((L) => {
2008
2008
  const b = L[1].data;
2009
2009
  if (b != null)
2010
2010
  if (Array.isArray(b))
2011
2011
  for (let T = 0; T < b.length; T++)
2012
- b[T].id == I.id && b.splice(T, 1, E.data);
2012
+ b[T].id == D.id && b.splice(T, 1, E.data);
2013
2013
  else
2014
- b.id == I.id && (l.value[L[0]] = E);
2014
+ b.id == D.id && (l.value[L[0]] = E);
2015
2015
  }), E.data;
2016
2016
  }
2017
- return I;
2017
+ return D;
2018
2018
  }
2019
2019
  async function $(r) {
2020
2020
  r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
2021
- const y = D(r);
2022
- let I;
2021
+ const y = x(r);
2022
+ let D;
2023
2023
  if (e.api != null)
2024
2024
  try {
2025
2025
  let i = await e.api.post(r);
2026
- I = i == null ? void 0 : i.data;
2026
+ D = i == null ? void 0 : i.data;
2027
2027
  } catch (i) {
2028
2028
  throw i;
2029
2029
  }
2030
2030
  else
2031
- I = r.data;
2032
- if (I != null) {
2031
+ D = r.data;
2032
+ if (D != null) {
2033
2033
  let i = {
2034
2034
  meta: { storedOn: t.toString() },
2035
- data: I
2035
+ data: D
2036
2036
  };
2037
2037
  return s == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
2038
2038
  }
2039
- return I;
2039
+ return D;
2040
2040
  }
2041
2041
  async function d(r) {
2042
2042
  var i;
2043
2043
  r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
2044
- const y = D(r);
2044
+ const y = x(r);
2045
2045
  if (e.api != null)
2046
2046
  try {
2047
2047
  let E = await e.api.deleteItem(r);
@@ -2051,13 +2051,13 @@ function An(e) {
2051
2051
  throw E;
2052
2052
  }
2053
2053
  delete l.value[y];
2054
- const I = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
- I != null && Object.entries(l.value).forEach((w) => {
2054
+ const D = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
+ D != null && Object.entries(l.value).forEach((w) => {
2056
2056
  const L = w[1].data;
2057
2057
  if (L != null)
2058
2058
  if (Array.isArray(L))
2059
2059
  for (let b = 0; b < L.length; b++)
2060
- L[b].id == I && L.splice(b, 1);
2060
+ L[b].id == D && L.splice(b, 1);
2061
2061
  else
2062
2062
  delete l.value[w[0]];
2063
2063
  }), s == !0 && await ve().removeItem(y);
@@ -2085,80 +2085,81 @@ function An(e) {
2085
2085
  }
2086
2086
  function qr(e) {
2087
2087
  return pr(e.storeName, () => {
2088
- const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), D = z({}), P = e.storageMode == "local-cache";
2088
+ const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
2089
2089
  function _() {
2090
2090
  var i;
2091
2091
  return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
2092
2092
  }
2093
2093
  async function M() {
2094
- P == !0 && await ve().setItem(_(), {
2094
+ console.log("trying save"), P == !0 && (console.log("saving"), await ve().setItem(_(), {
2095
2095
  meta: g.value,
2096
2096
  data: t.value,
2097
2097
  count: l.value,
2098
2098
  filters: []
2099
- });
2099
+ }));
2100
2100
  }
2101
2101
  function $(i) {
2102
2102
  const E = _();
2103
- return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
2103
+ return x.value[E] || (x.value[E] = new Promise(async (w, L) => {
2104
2104
  var b, T;
2105
2105
  try {
2106
- let x = await ((T = e.api) == null ? void 0 : T.getAll({
2106
+ let I = await ((T = e.api) == null ? void 0 : T.getAll({
2107
2107
  additionalUrl: "/getAll",
2108
2108
  nav: i.nav,
2109
2109
  params: {
2110
2110
  lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
2111
2111
  }
2112
2112
  }));
2113
- x == null ? L(x) : (t.value ?? (t.value = []), x.data.forEach((N) => {
2113
+ console.log("res"), console.log(I), I == null ? L(I) : (t.value ?? (t.value = []), I.data.forEach((N) => {
2114
2114
  var A, j;
2115
2115
  const f = t.value.findIndex((X) => X.id == N.id);
2116
2116
  f >= 0 ? (A = t.value) == null || A.splice(f, 1, N) : (j = t.value) == null || j.push(N);
2117
2117
  }), l.value = t.value.length, g.value = {
2118
2118
  lastUpdate: he.utc().toString(),
2119
2119
  storedOn: S.toString()
2120
- }, await M(), w(x));
2121
- } catch (x) {
2122
- L(x);
2120
+ }, await M(), console.log("resolving"), console.log(I), w(I));
2121
+ } catch (I) {
2122
+ L(I);
2123
2123
  } finally {
2124
- delete D.value[E];
2124
+ delete x.value[E];
2125
2125
  }
2126
- })), D.value[E];
2126
+ })), x.value[E];
2127
2127
  }
2128
2128
  async function d(i) {
2129
2129
  var L, b, T;
2130
2130
  const E = _(), w = i.refresh;
2131
- if (!w && t.value != null)
2132
- return {
2131
+ if (console.log("getting all from"), console.log(E), !w && t.value != null)
2132
+ return console.log("not refresh and ditems not null"), {
2133
2133
  count: (L = t.value) == null ? void 0 : L.length,
2134
2134
  data: t.value,
2135
2135
  filters: []
2136
2136
  };
2137
2137
  if (!w && P == !0) {
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, {
2138
+ console.log("not refresh and caching locally");
2139
+ const I = await ve().getItem(E);
2140
+ if (console.log(I), I != null && parseFloat(I.meta.storedOn) > S - 7)
2141
+ return t.value = I.data, l.value = I.data.length, s.value = I.filters ?? [], g.value = I.meta, {
2141
2142
  count: (b = t.value) == null ? void 0 : b.length,
2142
2143
  data: t.value ?? [],
2143
2144
  filters: []
2144
2145
  };
2145
2146
  }
2146
2147
  if (e.api == null)
2147
- return {
2148
+ return console.log("no api"), {
2148
2149
  count: (T = t.value) == null ? void 0 : T.length,
2149
2150
  data: t.value ?? [],
2150
2151
  filters: s.value
2151
2152
  };
2152
- t.value ?? (t.value = []);
2153
+ console.log("setting dataitems"), t.value ?? (t.value = []);
2153
2154
  try {
2154
- return await $(i);
2155
- } catch (x) {
2156
- let N = x;
2155
+ return console.log("create refresh promise"), await $(i);
2156
+ } catch (I) {
2157
+ let N = I;
2157
2158
  throw new Error(N.message ?? "Problem");
2158
2159
  }
2159
2160
  }
2160
2161
  async function h(i) {
2161
- var b, T, x, N;
2162
+ var b, T, I, N;
2162
2163
  const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
2163
2164
  if (w == null)
2164
2165
  throw new Error("no id provided");
@@ -2179,7 +2180,7 @@ function qr(e) {
2179
2180
  }
2180
2181
  if (e.api == null)
2181
2182
  return {
2182
- data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
2183
+ data: (I = t.value) == null ? void 0 : I.find((f) => f.id == i.id)
2183
2184
  };
2184
2185
  t.value ?? (t.value = []);
2185
2186
  try {
@@ -2198,13 +2199,13 @@ function qr(e) {
2198
2199
  let T = await e.api.patch(i);
2199
2200
  E = { ...i.data, ...T == null ? void 0 : T.data };
2200
2201
  } catch (T) {
2201
- let x = T;
2202
- throw new Error(x.message ?? "Patch Problem");
2202
+ let I = T;
2203
+ throw new Error(I.message ?? "Patch Problem");
2203
2204
  }
2204
2205
  else
2205
2206
  E = i.data;
2206
2207
  if (E != null) {
2207
- let T = (w = t.value) == null ? void 0 : w.findIndex((x) => x.id == E.id);
2208
+ let T = (w = t.value) == null ? void 0 : w.findIndex((I) => I.id == E.id);
2208
2209
  T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
2209
2210
  }
2210
2211
  return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
@@ -2242,7 +2243,7 @@ function qr(e) {
2242
2243
  b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
2243
2244
  }
2244
2245
  }
2245
- async function I(i) {
2246
+ async function D(i) {
2246
2247
  var E;
2247
2248
  if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
2248
2249
  try {
@@ -2265,7 +2266,7 @@ function qr(e) {
2265
2266
  getAll: d,
2266
2267
  patch: u,
2267
2268
  post: r,
2268
- restore: I
2269
+ restore: D
2269
2270
  };
2270
2271
  });
2271
2272
  }
@@ -2274,7 +2275,7 @@ function Er() {
2274
2275
  return Ar;
2275
2276
  }
2276
2277
  function En(e) {
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;
2278
+ 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;
2278
2279
  function g(u) {
2279
2280
  let r = new URLSearchParams();
2280
2281
  return Object.entries(u).forEach((y) => {
@@ -2283,17 +2284,17 @@ function En(e) {
2283
2284
  y[1] != null && r.append(y[0], y[1].toString());
2284
2285
  }), r.toString();
2285
2286
  }
2286
- function D(u) {
2287
+ function x(u) {
2287
2288
  let r = Q(u.url) ?? void 0, y = Q(u.id);
2288
2289
  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 ?? "";
2289
2290
  }
2290
2291
  function P(u) {
2291
- var y, I;
2292
+ var y, D;
2292
2293
  let r = { ...u.headers };
2293
- return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(I = e == null ? void 0 : e.auth) == null ? void 0 : I.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
2294
+ return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(D = e == null ? void 0 : e.auth) == null ? void 0 : D.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
2294
2295
  }
2295
2296
  async function _(u) {
2296
- 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;
2297
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2297
2298
  let i = u.finalUrl, E = u.headers;
2298
2299
  if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2299
2300
  return console.log(`DEMO: Get from ${i}`), s.get(u);
@@ -2315,7 +2316,7 @@ function En(e) {
2315
2316
  let L = await w.text();
2316
2317
  throw new Error(L ?? w.statusText ?? "Get error");
2317
2318
  }
2318
- if (I)
2319
+ if (D)
2319
2320
  return await w.text();
2320
2321
  if (y)
2321
2322
  return await w.json();
@@ -2328,7 +2329,7 @@ function En(e) {
2328
2329
  }
2329
2330
  }
2330
2331
  async function M(u) {
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;
2332
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2332
2333
  let i = u.finalUrl, E = u.headers;
2333
2334
  if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2334
2335
  return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
@@ -2350,7 +2351,7 @@ function En(e) {
2350
2351
  let L = await w.text();
2351
2352
  throw new Error(L ?? w.statusText ?? "Get all error");
2352
2353
  }
2353
- if (I)
2354
+ if (D)
2354
2355
  return await w.text();
2355
2356
  if (y)
2356
2357
  return await w.json();
@@ -2363,7 +2364,7 @@ function En(e) {
2363
2364
  }
2364
2365
  }
2365
2366
  async function $(u) {
2366
- 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;
2367
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2367
2368
  let i = u.finalUrl, E = u.headers;
2368
2369
  if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2369
2370
  return console.log(`DEMO: Post to ${i}`), s.post(u);
@@ -2386,7 +2387,7 @@ function En(e) {
2386
2387
  let L = await w.text();
2387
2388
  throw new Error(L ?? w.statusText ?? "Post error!");
2388
2389
  }
2389
- if (I)
2390
+ if (D)
2390
2391
  return await w.text();
2391
2392
  if (y)
2392
2393
  return await w.json();
@@ -2399,7 +2400,7 @@ function En(e) {
2399
2400
  }
2400
2401
  }
2401
2402
  async function d(u) {
2402
- 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;
2403
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2403
2404
  let i = u.finalUrl, E = u.headers;
2404
2405
  if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2405
2406
  return console.log(`DEMO: Patch to ${i}`), s.patch(u);
@@ -2422,7 +2423,7 @@ function En(e) {
2422
2423
  let L = await w.text();
2423
2424
  throw new Error(L ?? w.statusText ?? "Patch error!");
2424
2425
  }
2425
- if (I)
2426
+ if (D)
2426
2427
  return await w.text();
2427
2428
  if (y)
2428
2429
  return await w.json();
@@ -2436,8 +2437,8 @@ function En(e) {
2436
2437
  }
2437
2438
  async function h(u) {
2438
2439
  const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
2439
- let y = u.finalUrl, I = u.headers;
2440
- if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)), s != null && s.isDemoing.value)
2440
+ let y = u.finalUrl, D = u.headers;
2441
+ if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (D = t(u)), s != null && s.isDemoing.value)
2441
2442
  return console.log(`DEMO: Delete ${y}`), s.deleteItem(u);
2442
2443
  console.log(`Delete ${y}`);
2443
2444
  let i;
@@ -2446,7 +2447,7 @@ function En(e) {
2446
2447
  method: "DELETE",
2447
2448
  mode: "cors",
2448
2449
  cache: "no-cache",
2449
- headers: I,
2450
+ headers: D,
2450
2451
  body: JSON.stringify(u.data)
2451
2452
  }), i.status == 401)
2452
2453
  throw {
@@ -2474,21 +2475,21 @@ function En(e) {
2474
2475
  }, Ar;
2475
2476
  }
2476
2477
  function ut(e) {
2477
- const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: D } = en(e);
2478
+ const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: x } = en(e);
2478
2479
  function P(r) {
2479
2480
  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);
2480
2481
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2481
- const I = (e == null ? void 0 : e.items) ?? [];
2482
+ const D = (e == null ? void 0 : e.items) ?? [];
2482
2483
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
2483
2484
  var w;
2484
2485
  const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
2485
2486
  if (i == null)
2486
2487
  return Promise.resolve("No id found in delete action");
2487
- const E = I.findIndex((L) => L.id == i);
2488
- return E >= 0 && I.splice(E, 1), Promise.resolve(void 0);
2488
+ const E = D.findIndex((L) => L.id == i);
2489
+ return E >= 0 && D.splice(E, 1), Promise.resolve(void 0);
2489
2490
  }), g(async () => {
2490
2491
  let 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);
2492
+ 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);
2492
2493
  }, {
2493
2494
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2494
2495
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2501,11 +2502,11 @@ function ut(e) {
2501
2502
  function _(r) {
2502
2503
  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 this item?" : void 0);
2503
2504
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2504
- const I = (e == null ? void 0 : e.items) ?? [];
2505
+ const D = (e == null ? void 0 : e.items) ?? [];
2505
2506
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
2506
2507
  var E;
2507
2508
  const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
2508
- return i == null ? Promise.resolve(void 0) : Promise.resolve(I.find((w) => w.id == i));
2509
+ return i == null ? Promise.resolve(void 0) : Promise.resolve(D.find((w) => w.id == i));
2509
2510
  }), g(async () => {
2510
2511
  let i;
2511
2512
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
@@ -2521,8 +2522,8 @@ function ut(e) {
2521
2522
  function M(r) {
2522
2523
  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);
2523
2524
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2524
- const I = (e == null ? void 0 : e.items) ?? [];
2525
- return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(I)), g(async () => {
2525
+ const D = (e == null ? void 0 : e.items) ?? [];
2526
+ return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(D)), g(async () => {
2526
2527
  let i;
2527
2528
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
2528
2529
  }, {
@@ -2538,8 +2539,8 @@ function ut(e) {
2538
2539
  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 restore this item?" : void 0);
2539
2540
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2540
2541
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
2541
- let 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;
2542
+ let D, i;
2543
+ return r.onCanRestoreAsync != null && (D = await r.onCanRestoreAsync(r.data)), D == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), x(D), i;
2543
2544
  }, {
2544
2545
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2545
2546
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2552,20 +2553,20 @@ function ut(e) {
2552
2553
  function d(r) {
2553
2554
  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 save this item?" : void 0);
2554
2555
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2555
- const I = (e == null ? void 0 : e.items) ?? [];
2556
+ const D = (e == null ? void 0 : e.items) ?? [];
2556
2557
  return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
2557
2558
  var i;
2558
2559
  return r.mode ?? (r.mode = ((i = r.data) == null ? void 0 : i.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
2559
2560
  }) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
2560
- const E = I.findIndex((w) => w.id == i.id);
2561
- return E >= 0 ? I.splice(E, 1, i) : I.push(i), Promise.resolve(i);
2561
+ const E = D.findIndex((w) => w.id == i.id);
2562
+ return E >= 0 ? D.splice(E, 1, i) : D.push(i), Promise.resolve(i);
2562
2563
  }), g(async () => {
2563
2564
  let i;
2564
2565
  if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
2565
2566
  return;
2566
2567
  if (r.onCanSaveAsync != null) {
2567
2568
  let w = await r.onCanSaveAsync(i);
2568
- if (D(w), w != null)
2569
+ if (x(w), w != null)
2569
2570
  return;
2570
2571
  }
2571
2572
  let E;
@@ -2596,7 +2597,7 @@ function ut(e) {
2596
2597
  getAllItems: M,
2597
2598
  getItem: _,
2598
2599
  isLoading: s,
2599
- logError: D,
2600
+ logError: x,
2600
2601
  restoreItem: $,
2601
2602
  saveItem: d
2602
2603
  };
@@ -2614,10 +2615,10 @@ function Dn(e) {
2614
2615
  l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
2615
2616
  }
2616
2617
  const s = Zt("auth-credentials", {});
2617
- function g(x) {
2618
- if (x == null)
2618
+ function g(I) {
2619
+ if (I == null)
2619
2620
  return !0;
2620
- var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
2621
+ var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2621
2622
  if (N == null)
2622
2623
  return !1;
2623
2624
  if (N.requiresAuth === !1)
@@ -2629,25 +2630,25 @@ function Dn(e) {
2629
2630
  return !0;
2630
2631
  if (N.permissions != null) {
2631
2632
  for (var A = 0; A < N.permissions.length; A++)
2632
- if (!D(N.permissions[A]))
2633
+ if (!x(N.permissions[A]))
2633
2634
  return !1;
2634
2635
  }
2635
2636
  return !0;
2636
2637
  }
2637
- function D(x) {
2638
+ function x(I) {
2638
2639
  const N = Q(s);
2639
2640
  if (N.userPermissions != null)
2640
2641
  for (var f = 0; f < N.userPermissions.length; f++) {
2641
2642
  var A = N.userPermissions[f].split(".");
2642
- if (N.userPermissions[f] == "everything.edit" || x == A[0] && A.length > 1 && A[1] == "edit")
2643
+ if (N.userPermissions[f] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
2643
2644
  return !0;
2644
2645
  }
2645
2646
  return !1;
2646
2647
  }
2647
- function P(x) {
2648
- if (x == null)
2648
+ function P(I) {
2649
+ if (I == null)
2649
2650
  return !0;
2650
- var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
2651
+ var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2651
2652
  if (N == null)
2652
2653
  return !1;
2653
2654
  if (N.requiresAuth === !1)
@@ -2664,24 +2665,24 @@ function Dn(e) {
2664
2665
  }
2665
2666
  return !0;
2666
2667
  }
2667
- function _(x) {
2668
+ function _(I) {
2668
2669
  const N = Q(s);
2669
2670
  if (N.userPermissions != null)
2670
2671
  for (var f = 0; f < N.userPermissions.length; f++) {
2671
2672
  var A = N.userPermissions[f].split(".");
2672
- if (x == A[0] || x == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
2673
+ if (I == A[0] || I == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
2673
2674
  return !0;
2674
2675
  }
2675
2676
  return !1;
2676
2677
  }
2677
- function M(x, N, f) {
2678
+ function M(I, N, f) {
2678
2679
  let A = !0;
2679
2680
  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);
2681
+ f == "edit" ? x(X) || (A = !1) : _(X) || (A = !1);
2682
+ }), I != null && I.length > 0 && (I.some((X) => u(X)) || (A = !1)), A);
2682
2683
  }
2683
- function $(x, N = !1) {
2684
- var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
2684
+ function $(I, N = !1) {
2685
+ var f = e.getAuthItem != null ? e.getAuthItem(I) : null;
2685
2686
  let A = !1;
2686
2687
  if (f == null)
2687
2688
  return !1;
@@ -2690,43 +2691,43 @@ function Dn(e) {
2690
2691
  $(ue, !0) && (A = !0);
2691
2692
  }), A);
2692
2693
  }
2693
- function d(x) {
2694
+ function d(I) {
2694
2695
  return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, f) => {
2695
2696
  const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
2696
2697
  return N ? `${A}&redirect_path=${N}` : A;
2697
- }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
2698
+ }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, l.value) ?? "" : "";
2698
2699
  }
2699
- function h(x) {
2700
+ function h(I) {
2700
2701
  var f;
2701
- return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == x)) == null ? void 0 : f.value) ?? 0;
2702
+ return I == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == I)) == null ? void 0 : f.value) ?? 0;
2702
2703
  }
2703
- function u(x) {
2704
+ function u(I) {
2704
2705
  const N = Q(s);
2705
2706
  if (N.subscriptionCode == null)
2706
2707
  return !1;
2707
- if (N.subscriptionCode == x)
2708
+ if (N.subscriptionCode == I)
2708
2709
  return !0;
2709
- const f = h(x), A = h(N.subscriptionCode);
2710
+ const f = h(I), A = h(N.subscriptionCode);
2710
2711
  return f <= A;
2711
2712
  }
2712
- function r(x) {
2713
- const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2713
+ function r(I) {
2714
+ const f = I.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2714
2715
  atob(f).split("").map(function(j) {
2715
2716
  return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
2716
2717
  }).join("")
2717
2718
  );
2718
2719
  return JSON.parse(A);
2719
2720
  }
2720
- function y(x, N) {
2721
- s.value = void 0, L(), x != null && N != null && N.currentRoute.value.path != x && N.push({ path: x });
2721
+ function y(I, N) {
2722
+ s.value = void 0, L(), I != null && N != null && N.currentRoute.value.path != I && N.push({ path: I });
2722
2723
  }
2723
- function I(x) {
2724
+ function D(I) {
2724
2725
  var f;
2725
- Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(x)));
2726
+ Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(I)));
2726
2727
  }
2727
- async function i(x, N) {
2728
+ async function i(I, N) {
2728
2729
  return e.getToken ?? (e.getToken = async () => {
2729
- let f = x, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2730
+ let f = I, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2730
2731
  if (f == null || A == null)
2731
2732
  throw new Error("Code and State required in OAuth token process");
2732
2733
  if (A != l.value)
@@ -2740,38 +2741,38 @@ function Dn(e) {
2740
2741
  data: ue
2741
2742
  });
2742
2743
  E(G.access_token);
2743
- }), await e.getToken(x, N);
2744
+ }), await e.getToken(I, N);
2744
2745
  }
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);
2746
+ function E(I) {
2747
+ if (I != null && (e.demo == null || !e.demo.isDemoing.value)) {
2748
+ const N = r(I);
2749
+ w(N, I), e.processTokenPayload != null && e.processTokenPayload(s, N);
2749
2750
  }
2750
2751
  }
2751
- function w(x, N) {
2752
+ function w(I, N) {
2752
2753
  var A;
2753
2754
  const f = s.value;
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(",")) ?? [];
2755
+ f.expiresOn = I.ExpiresOn, f.isGlobalAdmin = I.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = I.Permissions, f.subscriptionCode = I.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = N, f.userID = I.UserLoginID, f.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
2755
2756
  }
2756
2757
  function L() {
2757
- var x;
2758
- s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
2758
+ var I;
2759
+ s.value ?? (s.value = {}), (I = s.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? hr);
2759
2760
  }
2760
2761
  function b() {
2761
- const x = Q(s);
2762
- return x.isLoggedIn && T() && (y(), window.location.href = d()), x.isLoggedIn;
2762
+ const I = Q(s);
2763
+ return I.isLoggedIn && T() && (y(), window.location.href = d()), I.isLoggedIn;
2763
2764
  }
2764
2765
  function T() {
2765
- const x = Q(s);
2766
- if (x == null || x.expiresOn == null)
2766
+ const I = Q(s);
2767
+ if (I == null || I.expiresOn == null)
2767
2768
  return !0;
2768
- const N = he.fromFormat(x.expiresOn, t), f = he.utc();
2769
+ const N = he.fromFormat(I.expiresOn, t), f = he.utc();
2769
2770
  return N <= f;
2770
2771
  }
2771
2772
  return L(), Ir = {
2772
2773
  authState: l,
2773
2774
  canEdit: g,
2774
- canEditPermit: D,
2775
+ canEditPermit: x,
2775
2776
  canView: P,
2776
2777
  canViewPermit: _,
2777
2778
  credentials: s,
@@ -2780,7 +2781,7 @@ function Dn(e) {
2780
2781
  getAuthorizeUrl: d,
2781
2782
  getToken: i,
2782
2783
  isLoggedIn: ee(() => s.value.isLoggedIn === !0),
2783
- login: I,
2784
+ login: D,
2784
2785
  logout: y,
2785
2786
  resetAuthState: S,
2786
2787
  setAuth: E,
@@ -2793,7 +2794,7 @@ function xn(e, t, l = {}) {
2793
2794
  preventDefault: S = !1,
2794
2795
  stopPropagation: s = !1,
2795
2796
  axis: g = "both"
2796
- } = l, D = { capture: l.capture ?? !0 };
2797
+ } = l, x = { capture: l.capture ?? !0 };
2797
2798
  let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2798
2799
  function u(L) {
2799
2800
  Q(S) && L.preventDefault(), Q(s) && L.stopPropagation();
@@ -2810,17 +2811,17 @@ function xn(e, t, l = {}) {
2810
2811
  }, P = {
2811
2812
  x: T.offsetLeft,
2812
2813
  y: T.offsetTop
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));
2814
+ }, ((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", D)), d.push(me("touchend", D)), u(L));
2814
2815
  }
2815
2816
  function y(L) {
2816
2817
  var A;
2817
2818
  if (!M || !Q(e))
2818
2819
  return;
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;
2820
+ const I = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
2821
+ let N = I.clientX - M.x, f = I.clientY - M.y;
2821
2822
  (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);
2822
2823
  }
2823
- function I(L) {
2824
+ function D(L) {
2824
2825
  var b;
2825
2826
  document.documentElement.style.cursor = "", d.forEach((T) => {
2826
2827
  T();
@@ -2840,7 +2841,7 @@ function xn(e, t, l = {}) {
2840
2841
  if (!L)
2841
2842
  return;
2842
2843
  const b = L.$el;
2843
- b.style.cursor = "move", $.push(me(b, "mousedown", r, D)), $.push(me(b, "touchstart", r, D)), h.value = !0;
2844
+ b.style.cursor = "move", $.push(me(b, "mousedown", r, x)), $.push(me(b, "touchstart", r, x)), h.value = !0;
2844
2845
  }
2845
2846
  function w() {
2846
2847
  if (!Q(h))
@@ -2861,21 +2862,21 @@ function xn(e, t, l = {}) {
2861
2862
  }
2862
2863
  const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
2863
2864
  function _n(e, t = {}) {
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 = [];
2865
+ 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, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2865
2866
  const u = z(!1);
2866
2867
  let r = [], y = [];
2867
- const I = z(!1), i = z({ x: 0, y: 0 });
2868
+ const D = z(!1), i = z({ x: 0, y: 0 });
2868
2869
  let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
2869
2870
  function L(G) {
2870
2871
  Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
2871
2872
  }
2872
2873
  function b(G, Y) {
2873
- h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
2874
+ h = Y.map(I), h.forEach((H) => G.$el.appendChild(H));
2874
2875
  }
2875
2876
  function T(G) {
2876
2877
  h.forEach((Y) => G.$el.removeChild(Y));
2877
2878
  }
2878
- function x(G) {
2879
+ function I(G) {
2879
2880
  const Y = S + "px", H = -S / 2 + "px", ie = s + 1, Z = document.createElement("div");
2880
2881
  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;
2881
2882
  }
@@ -2913,11 +2914,11 @@ function _n(e, t = {}) {
2913
2914
  w.height = se;
2914
2915
  }
2915
2916
  if (d.includes("l")) {
2916
- const se = Math.min(D, Math.max(g, (ce.width ?? 0) - W));
2917
+ const se = Math.min(x, Math.max(g, (ce.width ?? 0) - W));
2917
2918
  w.width = se, w.left = (ce.left ?? 0) + W;
2918
2919
  }
2919
2920
  if (d.includes("r")) {
2920
- const se = Math.min(D, Math.max(g, (ce.width ?? 0) + W));
2921
+ const se = Math.min(x, Math.max(g, (ce.width ?? 0) + W));
2921
2922
  w.width = se;
2922
2923
  }
2923
2924
  H.dispatchEvent(new CustomEvent("resize")), L(G), re(w);
@@ -2991,27 +2992,27 @@ function _n(e, t = {}) {
2991
2992
  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);
2992
2993
  }
2993
2994
  function ue(G, Y) {
2994
- if (I.value)
2995
+ if (D.value)
2995
2996
  return;
2996
2997
  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);
2998
+ H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), D.value = !0, l = Y);
2998
2999
  }
2999
3000
  function be(G) {
3000
- if (!I.value)
3001
+ if (!D.value)
3001
3002
  return;
3002
3003
  const Y = Ee(e);
3003
3004
  Y && (T(Y), X(G), r.forEach((H) => {
3004
3005
  H();
3005
- }), r.length = 0, I.value = !1);
3006
+ }), r.length = 0, D.value = !1);
3006
3007
  }
3007
3008
  return {
3008
- resizingIsOn: I,
3009
+ resizingIsOn: D,
3009
3010
  turnResizingOn: ue,
3010
3011
  turnResizingOff: be
3011
3012
  };
3012
3013
  }
3013
3014
  function Cn(e) {
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);
3015
+ 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: M, turnDraggableOn: $ } = xn(t, l);
3015
3016
  jt(t, (h) => {
3016
3017
  const u = h[0], { width: r } = u.contentRect;
3017
3018
  S.value = r < s;
@@ -3022,7 +3023,7 @@ function Cn(e) {
3022
3023
  return d(g.value), Te(g, (h) => d(h)), {
3023
3024
  isMobile: S,
3024
3025
  variant: g,
3025
- bladeData: D
3026
+ bladeData: x
3026
3027
  };
3027
3028
  }
3028
3029
  const mr = {
@@ -3092,7 +3093,7 @@ function Pn(e) {
3092
3093
  }
3093
3094
  }));
3094
3095
  }
3095
- function D(d) {
3096
+ function x(d) {
3096
3097
  var h;
3097
3098
  if (l != null) {
3098
3099
  const u = l.themes.value.dark, r = l.themes.value.light;
@@ -3120,7 +3121,7 @@ function Pn(e) {
3120
3121
  }), Dr = {
3121
3122
  state: t,
3122
3123
  resetCosmetics: g,
3123
- setTemporaryColor: D,
3124
+ setTemporaryColor: x,
3124
3125
  toggleDrawer: P,
3125
3126
  toggleDrawerStick: _,
3126
3127
  toggleLightDark: M,
@@ -3140,18 +3141,18 @@ function Mn() {
3140
3141
  } = t;
3141
3142
  if (!_e(l))
3142
3143
  return;
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) => ({
3145
- header: I.title ?? I.value ?? "",
3146
- itemText: I.itemText,
3147
- value: I.value
3148
- })) : D = Object.keys(l[0]).map((I) => ({ header: tn(I) ?? "", value: I })), D = D.filter((I) => I.header.length > 0);
3144
+ let x = [];
3145
+ S != null ? x = S == null ? void 0 : S.filter((D) => (D.csv ?? D.csvText ?? D.csvFilter ?? D.csvArray) != null).map((D) => ({
3146
+ header: D.title ?? D.value ?? "",
3147
+ itemText: D.itemText,
3148
+ value: D.value
3149
+ })) : x = Object.keys(l[0]).map((D) => ({ header: tn(D) ?? "", value: D })), x = x.filter((D) => D.header.length > 0);
3149
3150
  var P = [];
3150
- for (let I = 0; I < l.length; I++) {
3151
- const i = l[I];
3151
+ for (let D = 0; D < l.length; D++) {
3152
+ const i = l[D];
3152
3153
  var _ = {}, M = [];
3153
- for (let E = 0; E < D.length; E++) {
3154
- const w = D[E];
3154
+ for (let E = 0; E < x.length; E++) {
3155
+ const w = x[E];
3155
3156
  var $ = null;
3156
3157
  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] = $;
3157
3158
  }
@@ -3160,10 +3161,10 @@ function Mn() {
3160
3161
  }), M = [];
3161
3162
  }
3162
3163
  var d = [];
3163
- if (d.push(D.map((I) => I.header).toString()), P.forEach((I) => {
3164
+ if (d.push(x.map((D) => D.header).toString()), P.forEach((D) => {
3164
3165
  let i = [];
3165
- D.forEach(function(E) {
3166
- var w = I[E.header];
3166
+ x.forEach(function(E) {
3167
+ var w = D[E.header];
3167
3168
  i.push(w ?? "");
3168
3169
  }), d.push(i.join(","));
3169
3170
  }), g == "array")
@@ -3208,7 +3209,7 @@ function Ln(e) {
3208
3209
  const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3209
3210
  return M ? d.toFormat(M) : d == null ? void 0 : d.toString();
3210
3211
  }
3211
- function D(_, M) {
3212
+ function x(_, M) {
3212
3213
  return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
3213
3214
  }
3214
3215
  function P(_, M, $) {
@@ -3224,7 +3225,7 @@ function Ln(e) {
3224
3225
  getTomorrow: S,
3225
3226
  tzDate: s,
3226
3227
  tzString: g,
3227
- utcDate: D,
3228
+ utcDate: x,
3228
3229
  utcString: P
3229
3230
  }, xr;
3230
3231
  }
@@ -3248,13 +3249,13 @@ function Nn(e) {
3248
3249
  }
3249
3250
  return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
3250
3251
  }
3251
- function D(d) {
3252
+ function x(d) {
3252
3253
  var r;
3253
3254
  if (l == null)
3254
3255
  return Promise.resolve("no demo data available for this api");
3255
3256
  const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
3256
3257
  if (h != null && (u == null ? void 0 : u.data) != null) {
3257
- const y = u.data.findIndex((I) => I.id == h);
3258
+ const y = u.data.findIndex((D) => D.id == h);
3258
3259
  y >= 0 && u.data.splice(y, 1);
3259
3260
  }
3260
3261
  return new Promise(function(y) {
@@ -3264,12 +3265,12 @@ function Nn(e) {
3264
3265
  });
3265
3266
  }
3266
3267
  function P(d) {
3267
- var y, I, i;
3268
+ var y, D, i;
3268
3269
  if (l == null)
3269
3270
  throw new Error("no demo data available for this api");
3270
3271
  const h = d.id ?? ((y = d.data) == null ? void 0 : y.id), u = g(d);
3271
3272
  let r;
3272
- return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (I = u.data) == null ? void 0 : I.find((E) => E.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((E) => {
3273
+ return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (D = u.data) == null ? void 0 : D.find((E) => E.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((E) => {
3273
3274
  setTimeout(() => {
3274
3275
  E({
3275
3276
  data: r
@@ -3298,9 +3299,9 @@ function Nn(e) {
3298
3299
  throw new Error("no demo data available for this api");
3299
3300
  const h = g(d);
3300
3301
  let u;
3301
- return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (y = h.data) == null || y.push(u))), u == null ? Promise.resolve(void 0) : new Promise((I) => {
3302
+ return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (y = h.data) == null || y.push(u))), u == null ? Promise.resolve(void 0) : new Promise((D) => {
3302
3303
  setTimeout(() => {
3303
- I({
3304
+ D({
3304
3305
  data: u
3305
3306
  });
3306
3307
  });
@@ -3316,13 +3317,13 @@ function Nn(e) {
3316
3317
  if (h.data ?? (h.data = []), h.patchAction != null)
3317
3318
  u = h.patchAction(h.data, d.data);
3318
3319
  else if (d.data.id != null) {
3319
- const I = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3320
- I != null && I > -1 && ((y = h.data) == null || y.splice(I, 1, d.data)), u = d.data;
3320
+ const D = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3321
+ D != null && D > -1 && ((y = h.data) == null || y.splice(D, 1, d.data)), u = d.data;
3321
3322
  }
3322
3323
  }
3323
- return u == null ? Promise.resolve(void 0) : new Promise((I) => {
3324
+ return u == null ? Promise.resolve(void 0) : new Promise((D) => {
3324
3325
  setTimeout(() => {
3325
- I({
3326
+ D({
3326
3327
  data: u
3327
3328
  });
3328
3329
  });
@@ -3333,7 +3334,7 @@ function Nn(e) {
3333
3334
  isDemoing: t,
3334
3335
  startDemo: S,
3335
3336
  data: l,
3336
- deleteItem: D,
3337
+ deleteItem: x,
3337
3338
  get: P,
3338
3339
  getAll: _,
3339
3340
  post: M,
@@ -3349,8 +3350,8 @@ function Aa(e) {
3349
3350
  document.title = S.meta.title;
3350
3351
  else {
3351
3352
  const g = Rn.VITE_NODE_ENV;
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;
3353
+ let x = "";
3354
+ 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;
3354
3355
  }
3355
3356
  }
3356
3357
  return {
@@ -3389,7 +3390,7 @@ function Un(e) {
3389
3390
  function g(f, A) {
3390
3391
  return t(f, "d LLL", A);
3391
3392
  }
3392
- function D(f, A) {
3393
+ function x(f, A) {
3393
3394
  return t(f, "ccc", A);
3394
3395
  }
3395
3396
  function P(f, A) {
@@ -3427,7 +3428,7 @@ function Un(e) {
3427
3428
  function y(f, A) {
3428
3429
  return t(f, "ddd DD MMM YYYY", A);
3429
3430
  }
3430
- function I(f, A) {
3431
+ function D(f, A) {
3431
3432
  return t(f, "ccc dd LLL yyyy hh:mm a", A);
3432
3433
  }
3433
3434
  function i(f) {
@@ -3452,12 +3453,12 @@ function Un(e) {
3452
3453
  function T(f) {
3453
3454
  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";
3454
3455
  }
3455
- const x = {
3456
+ const I = {
3456
3457
  toCompanyNameAndLocationLine: l,
3457
3458
  toCurrency: S,
3458
3459
  toDayDate: s,
3459
3460
  toDayMonth: g,
3460
- toDayOfWeek: D,
3461
+ toDayOfWeek: x,
3461
3462
  toDayShortDate: P,
3462
3463
  toDayShortDateAndTime: _,
3463
3464
  toDisplayNumber: M,
@@ -3467,7 +3468,7 @@ function Un(e) {
3467
3468
  toLocationLine: u,
3468
3469
  toLocationLineNoCommas: r,
3469
3470
  toLongDate: y,
3470
- toLongDateAndTime: I,
3471
+ toLongDateAndTime: D,
3471
3472
  toPercent: i,
3472
3473
  toPrettyCSV: E,
3473
3474
  toShortDate: w,
@@ -3478,14 +3479,14 @@ function Un(e) {
3478
3479
  function N(f) {
3479
3480
  if (f != null) {
3480
3481
  let A = f;
3481
- if (A != null && x[A] != null)
3482
- return x[A];
3482
+ if (A != null && I[A] != null)
3483
+ return I[A];
3483
3484
  }
3484
3485
  return (A) => A;
3485
3486
  }
3486
3487
  return _r = {
3487
3488
  findFilter: N,
3488
- ...x
3489
+ ...I
3489
3490
  }, _r;
3490
3491
  }
3491
3492
  function Bn(e, t) {
@@ -3502,13 +3503,13 @@ function Bn(e, t) {
3502
3503
  t.propsToTrack.some((d) => d == $) || delete _[$];
3503
3504
  })), JSON.stringify(_);
3504
3505
  }
3505
- function D() {
3506
+ function x() {
3506
3507
  s = g(Q(S)), l.value = !1;
3507
3508
  }
3508
3509
  return {
3509
3510
  asyncItem: S,
3510
3511
  isChanged: l,
3511
- restartTracker: D
3512
+ restartTracker: x
3512
3513
  };
3513
3514
  }
3514
3515
  function Ia(e, t) {
@@ -3516,10 +3517,10 @@ function Ia(e, t) {
3516
3517
  const {
3517
3518
  // useBladeSrc = true,
3518
3519
  useRouteSrc: l = !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
+ } = 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 = Lr(), P = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
3520
3521
  var W;
3521
3522
  return Q(e.proxyID) ?? (_ != null ? (W = P == null ? void 0 : P.query) == null ? void 0 : W[_] : void 0);
3522
- }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
3523
+ }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: D, saveItem: i } = ut({
3523
3524
  nav: g,
3524
3525
  onError: e.onError ?? (t == null ? void 0 : t.onError),
3525
3526
  proxyID: M.value,
@@ -3528,7 +3529,7 @@ function Ia(e, t) {
3528
3529
  storageMode: s,
3529
3530
  nav: g
3530
3531
  })
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
+ }), 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"), I = Ne(!1), N = ee(() => {
3532
3533
  let W = e.params != null ? { ...e.params } : {};
3533
3534
  return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
3534
3535
  }), f = ee(() => {
@@ -3558,7 +3559,7 @@ function Ia(e, t) {
3558
3559
  const {
3559
3560
  additionalUrl: ne,
3560
3561
  onDeleteAsync: ce,
3561
- onDeleteSuccessAsync: se = () => (D.back(), Promise.resolve(void 0)),
3562
+ onDeleteSuccessAsync: se = () => (x.back(), Promise.resolve(void 0)),
3562
3563
  proxyID: ge
3563
3564
  } = { ...e };
3564
3565
  u({
@@ -3580,7 +3581,7 @@ function Ia(e, t) {
3580
3581
  onRestoreSuccessAsync: se,
3581
3582
  proxyID: ge
3582
3583
  } = { ...e };
3583
- I({
3584
+ D({
3584
3585
  additionalUrl: ne,
3585
3586
  data: W,
3586
3587
  nav: g,
@@ -3592,7 +3593,7 @@ function Ia(e, t) {
3592
3593
  });
3593
3594
  }
3594
3595
  async function Y(W) {
3595
- if (x.value = !1, e.item != null)
3596
+ if (I.value = !1, e.item != null)
3596
3597
  $.value = e.item;
3597
3598
  else {
3598
3599
  const ne = {
@@ -3622,7 +3623,7 @@ function Ia(e, t) {
3622
3623
  onCanSaveAsync: se,
3623
3624
  onGetSaveAsync: ge,
3624
3625
  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))
3626
+ onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? x.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
3626
3627
  } = { ...e };
3627
3628
  i({
3628
3629
  additionalUrl: ce,
@@ -3643,7 +3644,7 @@ function Ia(e, t) {
3643
3644
  !W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
3644
3645
  }
3645
3646
  return Te(E, (W) => {
3646
- x.value = W != null;
3647
+ I.value = W != null;
3647
3648
  }), Te(() => e.refreshToggle, () => {
3648
3649
  Y({ deepRefresh: !0 });
3649
3650
  }), Xr(async () => {
@@ -3666,7 +3667,7 @@ function Ia(e, t) {
3666
3667
  refresh: Y,
3667
3668
  restoreItem: G,
3668
3669
  saveItem: H,
3669
- showError: x,
3670
+ showError: I,
3670
3671
  toggleMode: ie
3671
3672
  };
3672
3673
  }
@@ -3699,14 +3700,14 @@ function $n(e) {
3699
3700
  var u;
3700
3701
  return (u = P(h)) == null ? void 0 : u.displayName;
3701
3702
  }
3702
- function D(h) {
3703
+ function x(h) {
3703
3704
  var u;
3704
3705
  return (u = P(h)) == null ? void 0 : u.icon;
3705
3706
  }
3706
3707
  function P(h) {
3707
3708
  return h == null ? null : typeof h != "string" ? h : tt(l, (r) => r.children).find((r) => {
3708
3709
  var y;
3709
- return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((I) => I == h));
3710
+ return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((D) => D == h));
3710
3711
  }) ?? null;
3711
3712
  }
3712
3713
  function _(h) {
@@ -3745,7 +3746,7 @@ function $n(e) {
3745
3746
  findArchiveName: S,
3746
3747
  findCacheHours: s,
3747
3748
  findDisplay: g,
3748
- findIcon: D,
3749
+ findIcon: x,
3749
3750
  findItem: P,
3750
3751
  findStoreName: $,
3751
3752
  findPath: _,
@@ -3755,13 +3756,13 @@ function $n(e) {
3755
3756
  }
3756
3757
  function Da(e, t, l) {
3757
3758
  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([
3759
+ const S = Mn(), s = it(), g = Lr(), x = 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([
3759
3760
  ...u.filter((U) => U.name != null).map((U) => U.name),
3760
3761
  ...e.defaultFilters ?? [],
3761
3762
  ...r.value
3762
- ]).value), I = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3763
- let i = z([...I.value]);
3764
- const E = ee(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(L());
3763
+ ]).value), D = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3764
+ let i = z([...D.value]);
3765
+ const E = ee(() => Gr(i, D).value.length > 0 || Gr(D, i).value.length > 0), w = z(L());
3765
3766
  function L() {
3766
3767
  var U, K;
3767
3768
  if (_) {
@@ -3770,7 +3771,7 @@ function Da(e, t, l) {
3770
3771
  return Number.parseInt(V);
3771
3772
  }
3772
3773
  if (M) {
3773
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.page;
3774
+ const V = (K = x == null ? void 0 : x.query) == null ? void 0 : K.page;
3774
3775
  if (V != null)
3775
3776
  return Number.parseInt(typeof V == "string" ? V : V.toString());
3776
3777
  }
@@ -3784,13 +3785,13 @@ function Da(e, t, l) {
3784
3785
  return V;
3785
3786
  }
3786
3787
  if (M) {
3787
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.query;
3788
+ const V = (K = x == null ? void 0 : x.query) == null ? void 0 : K.query;
3788
3789
  if (V != null)
3789
3790
  return V;
3790
3791
  }
3791
3792
  return e.proxyID;
3792
- }), T = z(x());
3793
- function x() {
3793
+ }), T = z(I());
3794
+ function I() {
3794
3795
  var U, K;
3795
3796
  if (_) {
3796
3797
  const V = (U = P.value) == null ? void 0 : U.search;
@@ -3798,7 +3799,7 @@ function Da(e, t, l) {
3798
3799
  return V;
3799
3800
  }
3800
3801
  if (M) {
3801
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.search;
3802
+ const V = (K = x == null ? void 0 : x.query) == null ? void 0 : K.search;
3802
3803
  if (V != null)
3803
3804
  return V;
3804
3805
  }
@@ -3819,7 +3820,7 @@ function Da(e, t, l) {
3819
3820
  })
3820
3821
  }), 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
3822
  let U, K = [];
3822
- I.value.forEach((O) => {
3823
+ D.value.forEach((O) => {
3823
3824
  const de = y.value[O], ye = u.find((De) => De.name == de);
3824
3825
  ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
3825
3826
  });
@@ -3944,7 +3945,7 @@ function Da(e, t, l) {
3944
3945
  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;
3945
3946
  }
3946
3947
  });
3947
- A.value = V, i.value = [...I.value];
3948
+ A.value = V, i.value = [...D.value];
3948
3949
  }
3949
3950
  Pe();
3950
3951
  }
@@ -3981,7 +3982,7 @@ function Da(e, t, l) {
3981
3982
  Pe();
3982
3983
  }), Xr(async () => {
3983
3984
  var U;
3984
- e.eager == !0 && await Ie({ deepRefresh: ((U = D == null ? void 0 : D.params) == null ? void 0 : U.refresh) == "true" });
3985
+ e.eager == !0 && await Ie({ deepRefresh: ((U = x == null ? void 0 : x.params) == null ? void 0 : U.refresh) == "true" });
3985
3986
  }), {
3986
3987
  add: Se,
3987
3988
  asyncItems: A,
@@ -4001,7 +4002,7 @@ function Da(e, t, l) {
4001
4002
  refresh: Ie,
4002
4003
  restoreItem: Je,
4003
4004
  searchString: T,
4004
- selectedFilters: I,
4005
+ selectedFilters: D,
4005
4006
  selectItem: je,
4006
4007
  // serverFilters,
4007
4008
  showError: se,
@@ -4030,11 +4031,11 @@ function xa() {
4030
4031
  ...We,
4031
4032
  sidebarNavItems: ee(() => {
4032
4033
  var g;
4033
- S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
4034
+ S = S.filter((x) => x.meta != null && x.meta.menuGroup != null);
4034
4035
  const s = [];
4035
- return S.forEach((D) => {
4036
+ return S.forEach((x) => {
4036
4037
  var d;
4037
- const P = We.groupOptions.value.find((h) => h.displayName == D.meta.menuGroup), _ = t.findItem(D.meta.nav), M = D.meta;
4038
+ const P = We.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup), _ = t.findItem(x.meta.nav), M = x.meta;
4038
4039
  let $ = s.find((h) => h.displayName == M.menuGroup);
4039
4040
  $ == null && ($ = {
4040
4041
  displayName: M.menuGroup,
@@ -4048,12 +4049,12 @@ function xa() {
4048
4049
  requiresAuth: (M == null ? void 0 : M.requiresAuth) !== !1,
4049
4050
  subscriptions: (M == null ? void 0 : M.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
4050
4051
  subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4051
- routeName: D.name
4052
+ routeName: x.name
4052
4053
  });
4053
- }), s.forEach((D) => {
4054
+ }), s.forEach((x) => {
4054
4055
  var P;
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"));
4056
+ x.items = (P = x.items) == null ? void 0 : P.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4057
+ }), We.currentGroup.value != null ? ((g = s.find((x) => x.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((x) => !x.requiresAuth || l.doShow(x.subscriptions, x.permissions, "view"));
4057
4058
  })
4058
4059
  };
4059
4060
  }
@@ -4079,21 +4080,21 @@ function _a() {
4079
4080
  return Mr;
4080
4081
  }
4081
4082
  function Gn() {
4082
- function e(D) {
4083
- er.value = D.detail, br.value = !0;
4083
+ function e(x) {
4084
+ er.value = x.detail, br.value = !0;
4084
4085
  }
4085
4086
  function t() {
4086
4087
  Kr || (Kr = !0, window.location.reload());
4087
4088
  }
4088
4089
  function l() {
4089
- var D;
4090
- (D = Qr.value) == null || D.prompt(), wr.value = !1;
4090
+ var x;
4091
+ (x = Qr.value) == null || x.prompt(), wr.value = !1;
4091
4092
  }
4092
4093
  function S() {
4093
4094
  return !!window.matchMedia("(display-mode: standalone)").matches;
4094
4095
  }
4095
- function s(D) {
4096
- D.preventDefault(), wr.value = !0, Qr.value = D;
4096
+ function s(x) {
4097
+ x.preventDefault(), wr.value = !0, Qr.value = x;
4097
4098
  }
4098
4099
  function g() {
4099
4100
  br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
@@ -4121,7 +4122,7 @@ function Pa(e) {
4121
4122
  kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
4122
4123
  const g = Dn(e.auth);
4123
4124
  Fn(e.menu);
4124
- const D = En({
4125
+ const x = En({
4125
4126
  auth: g,
4126
4127
  findPath: s.findPath,
4127
4128
  useBearerToken: !0
@@ -4131,7 +4132,7 @@ function Pa(e) {
4131
4132
  Un({
4132
4133
  dates: P
4133
4134
  }), Gn(), wn({
4134
- api: D,
4135
+ api: x,
4135
4136
  auth: g,
4136
4137
  navigation: s
4137
4138
  });